func (o *organization) Update(guid string, req OrgUpdateRequest, opts ...bool) (*OrganizationFields, error) {
	async := true
	if len(opts) > 0 {
		async = opts[0]
	}
	orgFields := OrganizationFields{}
	rawURL := fmt.Sprintf("/v2/organizations/%s?async=%t", guid, async)
	_, err := o.client.Put(rawURL, req, &orgFields)
	return &orgFields, err
}
opts is list of boolean parametes
opts[0] - async - Will run the update request in a background job. Recommended: 'true'. Default to 'true'.
package mccpv2
import (
	"fmt"
	"strings"
	"github.com/IBM-Cloud/bluemix-go/bmxerror"
	"github.com/IBM-Cloud/bluemix-go/client"
	"github.com/IBM-Cloud/bluemix-go/rest"
)
var ErrCodeOrgDoesnotExist = "OrgDoesnotExist"
type Metadata struct {
	GUID string `json:"guid"`
	URL  string `json:"url"`
}
type Resource struct {
	Metadata Metadata
}
type OrgResource struct {
	Resource
	Entity OrgEntity
}
type OrgEntity struct {
	Name                   string `json:"name"`
	Region                 string `json:"region"`
	BillingEnabled         bool   `json:"billing_enabled"`
	Status                 string `json:"status"`
	OrgQuotaDefinitionGUID string `json:"quota_definition_guid"`
}
func (resource OrgResource) ToFields() Organization {
	entity := resource.Entity
	return Organization{
		GUID:                   resource.Metadata.GUID,
		Name:                   entity.Name,
		Region:                 entity.Region,
		BillingEnabled:         entity.BillingEnabled,
		Status:                 entity.Status,
		OrgQuotaDefinitionGUID: entity.OrgQuotaDefinitionGUID,
	}
}
type OrgCreateRequest struct {
	Name                   string `json:"name"`
	OrgQuotaDefinitionGUID string `json:"quota_definition_guid,omitempty"`
	Status                 string `json:"status,omitempty"`
}
type OrgUpdateRequest struct {
	Name                   *string `json:"name,omitempty"`
	OrgQuotaDefinitionGUID string  `json:"quota_definition_guid,omitempty"`
}
type Organization struct {
	GUID                   string
	Name                   string
	Region                 string
	BillingEnabled         bool
	Status                 string
	OrgQuotaDefinitionGUID string
}
type OrganizationFields struct {
	Metadata Metadata
	Entity   OrgEntity
}
type OrgRole struct {
	UserGUID string
	Admin    bool
	UserName string
}
type OrgRoleResource struct {
	Resource
	Entity OrgRoleEntity
}
type OrgRoleEntity struct {
	UserGUID string `json:"guid"`
	Admin    bool   `json:"bool"`
	UserName string `json:"username"`
}
func (resource *OrgRoleResource) ToFields() OrgRole {
	entity := resource.Entity
	return OrgRole{
		UserGUID: resource.Metadata.GUID,
		Admin:    entity.Admin,
		UserName: entity.UserName,
	}
}
type OrgRegionInformation struct {
	ID          string `json:"id"`
	Domain      string `json:"domain"`
	Name        string `json:"name"`
	Region      string `json:"region"`
	DisplayName string `json:"display_name"`
	Customer    struct {
		Name        string `json:"name"`
		DisplayName string `json:"display_name"`
	} `json:"customer"`
	Deployment struct {
		Name        string `json:"name"`
		DisplayName string `json:"display_name"`
	} `json:"deployment"`
	Geo struct {
		Name        string `json:"name"`
		DisplayName string `json:"display_name"`
	} `json:"geo"`
	Account struct {
		GUID       string   `json:"guid"`
		OwnerGUIDs []string `json:"owner_guids"`
	} `json:"account"`
	PublicRegionsByProximity []string `json:"public_regions_by_proximity"`
	ConsoleURL               string   `json:"console_url"`
	CFAPI                    string   `json:"cf_api"`
	MCCPAPI                  string   `json:"mccp_api"`
	Type                     string   `json:"type"`
	Home                     bool     `json:"home"`
	Stealth                  string   `json:"stealth"`
	Aliases                  []string `json:"aliases"`
	Settings                 struct {
		Devops struct {
			Enabled bool `json:"enabled"`
		} `json:"devops"`
		EnhancedAutoFix bool `json:"enhancedAutofix"`
	} `json:"settings"`
	OrgName string `json:"org_name"`
	OrgGUID string `json:"org_guid"`
}
type Organizations interface {
	Create(req OrgCreateRequest, opts ...bool) (*OrganizationFields, error)
	Get(orgGUID string) (*OrganizationFields, error)
	List(region string) ([]Organization, error)
	FindByName(orgName, region string) (*Organization, error)
	DeleteByRegion(guid string, region string, opts ...bool) error
	Delete(guid string, opts ...bool) error
	Update(guid string, req OrgUpdateRequest, opts ...bool) (*OrganizationFields, error)
	GetRegionInformation(orgGUID string) ([]OrgRegionInformation, error)
	AssociateBillingManager(orgGUID string, userMail string) (*OrganizationFields, error)
	AssociateAuditor(orgGUID string, userMail string) (*OrganizationFields, error)
	AssociateManager(orgGUID string, userMail string) (*OrganizationFields, error)
	AssociateUser(orgGUID string, userMail string) (*OrganizationFields, error)
	ListBillingManager(orgGUID string, filters ...string) ([]OrgRole, error)
	ListAuditors(orgGUID string, filters ...string) ([]OrgRole, error)
	ListManager(orgGUID string, filters ...string) ([]OrgRole, error)
	ListUsers(orgGUID string, filters ...string) ([]OrgRole, error)
	DisassociateBillingManager(orgGUID string, userMail string) error
	DisassociateManager(orgGUID string, userMail string) error
	DisassociateAuditor(orgGUID string, userMail string) error
	DisassociateUser(orgGUID string, userMail string) error
}
type organization struct {
	client *client.Client
}
func newOrganizationAPI(c *client.Client) Organizations {
	return &organization{
		client: c,
	}
}
func (o *organization) Create(req OrgCreateRequest, opts ...bool) (*OrganizationFields, error) {
	async := true
	orgFields := OrganizationFields{}
	if len(opts) > 0 {
		async = opts[0]
	}
	rawURL := fmt.Sprintf("/v2/organizations?async=%t", async)
	_, err := o.client.Post(rawURL, req, &orgFields)
	if err != nil {
		return nil, err
	}
	return &orgFields, err
}
func (o *organization) Get(orgGUID string) (*OrganizationFields, error) {
	rawURL := fmt.Sprintf("/v2/organizations/%s", orgGUID)
	orgFields := OrganizationFields{}
	_, err := o.client.Get(rawURL, &orgFields)
	if err != nil {
		return nil, err
	}
	return &orgFields, err
}