Class: Peddler::APIs::FinancesV0

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/finances_v0.rb,
lib/peddler/apis/finances_v0/error.rb,
lib/peddler/apis/finances_v0/promotion.rb,
lib/peddler/apis/finances_v0/error_list.rb,
lib/peddler/apis/finances_v0/fee_component.rb,
lib/peddler/apis/finances_v0/shipment_item.rb,
lib/peddler/apis/finances_v0/direct_payment.rb,
lib/peddler/apis/finances_v0/promotion_list.rb,
lib/peddler/apis/finances_v0/shipment_event.rb,
lib/peddler/apis/finances_v0/adjustment_item.rb,
lib/peddler/apis/finances_v0/adjustment_event.rb,
lib/peddler/apis/finances_v0/charge_component.rb,
lib/peddler/apis/finances_v0/financial_events.rb,
lib/peddler/apis/finances_v0/charge_instrument.rb,
lib/peddler/apis/finances_v0/retrocharge_event.rb,
lib/peddler/apis/finances_v0/service_fee_event.rb,
lib/peddler/apis/finances_v0/debt_recovery_item.rb,
lib/peddler/apis/finances_v0/fee_component_list.rb,
lib/peddler/apis/finances_v0/shipment_item_list.rb,
lib/peddler/apis/finances_v0/charge_refund_event.rb,
lib/peddler/apis/finances_v0/debt_recovery_event.rb,
lib/peddler/apis/finances_v0/direct_payment_list.rb,
lib/peddler/apis/finances_v0/shipment_event_list.rb,
lib/peddler/apis/finances_v0/adjustment_item_list.rb,
lib/peddler/apis/finances_v0/coupon_payment_event.rb,
lib/peddler/apis/finances_v0/loan_servicing_event.rb,
lib/peddler/apis/finances_v0/trial_shipment_event.rb,
lib/peddler/apis/finances_v0/adjustment_event_list.rb,
lib/peddler/apis/finances_v0/charge_component_list.rb,
lib/peddler/apis/finances_v0/fba_liquidation_event.rb,
lib/peddler/apis/finances_v0/financial_event_group.rb,
lib/peddler/apis/finances_v0/pay_with_amazon_event.rb,
lib/peddler/apis/finances_v0/removal_shipment_item.rb,
lib/peddler/apis/finances_v0/tax_withholding_event.rb,
lib/peddler/apis/finances_v0/charge_instrument_list.rb,
lib/peddler/apis/finances_v0/removal_shipment_event.rb,
lib/peddler/apis/finances_v0/retrocharge_event_list.rb,
lib/peddler/apis/finances_v0/service_fee_event_list.rb,
lib/peddler/apis/finances_v0/tax_withheld_component.rb,
lib/peddler/apis/finances_v0/tax_withholding_period.rb,
lib/peddler/apis/finances_v0/debt_recovery_item_list.rb,
lib/peddler/apis/finances_v0/tds_reimbursement_event.rb,
lib/peddler/apis/finances_v0/adhoc_disbursement_event.rb,
lib/peddler/apis/finances_v0/charge_refund_event_list.rb,
lib/peddler/apis/finances_v0/debt_recovery_event_list.rb,
lib/peddler/apis/finances_v0/rental_transaction_event.rb,
lib/peddler/apis/finances_v0/safet_reimbursement_item.rb,
lib/peddler/apis/finances_v0/charge_refund_transaction.rb,
lib/peddler/apis/finances_v0/coupon_payment_event_list.rb,
lib/peddler/apis/finances_v0/loan_servicing_event_list.rb,
lib/peddler/apis/finances_v0/product_ads_payment_event.rb,
lib/peddler/apis/finances_v0/safet_reimbursement_event.rb,
lib/peddler/apis/finances_v0/seller_deal_payment_event.rb,
lib/peddler/apis/finances_v0/trial_shipment_event_list.rb,
lib/peddler/apis/finances_v0/charge_refund_transactions.rb,
lib/peddler/apis/finances_v0/fba_liquidation_event_list.rb,
lib/peddler/apis/finances_v0/financial_event_group_list.rb,
lib/peddler/apis/finances_v0/imaging_services_fee_event.rb,
lib/peddler/apis/finances_v0/pay_with_amazon_event_list.rb,
lib/peddler/apis/finances_v0/removal_shipment_item_list.rb,
lib/peddler/apis/finances_v0/shipment_settle_event_list.rb,
lib/peddler/apis/finances_v0/tax_withholding_event_list.rb,
lib/peddler/apis/finances_v0/affordability_expense_event.rb,
lib/peddler/apis/finances_v0/removal_shipment_event_list.rb,
lib/peddler/apis/finances_v0/tax_withheld_component_list.rb,
lib/peddler/apis/finances_v0/tds_reimbursement_event_list.rb,
lib/peddler/apis/finances_v0/adhoc_disbursement_event_list.rb,
lib/peddler/apis/finances_v0/list_financial_events_payload.rb,
lib/peddler/apis/finances_v0/rental_transaction_event_list.rb,
lib/peddler/apis/finances_v0/safet_reimbursement_item_list.rb,
lib/peddler/apis/finances_v0/list_financial_events_response.rb,
lib/peddler/apis/finances_v0/product_ads_payment_event_list.rb,
lib/peddler/apis/finances_v0/safet_reimbursement_event_list.rb,
lib/peddler/apis/finances_v0/seller_deal_payment_event_list.rb,
lib/peddler/apis/finances_v0/solution_provider_credit_event.rb,
lib/peddler/apis/finances_v0/failed_adhoc_disbursement_event.rb,
lib/peddler/apis/finances_v0/imaging_services_fee_event_list.rb,
lib/peddler/apis/finances_v0/affordability_expense_event_list.rb,
lib/peddler/apis/finances_v0/removal_shipment_item_adjustment.rb,
lib/peddler/apis/finances_v0/value_added_service_charge_event.rb,
lib/peddler/apis/finances_v0/removal_shipment_adjustment_event.rb,
lib/peddler/apis/finances_v0/capacity_reservation_billing_event.rb,
lib/peddler/apis/finances_v0/ebt_refund_reimbursement_only_event.rb,
lib/peddler/apis/finances_v0/list_financial_event_groups_payload.rb,
lib/peddler/apis/finances_v0/solution_provider_credit_event_list.rb,
lib/peddler/apis/finances_v0/failed_adhoc_disbursement_event_list.rb,
lib/peddler/apis/finances_v0/list_financial_event_groups_response.rb,
lib/peddler/apis/finances_v0/network_commingling_transaction_event.rb,
lib/peddler/apis/finances_v0/value_added_service_charge_event_list.rb,
lib/peddler/apis/finances_v0/removal_shipment_adjustment_event_list.rb,
lib/peddler/apis/finances_v0/seller_review_enrollment_payment_event.rb,
lib/peddler/apis/finances_v0/capacity_reservation_billing_event_list.rb,
lib/peddler/apis/finances_v0/ebt_refund_reimbursement_only_event_list.rb,
lib/peddler/apis/finances_v0/network_commingling_transaction_event_list.rb,
lib/peddler/apis/finances_v0/seller_review_enrollment_payment_event_list.rb

Overview

Selling Partner API for Finances

The Selling Partner API for Finances provides financial information that is relevant to a seller's business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.

Defined Under Namespace

Classes: AdhocDisbursementEventList, AdjustmentEventList, AdjustmentItemList, AffordabilityExpenseEventList, CapacityReservationBillingEventList, ChargeComponentList, ChargeInstrumentList, ChargeRefundEventList, ChargeRefundTransactions, CouponPaymentEventList, DebtRecoveryEventList, DebtRecoveryItemList, DirectPaymentList, EBTRefundReimbursementOnlyEventList, ErrorList, FBALiquidationEventList, FailedAdhocDisbursementEventList, FeeComponentList, FinancialEventGroupList, ImagingServicesFeeEventList, LoanServicingEventList, NetworkComminglingTransactionEventList, PayWithAmazonEventList, ProductAdsPaymentEventList, PromotionList, RemovalShipmentAdjustmentEventList, RemovalShipmentEventList, RemovalShipmentItemList, RentalTransactionEventList, RetrochargeEventList, SAFETReimbursementEventList, SAFETReimbursementItemList, SellerDealPaymentEventList, SellerReviewEnrollmentPaymentEventList, ServiceFeeEventList, ShipmentEventList, ShipmentItemList, ShipmentSettleEventList, SolutionProviderCreditEventList, TDSReimbursementEventList, TaxWithheldComponentList, TaxWithholdingEventList, TrialShipmentEventList, ValueAddedServiceChargeEventList

Constant Summary collapse

Error =

Error response 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] A message that describes the error condition in a human-readable form.
  attribute(:message, String)

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

A promotion applied to an item.

Structure.new do
  # @return [Money] The amount of promotional discount applied to the item.
  attribute?(:promotion_amount, Money, from: "PromotionAmount")

  # @return [String] The seller-specified identifier for the promotion.
  attribute?(:promotion_id, String, from: "PromotionId")

  # @return [String] The type of promotion.
  attribute?(:promotion_type, String, from: "PromotionType")
end
FeeComponent =

A fee associated with the event.

Structure.new do
  # @return [Money] The amount of the fee.
  attribute?(:fee_amount, Money, from: "FeeAmount")

  # @return [String] The type of fee. For more information about Selling on Amazon fees, see [Selling on Amazon
  #   Fee Schedule](https://sellercentral.amazon.com/gp/help/200336920) on Seller Central. For more information
  #   about Fulfillment by Amazon fees, see [FBA features, services and
  #   fees](https://sellercentral.amazon.com/gp/help/201074400) on Seller Central.
  attribute?(:fee_type, String, from: "FeeType")
end
ShipmentItem =

An item of a shipment, refund, guarantee claim, or chargeback.

Structure.new do
  # @return [Money] The cost of Amazon Points granted for a shipment item.
  attribute?(:cost_of_points_granted, Money, from: "CostOfPointsGranted")

  # @return [Money] The cost of Amazon Points returned for a shipment item. This value is only returned for
  #   refunds, guarantee claims, and chargeback events.
  attribute?(:cost_of_points_returned, Money, from: "CostOfPointsReturned")

  # @return [Array<ChargeComponent>] A list of charge adjustments associated with the shipment item. This value is
  #   only returned for refunds, guarantee claims, and chargeback events.
  attribute?(:item_charge_adjustment_list, [ChargeComponent], from: "ItemChargeAdjustmentList")

  # @return [Array<ChargeComponent>] A list of charges associated with the shipment item.
  attribute?(:item_charge_list, [ChargeComponent], from: "ItemChargeList")

  # @return [Array<FeeComponent>] A list of fee adjustments associated with the shipment item. This value is only
  #   returned for refunds, guarantee claims, and chargeback events.
  attribute?(:item_fee_adjustment_list, [FeeComponent], from: "ItemFeeAdjustmentList")

  # @return [Array<FeeComponent>] A list of fees associated with the shipment item.
  attribute?(:item_fee_list, [FeeComponent], from: "ItemFeeList")

  # @return [Array<TaxWithheldComponent>] A list of taxes withheld information for a shipment item.
  attribute?(:item_tax_withheld_list, [TaxWithheldComponent], from: "ItemTaxWithheldList")

  # @return [String] An Amazon-defined order adjustment identifier defined for refunds, guarantee claims, and
  #   chargeback events.
  attribute?(:order_adjustment_item_id, String, from: "OrderAdjustmentItemId")

  # @return [String] An Amazon-defined order item identifier.
  attribute?(:order_item_id, String, from: "OrderItemId")

  # @return [Array<Promotion>] A list of promotion adjustments associated with the shipment item. This value is
  #   only returned for refunds, guarantee claims, and chargeback events.
  attribute?(:promotion_adjustment_list, [Promotion], from: "PromotionAdjustmentList")

  # @return [Array<Promotion>]
  attribute?(:promotion_list, [Promotion], from: "PromotionList")

  # @return [Integer] The number of items shipped.
  attribute?(:quantity_shipped, Integer, from: "QuantityShipped")

  # @return [String] The seller SKU of the item. The seller SKU is qualified by the seller's seller ID, which is
  #   included with every call to the Selling Partner API.
  attribute?(:seller_sku, String, from: "SellerSKU")
end
DirectPayment =

A payment made directly to a seller.

Structure.new do
  # @return [Money] The amount of the direct payment.
  attribute?(:direct_payment_amount, Money, from: "DirectPaymentAmount")

  # @return [String] The type of payment.
  #
  # Possible values:
  #
  # * `StoredValueCardRevenue` - The amount that is deducted from the seller's account because the seller received
  #   money through a stored value card.
  #
  # * `StoredValueCardRefund` - The amount that Amazon returns to the seller if the order that is purchased using
  #   a stored value card is refunded.
  #
  # * `PrivateLabelCreditCardRevenue` - The amount that is deducted from the seller's account because the seller
  #   received money through a private label credit card offered by Amazon.
  #
  # * `PrivateLabelCreditCardRefund` - The amount that Amazon returns to the seller if the order that is purchased
  #   using a private label credit card offered by Amazon is refunded.
  #
  # * `CollectOnDeliveryRevenue` - The COD amount that the seller collected directly from the buyer.
  #
  # * `CollectOnDeliveryRefund` - The amount that Amazon refunds to the buyer if an order paid for by COD is
  #   refunded.
  attribute?(:direct_payment_type, String, from: "DirectPaymentType")
end
ShipmentEvent =

A shipment, refund, guarantee claim, or chargeback.

Structure.new do
  # @return [String] An Amazon-defined identifier for an order.
  attribute?(:amazon_order_id, String, from: "AmazonOrderId")

  # @return [Array<DirectPayment>] A list of transactions where buyers pay Amazon through one of the credit cards
  #   offered by Amazon or where buyers pay a seller directly through COD.
  attribute?(:direct_payment_list, [DirectPayment], from: "DirectPaymentList")

  # @return [String] The name of the marketplace where the event occurred.
  attribute?(:marketplace_name, String, from: "MarketplaceName")

  # @return [Array<ChargeComponent>] A list of order-level charge adjustments. These adjustments are applicable to
  #   Multi-Channel Fulfillment COD orders.
  attribute?(:order_charge_adjustment_list, [ChargeComponent], from: "OrderChargeAdjustmentList")

  # @return [Array<ChargeComponent>] A list of order-level charges. These charges are applicable to Multi-Channel
  #   Fulfillment COD orders.
  attribute?(:order_charge_list, [ChargeComponent], from: "OrderChargeList")

  # @return [Array<FeeComponent>] A list of order-level fee adjustments. These adjustments are applicable to
  #   Multi-Channel Fulfillment orders.
  attribute?(:order_fee_adjustment_list, [FeeComponent], from: "OrderFeeAdjustmentList")

  # @return [Array<FeeComponent>] A list of order-level fees. These charges are applicable to Multi-Channel
  #   Fulfillment orders.
  attribute?(:order_fee_list, [FeeComponent], from: "OrderFeeList")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [String] A seller-defined identifier for an order.
  attribute?(:seller_order_id, String, from: "SellerOrderId")

  # @return [Array<FeeComponent>] A list of shipment-level fee adjustments.
  attribute?(:shipment_fee_adjustment_list, [FeeComponent], from: "ShipmentFeeAdjustmentList")

  # @return [Array<FeeComponent>] A list of shipment-level fees.
  attribute?(:shipment_fee_list, [FeeComponent], from: "ShipmentFeeList")

  # @return [Array<ShipmentItem>] A list of shipment item adjustments.
  attribute?(:shipment_item_adjustment_list, [ShipmentItem], from: "ShipmentItemAdjustmentList")

  # @return [Array<ShipmentItem>]
  attribute?(:shipment_item_list, [ShipmentItem], from: "ShipmentItemList")

  # @return [String] The name of the store where the event occurred.
  attribute?(:store_name, String, from: "StoreName")
end
AdjustmentItem =

An item in an adjustment to the seller's account.

Structure.new do
  # @return [String] The Amazon Standard Identification Number (ASIN) of the item.
  attribute?(:asin, String, from: "ASIN")

  # @return [String] A unique identifier assigned to products stored in and fulfilled from a fulfillment center.
  attribute?(:fn_sku, String, from: "FnSKU")

  # @return [Money] The per-unit value of the item.
  attribute?(:per_unit_amount, Money, from: "PerUnitAmount")

  # @return [String] A short description of the item.
  attribute?(:product_description, String, from: "ProductDescription")

  # @return [String] Represents the number of units in the seller's inventory when the `AdjustmentType` is
  #   `FBAInventoryReimbursement`.
  attribute?(:quantity, String, from: "Quantity")

  # @return [String] The seller SKU of the item. The seller SKU is qualified by the seller's seller ID, which is
  #   included with every call to the Selling Partner API.
  attribute?(:seller_sku, String, from: "SellerSKU")

  # @return [Money] The total value of the item.
  attribute?(:total_amount, Money, from: "TotalAmount")

  # @return [String] The transaction number that is related to the adjustment.
  attribute?(:transaction_number, String, from: "TransactionNumber")
end
AdjustmentEvent =

An adjustment to the seller's account.

Structure.new do
  # @return [Money] The amount adjusted as part of this event.
  attribute?(:adjustment_amount, Money, from: "AdjustmentAmount")

  # @return [Array<AdjustmentItem>] A list of information about adjustments to an account.
  attribute?(:adjustment_item_list, [AdjustmentItem], from: "AdjustmentItemList")

  # @return [String] The type of adjustment.
  #
  # Possible values:
  #
  # * `FBAInventoryReimbursement`: An FBA inventory reimbursement to a seller's account. This occurs if a seller's
  #   inventory is damaged.
  # * `ReserveEvent`: A reserve event that is generated at the time a settlement period closes. This occurs when
  #   some money from a seller's account is held back.
  # * `PostageBilling`: The amount paid by a seller for shipping labels.
  # * `PostageRefund`: The reimbursement of shipping labels purchased for orders that were canceled or refunded.
  # * `LostOrDamagedReimbursement`: An Amazon Easy Ship reimbursement to a seller's account for a package that we
  #   lost or damaged.
  # * `CanceledButPickedUpReimbursement`: An Amazon Easy Ship reimbursement to a seller's account. This occurs
  #   when a package is picked up and the order is subsequently canceled. This value is used only in the India
  #   marketplace.
  # * `ReimbursementClawback`: An Amazon Easy Ship reimbursement clawback from a seller's account. This occurs
  #   when a prior reimbursement is reversed. This value is used only in the India marketplace.
  # * `SellerRewards`: An award credited to a seller's account for their participation in an offer in the Seller
  #   Rewards program. Applies only to the India marketplace.
  attribute?(:adjustment_type, String, from: "AdjustmentType")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [String] The name of the store where the event occurred.
  attribute?(:store_name, String, from: "StoreName")
end
ChargeComponent =

A charge on the seller's account.

Possible values:

  • Principal: The selling price of the order item, which is equal to the selling price of the item multiplied by the quantity ordered.

  • Tax: The tax on the principal that is collected by the seller.

  • MarketplaceFacilitatorTax-Principal: The tax that is withheld on the principal.

  • MarketplaceFacilitatorTax-Shipping: The tax that is withheld on the ShippingCharge.

  • MarketplaceFacilitatorTax-Giftwrap: The tax that is withheld on the Giftwrap charge.

  • MarketplaceFacilitatorTax-Other: The tax that is withheld on other miscellaneous charges.

  • Discount: The promotional discount for an order item.

  • TaxDiscount: The tax that is deducted for promotional rebates.

  • CODItemCharge: The COD charge for an order item.

  • CODItemTaxCharge: The tax that is collected by the seller on a CODItemCharge.

  • CODOrderCharge: The COD charge for an order.

  • CODOrderTaxCharge: The tax that is collected by the seller on a CODOrderCharge.

  • CODShippingCharge: Shipping charges for a COD order.

  • CODShippingTaxCharge: The tax that is collected by the seller on a CODShippingCharge.

  • ShippingCharge: The shipping charge.

  • ShippingTax: The tax that is collected by the seller on a ShippingCharge.

  • Goodwill: The amount of money that is given to a buyer as a gesture of goodwill or to compensate for pain and suffering in the buying experience.

  • Giftwrap: The gift wrap charge.

  • GiftwrapTax: The tax that is collected by the seller on a gift wrap charge.

  • RestockingFee: The charge that is applied to the buyer when returning a product in certain categories.

  • ReturnShipping: The amount of money that is given to the buyer to compensate for shipping the item back if we are at fault.

  • PointsFee: The value of Amazon Points deducted from the refund if the buyer does not have enough Amazon Points to cover the deduction.

  • GenericDeduction: A generic bad debt deduction.

  • FreeReplacementReturnShipping: The compensation for return shipping when a buyer receives the wrong item, requests a free replacement, and returns the incorrect item.

  • PaymentMethodFee: The fee that is collected for certain payment methods in certain marketplaces.

  • ExportCharge: The export duty that is charged when an item is shipped to an international destination as part of the Amazon Global program.

  • SAFE-TReimbursement: The SAFE-T claim amount for the item.

  • TCS-CGST: Tax Collected at Source (TCS) for Central Goods and Services Tax (CGST).

  • TCS-SGST: Tax Collected at Source for State Goods and Services Tax (SGST).

  • TCS-IGST: Tax Collected at Source for Integrated Goods and Services Tax (IGST).

  • TCS-UTGST: Tax Collected at Source for Union Territories Goods and Services Tax (UTGST).

  • PaidthroughEBT: The amount of money paid with EBT for any order or shipment items.

Structure.new do
  # @return [Money] The amount of the charge.
  attribute?(:charge_amount, Money, from: "ChargeAmount")

  # @return [String] The type of charge.
  attribute?(:charge_type, String, from: "ChargeType")
end
FinancialEvents =

All the information that is related to a financial event.

Structure.new do
  # @return [Array<AdhocDisbursementEvent>]
  attribute?(:adhoc_disbursement_event_list, [AdhocDisbursementEvent], from: "AdhocDisbursementEventList")

  # @return [Array<AdjustmentEvent>]
  attribute?(:adjustment_event_list, [AdjustmentEvent], from: "AdjustmentEventList")

  # @return [Array<AffordabilityExpenseEvent>]
  attribute?(:affordability_expense_event_list, [AffordabilityExpenseEvent], from: "AffordabilityExpenseEventList")

  # @return [Array<AffordabilityExpenseEvent>]
  attribute?(:affordability_expense_reversal_event_list, [AffordabilityExpenseEvent], from: "AffordabilityExpenseReversalEventList")

  # @return [Array<CapacityReservationBillingEvent>]
  attribute?(:capacity_reservation_billing_event_list, [CapacityReservationBillingEvent], from: "CapacityReservationBillingEventList")

  # @return [Array<ChargeRefundEvent>]
  attribute?(:charge_refund_event_list, [ChargeRefundEvent], from: "ChargeRefundEventList")

  # @return [Array<ShipmentEvent>] A list of chargeback events.
  attribute?(:chargeback_event_list, [ShipmentEvent], from: "ChargebackEventList")

  # @return [Array<CouponPaymentEvent>]
  attribute?(:coupon_payment_event_list, [CouponPaymentEvent], from: "CouponPaymentEventList")

  # @return [Array<DebtRecoveryEvent>]
  attribute?(:debt_recovery_event_list, [DebtRecoveryEvent], from: "DebtRecoveryEventList")

  # @return [Array<EBTRefundReimbursementOnlyEvent>] A list of EBT refund reimbursement events.
  attribute?(:ebt_refund_reimbursement_only_event_list, [EBTRefundReimbursementOnlyEvent], from: "EBTRefundReimbursementOnlyEventList")

  # @return [Array<FBALiquidationEvent>]
  attribute?(:fba_liquidation_event_list, [FBALiquidationEvent], from: "FBALiquidationEventList")

  # @return [Array<FailedAdhocDisbursementEvent>]
  attribute?(:failed_adhoc_disbursement_event_list, [FailedAdhocDisbursementEvent], from: "FailedAdhocDisbursementEventList")

  # @return [Array<ShipmentEvent>] A list of guarantee claim events.
  attribute?(:guarantee_claim_event_list, [ShipmentEvent], from: "GuaranteeClaimEventList")

  # @return [Array<ImagingServicesFeeEvent>]
  attribute?(:imaging_services_fee_event_list, [ImagingServicesFeeEvent], from: "ImagingServicesFeeEventList")

  # @return [Array<LoanServicingEvent>]
  attribute?(:loan_servicing_event_list, [LoanServicingEvent], from: "LoanServicingEventList")

  # @return [Array<NetworkComminglingTransactionEvent>]
  attribute?(:network_commingling_transaction_event_list, [NetworkComminglingTransactionEvent], from: "NetworkComminglingTransactionEventList")

  # @return [Array<PayWithAmazonEvent>]
  attribute?(:pay_with_amazon_event_list, [PayWithAmazonEvent], from: "PayWithAmazonEventList")

  # @return [Array<ProductAdsPaymentEvent>]
  attribute?(:product_ads_payment_event_list, [ProductAdsPaymentEvent], from: "ProductAdsPaymentEventList")

  # @return [Array<ShipmentEvent>] A list of refund events.
  attribute?(:refund_event_list, [ShipmentEvent], from: "RefundEventList")

  # @return [Array<RemovalShipmentAdjustmentEvent>]
  attribute?(:removal_shipment_adjustment_event_list, [RemovalShipmentAdjustmentEvent], from: "RemovalShipmentAdjustmentEventList")

  # @return [Array<RemovalShipmentEvent>]
  attribute?(:removal_shipment_event_list, [RemovalShipmentEvent], from: "RemovalShipmentEventList")

  # @return [Array<RentalTransactionEvent>]
  attribute?(:rental_transaction_event_list, [RentalTransactionEvent], from: "RentalTransactionEventList")

  # @return [Array<RetrochargeEvent>]
  attribute?(:retrocharge_event_list, [RetrochargeEvent], from: "RetrochargeEventList")

  # @return [Array<SAFETReimbursementEvent>]
  attribute?(:safet_reimbursement_event_list, [SAFETReimbursementEvent], from: "SAFETReimbursementEventList")

  # @return [Array<SellerDealPaymentEvent>]
  attribute?(:seller_deal_payment_event_list, [SellerDealPaymentEvent], from: "SellerDealPaymentEventList")

  # @return [Array<SellerReviewEnrollmentPaymentEvent>]
  attribute?(:seller_review_enrollment_payment_event_list, [SellerReviewEnrollmentPaymentEvent], from: "SellerReviewEnrollmentPaymentEventList")

  # @return [Array<ServiceFeeEvent>]
  attribute?(:service_fee_event_list, [ServiceFeeEvent], from: "ServiceFeeEventList")

  # @return [Array<SolutionProviderCreditEvent>]
  attribute?(:service_provider_credit_event_list, [SolutionProviderCreditEvent], from: "ServiceProviderCreditEventList")

  # @return [Array<ShipmentEvent>] A list of shipment events.
  attribute?(:shipment_event_list, [ShipmentEvent], from: "ShipmentEventList")

  # @return [Array<ShipmentEvent>] A list of Shipment Settle events.
  attribute?(:shipment_settle_event_list, [ShipmentEvent], from: "ShipmentSettleEventList")

  # @return [Array<TDSReimbursementEvent>]
  attribute?(:tds_reimbursement_event_list, [TDSReimbursementEvent], from: "TDSReimbursementEventList")

  # @return [Array<TaxWithholdingEvent>]
  attribute?(:tax_withholding_event_list, [TaxWithholdingEvent], from: "TaxWithholdingEventList")

  # @return [Array<TrialShipmentEvent>]
  attribute?(:trial_shipment_event_list, [TrialShipmentEvent], from: "TrialShipmentEventList")

  # @return [Array<ValueAddedServiceChargeEvent>]
  attribute?(:value_added_service_charge_event_list, [ValueAddedServiceChargeEvent], from: "ValueAddedServiceChargeEventList")
end
ChargeInstrument =

A payment instrument.

Structure.new do
  # @return [Money] The amount charged to this charge instrument.
  attribute?(:amount, Money, from: "Amount")

  # @return [String] A short description of the charge instrument.
  attribute?(:description, String, from: "Description")

  # @return [String] The account tail (trailing digits) of the charge instrument.
  attribute?(:tail, String, from: "Tail")
end
RetrochargeEvent =

A retrocharge or retrocharge reversal.

Structure.new do
  # @return [String] An Amazon-defined identifier for an order.
  attribute?(:amazon_order_id, String, from: "AmazonOrderId")

  # @return [Money] The base tax associated with the retrocharge event.
  attribute?(:base_tax, Money, from: "BaseTax")

  # @return [String] The name of the marketplace where the retrocharge event occurred.
  attribute?(:marketplace_name, String, from: "MarketplaceName")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [String] The type of event.
  #
  # Possible values:
  #
  # * `Retrocharge`
  #
  # * `RetrochargeReversal`
  attribute?(:retrocharge_event_type, String, from: "RetrochargeEventType")

  # @return [Array<TaxWithheldComponent>] A list of information about taxes withheld.
  attribute?(:retrocharge_tax_withheld_list, [TaxWithheldComponent], from: "RetrochargeTaxWithheldList")

  # @return [Money] The shipping tax associated with the retrocharge event.
  attribute?(:shipping_tax, Money, from: "ShippingTax")
end
ServiceFeeEvent =

A service fee on the seller's account.

Structure.new do
  # @return [String] The Amazon Standard Identification Number (ASIN) of the item.
  attribute?(:asin, String, from: "ASIN")

  # @return [String] An Amazon-defined identifier for an order.
  attribute?(:amazon_order_id, String, from: "AmazonOrderId")

  # @return [String] A short description of the service fee event.
  attribute?(:fee_description, String, from: "FeeDescription")

  # @return [Array<FeeComponent>] A list of fee components associated with the service fee.
  attribute?(:fee_list, [FeeComponent], from: "FeeList")

  # @return [String] A short description of the service fee reason.
  attribute?(:fee_reason, String, from: "FeeReason")

  # @return [String] A unique identifier assigned by Amazon to products stored in and fulfilled from an Amazon
  #   fulfillment center.
  attribute?(:fn_sku, String, from: "FnSKU")

  # @return [String] The seller SKU of the item. The seller SKU is qualified by the seller's seller ID, which is
  #   included with every call to the Selling Partner API.
  attribute?(:seller_sku, String, from: "SellerSKU")

  # @return [String] The name of the store where the event occurred.
  attribute?(:store_name, String, from: "StoreName")
end
DebtRecoveryItem =

An item of a debt payment or debt adjustment.

Structure.new do
  # @return [String] The start date and time of the financial event group that contains the debt. In [ISO
  #   8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
  attribute?(:group_begin_date, String, from: "GroupBeginDate")

  # @return [String] The end date and time of the financial event group that contains the debt. In [ISO
  #   8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
  attribute?(:group_end_date, String, from: "GroupEndDate")

  # @return [Money] The original debt amount.
  attribute?(:original_amount, Money, from: "OriginalAmount")

  # @return [Money] The amount applied for the recovery item.
  attribute?(:recovery_amount, Money, from: "RecoveryAmount")
end
ChargeRefundEvent =

An event related to charge refund.

Structure.new do
  # @return [Array<ChargeRefundTransaction>] The amount of the charge refund credit.
  attribute?(:charge_refund_transactions, [ChargeRefundTransaction], from: "ChargeRefundTransactions")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [String] The reason given for a charge refund. For example, `SubscriptionFeeCorrection`.
  attribute?(:reason_code, String, from: "ReasonCode")

  # @return [String] A description of the Reason Code. For example, `SubscriptionFeeCorrection`.
  attribute?(:reason_code_description, String, from: "ReasonCodeDescription")
end
DebtRecoveryEvent =

A debt payment or debt adjustment.

Structure.new do
  # @return [Array<ChargeInstrument>]
  attribute?(:charge_instrument_list, [ChargeInstrument], from: "ChargeInstrumentList")

  # @return [Array<DebtRecoveryItem>]
  attribute?(:debt_recovery_item_list, [DebtRecoveryItem], from: "DebtRecoveryItemList")

  # @return [String] The debt recovery type.
  #
  # Possible values:
  #
  # * `DebtPayment` * `DebtPaymentFailure` * `DebtAdjustment`
  attribute?(:debt_recovery_type, String, from: "DebtRecoveryType")

  # @return [Money] The amount returned for overpayment.
  attribute?(:over_payment_credit, Money, from: "OverPaymentCredit")

  # @return [Money] The amount applied for recovery.
  attribute?(:recovery_amount, Money, from: "RecoveryAmount")
end
CouponPaymentEvent =

An event related to coupon payments.

Structure.new do
  # @return [ChargeComponent]
  attribute?(:charge_component, ChargeComponent, from: "ChargeComponent")

  # @return [Integer] The number of coupon clips or redemptions.
  attribute?(:clip_or_redemption_count, Integer, from: "ClipOrRedemptionCount")

  # @return [String] A coupon identifier.
  attribute?(:coupon_id, String, from: "CouponId")

  # @return [FeeComponent]
  attribute?(:fee_component, FeeComponent, from: "FeeComponent")

  # @return [String] A payment event identifier.
  attribute?(:payment_event_id, String, from: "PaymentEventId")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [String] The description provided by the seller when they created the coupon.
  attribute?(:seller_coupon_description, String, from: "SellerCouponDescription")

  # @return [Money] The `FeeComponent` value plus the `ChargeComponent` value.
  attribute?(:total_amount, Money, from: "TotalAmount")
end
LoanServicingEvent =

A loan advance, loan payment, or loan refund.

Structure.new do
  # @return [Money] The amount of the loan.
  attribute?(:loan_amount, Money, from: "LoanAmount")

  # @return [String] The type of event.
  #
  # Possible values:
  #
  # * `LoanAdvance`
  #
  # * `LoanPayment`
  #
  # * `LoanRefund`
  attribute?(:source_business_event_type, String, from: "SourceBusinessEventType")
end
TrialShipmentEvent =

An event related to a trial shipment.

Structure.new do
  # @return [String] An Amazon-defined identifier for an order.
  attribute?(:amazon_order_id, String, from: "AmazonOrderId")

  # @return [Array<FeeComponent>] A list of fees charged by Amazon for trial shipments.
  attribute?(:fee_list, [FeeComponent], from: "FeeList")

  # @return [String] The identifier of the financial event group.
  attribute?(:financial_event_group_id, String, from: "FinancialEventGroupId")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [String] The seller SKU of the item. The seller SKU is qualified by the seller's seller ID, which is
  #   included with every call to the Selling Partner API.
  attribute?(:sku, String, from: "SKU")
end
FBALiquidationEvent =

A payment event for Fulfillment by Amazon (FBA) inventory liquidation. This event is used only in the US marketplace.

Structure.new do
  # @return [Money] The fee charged to the seller by Amazon for liquidating the seller's FBA inventory.
  attribute?(:liquidation_fee_amount, Money, from: "LiquidationFeeAmount")

  # @return [Money] The amount paid by the liquidator for the seller's inventory. The seller receives this amount
  #   minus `LiquidationFeeAmount`.
  attribute?(:liquidation_proceeds_amount, Money, from: "LiquidationProceedsAmount")

  # @return [String] The identifier for the original removal order.
  attribute?(:original_removal_order_id, String, from: "OriginalRemovalOrderId")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")
end
FinancialEventGroup =

Information related to a financial event group.

Structure.new do
  # @return [String] The account tail of the payment instrument.
  attribute?(:account_tail, String, from: "AccountTail")

  # @return [Money] The balance at the start of the settlement period.
  attribute?(:beginning_balance, Money, from: "BeginningBalance")

  # @return [Money] The total amount in the currency of the marketplace in which the funds were disbursed.
  attribute?(:converted_total, Money, from: "ConvertedTotal")

  # @return [String] The date and time at which the financial event group is closed. In [ISO
  #   8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
  attribute?(:financial_event_group_end, String, from: "FinancialEventGroupEnd")

  # @return [String] A unique identifier for the financial event group.
  attribute?(:financial_event_group_id, String, from: "FinancialEventGroupId")

  # @return [String] The date and time at which the financial event group is opened. In [ISO
  #   8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
  attribute?(:financial_event_group_start, String, from: "FinancialEventGroupStart")

  # @return [String] The date and time when the disbursement or charge was initiated. Only present for closed
  #   settlements. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
  attribute?(:fund_transfer_date, String, from: "FundTransferDate")

  # @return [String] The status of the fund transfer.
  attribute?(:fund_transfer_status, String, from: "FundTransferStatus")

  # @return [Money] The total amount in the currency of the marketplace in which the transactions occurred. For a
  #   closed financial group, this is the total amount of a disbursement or a charge amount. For an open financial
  #   event group, this is the current balance.
  attribute?(:original_total, Money, from: "OriginalTotal")

  # @return [String] The processing status of the financial event group indicates whether the balance of the
  #   financial event group is settled.
  #
  # Possible values:
  #
  # * `Open` * `Closed`
  attribute?(:processing_status, String, from: "ProcessingStatus")

  # @return [String] The trace identifier used by sellers to look up transactions externally.
  attribute?(:trace_id, String, from: "TraceId")
end
PayWithAmazonEvent =

An event related to the seller's Pay with Amazon account.

Structure.new do
  # @return [String] A short description of this payment event.
  attribute?(:amount_description, String, from: "AmountDescription")

  # @return [String] The type of business object.
  attribute?(:business_object_type, String, from: "BusinessObjectType")

  # @return [ChargeComponent] The charge associated with the event.
  attribute?(:charge, ChargeComponent, from: "Charge")

  # @return [Array<FeeComponent>] A list of fees associated with the event.
  attribute?(:fee_list, [FeeComponent], from: "FeeList")

  # @return [String] The fulfillment channel.
  #
  # Possible values:
  #
  # * `AFN`: Amazon Fulfillment Network (Fulfillment by Amazon)
  #
  # * `MFN`: Merchant Fulfillment Network (self-fulfilled)
  attribute?(:fulfillment_channel, String, from: "FulfillmentChannel")

  # @return [String] The type of payment.
  #
  # Possible values:
  #
  # * `Sales`
  attribute?(:payment_amount_type, String, from: "PaymentAmountType")

  # @return [String] The sales channel for the transaction.
  attribute?(:sales_channel, String, from: "SalesChannel")

  # @return [String] An order identifier that is specified by the seller.
  attribute?(:seller_order_id, String, from: "SellerOrderId")

  # @return [String] The name of the store where the event occurred.
  attribute?(:store_name, String, from: "StoreName")

  # @return [String] The date and time when the payment transaction is posted. In [ISO
  #   8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
  attribute?(:transaction_posted_date, String, from: "TransactionPostedDate")
end
RemovalShipmentItem =

Item-level information for a removal shipment.

Structure.new do
  # @return [Money] The fee that Amazon charged to the seller for the removal of the item. The amount is a
  #   negative number.
  attribute?(:fee_amount, Money, from: "FeeAmount")

  # @return [String] The Amazon fulfillment network SKU for the item.
  attribute?(:fulfillment_network_sku, String, from: "FulfillmentNetworkSKU")

  # @return [Integer] The quantity of the item.
  attribute?(:quantity, Integer, from: "Quantity")

  # @return [String] An identifier for an item in a removal shipment.
  attribute?(:removal_shipment_item_id, String, from: "RemovalShipmentItemId")

  # @return [Money] The total amount paid to the seller for the removed item.
  attribute?(:revenue, Money, from: "Revenue")

  # @return [Money] Tax collected on the revenue.
  attribute?(:tax_amount, Money, from: "TaxAmount")

  # @return [String] The tax collection model that is applied to the item.
  #
  # Possible values:
  #
  # * `MarketplaceFacilitator`: Tax is withheld and remitted to the taxing authority by Amazon on behalf of the
  #   seller.
  # * `Standard`: Tax is paid to the seller and not remitted to the taxing authority by Amazon.
  attribute?(:tax_collection_model, String, from: "TaxCollectionModel")

  # @return [Money] The tax withheld and remitted to the taxing authority by Amazon on behalf of the seller. If
  #   `TaxCollectionModel` = `MarketplaceFacilitator`, then `TaxWithheld` = `TaxAmount` (except when the
  #   `TaxWithheld` amount is a negative number). Otherwise, `TaxWithheld` = `0`.
  attribute?(:tax_withheld, Money, from: "TaxWithheld")
end
TaxWithholdingEvent =

A tax withholding event on a seller's account.

Structure.new do
  # @return [Money] The amount which tax was withheld against.
  attribute?(:base_amount, Money, from: "BaseAmount")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [TaxWithholdingPeriod] Time period for which tax is withheld.
  attribute?(:tax_withholding_period, TaxWithholdingPeriod, from: "TaxWithholdingPeriod")

  # @return [Money] The amount of the tax withholding deducted from seller's account.
  attribute?(:withheld_amount, Money, from: "WithheldAmount")
end
RemovalShipmentEvent =

A removal shipment event for a removal order.

Structure.new do
  # @return [String] The merchant removal `orderId`.
  attribute?(:merchant_order_id, String, from: "MerchantOrderId")

  # @return [String] The identifier for the removal shipment order.
  attribute?(:order_id, String, from: "OrderId")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [Array<RemovalShipmentItem>] A list of removal shipment items.
  attribute?(:removal_shipment_item_list, [RemovalShipmentItem], from: "RemovalShipmentItemList")

  # @return [String] The name of the store where the event occurred.
  attribute?(:store_name, String, from: "StoreName")

  # @return [String] The type of removal order.
  #
  # Possible values:
  #
  # * `WHOLESALE_LIQUIDATION`
  attribute?(:transaction_type, String, from: "TransactionType")
end
TaxWithheldComponent =

Information about the taxes withheld.

Structure.new do
  # @return [String] The tax collection model applied to the item.
  #
  # Possible values:
  #
  # * `MarketplaceFacilitator`: Tax is withheld and remitted to the taxing authority by Amazon on behalf of the
  #   seller.
  # * `Standard`: Tax is paid to the seller and not remitted to the taxing authority by Amazon.
  attribute?(:tax_collection_model, String, from: "TaxCollectionModel")

  # @return [Array<ChargeComponent>] A list of charges that represent the types and amounts of taxes withheld.
  attribute?(:taxes_withheld, [ChargeComponent], from: "TaxesWithheld")
end
TaxWithholdingPeriod =

The period during which tax withholding on a seller's account is calculated.

Structure.new do
  # @return [String] End of the time range.
  attribute?(:end_date, String, from: "EndDate")

  # @return [String] Start of the time range.
  attribute?(:start_date, String, from: "StartDate")
end
TDSReimbursementEvent =

An event related to a Tax-Deducted-at-Source (TDS) reimbursement.

Structure.new do
  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [Money] The amount reimbursed.
  attribute?(:reimbursed_amount, Money, from: "ReimbursedAmount")

  # @return [String] The Tax-Deducted-at-Source (TDS) identifier.
  attribute?(:tds_order_id, String, from: "TDSOrderId")
end
AdhocDisbursementEvent =

An event related to an Adhoc Disbursement.

Structure.new do
  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [Money] The amount of the transaction.
  attribute?(:transaction_amount, Money, from: "TransactionAmount")

  # @return [String] The identifier for the transaction.
  attribute?(:transaction_id, String, from: "TransactionId")

  # @return [String] The type of transaction. For example, "Disbursed to Amazon Gift Card balance".
  attribute?(:transaction_type, String, from: "TransactionType")
end
RentalTransactionEvent =

An event related to a rental transaction.

Structure.new do
  # @return [String] An Amazon-defined identifier for an order.
  attribute?(:amazon_order_id, String, from: "AmazonOrderId")

  # @return [Integer] The number of days that the buyer extended an already rented item. This value is only
  #   returned for `RentalCustomerPayment-Extension` and `RentalCustomerRefund-Extension` events.
  attribute?(:extension_length, Integer, from: "ExtensionLength")

  # @return [String] The name of the marketplace.
  attribute?(:marketplace_name, String, from: "MarketplaceName")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [Array<ChargeComponent>] A list of charges associated with the rental event.
  attribute?(:rental_charge_list, [ChargeComponent], from: "RentalChargeList")

  # @return [String] The type of rental event.
  #
  # Possible values:
  #
  # * `RentalCustomerPayment-Buyout`: A transaction type that represents when the customer wants to buy out a
  #   rented item.
  #
  # * `RentalCustomerPayment-Extension`: A transaction type that represents when the customer wants to extend the
  #   rental period.
  #
  # * `RentalCustomerRefund-Buyout`: A transaction type that represents when the customer requests a refund for
  #   the buyout of the rented item.
  #
  # * `RentalCustomerRefund-Extension`: A transaction type that represents when the customer requests a refund
  #   over the extension on the rented item.
  #
  # * `RentalHandlingFee`: A transaction type that represents the fee that Amazon charges sellers who rent through
  #   Amazon.
  #
  # * `RentalChargeFailureReimbursement`: A transaction type that represents when Amazon sends money to the seller
  #   to compensate for a failed charge.
  #
  # * `RentalLostItemReimbursement`: A transaction type that represents when Amazon sends money to the seller to
  #   compensate for a lost item.
  attribute?(:rental_event_type, String, from: "RentalEventType")

  # @return [Array<FeeComponent>] A list of fees associated with the rental event.
  attribute?(:rental_fee_list, [FeeComponent], from: "RentalFeeList")

  # @return [Money] The amount of money that the customer originally paid to rent the item. This value is only
  #   returned for `RentalChargeFailureReimbursement` and `RentalLostItemReimbursement` events.
  attribute?(:rental_initial_value, Money, from: "RentalInitialValue")

  # @return [Money] The amount of money that Amazon sends the seller to compensate for a lost item or a failed
  #   charge. This value is only returned for `RentalChargeFailureReimbursement` and `RentalLostItemReimbursement`
  #   events.
  attribute?(:rental_reimbursement, Money, from: "RentalReimbursement")

  # @return [Array<TaxWithheldComponent>] A list of taxes withheld information for a rental item.
  attribute?(:rental_tax_withheld_list, [TaxWithheldComponent], from: "RentalTaxWithheldList")
end
SAFETReimbursementItem =

An item from a SAFE-T claim reimbursement.

Structure.new do
  # @return [Array<ChargeComponent>] A list of charges associated with the item.
  attribute?(:item_charge_list, [ChargeComponent], from: "itemChargeList")

  # @return [String] The description of the item as shown on the product detail page on the retail website.
  attribute?(:product_description, String, from: "productDescription")

  # @return [String] The number of units of the item being reimbursed.
  attribute?(:quantity, String)
end
ChargeRefundTransaction =

The charge refund transaction.

Structure.new do
  # @return [Money] The amount of the charge refund credit.
  attribute?(:charge_amount, Money, from: "ChargeAmount")

  # @return [String] The type of charge.
  attribute?(:charge_type, String, from: "ChargeType")
end
ProductAdsPaymentEvent =

A Sponsored Products payment event.

Structure.new do
  # @return [Money] Base amount of the transaction, before tax.
  attribute?(:base_value, Money, from: "baseValue")

  # @return [String] The identifier for the invoice that includes the transaction.
  attribute?(:invoice_id, String, from: "invoiceId")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "postedDate")

  # @return [Money] Tax amount of the transaction.
  attribute?(:tax_value, Money, from: "taxValue")

  # @return [String] Indicates if the transaction is for a charge or a refund.
  #
  # Possible values:
  #
  # * `charge`
  #
  # * `refund`
  attribute?(:transaction_type, String, from: "transactionType")

  # @return [Money] The total amount of the transaction. Equal to `baseValue` + `taxValue`.
  attribute?(:transaction_value, Money, from: "transactionValue")
end
SAFETReimbursementEvent =

A SAFE-T claim reimbursement on the seller's account.

Structure.new do
  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [String] Indicates why the seller was reimbursed.
  attribute?(:reason_code, String, from: "ReasonCode")

  # @return [Money] The amount of the reimbursement.
  attribute?(:reimbursed_amount, Money, from: "ReimbursedAmount")

  # @return [String] A SAFE-T claim identifier.
  attribute?(:safet_claim_id, String, from: "SAFETClaimId")

  # @return [Array<SAFETReimbursementItem>]
  attribute?(:safet_reimbursement_item_list, [SAFETReimbursementItem], from: "SAFETReimbursementItemList")
end
SellerDealPaymentEvent =

An event linked to the payment of a fee related to the specified deal.

Structure.new do
  # @return [String] The internal description of the deal.
  attribute?(:deal_description, String, from: "dealDescription")

  # @return [String] The unique identifier of the deal.
  attribute?(:deal_id, String, from: "dealId")

  # @return [String] The type of event: `SellerDealComplete`.
  attribute?(:event_type, String, from: "eventType")

  # @return [Money] The monetary amount of the fee.
  attribute?(:fee_amount, Money, from: "feeAmount")

  # @return [String] The type of fee: `RunLightningDealFee`.
  attribute?(:fee_type, String, from: "feeType")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "postedDate")

  # @return [Money] The monetary amount of the tax applied.
  attribute?(:tax_amount, Money, from: "taxAmount")

  # @return [Money] The total monetary amount paid.
  attribute?(:total_amount, Money, from: "totalAmount")
end
ImagingServicesFeeEvent =

A fee event related to Amazon Imaging services.

Structure.new do
  # @return [String] The Amazon Standard Identification Number (ASIN) of the item for which the imaging service
  #   was requested.
  attribute?(:asin, String, from: "ASIN")

  # @return [Array<FeeComponent>] A list of fees associated with the event.
  attribute?(:fee_list, [FeeComponent], from: "FeeList")

  # @return [String] The identifier for the imaging services request.
  attribute?(:imaging_request_billing_item_id, String, from: "ImagingRequestBillingItemID")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")
end
AffordabilityExpenseEvent =

An expense related to an affordability promotion.

Structure.new do
  # @return [Money] Central Goods and Service Tax, charged and collected by the central government.
  attribute(:tax_type_cgst, Money, from: "TaxTypeCGST")

  # @return [Money] Integrated Goods and Service Tax, charged and collected by the central government.
  attribute(:tax_type_igst, Money, from: "TaxTypeIGST")

  # @return [Money] State Goods and Service Tax, charged and collected by the state government.
  attribute(:tax_type_sgst, Money, from: "TaxTypeSGST")

  # @return [String] An Amazon-defined identifier for an order.
  attribute?(:amazon_order_id, String, from: "AmazonOrderId")

  # @return [Money] The amount charged for clicks incurred under the Sponsored Products program.
  attribute?(:base_expense, Money, from: "BaseExpense")

  # @return [String] The Amazon-defined marketplace identifier.
  attribute?(:marketplace_id, String, from: "MarketplaceId")

  # @return [String] The date and time when the financial event was created.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [Money] The total amount charged to the seller. `TotalExpense` = `BaseExpense` + `TaxTypeIGST` +
  #   `TaxTypeCGST` + `TaxTypeSGST`.
  attribute?(:total_expense, Money, from: "TotalExpense")

  # @return [String] The type of transaction.
  #
  # Possible values:
  #
  # * `Charge`: an affordability promotion expense.
  # * `Refund`: an affordability promotion expense reversal.
  attribute?(:transaction_type, String, from: "TransactionType")
end
ListFinancialEventsPayload =

The payload for the listFinancialEvents operation.

Structure.new do
  # @return [FinancialEvents]
  attribute?(:financial_events, FinancialEvents, from: "FinancialEvents")

  # @return [String] When present and not empty, pass this string token in the next request to return the next
  #   response page.
  attribute?(:next_token, String, from: "NextToken")
end
ListFinancialEventsResponse =

The response schema for the listFinancialEvents operation.

Structure.new do
  # @return [Array<Error>] One or more unexpected errors occurred during the `listFinancialEvents` operation.
  attribute?(:errors, [Error])

  # @return [ListFinancialEventsPayload] The payload for the `listFinancialEvents` operation.
  attribute?(:payload, ListFinancialEventsPayload)
end
SolutionProviderCreditEvent =

A credit given to a solution provider.

Structure.new do
  # @return [String] The two-letter country code of the country associated with the marketplace where the order
  #   was placed.
  attribute?(:marketplace_country_code, String, from: "MarketplaceCountryCode")

  # @return [String] The identifier of the marketplace where the order was placed.
  attribute?(:marketplace_id, String, from: "MarketplaceId")

  # @return [String] The Amazon-defined identifier of the solution provider.
  attribute?(:provider_id, String, from: "ProviderId")

  # @return [String] The store name where the payment event occurred.
  attribute?(:provider_store_name, String, from: "ProviderStoreName")

  # @return [String] The transaction type.
  attribute?(:provider_transaction_type, String, from: "ProviderTransactionType")

  # @return [String] The Amazon-defined identifier of the seller.
  attribute?(:seller_id, String, from: "SellerId")

  # @return [String] A seller-defined identifier for an order.
  attribute?(:seller_order_id, String, from: "SellerOrderId")

  # @return [String] The store name where the payment event occurred.
  attribute?(:seller_store_name, String, from: "SellerStoreName")

  # @return [Money] The amount of the credit.
  attribute?(:transaction_amount, Money, from: "TransactionAmount")

  # @return [String] The date and time that the credit transaction was created, in [ISO
  #   8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
  attribute?(:transaction_creation_date, String, from: "TransactionCreationDate")
end
FailedAdhocDisbursementEvent =

Failed ad hoc disbursement event list.

Structure.new do
  # @return [String] The disbursement identifier.
  attribute?(:disbursement_id, String, from: "DisbursementId")

  # @return [String] The type of fund transfer. For example, `Refund`.
  attribute?(:funds_transfers_type, String, from: "FundsTransfersType")

  # @return [String] The type of payment for disbursement. For example, `CREDIT_CARD`.
  attribute?(:payment_disbursement_type, String, from: "PaymentDisbursementType")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [String] The status of the failed `AdhocDisbursement`. For example, `HARD_DECLINED`.
  attribute?(:status, String, from: "Status")

  # @return [Money] The amount of the Adhoc Disbursement.
  attribute?(:transfer_amount, Money, from: "TransferAmount")

  # @return [String] The transfer identifier.
  attribute?(:transfer_id, String, from: "TransferId")
end
RemovalShipmentItemAdjustment =

Item-level information for a removal shipment item adjustment.

Structure.new do
  # @return [Integer] Adjusted quantity of `RemovalShipmentItemAdjustment` items.
  attribute?(:adjusted_quantity, Integer, from: "AdjustedQuantity")

  # @return [String] The Amazon fulfillment network SKU for the item.
  attribute?(:fulfillment_network_sku, String, from: "FulfillmentNetworkSKU")

  # @return [String] An identifier for an item in a removal shipment.
  attribute?(:removal_shipment_item_id, String, from: "RemovalShipmentItemId")

  # @return [Money] The total amount adjusted for disputed items.
  attribute?(:revenue_adjustment, Money, from: "RevenueAdjustment")

  # @return [Money] Adjustment on the tax collected amount on the adjusted revenue.
  attribute?(:tax_amount_adjustment, Money, from: "TaxAmountAdjustment")

  # @return [String] The tax collection model that is applied to the item.
  #
  # Possible values:
  #
  # * `MarketplaceFacilitator`: Tax is withheld and remitted to the taxing authority by Amazon on behalf of the
  #   seller.
  # * `Standard`: Tax is paid to the seller and not remitted to the taxing authority by Amazon.
  attribute?(:tax_collection_model, String, from: "TaxCollectionModel")

  # @return [Money] Adjustment of the tax that is withheld and remitted to the taxing authority by Amazon on
  #   behalf of the seller. If `TaxCollectionModel` = `MarketplaceFacilitator`, then `TaxWithheld` = `TaxAmount`
  #   (except when the `TaxWithheld` amount is a negative number). Otherwise, `TaxWithheld` = `0`.
  attribute?(:tax_withheld_adjustment, Money, from: "TaxWithheldAdjustment")
end
ValueAddedServiceChargeEvent =

An event related to a value added service charge.

Structure.new do
  # @return [String] A short description of the service charge event.
  attribute?(:description, String, from: "Description")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [Money] The amount of the service charge event.
  attribute?(:transaction_amount, Money, from: "TransactionAmount")

  # @return [String] The transaction type. For example, 'Other Support Service fees'
  attribute?(:transaction_type, String, from: "TransactionType")
end
RemovalShipmentAdjustmentEvent =

A financial adjustment event for FBA liquidated inventory. A positive value indicates money owed to Amazon by the buyer (for example, when the charge was incorrectly calculated as less than it should be). A negative value indicates a full or partial refund owed to the buyer (for example, when the buyer receives damaged items or fewer items than ordered).

Structure.new do
  # @return [String] The unique identifier for the adjustment event.
  attribute?(:adjustment_event_id, String, from: "AdjustmentEventId")

  # @return [String] The merchant removal orderId.
  attribute?(:merchant_order_id, String, from: "MerchantOrderId")

  # @return [String] The orderId for shipping inventory.
  attribute?(:order_id, String, from: "OrderId")

  # @return [String] The date when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [Array<RemovalShipmentItemAdjustment>] A comma-delimited list of `RemovalShipmentItemAdjustment`
  #   details for FBA inventory.
  attribute?(:removal_shipment_item_adjustment_list, [RemovalShipmentItemAdjustment], from: "RemovalShipmentItemAdjustmentList")

  # @return [String] The type of removal order.
  #
  # Possible values:
  #
  # * `WHOLESALE_LIQUIDATION`.
  attribute?(:transaction_type, String, from: "TransactionType")
end
CapacityReservationBillingEvent =

An event related to a capacity reservation billing charge.

Structure.new do
  # @return [String] A short description of the capacity reservation billing event.
  attribute?(:description, String, from: "Description")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [Money] The amount of the capacity reservation billing event.
  attribute?(:transaction_amount, Money, from: "TransactionAmount")

  # @return [String] The transaction type. For example, FBA Inventory Fee.
  attribute?(:transaction_type, String, from: "TransactionType")
end
EBTRefundReimbursementOnlyEvent =

An EBT refund reimbursement event.

Structure.new do
  # @return [Money] The amount reimbursed during this event.
  attribute?(:amount, Money, from: "Amount")

  # @return [String] The identifier of an order.
  attribute?(:order_id, String, from: "OrderId")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")
end
ListFinancialEventGroupsPayload =

The payload for the listFinancialEventGroups operation.

Structure.new do
  # @return [Array<FinancialEventGroup>]
  attribute?(:financial_event_group_list, [FinancialEventGroup], from: "FinancialEventGroupList")

  # @return [String] When present and not empty, pass this string token in the next request to return the next
  #   response page.
  attribute?(:next_token, String, from: "NextToken")
end
ListFinancialEventGroupsResponse =

The response schema for the listFinancialEventGroups operation.

Structure.new do
  # @return [Array<Error>] One or more unexpected errors occurred during the `listFinancialEventGroups` operation.
  attribute?(:errors, [Error])

  # @return [ListFinancialEventGroupsPayload] The payload for the `listFinancialEventGroups` operation.
  attribute?(:payload, ListFinancialEventGroupsPayload)
end
NetworkComminglingTransactionEvent =

A network commingling transaction event.

Structure.new do
  # @return [String] The Amazon Standard Identification Number (ASIN) of the swapped item.
  attribute?(:asin, String, from: "ASIN")

  # @return [String] The marketplace in which the event took place.
  attribute?(:marketplace_id, String, from: "MarketplaceId")

  # @return [String] The identifier for the network item swap.
  attribute?(:net_co_transaction_id, String, from: "NetCoTransactionID")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [String] The reason for the network item swap.
  attribute?(:swap_reason, String, from: "SwapReason")

  # @return [Money] The tax on the network item swap paid by the seller.
  attribute?(:tax_amount, Money, from: "TaxAmount")

  # @return [Money] The price of the swapped item minus `TaxAmount`.
  attribute?(:tax_exclusive_amount, Money, from: "TaxExclusiveAmount")

  # @return [String] The type of network item swap.
  #
  # Possible values:
  #
  # * `NetCo`: A Fulfillment by Amazon inventory pooling transaction. Available only in the India marketplace.
  #
  # * `ComminglingVAT`: A commingling VAT transaction. Available only in the Spain, UK, France, Germany, and Italy
  #   marketplaces.
  attribute?(:transaction_type, String, from: "TransactionType")
end
SellerReviewEnrollmentPaymentEvent =

A fee payment event for the Early Reviewer Program.

Structure.new do
  # @return [ChargeComponent]
  attribute?(:charge_component, ChargeComponent, from: "ChargeComponent")

  # @return [String] An enrollment identifier.
  attribute?(:enrollment_id, String, from: "EnrollmentId")

  # @return [FeeComponent]
  attribute?(:fee_component, FeeComponent, from: "FeeComponent")

  # @return [String] The Amazon Standard Identification Number (ASIN) of the item that was enrolled in the Early
  #   Reviewer Program.
  attribute?(:parent_asin, String, from: "ParentASIN")

  # @return [String] The date and time when the financial event was posted.
  attribute?(:posted_date, String, from: "PostedDate")

  # @return [Money] The `FeeComponent` value plus the `ChargeComponent` value.
  attribute?(:total_amount, Money, from: "TotalAmount")
end

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#endpoint_uri, #http, #initialize, #sandbox, #sandbox?

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#list_financial_event_groups(max_results_per_page: 10, financial_event_group_started_before: nil, financial_event_group_started_after: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events.

Parameters:

  • max_results_per_page (Integer) (defaults to: 10)

    The maximum number of results per page. If the response exceeds the maximum number of transactions or 10 MB, the response is InvalidInput.

  • financial_event_group_started_before (String) (defaults to: nil)

    A date that selects financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be after FinancialEventGroupStartedAfter and more than two minutes before the time of request. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned.

  • financial_event_group_started_after (String) (defaults to: nil)

    A date that selects financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be more than two minutes before you submit the request.

  • next_token (String) (defaults to: nil)

    The response includes nextToken when the number of results exceeds the specified pageSize value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until nextToken is null. Note that this operation can return empty pages.

  • rate_limit (Float) (defaults to: 0.5)

    Requests per second

Returns:



36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/peddler/apis/finances_v0.rb', line 36

def list_financial_event_groups(max_results_per_page: 10, financial_event_group_started_before: nil,
  financial_event_group_started_after: nil, next_token: nil, rate_limit: 0.5)
  path = "/finances/v0/financialEventGroups"
  params = {
    "MaxResultsPerPage" => max_results_per_page,
    "FinancialEventGroupStartedBefore" => financial_event_group_started_before,
    "FinancialEventGroupStartedAfter" => financial_event_group_started_after,
    "NextToken" => next_token,
  }.compact
  parser = -> { ListFinancialEventGroupsResponse }
  get(path, params:, rate_limit:, parser:)
end

#list_financial_events(max_results_per_page: 100, posted_after: nil, posted_before: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events.

Note: in ListFinancialEvents, deferred events don't show up in responses until they are released.

Parameters:

  • max_results_per_page (Integer) (defaults to: 100)

    The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is InvalidInput.

  • posted_after (String) (defaults to: nil)

    The response includes financial events posted after (or on) this date. This date must be in ISO 8601 date-time format. The date-time must be more than two minutes before the time of the request.

  • posted_before (String) (defaults to: nil)

    The response includes financial events posted before (but not on) this date. This date must be in ISO 8601 date-time format. The date-time must be later than PostedAfter and more than two minutes before the request was submitted. If PostedAfter and PostedBefore are more than 180 days apart, the response is empty. If you include the PostedBefore parameter in your request, you must also specify the PostedAfter parameter. Default: Two minutes before the time of the request.

  • next_token (String) (defaults to: nil)

    The response includes nextToken when the number of results exceeds the specified pageSize value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until nextToken is null. Note that this operation can return empty pages.

  • rate_limit (Float) (defaults to: 0.5)

    Requests per second

Returns:



133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/peddler/apis/finances_v0.rb', line 133

def list_financial_events(max_results_per_page: 100, posted_after: nil, posted_before: nil, next_token: nil,
  rate_limit: 0.5)
  path = "/finances/v0/financialEvents"
  params = {
    "MaxResultsPerPage" => max_results_per_page,
    "PostedAfter" => posted_after,
    "PostedBefore" => posted_before,
    "NextToken" => next_token,
  }.compact
  parser = -> { ListFinancialEventsResponse }
  get(path, params:, rate_limit:, parser:)
end

#list_financial_events_by_group_id(event_group_id, max_results_per_page: 100, posted_after: nil, posted_before: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events.

Note: This operation only retrieves a group's data for the past two years. A request for data spanning more than two years produces an empty response.

Parameters:

  • max_results_per_page (Integer) (defaults to: 100)

    The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is InvalidInput.

  • posted_after (String) (defaults to: nil)

    The response includes financial events posted after (or on) this date. This date must be in ISO 8601 date-time format. The date-time must be more than two minutes before the time of the request.

  • posted_before (String) (defaults to: nil)

    The response includes financial events posted before (but not on) this date. This date must be in ISO 8601 date-time format. The date-time must be later than PostedAfter and more than two minutes before the request was submitted. If PostedAfter and PostedBefore are more than 180 days apart, the response is empty. If you include the PostedBefore parameter in your request, you must also specify the PostedAfter parameter. Default: Two minutes before the time of the request.

  • event_group_id (String)

    The identifier of the financial event group to which the events belong.

  • next_token (String) (defaults to: nil)

    The response includes nextToken when the number of results exceeds the specified pageSize value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until nextToken is null. Note that this operation can return empty pages.

  • rate_limit (Float) (defaults to: 0.5)

    Requests per second

Returns:



74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/peddler/apis/finances_v0.rb', line 74

def list_financial_events_by_group_id(event_group_id, max_results_per_page: 100, posted_after: nil,
  posted_before: nil, next_token: nil, rate_limit: 0.5)
  path = "/finances/v0/financialEventGroups/#{percent_encode(event_group_id)}/financialEvents"
  params = {
    "MaxResultsPerPage" => max_results_per_page,
    "PostedAfter" => posted_after,
    "PostedBefore" => posted_before,
    "NextToken" => next_token,
  }.compact
  parser = -> { ListFinancialEventsResponse }
  get(path, params:, rate_limit:, parser:)
end

#list_financial_events_by_order_id(order_id, max_results_per_page: 100, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events.

Parameters:

  • order_id (String)

    An Amazon-defined order identifier, in 3-7-7 format.

  • max_results_per_page (Integer) (defaults to: 100)

    The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is InvalidInput.

  • next_token (String) (defaults to: nil)

    The response includes nextToken when the number of results exceeds the specified pageSize value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until nextToken is null. Note that this operation can return empty pages.

  • rate_limit (Float) (defaults to: 0.5)

    Requests per second

Returns:



100
101
102
103
104
105
106
107
108
# File 'lib/peddler/apis/finances_v0.rb', line 100

def list_financial_events_by_order_id(order_id, max_results_per_page: 100, next_token: nil, rate_limit: 0.5)
  path = "/finances/v0/orders/#{percent_encode(order_id)}/financialEvents"
  params = {
    "MaxResultsPerPage" => max_results_per_page,
    "NextToken" => next_token,
  }.compact
  parser = -> { ListFinancialEventsResponse }
  get(path, params:, rate_limit:, parser:)
end