diff --git a/services/billing/mgmt/2020-05-01/billing/enums.go b/services/billing/mgmt/2020-05-01/billing/enums.go index ae774ecab204..cb726b1a1bf5 100644 --- a/services/billing/mgmt/2020-05-01/billing/enums.go +++ b/services/billing/mgmt/2020-05-01/billing/enums.go @@ -193,6 +193,21 @@ func PossibleFrequencyValues() []Frequency { return []Frequency{Monthly, OneTime, UsageBased} } +// InvoiceDocumentType enumerates the values for invoice document type. +type InvoiceDocumentType string + +const ( + // InvoiceDocumentTypeCreditNote ... + InvoiceDocumentTypeCreditNote InvoiceDocumentType = "CreditNote" + // InvoiceDocumentTypeInvoice ... + InvoiceDocumentTypeInvoice InvoiceDocumentType = "Invoice" +) + +// PossibleInvoiceDocumentTypeValues returns an array of possible values for the InvoiceDocumentType const type. +func PossibleInvoiceDocumentTypeValues() []InvoiceDocumentType { + return []InvoiceDocumentType{InvoiceDocumentTypeCreditNote, InvoiceDocumentTypeInvoice} +} + // InvoiceSectionState enumerates the values for invoice section state. type InvoiceSectionState string @@ -218,11 +233,13 @@ const ( OverDue InvoiceStatus = "OverDue" // Paid ... Paid InvoiceStatus = "Paid" + // Void ... + Void InvoiceStatus = "Void" ) // PossibleInvoiceStatusValues returns an array of possible values for the InvoiceStatus const type. func PossibleInvoiceStatusValues() []InvoiceStatus { - return []InvoiceStatus{Due, OverDue, Paid} + return []InvoiceStatus{Due, OverDue, Paid, Void} } // InvoiceType enumerates the values for invoice type. diff --git a/services/billing/mgmt/2020-05-01/billing/models.go b/services/billing/mgmt/2020-05-01/billing/models.go index 3cccd8130e26..e576d43acb1f 100644 --- a/services/billing/mgmt/2020-05-01/billing/models.go +++ b/services/billing/mgmt/2020-05-01/billing/models.go @@ -2097,7 +2097,7 @@ type InvoiceProperties struct { DueDate *date.Time `json:"dueDate,omitempty"` // InvoiceDate - READ-ONLY; The date when the invoice was generated. InvoiceDate *date.Time `json:"invoiceDate,omitempty"` - // Status - READ-ONLY; The current status of the invoice. Possible values include: 'Due', 'OverDue', 'Paid' + // Status - READ-ONLY; The current status of the invoice. Possible values include: 'Due', 'OverDue', 'Paid', 'Void' Status InvoiceStatus `json:"status,omitempty"` // AmountDue - READ-ONLY; The amount due as of now. AmountDue *Amount `json:"amountDue,omitempty"` @@ -2133,10 +2133,24 @@ type InvoiceProperties struct { Documents *[]Document `json:"documents,omitempty"` // Payments - READ-ONLY; List of payments. Payments *[]PaymentProperties `json:"payments,omitempty"` + // RebillDetails - READ-ONLY; Rebill details for an invoice. + RebillDetails map[string]*RebillDetails `json:"rebillDetails"` + // DocumentType - READ-ONLY; The type of the document. Possible values include: 'InvoiceDocumentTypeInvoice', 'InvoiceDocumentTypeCreditNote' + DocumentType InvoiceDocumentType `json:"documentType,omitempty"` + // BilledDocumentID - READ-ONLY; The Id of the active invoice which is originally billed after this invoice was voided. This field is applicable to the void invoices only. + BilledDocumentID *string `json:"billedDocumentId,omitempty"` + // CreditForDocumentID - READ-ONLY; The Id of the invoice which got voided and this credit note was issued as a result. This field is applicable to the credit notes only. + CreditForDocumentID *string `json:"creditForDocumentId,omitempty"` // SubscriptionID - READ-ONLY; The ID of the subscription for which the invoice is generated. SubscriptionID *string `json:"subscriptionId,omitempty"` } +// MarshalJSON is the custom marshaler for InvoiceProperties. +func (IP InvoiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // InvoicesDownloadBillingSubscriptionInvoiceFuture an abstraction for monitoring and retrieving the results of // a long-running operation. type InvoicesDownloadBillingSubscriptionInvoiceFuture struct { @@ -4168,6 +4182,22 @@ func (pp PropertyProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// RebillDetails the rebill details of an invoice. +type RebillDetails struct { + // CreditNoteDocumentID - READ-ONLY; The ID of credit note. + CreditNoteDocumentID *string `json:"creditNoteDocumentId,omitempty"` + // InvoiceDocumentID - READ-ONLY; The ID of invoice. + InvoiceDocumentID *string `json:"invoiceDocumentId,omitempty"` + // RebillDetails - READ-ONLY; Rebill details for an invoice. + RebillDetails map[string]*RebillDetails `json:"rebillDetails"` +} + +// MarshalJSON is the custom marshaler for RebillDetails. +func (rd RebillDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // Reseller details of the reseller. type Reseller struct { // ResellerID - READ-ONLY; The MPN ID of the reseller.