muffin_man 1.4.13 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a42ef0ba984b7f8a4cb0c0dd4f57df1fee295f9b7e0419a98aaf2aa8c91d9d0
4
- data.tar.gz: f9b47bfc74b0914f7ea0135fc2f3e9bea4b1297fdebc3e72efa9e70a6295cbee
3
+ metadata.gz: 98cfca16c53e2145e716a9e3939e65bb1eb8b5b2c750c50a8f2c12dbcc33fb64
4
+ data.tar.gz: dc128645f62aa1a69023b96b12c1e1afc17b106da03b3bef94d9b27663e24056
5
5
  SHA512:
6
- metadata.gz: 6da1096325d7b5dca43d48f41f703771e90e5d73e1ab1e10578bba159b20bd5bdc345fc06e89c7fddf4670702dfdba51861adf825b49a252979568b75ac5a795
7
- data.tar.gz: de6ea25f3a1ccaee93304e39c2f340aa4468289ca43e8b4a4f48c8c0d6f9b8e5dd2759a5c2e49d0588aaa6153fe00ed3d02755fd20a974d0736ca142c11ea767
6
+ metadata.gz: b0de1692d4d2f58f21d94e0ec5b94b2c32cc9af921f1cbc50745e1f7c07976e3e918d85b4f841e88822a5df7143302fa4857592a6eff05d4c6801d094e67f67c
7
+ data.tar.gz: b9743782049f8cd178ddfc6bbcda74605b8bdff23c413320246168bb9c7d76bf2d1280433cdc5cfe2f9bfdf6aa7a4d512b82f17294385855a2b6238130729bd6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # 1.4.13
2
2
 
3
+ - Support for getItemEligibilityPreview [#35](https://github.com/patterninc/muffin_man/pull/35)
4
+
5
+ # 1.5.0
6
+
7
+ ## Breaking changes - 1. v20220401 search_catalog_items method signature updated
8
+
9
+ - [#32](https://github.com/patterninc/muffin_man/pull/32) Removes `keywords` argument requirement for v20220401 search_catalog_items as it is not required in v20220401. You'll need to pass `keywords` as a param rather than as an argument for the method
10
+
11
+ # 1.4.13
12
+
3
13
  - Support for updateInboundShipment [#28](https://github.com/patterninc/muffin_man/pull/28)
4
14
 
5
15
  # 1.4.12
@@ -12,7 +22,7 @@
12
22
 
13
23
  # 1.4.10
14
24
 
15
- - Support for getShipments [#27](https://github.com/patterninc/muffin_man/pull/27)
25
+ - Support for getShipments [#27](https://github.com/patterninc/muffin_man/pull/27)
16
26
 
17
27
  # 1.4.9
18
28
 
@@ -6,7 +6,8 @@ module MuffinMan
6
6
  SANDBOX_MARKETPLACE_IDS = "ATVPDKIKX0DER".freeze
7
7
  attr_reader :keywords, :asin, :marketplace_ids, :params
8
8
 
9
- SEARCH_CATALOG_ITEMS_PARAMS = %w[
9
+ SEARCH_CATALOG_ITEMS_PARAMS = [].freeze
10
+ BASE_SEARCH_CATALOG_ITEMS_PARAMS = %w[
10
11
  includedData
11
12
  brandNames
12
13
  classificationIds
@@ -30,10 +31,10 @@ module MuffinMan
30
31
  @params = params
31
32
  @local_var_path = "/catalog/#{api_version}/items"
32
33
  @query_params = {
33
- "keywords" => @keywords.join(","),
34
34
  "marketplaceIds" => @marketplace_ids.join(",")
35
35
  }
36
- @query_params.merge!(@params.slice(*SEARCH_CATALOG_ITEMS_PARAMS))
36
+ @query_params["keywords"] = @keywords.join(",") if @keywords.any?
37
+ @query_params.merge!(@params.slice(*search_catalog_items_params))
37
38
  @request_type = "GET"
38
39
  call_api
39
40
  end
@@ -53,6 +54,12 @@ module MuffinMan
53
54
  @request_type = "GET"
54
55
  call_api
55
56
  end
57
+
58
+ private
59
+
60
+ def search_catalog_items_params
61
+ BASE_SEARCH_CATALOG_ITEMS_PARAMS + self.class::SEARCH_CATALOG_ITEMS_PARAMS
62
+ end
56
63
  end
57
64
  end
58
- end
65
+ end
@@ -3,11 +3,16 @@ require "muffin_man/catalog_items/base_api"
3
3
  module MuffinMan
4
4
  module CatalogItems
5
5
  class V20220401 < BaseApi
6
+ SEARCH_CATALOG_ITEMS_PARAMS = %w(
7
+ identifiers
8
+ identifiersType
9
+ sellerId
10
+ ).freeze
6
11
 
7
12
  API_VERSION = "2022-04-01".freeze
8
13
 
9
- def search_catalog_items(keywords, marketplace_ids, params = {})
10
- super(keywords, marketplace_ids, params, API_VERSION)
14
+ def search_catalog_items(marketplace_ids, params = {})
15
+ super(params["keywords"], marketplace_ids, params, API_VERSION)
11
16
  end
12
17
 
13
18
  def get_catalog_item(asin, marketplace_ids, params = {})
@@ -0,0 +1,16 @@
1
+ module MuffinMan
2
+ module FulfillmentInbound
3
+ class V1 < SpApiClient
4
+ def get_item_eligibility_preview(asin, program, marketplace_ids: [])
5
+ @local_var_path = "/fba/inbound/v1/eligibility/itemPreview"
6
+ @query_params = {
7
+ "asin" => asin,
8
+ "program" => program,
9
+ }
10
+ @query_params["marketplaceIds"] = marketplace_ids.join(",") if marketplace_ids.any?
11
+ @request_type = "GET"
12
+ call_api
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuffinMan
4
- VERSION = "1.4.13"
4
+ VERSION = "1.5.1"
5
5
  end
data/lib/muffin_man.rb CHANGED
@@ -13,6 +13,7 @@ require "muffin_man/tokens/v20210301"
13
13
  require "muffin_man/product_pricing/v0"
14
14
  require "muffin_man/listings/v20210801"
15
15
  require "muffin_man/fulfillment_inbound/v0"
16
+ require "muffin_man/fulfillment_inbound/v1"
16
17
 
17
18
 
18
19
  module MuffinMan
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muffin_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.13
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2022-10-04 00:00:00.000000000 Z
13
+ date: 2022-10-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -144,6 +144,7 @@ files:
144
144
  - lib/muffin_man/catalog_items/v20220401.rb
145
145
  - lib/muffin_man/finances/v0.rb
146
146
  - lib/muffin_man/fulfillment_inbound/v0.rb
147
+ - lib/muffin_man/fulfillment_inbound/v1.rb
147
148
  - lib/muffin_man/listings/v20210801.rb
148
149
  - lib/muffin_man/lwa/auth_helper.rb
149
150
  - lib/muffin_man/orders/v0.rb