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,
sig/peddler/apis/seller_wallet_2024_03_01.rbs

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.

Defined Under Namespace

Classes: Balance, BalanceListing, BankAccount, BankAccountListing, CreateTransactionResponse, DeleteTransferSchedule, Error, ErrorList, Fee, FxRateDetails, PayeeContactInformation, PaymentPreference, ScheduleExpression, Transaction, TransactionAccount, TransactionInitiationRequest, TransactionInstrumentDetails, TransactionListing, TransferRatePreview, TransferSchedule, TransferScheduleFailures, TransferScheduleInformation, TransferScheduleListing, TransferScheduleRequest

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#cannot_sandbox!, #delete, #endpoint_uri, #get, #http, #initialize, #must_sandbox!, #patch, #percent_encode, #post, #put, #request, #sandbox, #sandbox?, #stringify_array, #timestamp, #user_agent

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.

  • (Hash[untyped, untyped])
  • (String)
  • (String)
  • (String)

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.

  • (Hash[untyped, untyped])
  • (String)
  • (String)
  • (String)

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.

  • (String)
  • (String)

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.

  • (String)
  • (String)

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.

  • (String)
  • (String)

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.

  • (String)
  • (String)
  • (String)
  • (String)
  • (Numeric)
  • (String)

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.

  • (String)
  • (String)

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.

  • (String)
  • (String)

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.

  • (String)
  • (String)
  • next_page_token: (String, nil) (defaults to: nil)

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.

  • (String)

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.

  • (String)
  • (String)
  • next_page_token: (String, nil) (defaults to: nil)

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.

  • (Hash[untyped, untyped])
  • (String)
  • (String)
  • (String)

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