Class: Peddler::APIs::SellerWallet20240301

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/seller_wallet_2024_03_01.rb

Overview

The Selling Partner API for Amazon Seller Wallet Open Banking API Spec.

For more information, refer to the [Seller Wallet Open Banking API Use Case Guide](doc:seller-wallet-open-banking-api-v2024-03-01-use-case-guide).

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.

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, #meter, #retriable, #sandbox, #sandbox?, #typed, #typed?, #use, #via

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)

    Defines the actual 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](developer-docs.amazon.com/sp-api/docs/marketplace-ids).

Returns:



136
137
138
139
140
141
142
143
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 136

def create_transaction(body, , amount_digital_signature, marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/transactions"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = Peddler::Types::SellerWallet20240301::CreateTransactionResponse if typed?
  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)

    Defines the actual 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](developer-docs.amazon.com/sp-api/docs/marketplace-ids).

Returns:



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

def create_transfer_schedule(body, , amount_digital_signature, marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/transferSchedules"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = Peddler::Types::SellerWallet20240301::TransferSchedule if typed?
  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](developer-docs.amazon.com/sp-api/docs/marketplace-ids).

Returns:



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

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 = Peddler::Types::SellerWallet20240301::DeleteTransferSchedule if typed?
  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)

    ID of the Amazon SW 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](developer-docs.amazon.com/sp-api/docs/marketplace-ids).

Returns:



48
49
50
51
52
53
54
55
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 48

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

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

Note:

This operation can make a static sandbox call.

Returns a transaction

Parameters:

  • transaction_id (String)

    ID of the Amazon SW 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](developer-docs.amazon.com/sp-api/docs/marketplace-ids).

Returns:



153
154
155
156
157
158
159
160
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 153

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 = Peddler::Types::SellerWallet20240301::Transaction if typed?
  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.

Returns list of potential fees on a transaction based on the source and destination country currency code

Parameters:

  • source_country_code (String)

    Represents 2 character country code of source transaction account in ISO 3166 standard format.

  • source_currency_code (String)

    Represents 3 letter currency code in ISO 4217 standard format of the source transaction country.

  • destination_country_code (String)

    Represents 2 character country code of destination transaction account in ISO 3166 standard format.

  • destination_currency_code (String)

    Represents 3 letter currency code in ISO 4217 standard format of the destination transaction country.

  • base_amount (Number)

    Represents the base transaction amount without any markup fees, rates that will be used to get the transfer preview.

  • 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](developer-docs.amazon.com/sp-api/docs/marketplace-ids).

Returns:



91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 91

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 = Peddler::Types::SellerWallet20240301::TransferRatePreview if typed?
  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](developer-docs.amazon.com/sp-api/docs/marketplace-ids).

Returns:



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

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 = Peddler::Types::SellerWallet20240301::TransferSchedule if typed?
  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)

    ID of the Amazon SW 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](developer-docs.amazon.com/sp-api/docs/marketplace-ids).

Returns:



65
66
67
68
69
70
71
72
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 65

def (, marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/accounts/#{percent_encode(account_id)}/balance"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = Peddler::Types::SellerWallet20240301::BalanceListing if typed?
  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)

    ID of the Amazon SW account

  • next_page_token (String) (defaults to: nil)

    Pagination token to retrieve a specific page of results.

  • 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](developer-docs.amazon.com/sp-api/docs/marketplace-ids).

Returns:



115
116
117
118
119
120
121
122
123
124
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 115

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 = Peddler::Types::SellerWallet20240301::TransactionListing if typed?
  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)

    A marketplace identifier. Specifies the marketplace for which items are returned.

Returns:



31
32
33
34
35
36
37
38
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 31

def list_accounts(marketplace_id)
  path = "/finances/transfers/wallet/2024-03-01/accounts"
  params = {
    "marketplaceId" => marketplace_id,
  }.compact
  parser = Peddler::Types::SellerWallet20240301::BankAccountListing if typed?
  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)

    ID of the Amazon SW 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](developer-docs.amazon.com/sp-api/docs/marketplace-ids).

  • next_page_token (String) (defaults to: nil)

    Pagination token to retrieve a specific page of results.

Returns:



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

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 = Peddler::Types::SellerWallet20240301::TransferScheduleListing if typed?
  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.

Returns a transfer belonging to the updated scheduled transfer request

Parameters:

  • body (Hash)

    Defines the actual 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](developer-docs.amazon.com/sp-api/docs/marketplace-ids).

Returns:



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

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