Skip to content

Commit

Permalink
hypens not underscores
Browse files Browse the repository at this point in the history
  • Loading branch information
ericcj committed Oct 19, 2023
1 parent 12268ff commit b5f07f7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,23 @@ require 'fulfillment-outbound-api-model'

## Restricted operations

Configure as per above but also create a new client for each restrictedResources you need, e.g.:

```
require 'orders-api-model'
client = AmzSpApi::RestrictedSpApiClient.new({
'restrictedResources' => [
{
'method' => 'GET',
'path' => "/orders/v0/orders",
'dataElements' => ['buyerInfo', 'shippingAddress']
}
]
})
api_orders = AmzSpApi::OrdersApiModel::OrdersV0Api.new(client)
api_orders.get_orders(marketplace_ids, created_after: 1.day.ago.iso8601)
client = AmzSpApi::RestrictedSpApiClient.new({
'restrictedResources' => [
{
Expand Down
3 changes: 2 additions & 1 deletion lib/amz_sp_api.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
require 'amz_sp_api_version'
require 'api_error'
require 'sp_api_client'
require 'sp_configuration'
require 'sp_api_client'
require 'restricted_sp_api_client'

module AmzSpApi
class << self
Expand Down
7 changes: 3 additions & 4 deletions lib/restricted_sp_api_client.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
require 'sp_api_client'
require 'tokens_api_model'

require 'api_error'
require 'api_client'

require 'configuration'
require 'sp_api_client'

require 'tokens-api-model'

module AmzSpApi
class RestrictedSpApiClient < ApiClient
Expand Down

0 comments on commit b5f07f7

Please sign in to comment.