azure-sdk-for-go: github.com/Azure/azure-sdk-for-go/services/preview/billing/mgmt/2017-02-27-preview/billing Index | Files | Directories

package billing

import "github.com/Azure/azure-sdk-for-go/services/preview/billing/mgmt/2017-02-27-preview/billing"

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

Package Files

client.go invoices.go models.go operations.go version.go

Constants

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

func UserAgent Uses

func UserAgent() string

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

func Version Uses

func Version() string

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

type BaseClient Uses

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

BaseClient is the base client for Billing.

func New Uses

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI Uses

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

type DownloadURL Uses

type DownloadURL struct {
    // ExpiryTime - READ-ONLY; The time in UTC at which this download URL will expire.
    ExpiryTime *date.Time `json:"expiryTime,omitempty"`
    // URL - READ-ONLY; 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 Uses

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

ErrorDetails the details of the error.

type ErrorResponse Uses

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 Uses

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

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

func (Invoice) MarshalJSON Uses

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

MarshalJSON is the custom marshaler for Invoice.

func (*Invoice) UnmarshalJSON Uses

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

UnmarshalJSON is the custom unmarshaler for Invoice struct.

type InvoiceProperties Uses

type InvoiceProperties struct {
    // InvoicePeriodStartDate - READ-ONLY; The start of the date range covered by the invoice.
    InvoicePeriodStartDate *date.Date `json:"invoicePeriodStartDate,omitempty"`
    // InvoicePeriodEndDate - READ-ONLY; 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 Uses

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 Uses

func NewInvoicesClient(subscriptionID string) InvoicesClient

NewInvoicesClient creates an instance of the InvoicesClient client.

func NewInvoicesClientWithBaseURI Uses

func NewInvoicesClientWithBaseURI(baseURI string, subscriptionID string) InvoicesClient

NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client.

func (InvoicesClient) Get Uses

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 Uses

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 Uses

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

GetLatestPreparer prepares the GetLatest request.

func (InvoicesClient) GetLatestResponder Uses

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 Uses

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 Uses

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

GetPreparer prepares the Get request.

func (InvoicesClient) GetResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

type InvoicesListResult struct {
    autorest.Response `json:"-"`
    // Value - READ-ONLY; The list of invoices.
    Value *[]Invoice `json:"value,omitempty"`
    // NextLink - READ-ONLY; 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 Uses

func (ilr InvoicesListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type InvoicesListResultIterator Uses

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

InvoicesListResultIterator provides access to a complete listing of Invoice values.

func NewInvoicesListResultIterator Uses

func NewInvoicesListResultIterator(page InvoicesListResultPage) InvoicesListResultIterator

Creates a new instance of the InvoicesListResultIterator type.

func (*InvoicesListResultIterator) Next Uses

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 Uses

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 Uses

func (iter InvoicesListResultIterator) NotDone() bool

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

func (InvoicesListResultIterator) Response Uses

func (iter InvoicesListResultIterator) Response() InvoicesListResult

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

func (InvoicesListResultIterator) Value Uses

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 Uses

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

InvoicesListResultPage contains a page of Invoice values.

func NewInvoicesListResultPage Uses

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

Creates a new instance of the InvoicesListResultPage type.

func (*InvoicesListResultPage) Next Uses

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 Uses

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 Uses

func (page InvoicesListResultPage) NotDone() bool

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

func (InvoicesListResultPage) Response Uses

func (page InvoicesListResultPage) Response() InvoicesListResult

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

func (InvoicesListResultPage) Values Uses

func (page InvoicesListResultPage) Values() []Invoice

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

type Operation Uses

type Operation struct {
    // Name - READ-ONLY; 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 Uses

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

OperationDisplay the object that represents the operation.

type OperationListResult Uses

type OperationListResult struct {
    autorest.Response `json:"-"`
    // Value - READ-ONLY; List of billing operations supported by the Microsoft.Billing resource provider.
    Value *[]Operation `json:"value,omitempty"`
    // NextLink - READ-ONLY; 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 Uses

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type OperationListResultIterator Uses

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

OperationListResultIterator provides access to a complete listing of Operation values.

func NewOperationListResultIterator Uses

func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator

Creates a new instance of the OperationListResultIterator type.

func (*OperationListResultIterator) Next Uses

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 Uses

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 Uses

func (iter OperationListResultIterator) NotDone() bool

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

func (OperationListResultIterator) Response Uses

func (iter OperationListResultIterator) Response() OperationListResult

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

func (OperationListResultIterator) Value Uses

func (iter OperationListResultIterator) Value() Operation

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

type OperationListResultPage Uses

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

OperationListResultPage contains a page of Operation values.

func NewOperationListResultPage Uses

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

Creates a new instance of the OperationListResultPage type.

func (*OperationListResultPage) Next Uses

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 Uses

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 Uses

func (page OperationListResultPage) NotDone() bool

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

func (OperationListResultPage) Response Uses

func (page OperationListResultPage) Response() OperationListResult

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

func (OperationListResultPage) Values Uses

func (page OperationListResultPage) Values() []Operation

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

type OperationsClient Uses

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 Uses

func NewOperationsClient(subscriptionID string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI Uses

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.

func (OperationsClient) List Uses

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

List lists all of the available billing REST API operations.

func (OperationsClient) ListComplete Uses

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

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

func (OperationsClient) ListPreparer Uses

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

ListPreparer prepares the List request.

func (OperationsClient) ListResponder Uses

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 Uses

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 Uses

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

Resource the Resource model definition.

Directories

PathSynopsis
billingapi

Package billing imports 10 packages (graph) and is imported by 4 packages. Updated 2019-07-30. Refresh now. Tools for package owners.