muffin_man 1.5.4 → 1.5.5

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: 815e6d799e774cb3a08322e50fb29485db132b069a976f16fd110b279286a95c
4
- data.tar.gz: c2c8054d5e139c4c92037d029feef98c606dca4e8162a7705f63b3cace9c4b4f
3
+ metadata.gz: 716ae095452a690d2761727c60d898d0c7af55a625e46fa3dd3d5db3a4f97328
4
+ data.tar.gz: e8e063861f9b8c83bd6f374c414434d8d6f0c9846f11f6b956e6d0ec72342060
5
5
  SHA512:
6
- metadata.gz: fad01d3bd223905a1060dda3f3f232bffc1c4d8ec7dd18a3289adcf2d67ab315678e420f73f3b35beb84e9187b73a84af4e5091f10f1394ca6f95513d9f70885
7
- data.tar.gz: cd4ff94c59ccc170b3753068ccc132df8f812a1bcbddf7fd5f4bfcac39dc953142f3276538c8f96b070bfccb5fb97260c91266751db57714dd314701d1d260fa
6
+ metadata.gz: 5f58612faf463c8b59e226d43cf680870c4317a5dcf6965fb205b0643b856297d909ffc14c7f8ec28b09818643d7ef79aa6b29b3804de7c244ff36f39c1db6dd
7
+ data.tar.gz: 8c66b92310f5bc1dd5667a1f65c3fd95ba14e0e12df82f8d33567c761eea35bc3bfad5bcc989cf00945aae5297ab08b8d4eee79cf8b5cf5d4a40f10ae2cb39a8
data/.rubocop.yml CHANGED
@@ -31,6 +31,9 @@ Metrics/BlockLength:
31
31
  Metrics/AbcSize:
32
32
  Enabled: false
33
33
 
34
+ Metrics/ParameterLists:
35
+ Enabled: false
36
+
34
37
  Style/Documentation:
35
38
  Enabled: false
36
39
 
@@ -44,4 +47,4 @@ RSpec/MultipleMemoizedHelpers:
44
47
  Enabled: false
45
48
 
46
49
  RSpec/MultipleExpectations:
47
- Enabled: false
50
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- # Unreleased
1
+ # 1.5.5
2
2
 
3
- - Support for getInventorySummaries [#36](https://github.com/patterninc/muffin_man/pull/36)
3
+ - Support for Merchant Fulfillment [#41](https://github.com/patterninc/muffin_man/pull/41)
4
4
 
5
5
  # 1.5.4
6
6
 
@@ -8,7 +8,8 @@
8
8
 
9
9
  # 1.5.3
10
10
 
11
- - Support for Fulfillment Outbound [#34](https://github.com/patterninc/muffin_man/pull/34)
11
+ - Support for getInventorySummaries [#36](https://github.com/patterninc/muffin_man/pull/36)
12
+ - Support for Fulfillment Outbound [#34](https://github.com/patterninc/muffin_man/pull/34)
12
13
 
13
14
  # 1.5.2
14
15
 
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MuffinMan
4
+ module MerchantFulfillment
5
+ class V0 < SpApiClient
6
+ def get_eligible_shipment_services(shipment_request_details, shipping_offering_filter = {})
7
+ @local_var_path = "/mfn/v0/eligibleShippingServices"
8
+ @request_body = {
9
+ "ShipmentRequestDetails" => shipment_request_details
10
+ }
11
+ @request_body["ShippingOfferingFilter"] = shipping_offering_filter unless shipping_offering_filter.empty?
12
+ @request_type = "POST"
13
+ call_api
14
+ end
15
+
16
+ def get_shipment(shipment_id)
17
+ @local_var_path = "/mfn/v0/shipments/#{shipment_id}"
18
+ @request_type = "GET"
19
+ call_api
20
+ end
21
+
22
+ def cancel_shipment(shipment_id)
23
+ @local_var_path = "/mfn/v0/shipments/#{shipment_id}"
24
+ @request_type = "DELETE"
25
+ call_api
26
+ end
27
+
28
+ def create_shipment(shipment_request_details, shipping_service_id,
29
+ shipping_service_offering_id: nil, hazmat_type: nil, label_format_option: {},
30
+ shipment_level_seller_inputs_list: [])
31
+ @local_var_path = "/mfn/v0/shipments"
32
+ @request_body = {
33
+ "ShipmentRequestDetails" => shipment_request_details,
34
+ "ShippingServiceId" => shipping_service_id
35
+ }
36
+ @request_body["ShippingServiceOfferId"] = shipping_service_offering_id unless shipping_service_offering_id.nil?
37
+ @request_body["HazmatType"] = hazmat_type unless hazmat_type.nil?
38
+ @request_body["LabelFormatOption"] = label_format_option unless label_format_option.empty?
39
+ if shipment_level_seller_inputs_list.any?
40
+ @request_body["ShipmentLevelSellerInputsList"] = shipment_level_seller_inputs_list
41
+ end
42
+ @request_type = "POST"
43
+ call_api
44
+ end
45
+
46
+ def get_additional_seller_inputs(shipping_service_id, ship_from_address, order_id)
47
+ @local_var_path = "/mfn/v0/additionalSellerInputs"
48
+ @request_body = {
49
+ "ShippingServiceId" => shipping_service_id,
50
+ "ShipFromAddress" => ship_from_address,
51
+ "OrderId" => order_id
52
+ }
53
+ @request_type = "POST"
54
+ call_api
55
+ end
56
+ end
57
+ end
58
+ end
@@ -28,7 +28,6 @@ module MuffinMan
28
28
  # @param [MuffinMan::RequestHelpers::OutboundFulfillment::Address] destination_address in form of object
29
29
  # @param [MuffinMan::RequestHelpers::OutboundFulfillment::Item] items in the form of list of items objects
30
30
  # @param [Hash] optional_params optional sp-api attributes in the form of hash
31
- # rubocop:disable Metrics/ParameterLists
32
31
  def initialize(seller_fulfillment_order_id, displayable_order_id, displayable_order_date_time,
33
32
  displayable_order_comment, shipping_speed_category, destination_address, items,
34
33
  optional_params = {})
@@ -42,7 +41,6 @@ module MuffinMan
42
41
  @items = items
43
42
  @optional_params = optional_params
44
43
  end
45
- # rubocop:enable Metrics/ParameterLists
46
44
 
47
45
  # Check to see if the all the properties in the model are valid
48
46
  # @return true if the model is valid
@@ -21,7 +21,6 @@ module MuffinMan
21
21
  }.merge(optional_params))
22
22
  end
23
23
 
24
- # rubocop:disable Metrics/ParameterLists
25
24
  def self.fulfillment_order_request(seller_fulfillment_order_id, displayable_order_id,
26
25
  displayable_order_date_time,
27
26
  displayable_order_comment, shipping_speed_category,
@@ -30,7 +29,6 @@ module MuffinMan
30
29
  displayable_order_comment, shipping_speed_category, destination_address,
31
30
  items, optional_params)
32
31
  end
33
- # rubocop:enable Metrics/ParameterLists
34
32
 
35
33
  def self.fulfillment_preview_request(address, items, optional_params = {})
36
34
  FulfillmentPreviewRequest.new(address, items, optional_params)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuffinMan
4
- VERSION = "1.5.4"
4
+ VERSION = "1.5.5"
5
5
  end
data/lib/muffin_man.rb CHANGED
@@ -19,6 +19,7 @@ require "muffin_man/fba_inventory/v1"
19
19
  require "muffin_man/request_helpers"
20
20
  require "muffin_man/feeds/v20210630"
21
21
  require "muffin_man/notifications/v1"
22
+ require "muffin_man/merchant_fulfillment/v0"
22
23
 
23
24
  module MuffinMan
24
25
  class Error < StandardError; 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.5.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin
@@ -165,6 +165,7 @@ files:
165
165
  - lib/muffin_man/fulfillment_outbound/v20200701.rb
166
166
  - lib/muffin_man/listings/v20210801.rb
167
167
  - lib/muffin_man/lwa/auth_helper.rb
168
+ - lib/muffin_man/merchant_fulfillment/v0.rb
168
169
  - lib/muffin_man/notifications/v1.rb
169
170
  - lib/muffin_man/orders/v0.rb
170
171
  - lib/muffin_man/product_fees/v0.rb