Module: Peddler::Types::SellerWallet20240301

Defined in:
lib/peddler/types/seller_wallet_2024_03_01/fee.rb,
lib/peddler/types/seller_wallet_2024_03_01/error.rb,
lib/peddler/types/seller_wallet_2024_03_01/balance.rb,
lib/peddler/types/seller_wallet_2024_03_01/currency.rb,
lib/peddler/types/seller_wallet_2024_03_01/error_list.rb,
lib/peddler/types/seller_wallet_2024_03_01/transaction.rb,
lib/peddler/types/seller_wallet_2024_03_01/bank_account.rb,
lib/peddler/types/seller_wallet_2024_03_01/balance_listing.rb,
lib/peddler/types/seller_wallet_2024_03_01/fx_rate_details.rb,
lib/peddler/types/seller_wallet_2024_03_01/transfer_schedule.rb,
lib/peddler/types/seller_wallet_2024_03_01/payment_preference.rb,
lib/peddler/types/seller_wallet_2024_03_01/schedule_expression.rb,
lib/peddler/types/seller_wallet_2024_03_01/transaction_account.rb,
lib/peddler/types/seller_wallet_2024_03_01/transaction_listing.rb,
lib/peddler/types/seller_wallet_2024_03_01/bank_account_listing.rb,
lib/peddler/types/seller_wallet_2024_03_01/transfer_rate_preview.rb,
lib/peddler/types/seller_wallet_2024_03_01/account_holder_address.rb,
lib/peddler/types/seller_wallet_2024_03_01/delete_transfer_schedule.rb,
lib/peddler/types/seller_wallet_2024_03_01/transfer_schedule_listing.rb,
lib/peddler/types/seller_wallet_2024_03_01/transfer_schedule_request.rb,
lib/peddler/types/seller_wallet_2024_03_01/transfer_schedule_failures.rb,
lib/peddler/types/seller_wallet_2024_03_01/create_transaction_response.rb,
lib/peddler/types/seller_wallet_2024_03_01/transfer_schedule_information.rb,
lib/peddler/types/seller_wallet_2024_03_01/transaction_initiation_request.rb,
lib/peddler/types/seller_wallet_2024_03_01/transaction_instrument_details.rb

Constant Summary collapse

Fee =

If the fees is in baseAmount (sourceAccount) currency, effectiveRate = (baseAmount - sum(fees.feeAmount.currencyAmount)) * baseRate) / baseAmount. If the fees is in transferAmount (destinationAccount) currency, effectiveRate = (( baseAmount * baseRate ) - sum(fees.feeAmount.currencyAmount )) / baseAmount

Structure.new do
  # @return [String] Unique identifier assigned to the Fee.
  attribute(:fee_id, String, from: "feeId")

  # @return [String] Displays type of the Fee.
  attribute(:fee_type, String, from: "feeType")

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

  # @return [Currency] Displays actual value of the fee in numeric format.
  attribute(:fee_amount, Currency, from: "feeAmount")
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)

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

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

Specifies the balance amount in the Amazon SW bank account

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

  # @return [String] Type of the balance
  attribute(:balance_type, String, from: "balanceType")

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

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

  # @return [String] The last update date on the account balance
  attribute(:last_update_date, String, from: "lastUpdateDate")
end
Currency =

A currency type and amount.

Structure.new do
  # @return [String] The three-digit currency code in ISO 4217 format.
  attribute(:currency_code, String, from: "currencyCode")

  # @return [Float] The monetary value.
  attribute(:currency_amount, Float, from: "currencyAmount")
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])
end
Transaction =

The current transaction status and related historical details.

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

  # @return [String] Type of the transaction
  attribute(:transaction_type, String, from: "transactionType")

  # @return [String] Execution Status of the transaction
  attribute(:transaction_status, String, from: "transactionStatus")

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

  # @return [String] Expected completion date of a transaction, for existing active Payees (Trusted Beneficiaries)
  # it will be 24 hours but for new destination bank accounts the value could go up to 5 days
  attribute(:expected_completion_date, String, from: "expectedCompletionDate")

  # @return [String] Transaction completion date
  attribute(:transaction_actual_completion_date, String, from: "transactionActualCompletionDate")

  # @return [String] The last update date on the transaction
  attribute(:last_update_date, String, from: "lastUpdateDate")

  # @return [String] Amazon SW customer who requested the transaction
  attribute(:requester_name, String, from: "requesterName")

  # @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, from: "transactionRequesterSource")

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

  # @return [TransactionAccount] Source bank account details in the transaction
  attribute(:transaction_source_account, TransactionAccount, from: "transactionSourceAccount")

  # @return [TransactionAccount] Destination bank account details in the transaction
  attribute(:transaction_destination_account, TransactionAccount, from: "transactionDestinationAccount")

  # @return [Currency] Specifies the amount for which the transfer was initiated
  attribute(:transaction_request_amount, Currency, from: "transactionRequestAmount")

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

  # @return [Currency] Specifies the amount of completed transaction in the destination account currency, this
  # will be populated only for international transactions
  attribute(:transaction_final_amount, Currency, from: "transactionFinalAmount")

  # @return [String] Description in case the transaction fails before completion
  attribute(:transaction_failure_reason, String, from: "transactionFailureReason")
end
BankAccount =

Details of an Amazon SW bank account, used to hold money earned by a SW customer by selling items. NOTE: Not including account_links, short cut links to the account balance and transactions -> since not mandatory

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

  # @return [String] BankAccount holder's name (expected to be Amazon customer)
  attribute(:account_holder_name, String, from: "accountHolderName")

  # @return [String] Format in which the Bank BankAccount is provided
  attribute(:bank_account_number_format, String, from: "bankAccountNumberFormat")

  # @return [String] The name of the bank, for all Amazon Seller Wallet account the value will be Amazon Seller
  # Wallet
  attribute(:bank_name, String, from: "bankName")

  # @return [String] Type of the Bank BankAccount is provided, for all Amazon Seller Wallet account the value will
  # be SELF
  attribute(:bank_account_ownership_type, String, from: "bankAccountOwnershipType")

  # @return [String] Routing number for automated clearing house transfers, for all Amazon Seller Wallet account
  # the value will be denoted by nine cosecutive 0's,
  attribute(:routing_number, String, from: "routingNumber")

  # @return [String] Bank account number format or routing number type.
  attribute(:bank_number_format, String, from: "bankNumberFormat")

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

  # @return [String] BankAccount currency code in ISO 4217 format
  attribute(:account_currency, String, from: "accountCurrency")

  # @return [String] Last 3 digit of the bank account number, for all Amazon Seller Wallet account the value will
  # be three consecutive 0's
  attribute(:bank_account_number_tail, String, from: "bankAccountNumberTail")

  # @return [String] Bank account holder compliance status
  attribute(:bank_account_holder_status, String, from: "bankAccountHolderStatus")
end
BalanceListing =

Struct that holds list of balances on the seller account.

Structure.new do
  # @return [Array<Balance>] Collection that holds list of balances on the account
  attribute(:balances, [Balance])
end
FxRateDetails =

Foreign exchange rate details displayed when transfer preview is requested.

Structure.new do
  # @return [String] Unique identifier assigned to the fees/foreign exchange Rate of a transaction.
  attribute(:fx_rate_id, String, from: "fxRateId")

  # @return [Float] This is the rate that will be market foreign exchange rate. For example: 1USD -> 86.0 INR.
  attribute(:base_rate, Float, from: "baseRate")

  # @return [Float] Displays the foreign exchange rate which will be all rates and fees baked in (i.e; markup
  # fees), example: market fx rate and international transaction fee.
  attribute(:effective_fx_rate, Float, from: "effectiveFxRate")

  # @return [String] Rate Direction can refer to the way final amount is calculated.
  attribute(:rate_direction, String, from: "rateDirection")
end
TransferSchedule =

Transfer schedule details and related historical details.

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

  # @return [String] Type of the transfer
  attribute(:transaction_type, String, from: "transactionType")

  # @return [TransactionAccount] Source bank account details in the scheduled transfer
  attribute(:transaction_source_account, TransactionAccount, from: "transactionSourceAccount")

  # @return [TransactionAccount] Destination bank account details in the scheduled transfer. Here
  # bankAccountCountryCode is a MANDATORY field
  attribute(:transaction_destination_account, TransactionAccount, from: "transactionDestinationAccount")

  # @return [String] Type of the transfer schedule. This information can be modified when updating a transfer
  # schedule.
  attribute(:transfer_schedule_status, String, from: "transferScheduleStatus")

  # @return [TransferScheduleInformation] Fields required for the scheduled transfer. This information can be
  # modified when updating a transfer schedule.
  attribute(:transfer_schedule_information, TransferScheduleInformation, from: "transferScheduleInformation")

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

  # @return [Array<TransferScheduleFailures>] Collection that holds Transfer Schedules that has been cancelled or
  # failed due to certain reasons.
  attribute(:transfer_schedule_failures, [TransferScheduleFailures], from: "transferScheduleFailures")
end
PaymentPreference =

Payment preference type in which transfer is being scheduled

Structure.new do
  # @return [String] Specifies the preferred payment type for the scheduled transaction eg:PERCENTAGE of certain
  # total amount in account
  attribute(:payment_preference_payment_type, String, from: "paymentPreferencePaymentType")

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

Parameters containing information of the expression that defines when the schedule runs. The following formats are supported.

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

  # @return [String] Field to specify recurrence of the scheduled transfer. Recurring frequency is mandatory if
  # scheduleExpressionType is set as RECURRING otherwise it should be empty field.
  attribute(:recurring_frequency, String, from: "recurringFrequency")
end
TransactionAccount =

Details of the bank account involved in the transaction.

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

  # @return [String] BankAccount holder's name
  attribute(:bank_account_holder_name, String, from: "bankAccountHolderName")

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

  # @return [String] Bank account format
  attribute(:bank_account_number_format, String, from: "bankAccountNumberFormat")

  # @return [String] Last 3 digit of the bank account number
  attribute(:bank_account_number_tail, String, from: "bankAccountNumberTail")

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

  # @return [String] The currency code in ISO 4217 format
  attribute(:bank_account_currency, String, from: "bankAccountCurrency")
end
TransactionListing =

Struct that holds collection of transactions.

Structure.new do
  # @return [String] If present, use this pagination token to retrieve the next page of supply sources, if not
  # provided the API will return same response. The field will only be provided when the list is greater than 100.
  attribute(:next_page_token, String, from: "nextPageToken")

  # @return [Array<Transaction>] Collection that holds Transaction
  attribute(:transactions, [Transaction])
end
BankAccountListing =

Struct that holds collection of accounts.

Structure.new do
  # @return [Array<BankAccount>] Collection that holds BankAccount
  attribute(:accounts, [BankAccount])
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 [Currency] Base amount of the transaction.
  attribute(:base_amount, Currency, from: "baseAmount")

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

  # @return [Currency] The final amount reflects both the fee deduction and currency conversion rate exchange
  attribute(:transfer_amount, Currency, from: "transferAmount")

  # @return [Array<Fee>] List of fees
  attribute(:fees, [Fee])
end
AccountHolderAddress =

Address for bank account verification of the Payee. For example, this can be a person or business mailing address

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

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

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

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

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

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

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

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

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

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

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

Struct that holds collection of transfer schedules.

Structure.new do
  # @return [String] If present, use this pagination token to retrieve the next page of supply sources, if not
  # provided the API will return same response. The field will only be provided when the list is greater than 100.
  attribute(:next_page_token, String, from: "nextPageToken")

  # @return [Array<TransferSchedule>] Collection that holds list of Transfer Schedules
  attribute(:transfer_schedules, [TransferSchedule], from: "transferSchedules")
end
TransferScheduleRequest =

Request body to initiate a scheduled transfer from a SW bank account to another customer defined bank account

Structure.new do
  # @return [String] The unique identifier of the source Amazon SW bank account from where the money needs to be
  # debited
  attribute(:source_account_id, String, from: "sourceAccountId")

  # @return [String] Represents 3 letter currency code in ISO 4217 standard format of the source payment method
  # country
  attribute(:source_currency_code, String, from: "sourceCurrencyCode")

  # @return [String] Optional field to specify the unique identifier of the destination bank account where the
  # money needs to be deposited
  attribute(:destination_account_id, String, from: "destinationAccountId")

  # @return [TransactionInstrumentDetails] Destination bank account details of the transaction request
  attribute(:destination_transaction_instrument, TransactionInstrumentDetails, from: "destinationTransactionInstrument")

  # @return [String] Type of the scheduled transaction
  attribute(:transaction_type, String, from: "transactionType")

  # @return [TransferScheduleInformation] Fields required for the scheduled transfer
  attribute(:transfer_schedule_information, TransferScheduleInformation, from: "transferScheduleInformation")

  # @return [PaymentPreference] Payment preference of the scheduled transfer
  attribute(:payment_preference, PaymentPreference, from: "paymentPreference")

  # @return [String] Type of the transaction schedule which is mandatory field in request body if a transfer
  # schedule needs to be updated
  attribute(:transfer_schedule_status, String, from: "transferScheduleStatus")
end
TransferScheduleFailures =

Specifies the balance amount in the Amazon SW bank account

Structure.new do
  # @return [String] The transfer schedule cancellation date
  attribute(:transfer_schedule_failure_date, String, from: "transferScheduleFailureDate")

  # @return [String] The statement/reasoning listed for the cancellation of the transfer schedule
  attribute(:transfer_schedule_failure_reason, String, from: "transferScheduleFailureReason")
end
CreateTransactionResponse =

The transaction response and historical details related to it.

Structure.new do
  # @return [Transaction] The transaction response details.
  attribute(:transaction, Transaction)

  # @return [String] The callback URL for the transaction which the user have to click to approve/consent the
  # transaction
  attribute(:call_back_url, String, from: "callBackURL")
end
TransferScheduleInformation =

Parameters containing information required for initiating a schedule transfer

Structure.new do
  # @return [String] Field to specify start date of the scheduled transfer
  attribute(:schedule_start_date, String, from: "scheduleStartDate")

  # @return [String] Field to specify end date of the scheduled transfer
  attribute(:schedule_end_date, String, from: "scheduleEndDate")

  # @return [ScheduleExpression] Field to specify expression for how often the schedule transfer repeats. Refer to
  # this documentation: https://docs.aws.amazon.com/scheduler/latest/APIReference/API_CreateSchedule.html
  attribute(:schedule_expression, ScheduleExpression, from: "scheduleExpression")

  # @return [String] Field to specify type of the transfer being scheduled
  attribute(:schedule_type, String, from: "scheduleType")
end
TransactionInitiationRequest =

Request body to initiate a transaction from a SW bank account to another customer defined bank account

Structure.new do
  # @return [String] The unique identifier of the source Amazon SW bank account from where the money needs to be
  # debited
  attribute(:source_account_id, String, from: "sourceAccountId")

  # @return [String] Optional field to specify the unique identifier of the destination bank account where the
  # money needs to be deposited
  attribute(:destination_account_id, String, from: "destinationAccountId")

  # @return [TransactionInstrumentDetails] Destination bank account details of the transaction request
  attribute(:destination_transaction_instrument, TransactionInstrumentDetails, from: "destinationTransactionInstrument")

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

  # @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 [AccountHolderAddress] Destination bank account details of the transaction request
  attribute(:destination_account_holder_address, AccountHolderAddress, from: "destinationAccountHolderAddress")

  # @return [Currency] 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, Currency, from: "sourceAmount")

  # @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")

  # @return [String] The transaction initiation request time in date-time format
  attribute(:request_time, String, from: "requestTime")
end
TransactionInstrumentDetails =

Request body to create transaction instrument, Amazon performs validation and screening (anti-money laundering measuers) on all the transaction instruments before executing a transaction thus it requires transaction instrument holder's contact details as well

Structure.new do
  # @return [BankAccount] Specifies the destination bank account details where the money needs to be deposited
  attribute(:bank_account, BankAccount, from: "bankAccount")

  # @return [String] This field would be used to populate the bank account number of the destination payment
  # method. The field is intentionally not included in any other Schemas since Amazon internal systems will never
  # receive it in unencrypted format, so field won't be part of the request signature
  attribute(:bank_account_number, String, from: "bankAccountNumber")

  # @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, from: "accountHolderName")
end