billing

package
v27.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package billing implements the Azure ARM Billing service API version 2017-02-27-preview.

Billing client provides access to billing resources for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Billing
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
}

BaseClient is the base client for Billing.

func New

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

type DownloadURL

type DownloadURL struct {
	// ExpiryTime - The time in UTC at which this download URL will expire.
	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
	// URL - The URL to the PDF file.
	URL *string `json:"url,omitempty"`
}

DownloadURL a secure URL that can be used to download a PDF invoice until the URL expires.

type ErrorDetails

type ErrorDetails struct {
	// Code - Error code.
	Code *string `json:"code,omitempty"`
	// Message - Error message indicating why the operation failed.
	Message *string `json:"message,omitempty"`
	// Target - The target of the particular error.
	Target *string `json:"target,omitempty"`
}

ErrorDetails the details of the error.

type ErrorResponse

type ErrorResponse struct {
	Error *ErrorDetails `json:"error,omitempty"`
}

ErrorResponse error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

type Invoice

type Invoice struct {
	autorest.Response  `json:"-"`
	*InvoiceProperties `json:"properties,omitempty"`
	// ID - Resource Id
	ID *string `json:"id,omitempty"`
	// Name - Resource name
	Name *string `json:"name,omitempty"`
	// Type - Resource type
	Type *string `json:"type,omitempty"`
}

Invoice an invoice resource can be used download a PDF version of an invoice.

func (Invoice) MarshalJSON

func (i Invoice) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Invoice.

func (*Invoice) UnmarshalJSON

func (i *Invoice) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Invoice struct.

type InvoiceProperties

type InvoiceProperties struct {
	// InvoicePeriodStartDate - The start of the date range covered by the invoice.
	InvoicePeriodStartDate *date.Date `json:"invoicePeriodStartDate,omitempty"`
	// InvoicePeriodEndDate - The end of the date range covered by the invoice.
	InvoicePeriodEndDate *date.Date `json:"invoicePeriodEndDate,omitempty"`
	// DownloadURL - A secure link to download the PDF version of an invoice. The link will cease to work after its expiry time is reached.
	DownloadURL *DownloadURL `json:"downloadUrl,omitempty"`
}

InvoiceProperties the properties of the invoice.

type InvoicesClient

type InvoicesClient struct {
	BaseClient
}

InvoicesClient is the billing client provides access to billing resources for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.

func NewInvoicesClient

func NewInvoicesClient(subscriptionID string) InvoicesClient

NewInvoicesClient creates an instance of the InvoicesClient client.

func NewInvoicesClientWithBaseURI

func NewInvoicesClientWithBaseURI(baseURI string, subscriptionID string) InvoicesClient

NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client.

func (InvoicesClient) Get

func (client InvoicesClient) Get(ctx context.Context, invoiceName string) (result Invoice, err error)

Get gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically. Parameters: invoiceName - the name of an invoice resource.

func (InvoicesClient) GetLatest

func (client InvoicesClient) GetLatest(ctx context.Context) (result Invoice, err error)

GetLatest gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically.

func (InvoicesClient) GetLatestPreparer

func (client InvoicesClient) GetLatestPreparer(ctx context.Context) (*http.Request, error)

GetLatestPreparer prepares the GetLatest request.

func (InvoicesClient) GetLatestResponder

func (client InvoicesClient) GetLatestResponder(resp *http.Response) (result Invoice, err error)

GetLatestResponder handles the response to the GetLatest request. The method always closes the http.Response Body.

func (InvoicesClient) GetLatestSender

func (client InvoicesClient) GetLatestSender(req *http.Request) (*http.Response, error)

GetLatestSender sends the GetLatest request. The method will close the http.Response Body if it receives an error.

func (InvoicesClient) GetPreparer

func (client InvoicesClient) GetPreparer(ctx context.Context, invoiceName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (InvoicesClient) GetResponder

func (client InvoicesClient) GetResponder(resp *http.Response) (result Invoice, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (InvoicesClient) GetSender

func (client InvoicesClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (InvoicesClient) List

func (client InvoicesClient) List(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result InvoicesListResultPage, err error)

List lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later Parameters: expand - may be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices. filter - may be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not' skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top - may be used to limit the number of results to the most recent N invoices.

func (InvoicesClient) ListComplete

func (client InvoicesClient) ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result InvoicesListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (InvoicesClient) ListPreparer

func (client InvoicesClient) ListPreparer(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (InvoicesClient) ListResponder

func (client InvoicesClient) ListResponder(resp *http.Response) (result InvoicesListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (InvoicesClient) ListSender

func (client InvoicesClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type InvoicesListResult

type InvoicesListResult struct {
	autorest.Response `json:"-"`
	// Value - The list of invoices.
	Value *[]Invoice `json:"value,omitempty"`
	// NextLink - the link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

InvoicesListResult result of the request to list invoices. It contains a list of available invoices in reverse chronological order.

func (InvoicesListResult) IsEmpty

func (ilr InvoicesListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type InvoicesListResultIterator

type InvoicesListResultIterator struct {
	// contains filtered or unexported fields
}

InvoicesListResultIterator provides access to a complete listing of Invoice values.

func NewInvoicesListResultIterator

func NewInvoicesListResultIterator(page InvoicesListResultPage) InvoicesListResultIterator

Creates a new instance of the InvoicesListResultIterator type.

func (*InvoicesListResultIterator) Next

func (iter *InvoicesListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*InvoicesListResultIterator) NextWithContext

func (iter *InvoicesListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (InvoicesListResultIterator) NotDone

func (iter InvoicesListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (InvoicesListResultIterator) Response

Response returns the raw server response from the last page request.

func (InvoicesListResultIterator) Value

func (iter InvoicesListResultIterator) Value() Invoice

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type InvoicesListResultPage

type InvoicesListResultPage struct {
	// contains filtered or unexported fields
}

InvoicesListResultPage contains a page of Invoice values.

func NewInvoicesListResultPage

func NewInvoicesListResultPage(getNextPage func(context.Context, InvoicesListResult) (InvoicesListResult, error)) InvoicesListResultPage

Creates a new instance of the InvoicesListResultPage type.

func (*InvoicesListResultPage) Next

func (page *InvoicesListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*InvoicesListResultPage) NextWithContext

func (page *InvoicesListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (InvoicesListResultPage) NotDone

func (page InvoicesListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (InvoicesListResultPage) Response

Response returns the raw server response from the last page request.

func (InvoicesListResultPage) Values

func (page InvoicesListResultPage) Values() []Invoice

Values returns the slice of values for the current page or nil if there are no values.

type Operation

type Operation struct {
	// Name - Operation name: {provider}/{resource}/{operation}
	Name *string `json:"name,omitempty"`
	// Display - The object that represents the operation.
	Display *OperationDisplay `json:"display,omitempty"`
}

Operation a Billing REST API operation

type OperationDisplay

type OperationDisplay struct {
	// Provider - Service provider: Microsoft.Billing
	Provider *string `json:"provider,omitempty"`
	// Resource - Resource on which the operation is performed: Invoice, etc.
	Resource *string `json:"resource,omitempty"`
	// Operation - Operation type: Read, write, delete, etc.
	Operation *string `json:"operation,omitempty"`
}

OperationDisplay the object that represents the operation.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	// Value - List of billing operations supported by the Microsoft.Billing resource provider.
	Value *[]Operation `json:"value,omitempty"`
	// NextLink - URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`
}

OperationListResult result of the request to list billing operations. It contains a list of operations and a URL link to get the next set of results.

func (OperationListResult) IsEmpty

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type OperationListResultIterator

type OperationListResultIterator struct {
	// contains filtered or unexported fields
}

OperationListResultIterator provides access to a complete listing of Operation values.

func NewOperationListResultIterator

func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator

Creates a new instance of the OperationListResultIterator type.

func (*OperationListResultIterator) Next

func (iter *OperationListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultIterator) NextWithContext

func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (OperationListResultIterator) NotDone

func (iter OperationListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (OperationListResultIterator) Response

Response returns the raw server response from the last page request.

func (OperationListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type OperationListResultPage

type OperationListResultPage struct {
	// contains filtered or unexported fields
}

OperationListResultPage contains a page of Operation values.

func NewOperationListResultPage

func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage

Creates a new instance of the OperationListResultPage type.

func (*OperationListResultPage) Next

func (page *OperationListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultPage) NextWithContext

func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (OperationListResultPage) NotDone

func (page OperationListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (OperationListResultPage) Response

Response returns the raw server response from the last page request.

func (OperationListResultPage) Values

func (page OperationListResultPage) Values() []Operation

Values returns the slice of values for the current page or nil if there are no values.

type OperationsClient

type OperationsClient struct {
	BaseClient
}

OperationsClient is the billing client provides access to billing resources for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.

func NewOperationsClient

func NewOperationsClient(subscriptionID string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.

func (OperationsClient) List

func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error)

List lists all of the available billing REST API operations.

func (OperationsClient) ListComplete

func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (OperationsClient) ListPreparer

func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (OperationsClient) ListResponder

func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (OperationsClient) ListSender

func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type Resource

type Resource struct {
	// ID - Resource Id
	ID *string `json:"id,omitempty"`
	// Name - Resource name
	Name *string `json:"name,omitempty"`
	// Type - Resource type
	Type *string `json:"type,omitempty"`
}

Resource the Resource model definition.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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