muffin_man 1.4.6 → 1.4.8

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: 062bcf57cb27afd95911a7bac99717cd9f4b070c429013584cddfe3cbf661886
4
- data.tar.gz: 5dc42d8a414afd0d973dca6b8266b53f84a4492daf8b4b7bd3067b59f874a634
3
+ metadata.gz: 7deaf6a01e70c248aad4bf1968206721974e8ce9c09e72edb506be92ef1cb786
4
+ data.tar.gz: 422f15a6a72239ed7f64a4d19f4de450f15a838a167b52fb4e08bbd10deca58b
5
5
  SHA512:
6
- metadata.gz: d725f54db9a3286ee469912f636187dc5de0b2dde1e2cd7af0430b981984d6c08a1ef2ea6afe1c747b960b3a5a067b29714a6a023a00e4b31fed300700702885
7
- data.tar.gz: 2a317b00e4afc4107085a2ab4c6447f8e79074a824f1b8df2e969ffffaef59ee0237deb4c1b0b3b7ee9d68df0d48dfa3d3dd85826ce63c06c5d8182f9fdfb60f
6
+ metadata.gz: a852d2614006e43f5f0698d77330215bef9872071623cab65da8afcf1539f2111e68da3dd4e4cd5fc70debb8fd0189dfb64e8cdc52c03087f099b574291976d9
7
+ data.tar.gz: 321e5cb98de5d46ecb024f3e2e76a73c3aaf5ebf1979378b0ac6445cdbe3e903ea4569e6260b224f5b669b78e1ea2fe58d5091ddc38f6088e622ec4d59ad5b5d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 1.4.8
2
+
3
+ - Support for createInboundShipment [#25](https://github.com/patterninc/muffin_man/pull/25)
4
+
5
+ # 1.4.7
6
+
7
+ - Support for createInboundShipmentPlan [#24](https://github.com/patterninc/muffin_man/pull/24)
8
+
1
9
  # 1.4.6
2
10
 
3
11
  - Support for Catalog API's of version 20220401 [#22](https://github.com/patterninc/muffin_man/pull/22)
@@ -11,6 +11,30 @@ module MuffinMan
11
11
  @request_type = "GET"
12
12
  call_api
13
13
  end
14
+
15
+ def create_inbound_shipment_plan(ship_from_address, label_prep_preference, inbound_shipment_plan_request_items, ship_to_country_code: nil, ship_to_country_subdivision_code: nil)
16
+ @local_var_path = "/fba/inbound/v0/plans"
17
+ @request_body = {
18
+ "ShipFromAddress" => ship_from_address,
19
+ "LabelPrepPreference" => label_prep_preference,
20
+ "InboundShipmentPlanRequestItems" => inbound_shipment_plan_request_items,
21
+ }
22
+ @request_body["ShipToCountryCode"] = ship_to_country_code unless ship_to_country_code.nil?
23
+ @request_body["ShipToCountrySubdivisionCode"] = ship_to_country_subdivision_code unless ship_to_country_subdivision_code.nil?
24
+ @request_type = "POST"
25
+ call_api
26
+ end
27
+
28
+ def create_inbound_shipment(shipment_id, marketplace_id, inbound_shipment_header, inbound_shipment_items)
29
+ @local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}"
30
+ @request_body = {
31
+ "MarketplaceId": marketplace_id,
32
+ "InboundShipmentHeader": inbound_shipment_header,
33
+ "InboundShipmentItems": inbound_shipment_items,
34
+ }
35
+ @request_type = "POST"
36
+ call_api
37
+ end
14
38
  end
15
39
  end
16
40
  end
@@ -0,0 +1,15 @@
1
+ module MuffinMan
2
+ module RequestHelpers
3
+ class Base
4
+ def self.json_body(*args)
5
+ new(*args).json_body
6
+ end
7
+
8
+ def initialize(*args); end
9
+
10
+ def json_body
11
+ {}
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,27 @@
1
+ module MuffinMan
2
+ module RequestHelpers
3
+ class InboundShipmentPlanRequestItem < Base
4
+ attr_reader :seller_sku, :asin, :condition, :quantity, :quantity_in_case, :prep_details_list
5
+
6
+ def initialize(seller_sku, asin, condition, quantity, quantity_in_case: nil, prep_details_list: [])
7
+ @seller_sku = seller_sku
8
+ @asin = asin
9
+ @quantity = quantity
10
+ @condition = condition
11
+ @quantity_in_case = quantity_in_case
12
+ @prep_details_list = prep_details_list
13
+ end
14
+
15
+ def json_body
16
+ {
17
+ "SellerSKU": seller_sku,
18
+ "ASIN": asin,
19
+ "Condition": condition,
20
+ "Quantity": quantity,
21
+ "QuantityInCase": quantity_in_case,
22
+ "PrepDetailsList": prep_details_list
23
+ }
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,2 @@
1
+ require 'muffin_man/request_helpers/base'
2
+ require 'muffin_man/request_helpers/inbound_shipment_plan_request_item'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuffinMan
4
- VERSION = "1.4.6"
4
+ VERSION = "1.4.8"
5
5
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muffin_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 1.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin
8
8
  - Jason
9
9
  - Nate
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2022-09-21 00:00:00.000000000 Z
13
+ date: 2022-09-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -116,7 +116,7 @@ dependencies:
116
116
  - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: 2.4.4
119
- description:
119
+ description:
120
120
  email:
121
121
  - gavin@pattern.com
122
122
  - jason@pattern.com
@@ -150,6 +150,9 @@ files:
150
150
  - lib/muffin_man/product_fees/v0.rb
151
151
  - lib/muffin_man/product_pricing/v0.rb
152
152
  - lib/muffin_man/reports/v20210630.rb
153
+ - lib/muffin_man/request_helpers.rb
154
+ - lib/muffin_man/request_helpers/base.rb
155
+ - lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb
153
156
  - lib/muffin_man/solicitations/v1.rb
154
157
  - lib/muffin_man/sp_api_client.rb
155
158
  - lib/muffin_man/tokens/v20210301.rb
@@ -160,7 +163,7 @@ homepage: https://github.com/patterninc/muffin_man
160
163
  licenses:
161
164
  - MIT
162
165
  metadata: {}
163
- post_install_message:
166
+ post_install_message:
164
167
  rdoc_options: []
165
168
  require_paths:
166
169
  - lib
@@ -175,8 +178,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
178
  - !ruby/object:Gem::Version
176
179
  version: '0'
177
180
  requirements: []
178
- rubygems_version: 3.1.6
179
- signing_key:
181
+ rubygems_version: 3.0.3
182
+ signing_key:
180
183
  specification_version: 4
181
184
  summary: Amazon Selling Partner API client
182
185
  test_files: []