muffin_man 1.4.12 → 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: 56a11750c6d7476f8ec76a10d48af26c4a08950925441d27711614db8f4a461d
4
- data.tar.gz: 54ad3a2010e6e8740faeb3c99f56b3a03b0eaf16764a3ddc332dc6a5d66f417e
3
+ metadata.gz: 704f242647d288ff82263bb78c3b328e26300f0dda61662e1475fc0bac43a7b7
4
+ data.tar.gz: ac74f2a7ab543606691475d649d4485461df4deaecceb25203c815eb7bcf779c
5
5
  SHA512:
6
- metadata.gz: '0839c14a32a23c9c5116e67579d0c972635075f3f552c62700d5ead90b9b74685b9dfc638856d9018c24380f5ca3ed3527c940b30763607318c2068612e700e1'
7
- data.tar.gz: ad67a79ef140ddbd2c5d01d8ea70c5e00c0ff8037ae13de6f864b411b1a6105d3e3338ce505459587b74801c5612030447908a416da8c84b7b8f4dd4080cf89a
6
+ metadata.gz: f58510f1a7182345d8d916dc3162a7bfa23dda54a6618f8d36691dcefa3718b7705f69f468107f6ef9f24824e32e01ec71122479c5cb2ea34b60c993c5e2a7d2
7
+ data.tar.gz: 25d9a261dade7924e0fb1267005703e89070e1f56b32c060fad4c0c70a8359b07c14093bc8debe4b5f94799caf70ce086ace257a259b55d139aa5df55b5b4b96
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
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
+
7
+ # 1.4.13
8
+
9
+ - Support for updateInboundShipment [#28](https://github.com/patterninc/muffin_man/pull/28)
10
+
1
11
  # 1.4.12
2
12
 
3
- - Support for getLabels [#30](https://github.com/patterninc/muffin_man/pull/30)
13
+ - Support for getShipmentItemsByShipmentId [#30](https://github.com/patterninc/muffin_man/pull/30)
4
14
 
5
15
  # 1.4.11
6
16
 
@@ -8,7 +18,7 @@
8
18
 
9
19
  # 1.4.10
10
20
 
11
- - Fix to override global AWS config with credentials that are passed [#27](https://github.com/patterninc/muffin_man/pull/27)
21
+ - Support for getShipments [#27](https://github.com/patterninc/muffin_man/pull/27)
12
22
 
13
23
  # 1.4.9
14
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 = {})
@@ -52,6 +52,17 @@ module MuffinMan
52
52
  call_api
53
53
  end
54
54
 
55
+ def update_inbound_shipment(shipment_id, marketplace_id, inbound_shipment_header, inbound_shipment_items)
56
+ @local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}"
57
+ @request_body = {
58
+ "MarketplaceId": marketplace_id,
59
+ "InboundShipmentHeader": inbound_shipment_header,
60
+ "InboundShipmentItems": inbound_shipment_items,
61
+ }
62
+ @request_type = "PUT"
63
+ call_api
64
+ end
65
+
55
66
  def get_labels(shipment_id, page_type, label_type, number_of_packages: nil, package_labels_to_print: [], number_of_pallets: nil, page_size: nil, page_start_index: nil)
56
67
  @local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/labels"
57
68
  @query_params = {
@@ -76,6 +87,18 @@ module MuffinMan
76
87
  @request_type = "GET"
77
88
  call_api
78
89
  end
90
+
91
+ def put_transport_details(shipment_id, is_partnered, shipment_type, transport_details)
92
+ @local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/transport"
93
+ @request_body = {
94
+ "shipmentId": shipment_id,
95
+ "IsPartnered": is_partnered,
96
+ "ShipmentType": shipment_type,
97
+ "TransportDetails": transport_details,
98
+ }
99
+ @request_type = "PUT"
100
+ call_api
101
+ end
79
102
  end
80
103
  end
81
104
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuffinMan
4
- VERSION = "1.4.12"
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.12
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-03 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