Module: Peddler::Types::Invoices20240619

Defined in:
lib/peddler/types/invoices_2024_06_19/error.rb,
lib/peddler/types/invoices_2024_06_19/export.rb,
lib/peddler/types/invoices_2024_06_19/invoice.rb,
lib/peddler/types/invoices_2024_06_19/error_list.rb,
lib/peddler/types/invoices_2024_06_19/attribute_option.rb,
lib/peddler/types/invoices_2024_06_19/invoices_document.rb,
lib/peddler/types/invoices_2024_06_19/invoices_attributes.rb,
lib/peddler/types/invoices_2024_06_19/get_invoice_response.rb,
lib/peddler/types/invoices_2024_06_19/get_invoices_response.rb,
lib/peddler/types/invoices_2024_06_19/transaction_identifier.rb,
lib/peddler/types/invoices_2024_06_19/export_invoices_request.rb,
lib/peddler/types/invoices_2024_06_19/export_invoices_response.rb,
lib/peddler/types/invoices_2024_06_19/get_invoices_export_response.rb,
lib/peddler/types/invoices_2024_06_19/get_invoices_exports_response.rb,
lib/peddler/types/invoices_2024_06_19/get_invoices_document_response.rb,
lib/peddler/types/invoices_2024_06_19/get_invoices_attributes_response.rb

Constant Summary collapse

Error =

The error response that is returned when the request is unsuccessful.

Structure.new do
  # @return [String] An error code that identifies the type of error that occurred.
  attribute(:code, String)

  # @return [String] Additional details that can help the caller understand or fix the issue.
  attribute(:details, String)

  # @return [String] A message that describes the error condition.
  attribute(:message, String)
end
Export =

Detailed information about the export.

Structure.new do
  # @return [String] When the export generation fails, this attribute contains a description of the error.
  attribute(:error_message, String, from: "errorMessage")

  # @return [String] The export identifier.
  attribute(:export_id, String, from: "exportId")

  # @return [String] The date and time when the export generation finished. Vales are in [ISO
  # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
  attribute(:generate_export_finished_at, String, from: "generateExportFinishedAt")

  # @return [String] The date and time when the export generation started. Values are in [ISO
  # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
  attribute(:generate_export_started_at, String, from: "generateExportStartedAt")

  # @return [Array<String>] The identifier for the export documents. To get the information required to retrieve
  # the export document's contents, pass each ID in the `getInvoicesDocument` operation.
  #
  # This list is empty until the status is `DONE`.
  attribute(:invoices_document_ids, [String], from: "invoicesDocumentIds")

  # @return [String]
  attribute(:status, String)
end
Invoice =

Provides detailed information about an invoice.

Structure.new do
  # @return [String] The date and time the invoice is issued. Values are in [ISO
  # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
  attribute(:date, String)

  # @return [String] If the invoice is in an error state, this attribute displays the error code.
  attribute(:error_code, String, from: "errorCode")

  # @return [String] The invoice identifier that is used by an external party. This is typically the government
  # agency that authorized the invoice.
  attribute(:external_invoice_id, String, from: "externalInvoiceId")

  # @return [String] The response message from the government authority when there is an error during invoice
  # issuance.
  attribute(:gov_response, String, from: "govResponse")

  # @return [String] The invoice identifier.
  attribute(:id, String)

  # @return [String] The classification of the invoice type. This varies across marketplaces. Use the
  # `getInvoicesAttributes` operation to check `invoiceType` options.
  attribute(:invoice_type, String, from: "invoiceType")

  # @return [String] Use this identifier in conjunction with `externalInvoiceId` to identify invoices from the
  # same seller.
  attribute(:series, String)

  # @return [String] The invoice status classification. Use the `getInvoicesAttributes` operation to check invoice
  # status options.
  attribute(:status, String)

  # @return [Array<TransactionIdentifier>] List with identifiers for the transactions associated to the invoice.
  attribute(:transaction_ids, [TransactionIdentifier], from: "transactionIds")

  # @return [String] Classification of the transaction that originated this invoice. Use the
  # `getInvoicesAttributes` operation to check `transactionType` options.
  attribute(:transaction_type, String, from: "transactionType")
end
ErrorList =

A list of error responses that are returned when a request is unsuccessful.

Structure.new do
  # @return [Array<Error>] List of errors.
  attribute(:errors, [Error])
end
AttributeOption =

The definition of the attribute option.

Structure.new do
  # @return [String] The description of the attribute value.
  attribute(:description, String)

  # @return [String] The possible values for the attribute option.
  attribute(:value, String)
end
InvoicesDocument =

An object that contains the documentId and an S3 pre-signed URL that you can use to download the specified file.

Structure.new do
  # @return [String] The identifier of the export document.
  attribute(:invoices_document_id, String, from: "invoicesDocumentId")

  # @return [String] A pre-signed URL that you can use to download the invoices document in zip format. This URL
  # expires after 30 seconds.
  attribute(:invoices_document_url, String, from: "invoicesDocumentUrl")
end
InvoicesAttributes =

An object that contains the invoice attributes definition.

Structure.new do
  # @return [Array<AttributeOption>] A list of all the options that are available for the invoice status
  # attribute.
  attribute(:invoice_status_options, [AttributeOption], from: "invoiceStatusOptions")

  # @return [Array<AttributeOption>] A list of all the options that are available for the invoice type attribute.
  attribute(:invoice_type_options, [AttributeOption], from: "invoiceTypeOptions")

  # @return [Array<AttributeOption>] A list of all the options that are available for the transaction identifier
  # name attribute.
  attribute(:transaction_identifier_name_options, [AttributeOption], from: "transactionIdentifierNameOptions")

  # @return [Array<AttributeOption>] A list of all the options that are available for the transaction type
  # attribute.
  attribute(:transaction_type_options, [AttributeOption], from: "transactionTypeOptions")
end
GetInvoiceResponse =

Success.

Structure.new do
  # @return [Invoice]
  attribute(:invoice, Invoice)
end
GetInvoicesResponse =

Success.

Structure.new do
  # @return [Array<Invoice>] A list of invoices.
  attribute(:invoices, [Invoice])

  # @return [String] This token is returned when the number of results exceeds the specified `pageSize` value. To
  # get the next page of results, call the `getInvoices` operation and include this token with the previous call
  # parameters.
  attribute(:next_token, String, from: "nextToken")
end
TransactionIdentifier =

The identifier for a transaction.

Structure.new do
  # @return [String] The transaction identifier name. Use the `getInvoicesAttributes` operation to check
  # `transactionIdentifierName` options.
  attribute(:name, String)

  # @return [String] The transaction identifier.
  attribute(:id, String)
end
ExportInvoicesRequest =

The information required to create the export request.

Structure.new do
  # @return [String] The latest invoice creation date for invoices that you want to include in the response. Dates
  # are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is the
  # time of the request.
  attribute(:date_end, String, from: "dateEnd")

  # @return [String] The earliest invoice creation date for invoices that you want to include in the response.
  # Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default
  # is 24 hours prior to the time of the request.
  attribute(:date_start, String, from: "dateStart")

  # @return [String] The external ID of the invoices you want included in the response.
  attribute(:external_invoice_id, String, from: "externalInvoiceId")

  # @return [String]
  attribute(:file_format, String, from: "fileFormat")

  # @return [String] The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes`
  # operation to check `invoiceType` options.
  attribute(:invoice_type, String, from: "invoiceType")

  # @return [String] The ID of the marketplace from which you want the invoices.
  attribute(:marketplace_id, String, from: "marketplaceId")

  # @return [String] The series number of the invoices you want included in the response.
  attribute(:series, String)

  # @return [Array<String>] A list of statuses that you can use to filter invoices. Use the
  # `getInvoicesAttributes` operation to check invoice status options.
  #
  # Min count: 1
  attribute(:statuses, [String])

  # @return [TransactionIdentifier]
  attribute(:transaction_identifier, TransactionIdentifier, from: "transactionIdentifier")

  # @return [String] The marketplace-specific classification of the transaction type for which the invoice was
  # created. Use the `getInvoicesAttributes` operation to check `transactionType` options
  attribute(:transaction_type, String, from: "transactionType")
end
ExportInvoicesResponse =

Success.

Structure.new do
  # @return [String] The export identifier.
  attribute(:export_id, String, from: "exportId")
end
GetInvoicesExportResponse =

Success.

Structure.new do
  # @return [Export]
  attribute(:export, Export)
end
GetInvoicesExportsResponse =

Success.

Structure.new do
  # @return [Array<Export>] A list of exports.
  attribute(:exports, [Export])

  # @return [String] This token is returned when the number of results exceeds the specified `pageSize` value. To
  # get the next page of results, call the `getInvoices` operation and include this token with the previous call
  # parameters.
  attribute(:next_token, String, from: "nextToken")
end
GetInvoicesDocumentResponse =

Success.

Structure.new do
  # @return [InvoicesDocument]
  attribute(:invoices_document, InvoicesDocument, from: "invoicesDocument")
end
GetInvoicesAttributesResponse =

Success.

Structure.new do
  # @return [InvoicesAttributes]
  attribute(:invoices_attributes, InvoicesAttributes, from: "invoicesAttributes")
end