github.com/IBM-Cloud/bluemix-go@v0.0.0-20240423071914-9e96525baef4/models/accouts.go (about) 1 package models 2 3 import "time" 4 5 type V2Account struct { 6 Guid string 7 Name string 8 Type string 9 State string 10 OwnerIamId string 11 CountryCode string 12 Organizations []AccountOrganization 13 } 14 15 type AccountOrganization struct { 16 GUID string `json:"guid"` 17 Region string `json:"region"` 18 } 19 20 type AccountUser struct { 21 UserId string `json:"userId"` 22 FirstName string `json:"firstname"` 23 LastName string `json:"lastname"` 24 State string `json:"state"` 25 IbmUniqueId string `json:"ibmUniqueId"` 26 Email string `json:"email"` 27 Phonenumber string `json:"phonenumber"` 28 Id string `json:"id"` 29 UaaGuid string `json:"uaaGuid"` 30 AccountId string `json:"accountId"` 31 Role string `json:"role"` 32 AddedOn string `json:"added_on"` 33 InvitedOn string `json:"invitedOn"` 34 Photo string `json:"photo"` 35 } 36 37 type V1Account struct { 38 Metadata Metadata `json:"metadata"` 39 Entity AccountEntity `json:"entity"` 40 } 41 42 type AccountEntity struct { 43 BillingCountryCode string `json:"billing_country_code"` 44 BluemixSubscriptions []BluemixSubscription `json:"bluemix_subscriptions"` 45 ConfigurationID *string `json:"configuration_id"` // Using pointer to handle null 46 CountryCode string `json:"country_code"` 47 CurrencyCode string `json:"currency_code"` 48 CurrentBillingSystem string `json:"current_billing_system"` 49 CustomerID string `json:"customer_id"` 50 IsIBMer bool `json:"isIBMer"` 51 Linkages []AccountLinkage `json:"linkages"` 52 Name string `json:"name"` 53 OfferTemplate string `json:"offer_template"` 54 Onboarded int `json:"onboarded"` 55 OrganizationsRegion []OrganizationsRegion `json:"organizations_region"` 56 Origin string `json:"origin"` 57 Owner string `json:"owner"` 58 OwnerIAMID string `json:"owner_iam_id"` 59 OwnerUniqueID string `json:"owner_unique_id"` 60 OwnerUserID string `json:"owner_userid"` 61 State string `json:"state"` 62 SubscriptionID string `json:"subscription_id"` 63 Tags []interface{} `json:"tags"` // Using interface{} since type is not specified 64 TeamDirectoryEnabled bool `json:"team_directory_enabled"` 65 TermsAndConditions TermsAndConditions `json:"terms_and_conditions"` 66 Type string `json:"type"` 67 } 68 69 type BluemixSubscription struct { 70 BillToContact string `json:"bill_to_contact"` 71 BillingSystem string `json:"billing_system"` 72 CatalogID string `json:"catalog_id"` 73 CurrentStateTimestamp time.Time `json:"current_state_timestamp"` 74 DistributionChannel string `json:"distribution_channel"` 75 History []History `json:"history"` 76 OrderID string `json:"order_id"` 77 PartNumber string `json:"part_number"` 78 PaygPendingTimestamp time.Time `json:"payg_pending_timestamp"` 79 PaymentMethod PaymentMethod `json:"payment_method"` 80 SoftlayerAccountID string `json:"softlayer_account_id"` 81 SoldToContact string `json:"sold_to_contact"` 82 State string `json:"state"` 83 SubscriptionTags []interface{} `json:"subscriptionTags"` 84 SubscriptionID string `json:"subscription_id"` 85 Type string `json:"type"` 86 } 87 88 type History struct { 89 BillingCountryCode string `json:"billingCountryCode"` 90 BillingSystem string `json:"billingSystem"` 91 CountryCode string `json:"countryCode"` 92 CurrencyCode string `json:"currencyCode"` 93 EndTime time.Time `json:"endTime"` 94 StartTime time.Time `json:"startTime"` 95 State string `json:"state"` 96 Type string `json:"type"` 97 BillToContact *string `json:"billToContact,omitempty"` 98 OrderId *string `json:"orderId,omitempty"` 99 PaymentMethodType *string `json:"paymentMethodType,omitempty"` 100 SoldToContact *string `json:"soldToContact,omitempty"` 101 StateEndComments *string `json:"stateEndComments,omitempty"` 102 StateEndedBy *string `json:"stateEndedBy,omitempty"` 103 WalletId *string `json:"walletId,omitempty"` 104 } 105 106 type PaymentMethod struct { 107 Ended *string `json:"ended"` // Using pointer to handle null 108 Started time.Time `json:"started"` 109 Type string `json:"type"` 110 WalletID string `json:"wallet_id"` 111 } 112 113 type AccountLinkage struct { 114 Origin string `json:"origin"` 115 State string `json:"state"` 116 } 117 118 type OrganizationsRegion struct { 119 GUID string `json:"guid"` 120 Region string `json:"region"` 121 } 122 123 type TermsAndConditions struct { 124 Accepted bool `json:"accepted"` 125 Required bool `json:"required"` 126 Timestamp time.Time `json:"timestamp"` 127 } 128 129 type Metadata struct { 130 CreatedAt time.Time `json:"created_at"` 131 GUID string `json:"guid"` 132 UpdateComments string `json:"update_comments"` 133 UpdatedAt time.Time `json:"updated_at"` 134 UpdatedBy string `json:"updated_by"` 135 URL string `json:"url"` 136 }