billing

package
v11.2.2-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package billing implements the Azure ARM Billing service API version 2017-04-24-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 DownloadURL

type DownloadURL struct {
	ExpiryTime *date.Time `json:"expiryTime,omitempty"`
	URL        *string    `json:"url,omitempty"`
}

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

type ErrorDetails

type ErrorDetails struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
	Target  *string `json:"target,omitempty"`
}

ErrorDetails is the details of the error.

type ErrorResponse

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

ErrorResponse is 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:"-"`
	ID                 *string `json:"id,omitempty"`
	Name               *string `json:"name,omitempty"`
	Type               *string `json:"type,omitempty"`
	*InvoiceProperties `json:"properties,omitempty"`
}

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

type InvoiceProperties

type InvoiceProperties struct {
	DownloadURL            *DownloadURL `json:"downloadUrl,omitempty"`
	InvoicePeriodStartDate *date.Date   `json:"invoicePeriodStartDate,omitempty"`
	InvoicePeriodEndDate   *date.Date   `json:"invoicePeriodEndDate,omitempty"`
	BillingPeriodIds       *[]string    `json:"billingPeriodIds,omitempty"`
}

InvoiceProperties is the properties of the invoice.

type InvoicesClient

type InvoicesClient struct {
	ManagementClient
}

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(invoiceName string) (result Invoice, err error)

Get gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically.

invoiceName is the name of an invoice resource.

func (InvoicesClient) GetLatest

func (client InvoicesClient) GetLatest() (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() (*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(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(expand string, filter string, skiptoken string, top *int32) (result InvoicesListResult, 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.

expand is 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 is 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 is 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 is may be used to limit the number of results to the most recent N invoices.

func (InvoicesClient) ListComplete

func (client InvoicesClient) ListComplete(expand string, filter string, skiptoken string, top *int32, cancel <-chan struct{}) (<-chan Invoice, <-chan error)

ListComplete gets all elements from the list without paging.

func (InvoicesClient) ListNextResults

func (client InvoicesClient) ListNextResults(lastResults InvoicesListResult) (result InvoicesListResult, err error)

ListNextResults retrieves the next set of results, if any.

func (InvoicesClient) ListPreparer

func (client InvoicesClient) ListPreparer(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             *[]Invoice `json:"value,omitempty"`
	NextLink          *string    `json:"nextLink,omitempty"`
}

InvoicesListResult is result of listing invoices. It contains a list of available invoices in reverse chronological order.

func (InvoicesListResult) InvoicesListResultPreparer

func (client InvoicesListResult) InvoicesListResultPreparer() (*http.Request, error)

InvoicesListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.

type ManagementClient

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

ManagementClient is the base client for Billing.

func New

func New(subscriptionID string) ManagementClient

New creates an instance of the ManagementClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient

NewWithBaseURI creates an instance of the ManagementClient client.

type Operation

type Operation struct {
	Name    *string           `json:"name,omitempty"`
	Display *OperationDisplay `json:"display,omitempty"`
}

Operation is a Billing REST API operation.

type OperationDisplay

type OperationDisplay struct {
	Provider  *string `json:"provider,omitempty"`
	Resource  *string `json:"resource,omitempty"`
	Operation *string `json:"operation,omitempty"`
}

OperationDisplay is the object that represents the operation.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	Value             *[]Operation `json:"value,omitempty"`
	NextLink          *string      `json:"nextLink,omitempty"`
}

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

func (OperationListResult) OperationListResultPreparer

func (client OperationListResult) OperationListResultPreparer() (*http.Request, error)

OperationListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.

type OperationsClient

type OperationsClient struct {
	ManagementClient
}

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() (result OperationListResult, err error)

List lists all of the available billing REST API operations.

func (OperationsClient) ListComplete

func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error)

ListComplete gets all elements from the list without paging.

func (OperationsClient) ListNextResults

func (client OperationsClient) ListNextResults(lastResults OperationListResult) (result OperationListResult, err error)

ListNextResults retrieves the next set of results, if any.

func (OperationsClient) ListPreparer

func (client OperationsClient) ListPreparer() (*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 Period

type Period struct {
	autorest.Response `json:"-"`
	ID                *string `json:"id,omitempty"`
	Name              *string `json:"name,omitempty"`
	Type              *string `json:"type,omitempty"`
	*PeriodProperties `json:"properties,omitempty"`
}

Period is a billing period resource.

type PeriodProperties

type PeriodProperties struct {
	BillingPeriodStartDate *date.Date `json:"billingPeriodStartDate,omitempty"`
	BillingPeriodEndDate   *date.Date `json:"billingPeriodEndDate,omitempty"`
	InvoiceIds             *[]string  `json:"invoiceIds,omitempty"`
}

PeriodProperties is the properties of the billing period.

type PeriodsClient

type PeriodsClient struct {
	ManagementClient
}

PeriodsClient 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 NewPeriodsClient

func NewPeriodsClient(subscriptionID string) PeriodsClient

NewPeriodsClient creates an instance of the PeriodsClient client.

func NewPeriodsClientWithBaseURI

func NewPeriodsClientWithBaseURI(baseURI string, subscriptionID string) PeriodsClient

NewPeriodsClientWithBaseURI creates an instance of the PeriodsClient client.

func (PeriodsClient) Get

func (client PeriodsClient) Get(billingPeriodName string) (result Period, err error)

Get gets a named billing period.

billingPeriodName is the name of a BillingPeriod resource.

func (PeriodsClient) GetPreparer

func (client PeriodsClient) GetPreparer(billingPeriodName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (PeriodsClient) GetResponder

func (client PeriodsClient) GetResponder(resp *http.Response) (result Period, err error)

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

func (PeriodsClient) GetSender

func (client PeriodsClient) 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 (PeriodsClient) List

func (client PeriodsClient) List(filter string, skiptoken string, top *int32) (result PeriodsListResult, err error)

List lists the available billing periods for a subscription in reverse chronological order.

filter is may be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. skiptoken is 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 is may be used to limit the number of results to the most recent N billing periods.

func (PeriodsClient) ListComplete

func (client PeriodsClient) ListComplete(filter string, skiptoken string, top *int32, cancel <-chan struct{}) (<-chan Period, <-chan error)

ListComplete gets all elements from the list without paging.

func (PeriodsClient) ListNextResults

func (client PeriodsClient) ListNextResults(lastResults PeriodsListResult) (result PeriodsListResult, err error)

ListNextResults retrieves the next set of results, if any.

func (PeriodsClient) ListPreparer

func (client PeriodsClient) ListPreparer(filter string, skiptoken string, top *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (PeriodsClient) ListResponder

func (client PeriodsClient) ListResponder(resp *http.Response) (result PeriodsListResult, err error)

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

func (PeriodsClient) ListSender

func (client PeriodsClient) 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 PeriodsListResult

type PeriodsListResult struct {
	autorest.Response `json:"-"`
	Value             *[]Period `json:"value,omitempty"`
	NextLink          *string   `json:"nextLink,omitempty"`
}

PeriodsListResult is result of listing billing periods. It contains a list of available billing periods in reverse chronological order.

func (PeriodsListResult) PeriodsListResultPreparer

func (client PeriodsListResult) PeriodsListResultPreparer() (*http.Request, error)

PeriodsListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.

type Resource

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

Resource is the Resource model definition.

Jump to

Keyboard shortcuts

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