muffin_man 1.4.13 → 1.5.0

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: 704f242647d288ff82263bb78c3b328e26300f0dda61662e1475fc0bac43a7b7
4
+ data.tar.gz: ac74f2a7ab543606691475d649d4485461df4deaecceb25203c815eb7bcf779c
5
5
  SHA512:
6
- metadata.gz: 6da1096325d7b5dca43d48f41f703771e90e5d73e1ab1e10578bba159b20bd5bdc345fc06e89c7fddf4670702dfdba51861adf825b49a252979568b75ac5a795
7
- data.tar.gz: de6ea25f3a1ccaee93304e39c2f340aa4468289ca43e8b4a4f48c8c0d6f9b8e5dd2759a5c2e49d0588aaa6153fe00ed3d02755fd20a974d0736ca142c11ea767
6
+ metadata.gz: f58510f1a7182345d8d916dc3162a7bfa23dda54a6618f8d36691dcefa3718b7705f69f468107f6ef9f24824e32e01ec71122479c5cb2ea34b60c993c5e2a7d2
7
+ data.tar.gz: 25d9a261dade7924e0fb1267005703e89070e1f56b32c060fad4c0c70a8359b07c14093bc8debe4b5f94799caf70ce086ace257a259b55d139aa5df55b5b4b96
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 1.5.0
2
+
3
+ ## Breaking changes - 1. v20220401 search_catalog_items method signature updated
4
+
5
+ - [#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
6
+
1
7
  # 1.4.13
2
8
 
3
9
  - Support for updateInboundShipment [#28](https://github.com/patterninc/muffin_man/pull/28)
@@ -12,7 +18,7 @@
12
18
 
13
19
  # 1.4.10
14
20
 
15
- - Support for getShipments [#27](https://github.com/patterninc/muffin_man/pull/27)
21
+ - Support for getShipments [#27](https://github.com/patterninc/muffin_man/pull/27)
16
22
 
17
23
  # 1.4.9
18
24
 
@@ -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 = {})
@@ -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.0"
5
5
  end
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.0
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-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec