billing

package
v9.0.1-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2017 License: Apache-2.0 Imports: 9 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 (
	// APIVersion is the version of the Billing
	APIVersion = "2017-02-27-preview"

	// 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 {
	InvoicePeriodStartDate *date.Date   `json:"invoicePeriodStartDate,omitempty"`
	InvoicePeriodEndDate   *date.Date   `json:"invoicePeriodEndDate,omitempty"`
	DownloadURL            *DownloadURL `json:"downloadUrl,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) 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 the request to list 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
	APIVersion     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 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) 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) 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 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