partnerbillingunitsv1

package
v0.62.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package partnerbillingunitsv1 : Operations and models for the PartnerBillingUnitsV1 service

Index

Constants

View Source
const (
	BillingOptionCustomerTypeAccountConst      = "ACCOUNT"
	BillingOptionCustomerTypeAccountGroupConst = "ACCOUNT_GROUP"
	BillingOptionCustomerTypeEnterpriseConst   = "ENTERPRISE"
)

Constants associated with the BillingOption.CustomerType property. The customer type. The valid values are `ENTERPRISE`, `ACCOUNT`, and `ACCOUNT_GROUP`.

View Source
const (
	BillingOptionTypeOfferConst        = "OFFER"
	BillingOptionTypeSubscriptionConst = "SUBSCRIPTION"
)

Constants associated with the BillingOption.Type property. The type of billing option. The valid values are `SUBSCRIPTION` and `OFFER`.

View Source
const (
	BillingOptionStateActiveConst    = "ACTIVE"
	BillingOptionStateCanceledConst  = "CANCELED"
	BillingOptionStateSuspendedConst = "SUSPENDED"
)

Constants associated with the BillingOption.State property. The state of the billing option. The valid values include `ACTIVE, `SUSPENDED`, and `CANCELED`.

View Source
const (
	BillingOptionCategoryPlatformConst = "PLATFORM"
	BillingOptionCategoryServiceConst  = "SERVICE"
	BillingOptionCategorySupportConst  = "SUPPORT"
)

Constants associated with the BillingOption.Category property. The category of the billing option. The valid values are `PLATFORM`, `SERVICE`, and `SUPPORT`.

View Source
const (
	CreditPoolsReportTypePlatformConst = "PLATFORM"
	CreditPoolsReportTypeServiceConst  = "SERVICE"
	CreditPoolsReportTypeSupportConst  = "SUPPORT"
)

Constants associated with the CreditPoolsReport.Type property. The category of the billing option. The valid values are `PLATFORM`, `SERVICE` and `SUPPORT`.

View Source
const (
	CreditPoolsReportCustomerTypeAccountConst      = "ACCOUNT"
	CreditPoolsReportCustomerTypeAccountGroupConst = "ACCOUNT_GROUP"
	CreditPoolsReportCustomerTypeEnterpriseConst   = "ENTERPRISE"
)

Constants associated with the CreditPoolsReport.CustomerType property. The customer type. The valid values are `ENTERPRISE`, `ACCOUNT`, and `ACCOUNT_GROUP`.

View Source
const (
	TermCreditsCategoryPlatformConst = "PLATFORM"
	TermCreditsCategoryServiceConst  = "SERVICE"
	TermCreditsCategorySupportConst  = "SUPPORT"
)

Constants associated with the TermCredits.Category property. The category of the billing option. The valid values are `PLATFORM`, `SERVICE`, and `SUPPORT`.

View Source
const DefaultServiceName = "partner_billing_units"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://partner.cloud.ibm.com"

DefaultServiceURL is the default URL to make service requests to.

Variables

This section is empty.

Functions

func GetServiceURLForRegion

func GetServiceURLForRegion(region string) (string, error)

GetServiceURLForRegion returns the service URL to be used for the specified region

func UnmarshalBillingOption

func UnmarshalBillingOption(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalBillingOption unmarshals an instance of BillingOption from the specified map of raw messages.

func UnmarshalBillingOptionsSummary

func UnmarshalBillingOptionsSummary(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalBillingOptionsSummary unmarshals an instance of BillingOptionsSummary from the specified map of raw messages.

func UnmarshalBillingOptionsSummaryFirst

func UnmarshalBillingOptionsSummaryFirst(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalBillingOptionsSummaryFirst unmarshals an instance of BillingOptionsSummaryFirst from the specified map of raw messages.

func UnmarshalBillingOptionsSummaryNext

func UnmarshalBillingOptionsSummaryNext(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalBillingOptionsSummaryNext unmarshals an instance of BillingOptionsSummaryNext from the specified map of raw messages.

func UnmarshalCreditPoolsReport

func UnmarshalCreditPoolsReport(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCreditPoolsReport unmarshals an instance of CreditPoolsReport from the specified map of raw messages.

func UnmarshalCreditPoolsReportSummary

func UnmarshalCreditPoolsReportSummary(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCreditPoolsReportSummary unmarshals an instance of CreditPoolsReportSummary from the specified map of raw messages.

func UnmarshalCreditPoolsReportSummaryFirst

func UnmarshalCreditPoolsReportSummaryFirst(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCreditPoolsReportSummaryFirst unmarshals an instance of CreditPoolsReportSummaryFirst from the specified map of raw messages.

func UnmarshalCreditPoolsReportSummaryNext

func UnmarshalCreditPoolsReportSummaryNext(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCreditPoolsReportSummaryNext unmarshals an instance of CreditPoolsReportSummaryNext from the specified map of raw messages.

func UnmarshalOverage

func UnmarshalOverage(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalOverage unmarshals an instance of Overage from the specified map of raw messages.

func UnmarshalTermCredits

func UnmarshalTermCredits(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTermCredits unmarshals an instance of TermCredits from the specified map of raw messages.

Types

type BillingOption

type BillingOption struct {
	// The ID of the billing option.
	ID *string `json:"id,omitempty"`

	// The ID of the billing unit that's associated with the billing option.
	BillingUnitID *string `json:"billing_unit_id,omitempty"`

	// Account ID of the customer.
	CustomerID *string `json:"customer_id,omitempty"`

	// The customer type. The valid values are `ENTERPRISE`, `ACCOUNT`, and `ACCOUNT_GROUP`.
	CustomerType *string `json:"customer_type,omitempty"`

	// A user-defined name for the customer.
	CustomerName *string `json:"customer_name,omitempty"`

	// ID of the reseller in the heirarchy of the requested customer.
	ResellerID *string `json:"reseller_id,omitempty"`

	// Name of the reseller in the heirarchy of the requested customer.
	ResellerName *string `json:"reseller_name,omitempty"`

	// The billing month for which the burn-down report is requested. Format is yyyy-mm. Defaults to current month.
	Month *string `json:"month,omitempty"`

	// Errors in the billing.
	Errors []map[string]interface{} `json:"errors,omitempty"`

	// The type of billing option. The valid values are `SUBSCRIPTION` and `OFFER`.
	Type *string `json:"type,omitempty"`

	// The start date of billing option.
	StartDate *strfmt.DateTime `json:"start_date,omitempty"`

	// The end date of billing option.
	EndDate *strfmt.DateTime `json:"end_date,omitempty"`

	// The state of the billing option. The valid values include `ACTIVE, `SUSPENDED`, and `CANCELED`.
	State *string `json:"state,omitempty"`

	// The category of the billing option. The valid values are `PLATFORM`, `SERVICE`, and `SUPPORT`.
	Category *string `json:"category,omitempty"`

	// The payment method for support.
	PaymentInstrument map[string]interface{} `json:"payment_instrument,omitempty"`

	// Part number of the offering.
	PartNumber *string `json:"part_number,omitempty"`

	// ID of the catalog containing this offering.
	CatalogID *string `json:"catalog_id,omitempty"`

	// ID of the order containing this offering.
	OrderID *string `json:"order_id,omitempty"`

	// PO Number of the offering.
	PoNumber *string `json:"po_number,omitempty"`

	// Subscription model.
	SubscriptionModel *string `json:"subscription_model,omitempty"`

	// The duration of the billing options in months.
	DurationInMonths *int64 `json:"duration_in_months,omitempty"`

	// Amount billed monthly for this offering.
	MonthlyAmount *float64 `json:"monthly_amount,omitempty"`

	// The support billing system.
	BillingSystem map[string]interface{} `json:"billing_system,omitempty"`

	// The country code for the billing unit.
	CountryCode *string `json:"country_code,omitempty"`

	// The currency code of the billing unit.
	CurrencyCode *string `json:"currency_code,omitempty"`
}

BillingOption : Billing options report for the end customers.

type BillingOptionsSummary

type BillingOptionsSummary struct {
	// The max number of reports in the response.
	Limit *int64 `json:"limit,omitempty"`

	// The link to the first page of the search query.
	First *BillingOptionsSummaryFirst `json:"first,omitempty"`

	// The link to the next page of the search query.
	Next *BillingOptionsSummaryNext `json:"next,omitempty"`

	// Aggregated usage report of all requested partners.
	Resources []BillingOption `json:"resources,omitempty"`
}

BillingOptionsSummary : The billing options report for the customer.

type BillingOptionsSummaryFirst

type BillingOptionsSummaryFirst struct {
	// A link to a page of query results.
	Href *string `json:"href,omitempty"`
}

BillingOptionsSummaryFirst : The link to the first page of the search query.

type BillingOptionsSummaryNext

type BillingOptionsSummaryNext struct {
	// A link to a page of query results.
	Href *string `json:"href,omitempty"`

	// The value of the `_start` query parameter to fetch the next page.
	Offset *string `json:"offset,omitempty"`
}

BillingOptionsSummaryNext : The link to the next page of the search query.

type CreditPoolsReport

type CreditPoolsReport struct {
	// The category of the billing option. The valid values are `PLATFORM`, `SERVICE` and `SUPPORT`.
	Type *string `json:"type,omitempty"`

	// The ID of the billing unit that's associated with the billing option.
	BillingUnitID *string `json:"billing_unit_id,omitempty"`

	// Account ID of the customer.
	CustomerID *string `json:"customer_id,omitempty"`

	// The customer type. The valid values are `ENTERPRISE`, `ACCOUNT`, and `ACCOUNT_GROUP`.
	CustomerType *string `json:"customer_type,omitempty"`

	// A user-defined name for the customer.
	CustomerName *string `json:"customer_name,omitempty"`

	// ID of the reseller in the heirarchy of the requested customer.
	ResellerID *string `json:"reseller_id,omitempty"`

	// Name of the reseller in the heirarchy of the requested customer.
	ResellerName *string `json:"reseller_name,omitempty"`

	// The billing month for which the burn-down report is requested. Format is yyyy-mm. Defaults to current month.
	Month *string `json:"month,omitempty"`

	// The currency code of the billing unit.
	CurrencyCode *string `json:"currency_code,omitempty"`

	// A list of active subscription terms available within a credit.
	TermCredits []TermCredits `json:"term_credits,omitempty"`

	// Overage that was generated on the credit pool.
	Overage *Overage `json:"overage,omitempty"`
}

CreditPoolsReport : Aggregated subscription burn-down report for the end customers.

type CreditPoolsReportSummary

type CreditPoolsReportSummary struct {
	// The max number of reports in the response.
	Limit *int64 `json:"limit,omitempty"`

	// The link to the first page of the search query.
	First *CreditPoolsReportSummaryFirst `json:"first,omitempty"`

	// The link to the next page of the search query.
	Next *CreditPoolsReportSummaryNext `json:"next,omitempty"`

	// Aggregated usage report of all requested partners.
	Resources []CreditPoolsReport `json:"resources,omitempty"`
}

CreditPoolsReportSummary : The aggregated credit pools report.

type CreditPoolsReportSummaryFirst

type CreditPoolsReportSummaryFirst struct {
	// A link to a page of query results.
	Href *string `json:"href,omitempty"`
}

CreditPoolsReportSummaryFirst : The link to the first page of the search query.

type CreditPoolsReportSummaryNext

type CreditPoolsReportSummaryNext struct {
	// A link to a page of query results.
	Href *string `json:"href,omitempty"`

	// The value of the `_start` query parameter to fetch the next page.
	Offset *string `json:"offset,omitempty"`
}

CreditPoolsReportSummaryNext : The link to the next page of the search query.

type GetBillingOptionsOptions

type GetBillingOptionsOptions struct {
	// Enterprise ID of the distributor or reseller for which the report is requested.
	PartnerID *string `json:"partner_id" validate:"required"`

	// Enterprise ID of the customer for which the report is requested.
	CustomerID *string `json:"customer_id,omitempty"`

	// Enterprise ID of the reseller for which the report is requested.
	ResellerID *string `json:"reseller_id,omitempty"`

	// The billing month for which the usage report is requested. Format is yyyy-mm. Defaults to current month.
	Date *string `json:"date,omitempty"`

	// Number of usage records returned. The default value is 30. Maximum value is 200.
	Limit *int64 `json:"_limit,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetBillingOptionsOptions : The GetBillingOptions options.

func (*GetBillingOptionsOptions) SetCustomerID

func (_options *GetBillingOptionsOptions) SetCustomerID(customerID string) *GetBillingOptionsOptions

SetCustomerID : Allow user to set CustomerID

func (*GetBillingOptionsOptions) SetDate

func (_options *GetBillingOptionsOptions) SetDate(date string) *GetBillingOptionsOptions

SetDate : Allow user to set Date

func (*GetBillingOptionsOptions) SetHeaders

func (options *GetBillingOptionsOptions) SetHeaders(param map[string]string) *GetBillingOptionsOptions

SetHeaders : Allow user to set Headers

func (*GetBillingOptionsOptions) SetLimit

func (_options *GetBillingOptionsOptions) SetLimit(limit int64) *GetBillingOptionsOptions

SetLimit : Allow user to set Limit

func (*GetBillingOptionsOptions) SetPartnerID

func (_options *GetBillingOptionsOptions) SetPartnerID(partnerID string) *GetBillingOptionsOptions

SetPartnerID : Allow user to set PartnerID

func (*GetBillingOptionsOptions) SetResellerID

func (_options *GetBillingOptionsOptions) SetResellerID(resellerID string) *GetBillingOptionsOptions

SetResellerID : Allow user to set ResellerID

type GetCreditPoolsReportOptions

type GetCreditPoolsReportOptions struct {
	// Enterprise ID of the distributor or reseller for which the report is requested.
	PartnerID *string `json:"partner_id" validate:"required"`

	// Enterprise ID of the customer for which the report is requested.
	CustomerID *string `json:"customer_id,omitempty"`

	// Enterprise ID of the reseller for which the report is requested.
	ResellerID *string `json:"reseller_id,omitempty"`

	// The billing month for which the usage report is requested. Format is yyyy-mm. Defaults to current month.
	Date *string `json:"date,omitempty"`

	// Number of usage records returned. The default value is 30. Maximum value is 200.
	Limit *int64 `json:"_limit,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetCreditPoolsReportOptions : The GetCreditPoolsReport options.

func (*GetCreditPoolsReportOptions) SetCustomerID

func (_options *GetCreditPoolsReportOptions) SetCustomerID(customerID string) *GetCreditPoolsReportOptions

SetCustomerID : Allow user to set CustomerID

func (*GetCreditPoolsReportOptions) SetDate

SetDate : Allow user to set Date

func (*GetCreditPoolsReportOptions) SetHeaders

func (options *GetCreditPoolsReportOptions) SetHeaders(param map[string]string) *GetCreditPoolsReportOptions

SetHeaders : Allow user to set Headers

func (*GetCreditPoolsReportOptions) SetLimit

SetLimit : Allow user to set Limit

func (*GetCreditPoolsReportOptions) SetPartnerID

func (_options *GetCreditPoolsReportOptions) SetPartnerID(partnerID string) *GetCreditPoolsReportOptions

SetPartnerID : Allow user to set PartnerID

func (*GetCreditPoolsReportOptions) SetResellerID

func (_options *GetCreditPoolsReportOptions) SetResellerID(resellerID string) *GetCreditPoolsReportOptions

SetResellerID : Allow user to set ResellerID

type Overage

type Overage struct {
	// The number of credits used as overage.
	Cost *float64 `json:"cost,omitempty"`

	// A list of resources that generated overage.
	Resources []map[string]interface{} `json:"resources,omitempty"`
}

Overage : Overage that was generated on the credit pool.

type PartnerBillingUnitsV1

type PartnerBillingUnitsV1 struct {
	Service *core.BaseService
}

PartnerBillingUnitsV1 : Billing units for IBM Cloud partners

API Version: 1.0.0

func NewPartnerBillingUnitsV1

func NewPartnerBillingUnitsV1(options *PartnerBillingUnitsV1Options) (service *PartnerBillingUnitsV1, err error)

NewPartnerBillingUnitsV1 : constructs an instance of PartnerBillingUnitsV1 with passed in options.

func NewPartnerBillingUnitsV1UsingExternalConfig

func NewPartnerBillingUnitsV1UsingExternalConfig(options *PartnerBillingUnitsV1Options) (partnerBillingUnits *PartnerBillingUnitsV1, err error)

NewPartnerBillingUnitsV1UsingExternalConfig : constructs an instance of PartnerBillingUnitsV1 with passed in options and external configuration.

func (*PartnerBillingUnitsV1) Clone

func (partnerBillingUnits *PartnerBillingUnitsV1) Clone() *PartnerBillingUnitsV1

Clone makes a copy of "partnerBillingUnits" suitable for processing requests.

func (*PartnerBillingUnitsV1) DisableRetries

func (partnerBillingUnits *PartnerBillingUnitsV1) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*PartnerBillingUnitsV1) EnableRetries

func (partnerBillingUnits *PartnerBillingUnitsV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*PartnerBillingUnitsV1) GetBillingOptions

func (partnerBillingUnits *PartnerBillingUnitsV1) GetBillingOptions(getBillingOptionsOptions *GetBillingOptionsOptions) (result *BillingOptionsSummary, response *core.DetailedResponse, err error)

GetBillingOptions : Get customers billing options Returns the billing options for the requested customer for a given month.

func (*PartnerBillingUnitsV1) GetBillingOptionsWithContext

func (partnerBillingUnits *PartnerBillingUnitsV1) GetBillingOptionsWithContext(ctx context.Context, getBillingOptionsOptions *GetBillingOptionsOptions) (result *BillingOptionsSummary, response *core.DetailedResponse, err error)

GetBillingOptionsWithContext is an alternate form of the GetBillingOptions method which supports a Context parameter

func (*PartnerBillingUnitsV1) GetCreditPoolsReport

func (partnerBillingUnits *PartnerBillingUnitsV1) GetCreditPoolsReport(getCreditPoolsReportOptions *GetCreditPoolsReportOptions) (result *CreditPoolsReportSummary, response *core.DetailedResponse, err error)

GetCreditPoolsReport : Get subscription burn-down report Returns the subscription or commitment burn-down reports for the end customers for a given month.

func (*PartnerBillingUnitsV1) GetCreditPoolsReportWithContext

func (partnerBillingUnits *PartnerBillingUnitsV1) GetCreditPoolsReportWithContext(ctx context.Context, getCreditPoolsReportOptions *GetCreditPoolsReportOptions) (result *CreditPoolsReportSummary, response *core.DetailedResponse, err error)

GetCreditPoolsReportWithContext is an alternate form of the GetCreditPoolsReport method which supports a Context parameter

func (*PartnerBillingUnitsV1) GetEnableGzipCompression

func (partnerBillingUnits *PartnerBillingUnitsV1) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*PartnerBillingUnitsV1) GetServiceURL

func (partnerBillingUnits *PartnerBillingUnitsV1) GetServiceURL() string

GetServiceURL returns the service URL

func (*PartnerBillingUnitsV1) NewGetBillingOptionsOptions

func (*PartnerBillingUnitsV1) NewGetBillingOptionsOptions(partnerID string, billingMonth string) *GetBillingOptionsOptions

NewGetBillingOptionsOptions : Instantiate GetBillingOptionsOptions

func (*PartnerBillingUnitsV1) NewGetCreditPoolsReportOptions

func (*PartnerBillingUnitsV1) NewGetCreditPoolsReportOptions(partnerID string, billingMonth string) *GetCreditPoolsReportOptions

NewGetCreditPoolsReportOptions : Instantiate GetCreditPoolsReportOptions

func (*PartnerBillingUnitsV1) SetDefaultHeaders

func (partnerBillingUnits *PartnerBillingUnitsV1) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*PartnerBillingUnitsV1) SetEnableGzipCompression

func (partnerBillingUnits *PartnerBillingUnitsV1) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*PartnerBillingUnitsV1) SetServiceURL

func (partnerBillingUnits *PartnerBillingUnitsV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

type PartnerBillingUnitsV1Options

type PartnerBillingUnitsV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator
}

PartnerBillingUnitsV1Options : Service options

type TermCredits

type TermCredits struct {
	// The ID of the billing option from which the subscription term is derived.
	BillingOptionID *string `json:"billing_option_id,omitempty"`

	// Billing option model.
	BillingOptionModel *string `json:"billing_option_model,omitempty"`

	// The category of the billing option. The valid values are `PLATFORM`, `SERVICE`, and `SUPPORT`.
	Category *string `json:"category,omitempty"`

	// The start date of the term in ISO format.
	StartDate *strfmt.DateTime `json:"start_date,omitempty"`

	// The end date of the term in ISO format.
	EndDate *strfmt.DateTime `json:"end_date,omitempty"`

	// The total credit available in this term.
	TotalCredits *float64 `json:"total_credits,omitempty"`

	// The balance of available credit at the start of the current month.
	StartingBalance *float64 `json:"starting_balance,omitempty"`

	// The amount of credit used during the current month.
	UsedCredits *float64 `json:"used_credits,omitempty"`

	// The balance of remaining credit in the subscription term.
	CurrentBalance *float64 `json:"current_balance,omitempty"`

	// A list of resources that used credit during the month.
	Resources []map[string]interface{} `json:"resources,omitempty"`
}

TermCredits : The subscription term that is active in the requested month.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL