Class: Peddler::APIs::SellerWallet20240301

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/seller_wallet_2024_03_01.rb,
lib/peddler/apis/seller_wallet_2024_03_01/fee.rb,
lib/peddler/apis/seller_wallet_2024_03_01/error.rb,
lib/peddler/apis/seller_wallet_2024_03_01/balance.rb,
lib/peddler/apis/seller_wallet_2024_03_01/error_list.rb,
lib/peddler/apis/seller_wallet_2024_03_01/transaction.rb,
lib/peddler/apis/seller_wallet_2024_03_01/bank_account.rb,
lib/peddler/apis/seller_wallet_2024_03_01/balance_listing.rb,
lib/peddler/apis/seller_wallet_2024_03_01/fx_rate_details.rb,
lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule.rb,
lib/peddler/apis/seller_wallet_2024_03_01/payment_preference.rb,
lib/peddler/apis/seller_wallet_2024_03_01/schedule_expression.rb,
lib/peddler/apis/seller_wallet_2024_03_01/transaction_account.rb,
lib/peddler/apis/seller_wallet_2024_03_01/transaction_listing.rb,
lib/peddler/apis/seller_wallet_2024_03_01/bank_account_listing.rb,
lib/peddler/apis/seller_wallet_2024_03_01/transfer_rate_preview.rb,
lib/peddler/apis/seller_wallet_2024_03_01/delete_transfer_schedule.rb,
lib/peddler/apis/seller_wallet_2024_03_01/payee_contact_information.rb,
lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule_listing.rb,
lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule_request.rb,
lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule_failures.rb,
lib/peddler/apis/seller_wallet_2024_03_01/create_transaction_response.rb,
lib/peddler/apis/seller_wallet_2024_03_01/transfer_schedule_information.rb,
lib/peddler/apis/seller_wallet_2024_03_01/transaction_initiation_request.rb,
lib/peddler/apis/seller_wallet_2024_03_01/transaction_instrument_details.rb

Overview

The Selling Partner API for Amazon Seller Wallet Open Banking API

The Selling Partner API for Seller Wallet (Seller Wallet API) provides financial information that is relevant to a seller's Seller Wallet account. You can obtain financial events, balances, and transfer schedules for Seller Wallet accounts. You can also schedule and initiate transactions.

Constant Summary collapse

Fee =

Details of the fee.

Structure.new do
  # @return [Money] The actual value of the fee in numeric format.
  attribute(:fee_amount, Money, null: false, from: "feeAmount")

  # @return [String] The unique identifier assigned to the fee.
  attribute(:fee_id, String, null: false, from: "feeId")

  # @return [String] The value of the fee in percentage format.
  attribute(:fee_rate_value, String, null: false, from: "feeRateValue")

  # @return [String] The type of the fee.
  attribute(:fee_type, String, null: false, from: "feeType")
end
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, null: false)

  # @return [String] A message that describes the error condition.
  attribute(:message, String, null: false)

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

The balance amount in the Amazon Seller Wallet bank account.

Structure.new do
  # @return [String] The unique identifier provided by Amazon to identify the account.
  attribute(:account_id, String, null: false, from: "accountId")

  # @return [Float] The balance amount in number format.
  attribute(:balance_amount, Float, null: false, from: "balanceAmount")

  # @return [String] The Amazon Seller Wallet bank account currency code in ISO 4217 format.
  attribute(:balance_currency, String, null: false, from: "balanceCurrency")

  # @return [Time] The date of the most recent account balance update.
  attribute(:last_update_date, Time, null: false, from: "lastUpdateDate")

  # @return [String] The type of balance.
  attribute?(:balance_type, String, from: "balanceType")
end
ErrorList =

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

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

The current transaction status and related historical details.

Structure.new do
  # @return [String] The unique identifier of the Amazon Seller Wallet bank account from which the money is
  #   debited.
  attribute(:account_id, String, null: false, from: "accountId")

  # @return [Time] The date of the most recent account balance update.
  attribute(:last_update_date, Time, null: false, from: "lastUpdateDate")

  # @return [String] A description of the transaction that the requester provides when they initiate the
  #   transaction.
  attribute(:transaction_description, String, null: false, from: "transactionDescription")

  # @return [TransactionAccount] The destination bank account details in the transaction.
  attribute(:transaction_destination_account, TransactionAccount, null: false, from: "transactionDestinationAccount")

  # @return [String] The unique identifier provided by Amazon to the transaction.
  attribute(:transaction_id, String, null: false, from: "transactionId")

  # @return [Money] The amount for which the transfer was initiated.
  attribute(:transaction_request_amount, Money, null: false, from: "transactionRequestAmount")

  # @return [Time] The date when the transaction was initiated.
  attribute(:transaction_request_date, Time, null: false, from: "transactionRequestDate")

  # @return [String] The transaction initiation source. This value is either the Amazon portal or PISP name that
  #   the customer used to start the transaction.
  attribute(:transaction_requester_source, String, null: false, from: "transactionRequesterSource")

  # @return [String] The status of the transaction.
  attribute(:transaction_status, String, null: false, from: "transactionStatus")

  # @return [String] The type of the transaction.
  attribute(:transaction_type, String, null: false, from: "transactionType")

  # @return [TransferRatePreview] The fees and rates that apply to the transaction, as applicable.
  attribute(:transfer_rate_details, TransferRatePreview, null: false, from: "transferRateDetails")

  # @return [Time] The expected completion date of the transaction.
  attribute?(:expected_completion_date, Time, from: "expectedCompletionDate")

  # @return [String] The Amazon Seller Wallet customer who requested the transaction.
  attribute?(:requester_name, String, from: "requesterName")

  # @return [Time] The transaction's completion date.
  attribute?(:transaction_actual_completion_date, Time, from: "transactionActualCompletionDate")

  # @return [String] The reason the transaction failed, if applicable.
  attribute?(:transaction_failure_reason, String, from: "transactionFailureReason")

  # @return [Money] The amount of completed transaction in the destination account currency. This value is only
  #   populated for international transactions
  attribute?(:transaction_final_amount, Money, from: "transactionFinalAmount")

  # @return [TransactionAccount] The source bank account details in the transaction.
  attribute?(:transaction_source_account, TransactionAccount, from: "transactionSourceAccount")
end
BankAccount =

Details of an Amazon Seller Wallet bank account. This account is used to hold the money that a Seller Wallet customer earns by selling items.

Structure.new do
  # @return [String] The two-digit country code in ISO 3166 format.
  attribute(:account_country_code, String, null: false, from: "accountCountryCode")

  # @return [String] Bank account currency code in ISO 4217 format.
  attribute(:account_currency, String, null: false, from: "accountCurrency")

  # @return [String] The last 3 digit of the bank account number. This value is three consecutive zeros for Amazon
  #   Seller Wallet accounts.
  attribute(:bank_account_number_tail, String, null: false, from: "bankAccountNumberTail")

  # @return [String] Type of ownership of the bank account. This value is `SELF` for Amazon Seller Wallet
  #   accounts.
  attribute(:bank_account_ownership_type, String, null: false, from: "bankAccountOwnershipType")

  # @return [String] The bank account holder's name (expected to be an Amazon customer). There is a 50 character
  #   limit.
  attribute?(:account_holder_name, String, from: "accountHolderName")

  # @return [String] The unique bank account identifier provided by Amazon. To initiate a `SELF` transaction with
  #   Seller Wallet, you must choose `BANK_ACCOUNT` as the payment method type in the
  #   [getPaymentMethod](https://developer-docs.amazon.com/sp-api/reference/getpaymentmethods) request. Your
  #   Amazon Seller Wallet bank account identifier should match the `paymentMethodId` in the response. This field
  #   is required.
  attribute?(:account_id, String, from: "accountId")

  # @return [String] The compliance status of the bank account holder.
  attribute?(:bank_account_holder_status, String, from: "bankAccountHolderStatus")

  # @return [String] The format in which the bank account number is provided for `THIRD_PARTY` transaction
  #   requests.
  attribute?(:bank_account_number_format, String, from: "bankAccountNumberFormat")

  # @return [String] The name of the bank. This value is Amazon Seller Wallet for Amazon Seller Wallet accounts.
  attribute?(:bank_name, String, from: "bankName")

  # @return [String] The bank number format or routing number type for `THIRD_PARTY` transaction requests.
  attribute?(:bank_number_format, String, from: "bankNumberFormat")

  # @return [String] Routing number for automated clearing house transfers for `THIRD_PARTY` transaction requests.
  #   This value is nine consecutive zeros for Amazon Seller Wallet accounts.
  attribute?(:routing_number, String, from: "routingNumber")
end
BalanceListing =

A list of balances in the seller account.

Structure.new do
  # @return [Array<Balance>] A list of balances in the seller account.
  attribute?(:balances, [Balance])
end
FxRateDetails =

Foreign exchange rate details.

Structure.new do
  # @return [Float] The market foreign exchange rate.
  attribute(:base_rate, Float, null: false, from: "baseRate")

  # @return [Float] The total rate applied to the money transfer. This includes all exchange rates, markups, and
  #   fees.
  attribute(:effective_fx_rate, Float, null: false, from: "effectiveFxRate")

  # @return [String] The unique identifier assigned to the fees / foreign exchange rate of a transaction.
  attribute(:fx_rate_id, String, null: false, from: "fxRateId")

  # @return [String] Whether the customer is buying or selling the source currency.
  attribute(:rate_direction, String, null: false, from: "rateDirection")
end
TransferSchedule =

Transfer schedule details and related historical details.

Structure.new do
  # @return [TransactionAccount] Details of the destination bank account in the scheduled transfer. Here
  #   `bankAccountCountryCode` is a required field.
  attribute(:transaction_destination_account, TransactionAccount, null: false, from: "transactionDestinationAccount")

  # @return [String] The type of transfer.
  attribute(:transaction_type, String, null: false, from: "transactionType")

  # @return [Array<TransferScheduleFailures>] A list of transfer schedule failures.
  attribute(:transfer_schedule_failures, [TransferScheduleFailures], null: false, from: "transferScheduleFailures")

  # @return [String] The unique identifier provided by Amazon to the scheduled transfer.
  attribute(:transfer_schedule_id, String, null: false, from: "transferScheduleId")

  # @return [TransferScheduleInformation] The fields required for the scheduled transfer. This information can be
  #   modified when you update a transfer schedule.
  attribute(:transfer_schedule_information, TransferScheduleInformation, null: false, from: "transferScheduleInformation")

  # @return [String] The type of transfer schedule. This information can be modified when you update a transfer
  #   schedule.
  attribute(:transfer_schedule_status, String, null: false, from: "transferScheduleStatus")

  # @return [PaymentPreference] The payment preference of the scheduled transfer. This information can be modified
  #   when you update a transfer schedule.
  attribute?(:payment_preference, PaymentPreference, from: "paymentPreference")

  # @return [TransactionAccount] Details of the source bank account in the scheduled transfer.
  attribute?(:transaction_source_account, TransactionAccount, from: "transactionSourceAccount")
end
PaymentPreference =

The type of payment preference in which the transfer is being scheduled.

Structure.new do
  # @return [String] The preferred payment type for the scheduled transaction. Can be `PERCENTAGE` or `AMOUNT`.
  attribute(:payment_preference_payment_type, String, null: false, from: "paymentPreferencePaymentType")

  # @return [Float] The value of the payment preference.
  attribute(:value, Float, null: false)
end
ScheduleExpression =

The configuration of the schedule.

Structure.new do
  # @return [String] The type of the scheduled transfer.
  attribute(:schedule_expression_type, String, null: false, from: "scheduleExpressionType")

  # @return [String] How often the scheduled transfer happens. This field is required if `scheduleExpressionType`
  #   is `RECURRING`; otherwise it should be empty.
  attribute?(:recurring_frequency, String, from: "recurringFrequency")
end
TransactionAccount =

Details of the bank account involved in the transaction.

Structure.new do
  # @return [String] The currency code in ISO 4217 format.
  attribute(:bank_account_currency, String, null: false, from: "bankAccountCurrency")

  # @return [String] The format for the bank account number.
  attribute(:bank_account_number_format, String, null: false, from: "bankAccountNumberFormat")

  # @return [String] The name of the bank.
  attribute(:bank_name, String, null: false, from: "bankName")

  # @return [String] The unique identifier provided by Amazon to identify the account.
  attribute?(:account_id, String, from: "accountId")

  # @return [String] The two-digit country code, in ISO 3166 format. This field is optional for
  #   `transactionSourceAccount`, but is mandatory for `transactionDestinationAccount`.
  attribute?(:bank_account_country_code, String, from: "bankAccountCountryCode")

  # @return [String] The account holder's name.
  attribute?(:bank_account_holder_name, String, from: "bankAccountHolderName")

  # @return [String] The last three digits of the bank account number.
  attribute?(:bank_account_number_tail, String, from: "bankAccountNumberTail")
end
TransactionListing =

A list of transactions.

Structure.new do
  # @return [Array<Transaction>] A list of transactions.
  attribute(:transactions, [Transaction], null: false)

  # @return [String] A token that you use to retrieve the next page of results. The response includes
  #   `nextPageToken` when the number of results exceeds 100. 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 `nextPageToken` is null. Note that this operation can return empty pages.
  attribute?(:next_page_token, String, from: "nextPageToken")
end
BankAccountListing =

A list of bank accounts.

Structure.new do
  # @return [Array<BankAccount>] A list of bank accounts.
  attribute(:accounts, [BankAccount], null: false)
end
TransferRatePreview =

The fees and foreign exchange rates that apply to the transaction.

If the fees are in terms of the baseAmount (source account) currency, then the effective rate is equal to 1 - (fees * baseRate / baseAmount).

If the fees are in terms of the transferAmount (destination account) currency, then the effective rate is equal to baseRate - (fees / baseAmount).

In the preceding expressions, fees is equal to the sum of all feeAmount.currencyAmount values in the fees array.

Structure.new do
  # @return [Money] The base amount of the transaction.
  attribute(:base_amount, Money, null: false, from: "baseAmount")

  # @return [Array<Fee>] A list of fees.
  attribute(:fees, [Fee], null: false)

  # @return [FxRateDetails] The foreign exchange rate value of the transaction.
  attribute(:fx_rate_details, FxRateDetails, null: false, from: "fxRateDetails")

  # @return [Money] The final amount transferred, which includes both the fee deduction and currency conversion
  #   rate.
  attribute(:transfer_amount, Money, null: false, from: "transferAmount")
end
DeleteTransferSchedule =

The response returned when the schedule transfer's delete request is successful.

Structure.new do
  # @return [String] A success code that specifies that the delete operation was successful. For example, HTTP
  #   200.
  attribute(:code, String, null: false)

  # @return [String] A message that describes the success condition of the delete schedule transaction.
  attribute(:message, String, null: false)

  # @return [String] Additional details that can help the caller understand the operation execution.
  attribute?(:details, String)
end
PayeeContactInformation =

The contact information of the payee. This field is required when the request bankAccountOwnershipType is THIRD_PARTY. The contact information is used for payee verification and registration purposes.

Structure.new do
  # @return [String] Address Line 1 of the public address.
  attribute(:address_line1, String, null: false, from: "addressLine1")

  # @return [String] City name of the public address.
  attribute(:city, String, null: false)

  # @return [String] The two digit country code, in ISO 3166 format.
  attribute(:country_code, String, null: false, from: "countryCode")

  # @return [String] Email address of the payee.
  attribute(:email_address, String, null: false, from: "emailAddress")

  # @return [String] Type of entity of the payee.
  attribute(:payee_entity_type, String, null: false, from: "payeeEntityType")

  # @return [String] First name of the payee. There is a 50 character limit.
  attribute(:payee_first_name, String, null: false, from: "payeeFirstName")

  # @return [String] Last name of the payee. There is a 50 character limit.
  attribute(:payee_last_name, String, null: false, from: "payeeLastName")

  # @return [String] Valid phone number of the payee.
  attribute(:phone_number, String, null: false, from: "phoneNumber")

  # @return [String] Postal code of the public address.
  attribute(:postal_code, String, null: false, from: "postalCode")

  # @return [String] State name of the public address. This is the state or region for China-based addresses.
  attribute(:state, String, null: false)

  # @return [String] Address Line 2 of the public address.
  attribute?(:address_line2, String, from: "addressLine2")

  # @return [String] Country name of the public address.
  attribute?(:country, String)

  # @return [String] Middle name of the payee. There is a 50 character limit.
  attribute?(:payee_middle_name, String, from: "payeeMiddleName")
end
TransferScheduleListing =

A list of transfer schedules.

Structure.new do
  # @return [Array<TransferSchedule>] A list of transfer schedules.
  attribute(:transfer_schedules, [TransferSchedule], null: false, from: "transferSchedules")

  # @return [String] A token that you use to retrieve the next page of results. The response includes
  #   `nextPageToken` when the number of results exceeds 100. 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 `nextPageToken` is null. Note that this operation can return empty pages.
  attribute?(:next_page_token, String, from: "nextPageToken")
end
TransferScheduleRequest =

Request body to initiate a scheduled transfer from a Seller Wallet bank account to another customer-defined bank account.

Structure.new do
  # @return [String] The unique identifier of the destination bank account where the money is deposited.
  attribute(:destination_account_id, String, null: false, from: "destinationAccountId")

  # @return [TransactionInstrumentDetails] Details of the destination bank account in the transaction request.
  attribute(:destination_transaction_instrument, TransactionInstrumentDetails, null: false, from: "destinationTransactionInstrument")

  # @return [PaymentPreference] The payment preference of the scheduled transfer.
  attribute(:payment_preference, PaymentPreference, null: false, from: "paymentPreference")

  # @return [String] The unique identifier of the source Amazon Seller Wallet bank account from which money is
  #   debited.
  attribute(:source_account_id, String, null: false, from: "sourceAccountId")

  # @return [String] The three-letter currency code of the source payment method country, in ISO 4217 format.
  attribute(:source_currency_code, String, null: false, from: "sourceCurrencyCode")

  # @return [String] The type of the scheduled transaction.
  attribute(:transaction_type, String, null: false, from: "transactionType")

  # @return [TransferScheduleInformation] The configuration of the scheduled transfer.
  attribute(:transfer_schedule_information, TransferScheduleInformation, null: false, from: "transferScheduleInformation")

  # @return [String] The type of transaction schedule. This field is required when you update a transfer schedule.
  attribute?(:transfer_schedule_status, String, from: "transferScheduleStatus")
end
TransferScheduleFailures =

The time of and reason for the transfer schedule failure.

Structure.new do
  # @return [Time] The transfer schedule failure date.
  attribute(:transfer_schedule_failure_date, Time, null: false, from: "transferScheduleFailureDate")

  # @return [String] The reason listed for the failure of the transfer schedule.
  attribute(:transfer_schedule_failure_reason, String, null: false, from: "transferScheduleFailureReason")
end
CreateTransactionResponse =

The transaction response and historical details related to it.

Structure.new do
  # @return [String] The callback URL for the transaction which the user have to click to approve/consent the
  #   transaction
  attribute(:call_back_url, String, null: false, from: "callBackURL")

  # @return [Transaction] The transaction response details.
  attribute(:transaction, Transaction, null: false)
end
TransferScheduleInformation =

Mandatory information for initiating a schedule transfer.

Structure.new do
  # @return [Time] The end date of the scheduled transfer.
  attribute?(:schedule_end_date, Time, from: "scheduleEndDate")

  # @return [ScheduleExpression] How often the scheduled transfer repeats.
  attribute?(:schedule_expression, ScheduleExpression, from: "scheduleExpression")

  # @return [Time] The start date of the scheduled transfer.
  attribute?(:schedule_start_date, Time, from: "scheduleStartDate")

  # @return [String] The type of schedule.
  attribute?(:schedule_type, String, from: "scheduleType")
end
TransactionInitiationRequest =

Request body to initiate a transaction from a Seller Wallet bank account to another customer-defined bank account.

Structure.new do
  # @return [TransactionInstrumentDetails] Details of the destination bank account in the transaction request.
  attribute(:destination_transaction_instrument, TransactionInstrumentDetails, null: false, from: "destinationTransactionInstrument")

  # @return [Time] The time at which the transaction was initiated in [ISO 8601 date time
  #   format](https://developer-docs.amazon.com/sp-api/docs/iso-8601).
  attribute(:request_time, Time, null: false, from: "requestTime")

  # @return [String] The unique identifier of the source Amazon Seller Wallet bank account from which the money is
  #   debited.
  attribute(:source_account_id, String, null: false, from: "sourceAccountId")

  # @return [Money] The transaction amount in the source account's currency format. Requests that use a currency
  #   other than the source bank account currency fail.
  attribute(:source_amount, Money, null: false, from: "sourceAmount")

  # @return [String] If the payment is for VAT (Value-Added-Tax) then enter VAT identification number in this
  #   field which will be mandatory. The length constraint is 140 characters and do not allow user to enter any
  #   sensitive information other than VAT-ID.
  attribute?(:customer_payment_reference, String, from: "customerPaymentReference")

  # @return [String] The unique identifier of the destination bank account where the money is deposited.
  attribute?(:destination_account_id, String, from: "destinationAccountId")

  # @return [PayeeContactInformation] The contact information of a payee.
  attribute?(:payee_contact_information, PayeeContactInformation, from: "payeeContactInformation")

  # @return [String] A description of the transaction.
  attribute?(:transaction_description, String, from: "transactionDescription")

  # @return [TransferRatePreview] The fees and foreign exchange rates that apply to the transaction. Transfer Rate
  #   Preview is currently optional. This field is required when the third party honors the fees and rates of the
  #   Seller Wallet transaction.
  attribute?(:transfer_rate_details, TransferRatePreview, from: "transferRateDetails")
end
TransactionInstrumentDetails =

Details of the destination bank account in the transaction request.

Structure.new do
  # @return [String] The bank account holder's name (expected to be an Amazon customer).
  #
  # **Note:** This field is encrypted before Amazon receives it, so should not be used to generate
  #   `destAccountDigitalSignature`, and should not be included in the request signature.
  attribute(:account_holder_name, String, null: false, from: "accountHolderName")

  # @return [BankAccount] Details of the destination bank account.
  attribute(:bank_account, BankAccount, null: false, from: "bankAccount")

  # @return [String] The bank account number of the destination payment method.
  #
  # **Note:** This field is encrypted before Amazon receives it, so should not be used to generate
  #   `destAccountDigitalSignature`, and should not be included in the request signature.
  attribute(:bank_account_number, String, null: false, from: "bankAccountNumber")
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

#create_transaction(body, dest_account_digital_signature, amount_digital_signature, marketplace_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Create a transaction request from a Seller Wallet account to another customer-provided account.

Parameters:

  • body (Hash)

    The payload of the request

  • dest_account_digital_signature (String)

    Digital signature for the destination bank account details. For more information, refer to Third-Party Provider Signature Guidance.

  • amount_digital_signature (String)

    Digital signature for the source currency transaction amount. Sign in the order of the request definitions. You can omit empty or optional fields. For more information, refer to Third-Party Provider Signature Guidance.

  • marketplace_id (String)

    The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

Returns:



131
132
133
134
135
136
137
138
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 131

def create_transaction(body, , amount_digital_signature, marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/transactions"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { CreateTransactionResponse }
  post(path, body:, params:, parser:)
end

#create_transfer_schedule(body, dest_account_digital_signature, amount_digital_signature, marketplace_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Create a transfer schedule request from a Seller Wallet account to another customer-provided account.

Parameters:

  • body (Hash)

    The payload of the request.

  • dest_account_digital_signature (String)

    Digital signature for the destination bank account details.

  • amount_digital_signature (String)

    Digital signature for the source currency transaction amount.

  • marketplace_id (String)

    The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

Returns:



191
192
193
194
195
196
197
198
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 191

def create_transfer_schedule(body, , amount_digital_signature, marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/transferSchedules"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { TransferSchedule }
  post(path, body:, params:, parser:)
end

#delete_schedule_transaction(transfer_schedule_id, marketplace_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Delete a transaction request that is scheduled from Amazon Seller Wallet account to another customer-provided account.

Parameters:

  • transfer_schedule_id (String)

    A unique reference ID for a scheduled transfer.

  • marketplace_id (String)

    The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

Returns:



245
246
247
248
249
250
251
252
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 245

def delete_schedule_transaction(transfer_schedule_id, marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/transferSchedules/#{percent_encode(transfer_schedule_id)}"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { DeleteTransferSchedule }
  delete(path, params:, parser:)
end

#get_account(account_id, marketplace_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieve a Seller Wallet bank account by Amazon account identifier.

Parameters:

  • account_id (String)

    The ID of the Amazon Seller Wallet account.

  • marketplace_id (String)

    The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

Returns:



39
40
41
42
43
44
45
46
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 39

def (, marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/accounts/#{percent_encode()}"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { BankAccount }
  get(path, params:, parser:)
end

#get_transaction(transaction_id, marketplace_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Find a transaction by the Amazon transaction identifier.

Parameters:

  • transaction_id (String)

    The ID of the Amazon Seller Wallet transaction.

  • marketplace_id (String)

    The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

Returns:



148
149
150
151
152
153
154
155
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 148

def get_transaction(transaction_id, marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/transactions/#{percent_encode(transaction_id)}"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { Transaction }
  get(path, params:, parser:)
end

#get_transfer_preview(source_country_code, source_currency_code, destination_country_code, destination_currency_code, base_amount, marketplace_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieve a list of potential fees on a transaction.

Parameters:

  • source_country_code (String)

    Country code of the source transaction account in ISO 3166 format.

  • source_currency_code (String)

    Currency code of the source transaction country in ISO 4217 format.

  • destination_country_code (String)

    Country code of the destination transaction account in ISO 3166 format.

  • destination_currency_code (String)

    Currency code of the destination transaction country in ISO 4217 format.

  • base_amount (Number)

    The base transaction amount without any markup fees.

  • marketplace_id (String)

    The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

Returns:



78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 78

def get_transfer_preview(source_country_code, source_currency_code, destination_country_code,
  destination_currency_code, base_amount, marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/transferPreview"
  params = {
    "sourceCountryCode" => source_country_code,
    "sourceCurrencyCode" => source_currency_code,
    "destinationCountryCode" => destination_country_code,
    "destinationCurrencyCode" => destination_currency_code,
    "baseAmount" => base_amount,
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { TransferRatePreview }
  get(path, params:, parser:)
end

#get_transfer_schedule(transfer_schedule_id, marketplace_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Find a particular Amazon Seller Wallet account transfer schedule.

Parameters:

  • transfer_schedule_id (String)

    The schedule ID of the Amazon Seller Wallet transfer.

  • marketplace_id (String)

    The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

Returns:



227
228
229
230
231
232
233
234
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 227

def get_transfer_schedule(transfer_schedule_id, marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/transferSchedules/#{percent_encode(transfer_schedule_id)}"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { TransferSchedule }
  get(path, params:, parser:)
end

#list_account_balances(account_id, marketplace_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieve the balance in a given Seller Wallet bank account.

Parameters:

  • account_id (String)

    The ID of the Amazon Seller Wallet account.

  • marketplace_id (String)

    The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

Returns:



56
57
58
59
60
61
62
63
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 56

def (, marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/accounts/#{percent_encode()}/balance"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { BalanceListing }
  get(path, params:, parser:)
end

#list_account_transactions(account_id, marketplace_id, next_page_token: nil) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieve a list of transactions for a given Seller Wallet bank account.

Parameters:

  • account_id (String)

    The ID of the Amazon Seller Wallet account.

  • next_page_token (String) (defaults to: nil)

    A token that you use to retrieve the next page of results. The response includes nextPageToken when the number of results exceeds 100. 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 nextPageToken is null. Note that this operation can return empty pages.

  • marketplace_id (String)

    The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

Returns:



105
106
107
108
109
110
111
112
113
114
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 105

def (, marketplace_id, next_page_token: nil)
  path = "/finances/transfers/wallet/2024-03-01/transactions"
  params = {
    "accountId" => ,
    "nextPageToken" => next_page_token,
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { TransactionListing }
  get(path, params:, parser:)
end

#list_accounts(marketplace_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Get Seller Wallet accounts for a seller.

Parameters:

  • marketplace_id (String)

    The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

Returns:



22
23
24
25
26
27
28
29
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 22

def list_accounts(marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/accounts"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { BankAccountListing }
  get(path, params:, parser:)
end

#list_transfer_schedules(account_id, marketplace_id, next_page_token: nil) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieve transfer schedules of a Seller Wallet bank account.

Parameters:

  • account_id (String)

    The ID of the Amazon Seller Wallet account.

  • marketplace_id (String)

    The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

  • next_page_token (String) (defaults to: nil)

    A token that you use to retrieve the next page of results. The response includes nextPageToken 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 nextPageToken is null. Note that this operation can return empty pages.

Returns:



170
171
172
173
174
175
176
177
178
179
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 170

def list_transfer_schedules(, marketplace_id, next_page_token: nil)
  path = "/finances/transfers/wallet/2024-03-01/transferSchedules"
  params = {
    "accountId" => ,
    "marketplaceId" => marketplace_id,
    "nextPageToken" => next_page_token,
  }.compact
  parser = -> { TransferScheduleListing }
  get(path, params:, parser:)
end

#update_transfer_schedule(body, dest_account_digital_signature, amount_digital_signature, marketplace_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Update transfer schedule information. Returns a transfer belonging to the updated scheduled transfer request.

Parameters:

  • body (Hash)

    The payload of the scheduled transfer request that is to be updated.

  • dest_account_digital_signature (String)

    Digital signature for the destination bank account details.

  • amount_digital_signature (String)

    Digital signature for the source currency transaction amount.

  • marketplace_id (String)

    The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to Marketplace IDs.

Returns:



210
211
212
213
214
215
216
217
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 210

def update_transfer_schedule(body, , amount_digital_signature, marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/transferSchedules"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = -> { TransferSchedule }
  put(path, body:, params:, parser:)
end