Documentation ¶
Index ¶
- Constants
- type AdditionalDetails
- type Address
- type ChargeDetails
- type Decimal
- type Error
- type ErrorList
- type InvoiceDetail
- type InvoiceItem
- type ItemQuantity
- type Money
- type PartyIdentification
- type SubmitInvoiceRequest
- type SubmitInvoiceResponse
- type TaxDetail
- type TaxRegistrationDetail
- type TransactionReference
Constants ¶
const ( // AdditionalDetailsTypeSUR captures enum value "SUR" AdditionalDetailsTypeSUR string = "SUR" // AdditionalDetailsTypeOCR captures enum value "OCR" AdditionalDetailsTypeOCR string = "OCR" )
const ( // ChargeDetailsTypeGIFTWRAP captures enum value "GIFTWRAP" ChargeDetailsTypeGIFTWRAP string = "GIFTWRAP" // ChargeDetailsTypeFULFILLMENT captures enum value "FULFILLMENT" ChargeDetailsTypeFULFILLMENT string = "FULFILLMENT" // ChargeDetailsTypeMARKETINGINSERT captures enum value "MARKETINGINSERT" ChargeDetailsTypeMARKETINGINSERT string = "MARKETINGINSERT" // ChargeDetailsTypePACKAGING captures enum value "PACKAGING" ChargeDetailsTypePACKAGING string = "PACKAGING" // ChargeDetailsTypeLOADING captures enum value "LOADING" ChargeDetailsTypeLOADING string = "LOADING" // ChargeDetailsTypeFREIGHTOUT captures enum value "FREIGHTOUT" ChargeDetailsTypeFREIGHTOUT string = "FREIGHTOUT" // ChargeDetailsTypeTAXCOLLECTEDATSOURCE captures enum value "TAX_COLLECTED_AT_SOURCE" ChargeDetailsTypeTAXCOLLECTEDATSOURCE string = "TAX_COLLECTED_AT_SOURCE" )
const ( // TaxDetailTaxTypeCGST captures enum value "CGST" TaxDetailTaxTypeCGST string = "CGST" // TaxDetailTaxTypeSGST captures enum value "SGST" TaxDetailTaxTypeSGST string = "SGST" // TaxDetailTaxTypeCESS captures enum value "CESS" TaxDetailTaxTypeCESS string = "CESS" // TaxDetailTaxTypeUTGST captures enum value "UTGST" TaxDetailTaxTypeUTGST string = "UTGST" // TaxDetailTaxTypeIGST captures enum value "IGST" TaxDetailTaxTypeIGST string = "IGST" // TaxDetailTaxTypeMwStDot captures enum value "MwSt." TaxDetailTaxTypeMwStDot string = "MwSt." // TaxDetailTaxTypePST captures enum value "PST" TaxDetailTaxTypePST string = "PST" // TaxDetailTaxTypeTVA captures enum value "TVA" TaxDetailTaxTypeTVA string = "TVA" // TaxDetailTaxTypeVAT captures enum value "VAT" TaxDetailTaxTypeVAT string = "VAT" // TaxDetailTaxTypeGST captures enum value "GST" TaxDetailTaxTypeGST string = "GST" // TaxDetailTaxTypeST captures enum value "ST" TaxDetailTaxTypeST string = "ST" // TaxDetailTaxTypeConsumption captures enum value "Consumption" TaxDetailTaxTypeConsumption string = "Consumption" // TaxDetailTaxTypeMutuallyDefined captures enum value "MutuallyDefined" TaxDetailTaxTypeMutuallyDefined string = "MutuallyDefined" // TaxDetailTaxTypeDomesticVAT captures enum value "DomesticVAT" TaxDetailTaxTypeDomesticVAT string = "DomesticVAT" )
const ( // TaxRegistrationDetailTaxRegistrationTypeVAT captures enum value "VAT" TaxRegistrationDetailTaxRegistrationTypeVAT string = "VAT" // TaxRegistrationDetailTaxRegistrationTypeGST captures enum value "GST" TaxRegistrationDetailTaxRegistrationTypeGST string = "GST" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalDetails ¶
type AdditionalDetails struct { // The detail of the additional information provided by the selling party. // Required: true Detail *string `json:"detail"` // The language code of the additional information detail. LanguageCode string `json:"languageCode,omitempty"` // The type of the additional information provided by the selling party. // Required: true // Enum: [SUR OCR] Type *string `json:"type"` }
AdditionalDetails A field where the selling party can provide additional information for tax-related or any other purposes.
swagger:model AdditionalDetails
func (*AdditionalDetails) ContextValidate ¶
ContextValidate validates this additional details based on context it is used
func (*AdditionalDetails) MarshalBinary ¶
func (m *AdditionalDetails) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AdditionalDetails) UnmarshalBinary ¶
func (m *AdditionalDetails) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Address ¶
type Address struct { // First line of the address. // Required: true AddressLine1 *string `json:"addressLine1"` // Additional street address information, if required. AddressLine2 string `json:"addressLine2,omitempty"` // Additional street address information, if required. AddressLine3 string `json:"addressLine3,omitempty"` // The city where the person, business or institution is located. // Required: true City *string `json:"city"` // The two digit country code in ISO 3166-1 alpha-2 format. // Required: true CountryCode *string `json:"countryCode"` // The county where person, business or institution is located. County string `json:"county,omitempty"` // The district where person, business or institution is located. District string `json:"district,omitempty"` // The name of the person, business or institution at that address. // Required: true Name *string `json:"name"` // The phone number of the person, business or institution located at that address. Phone string `json:"phone,omitempty"` // The postal code of that address. It conatins a series of letters or digits or both, sometimes including spaces or punctuation. // Required: true PostalCode *string `json:"postalCode"` // The state or region where person, business or institution is located. // Required: true StateOrRegion *string `json:"stateOrRegion"` }
Address Address of the party.
swagger:model Address
func (*Address) ContextValidate ¶
ContextValidate validates this address based on context it is used
func (*Address) MarshalBinary ¶
MarshalBinary interface implementation
func (*Address) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ChargeDetails ¶
type ChargeDetails struct { // charge amount // Required: true ChargeAmount *Money `json:"chargeAmount"` // Individual tax details per line item. TaxDetails []*TaxDetail `json:"taxDetails"` // Type of charge applied. // Required: true // Enum: [GIFTWRAP FULFILLMENT MARKETINGINSERT PACKAGING LOADING FREIGHTOUT TAX_COLLECTED_AT_SOURCE] Type *string `json:"type"` }
ChargeDetails Monetary and tax details of the charge.
swagger:model ChargeDetails
func (*ChargeDetails) ContextValidate ¶
ContextValidate validate this charge details based on the context it is used
func (*ChargeDetails) MarshalBinary ¶
func (m *ChargeDetails) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ChargeDetails) UnmarshalBinary ¶
func (m *ChargeDetails) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Decimal ¶
type Decimal string
Decimal A decimal number with no loss of precision. Useful when precision loss is unacceptable, as with currencies. Follows RFC7159 for number representation. <br>**Pattern** : `^-?(0|([1-9]\d*))(\.\d+)?([eE][+-]?\d+)?$`.
swagger:model Decimal
func (Decimal) ContextValidate ¶
ContextValidate validates this decimal based on context it is used
type Error ¶
type Error struct { // An error code that identifies the type of error that occurred. // Required: true Code *string `json:"code"` // Additional details that can help the caller understand or fix the issue. Details string `json:"details,omitempty"` // A message that describes the error condition. // Required: true Message *string `json:"message"` }
Error Error response returned when the request is unsuccessful.
swagger:model Error
func (*Error) ContextValidate ¶
ContextValidate validates this error based on context it is used
func (*Error) MarshalBinary ¶
MarshalBinary interface implementation
func (*Error) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ErrorList ¶
type ErrorList []*Error
ErrorList A list of error responses returned when a request is unsuccessful.
swagger:model ErrorList
func (ErrorList) ContextValidate ¶
ContextValidate validate this error list based on the context it is used
type InvoiceDetail ¶
type InvoiceDetail struct { // Additional details provided by the selling party, for tax-related or other purposes. AdditionalDetails []*AdditionalDetails `json:"additionalDetails"` // Name, address and tax details of the party to whom this invoice is issued. BillToParty *PartyIdentification `json:"billToParty,omitempty"` // Total charge amount details for all line items. ChargeDetails []*ChargeDetails `json:"chargeDetails"` // Invoice date. // Required: true // Format: date-time InvoiceDate *strfmt.DateTime `json:"invoiceDate"` // The unique invoice number. // Required: true InvoiceNumber *string `json:"invoiceNumber"` // Total amount details of the invoice. // Required: true InvoiceTotal *Money `json:"invoiceTotal"` // Provides the details of the items in this invoice. // Required: true Items []*InvoiceItem `json:"items"` // The payment terms for the invoice. PaymentTermsCode string `json:"paymentTermsCode,omitempty"` // An additional unique reference number used for regulatory or other purposes. ReferenceNumber string `json:"referenceNumber,omitempty"` // Name, address and tax details of the party receiving the payment of this invoice. // Required: true RemitToParty *PartyIdentification `json:"remitToParty"` // Warehouse code of the vendor as in the order. // Required: true ShipFromParty *PartyIdentification `json:"shipFromParty"` // Ship-to country code. ShipToCountryCode string `json:"shipToCountryCode,omitempty"` // Individual tax details per line item. TaxTotals []*TaxDetail `json:"taxTotals"` }
InvoiceDetail invoice detail
swagger:model InvoiceDetail
func (*InvoiceDetail) ContextValidate ¶
ContextValidate validate this invoice detail based on the context it is used
func (*InvoiceDetail) MarshalBinary ¶
func (m *InvoiceDetail) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InvoiceDetail) UnmarshalBinary ¶
func (m *InvoiceDetail) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InvoiceItem ¶
type InvoiceItem struct { // Buyer's standard identification number (ASIN) of an item. BuyerProductIdentifier string `json:"buyerProductIdentifier,omitempty"` // Individual charge details per line item. ChargeDetails []*ChargeDetails `json:"chargeDetails"` // Harmonized System of Nomenclature (HSN) tax code. The HSN number cannot contain alphabets. HsnCode string `json:"hsnCode,omitempty"` // Item quantity invoiced. // Required: true InvoicedQuantity *ItemQuantity `json:"invoicedQuantity"` // Numbering of the item on the purchase order. The first item will be 1, the second 2, and so on. // Required: true ItemSequenceNumber *string `json:"itemSequenceNumber"` // Net price (before tax) to vendor with currency details. // Required: true NetCost *Money `json:"netCost"` // The purchase order number for this order. Formatting Notes: 8-character alpha-numeric code. // Required: true PurchaseOrderNumber *string `json:"purchaseOrderNumber"` // Individual tax details per line item. TaxDetails []*TaxDetail `json:"taxDetails"` // The vendor's order number for this order. VendorOrderNumber string `json:"vendorOrderNumber,omitempty"` // The vendor selected product identification of the item. VendorProductIdentifier string `json:"vendorProductIdentifier,omitempty"` }
InvoiceItem invoice item
swagger:model InvoiceItem
func (*InvoiceItem) ContextValidate ¶
ContextValidate validate this invoice item based on the context it is used
func (*InvoiceItem) MarshalBinary ¶
func (m *InvoiceItem) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InvoiceItem) UnmarshalBinary ¶
func (m *InvoiceItem) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ItemQuantity ¶
type ItemQuantity struct { // Quantity of units available for a specific item. // Required: true Amount *int64 `json:"amount"` // Unit of measure for the available quantity. // Required: true UnitOfMeasure *string `json:"unitOfMeasure"` }
ItemQuantity Details of item quantity.
swagger:model ItemQuantity
func (*ItemQuantity) ContextValidate ¶
ContextValidate validates this item quantity based on context it is used
func (*ItemQuantity) MarshalBinary ¶
func (m *ItemQuantity) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ItemQuantity) UnmarshalBinary ¶
func (m *ItemQuantity) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Money ¶
type Money struct { // amount // Required: true Amount *Decimal `json:"amount"` // Three digit currency code in ISO 4217 format. // Required: true CurrencyCode *string `json:"currencyCode"` }
Money An amount of money, including units in the form of currency.
swagger:model Money
func (*Money) ContextValidate ¶
ContextValidate validate this money based on the context it is used
func (*Money) MarshalBinary ¶
MarshalBinary interface implementation
func (*Money) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type PartyIdentification ¶
type PartyIdentification struct { // Identification of the party by address. Address *Address `json:"address,omitempty"` // Assigned Identification for the party. // Required: true PartyID *string `json:"partyId"` // Tax registration details of the entity. TaxRegistrationDetails []*TaxRegistrationDetail `json:"taxRegistrationDetails"` }
PartyIdentification party identification
swagger:model PartyIdentification
func (*PartyIdentification) ContextValidate ¶
ContextValidate validate this party identification based on the context it is used
func (*PartyIdentification) MarshalBinary ¶
func (m *PartyIdentification) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PartyIdentification) UnmarshalBinary ¶
func (m *PartyIdentification) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SubmitInvoiceRequest ¶
type SubmitInvoiceRequest struct { // invoices Invoices []*InvoiceDetail `json:"invoices"` }
SubmitInvoiceRequest The request schema for the submitInvoice operation.
swagger:model SubmitInvoiceRequest
func (*SubmitInvoiceRequest) ContextValidate ¶
ContextValidate validate this submit invoice request based on the context it is used
func (*SubmitInvoiceRequest) MarshalBinary ¶
func (m *SubmitInvoiceRequest) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SubmitInvoiceRequest) UnmarshalBinary ¶
func (m *SubmitInvoiceRequest) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SubmitInvoiceResponse ¶
type SubmitInvoiceResponse struct { // errors Errors ErrorList `json:"errors,omitempty"` // The response payload for the submitInvoice operation. Payload *TransactionReference `json:"payload,omitempty"` }
SubmitInvoiceResponse The response schema for the submitInvoice operation.
swagger:model SubmitInvoiceResponse
func (*SubmitInvoiceResponse) ContextValidate ¶
ContextValidate validate this submit invoice response based on the context it is used
func (*SubmitInvoiceResponse) MarshalBinary ¶
func (m *SubmitInvoiceResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SubmitInvoiceResponse) UnmarshalBinary ¶
func (m *SubmitInvoiceResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TaxDetail ¶
type TaxDetail struct { // Total tax amount applied on invoice total or an item total. // Required: true TaxAmount *Money `json:"taxAmount"` // Tax percentage applied. Percentage must be expressed in decimal. TaxRate Decimal `json:"taxRate,omitempty"` // Type of the tax applied. // Required: true // Enum: [CGST SGST CESS UTGST IGST MwSt. PST TVA VAT GST ST Consumption MutuallyDefined DomesticVAT] TaxType *string `json:"taxType"` // This field will contain the invoice amount that is taxable at the rate specified in the tax rate field. TaxableAmount *Money `json:"taxableAmount,omitempty"` }
TaxDetail Details of tax amount applied.
swagger:model TaxDetail
func (*TaxDetail) ContextValidate ¶
ContextValidate validate this tax detail based on the context it is used
func (*TaxDetail) MarshalBinary ¶
MarshalBinary interface implementation
func (*TaxDetail) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type TaxRegistrationDetail ¶
type TaxRegistrationDetail struct { // Address associated with the tax registration number. TaxRegistrationAddress *Address `json:"taxRegistrationAddress,omitempty"` // Tax registration message that can be used for additional tax related details. TaxRegistrationMessage string `json:"taxRegistrationMessage,omitempty"` // Tax registration number for the entity. For example, VAT ID, Consumption Tax ID. // Required: true TaxRegistrationNumber *string `json:"taxRegistrationNumber"` // Tax registration type for the entity. // Enum: [VAT GST] TaxRegistrationType string `json:"taxRegistrationType,omitempty"` }
TaxRegistrationDetail Tax registration details of the entity.
swagger:model TaxRegistrationDetail
func (*TaxRegistrationDetail) ContextValidate ¶
ContextValidate validate this tax registration detail based on the context it is used
func (*TaxRegistrationDetail) MarshalBinary ¶
func (m *TaxRegistrationDetail) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TaxRegistrationDetail) UnmarshalBinary ¶
func (m *TaxRegistrationDetail) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TransactionReference ¶
type TransactionReference struct { // GUID to identify this transaction. This value can be used with the Transaction Status API to return the status of this transaction. TransactionID string `json:"transactionId,omitempty"` }
TransactionReference transaction reference
swagger:model TransactionReference
func (*TransactionReference) ContextValidate ¶
ContextValidate validates this transaction reference based on context it is used
func (*TransactionReference) MarshalBinary ¶
func (m *TransactionReference) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TransactionReference) UnmarshalBinary ¶
func (m *TransactionReference) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation