muffin_man 1.5.5 → 1.5.6

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: 716ae095452a690d2761727c60d898d0c7af55a625e46fa3dd3d5db3a4f97328
4
- data.tar.gz: e8e063861f9b8c83bd6f374c414434d8d6f0c9846f11f6b956e6d0ec72342060
3
+ metadata.gz: 13ceb91a7ccf4877d5f956f95b024b02e4debef9c6de7095404430c2faa68ce3
4
+ data.tar.gz: 692982d4def515e28d7d1493349095b33ad9ea8a215a9b5c3ea16b0bda5e4623
5
5
  SHA512:
6
- metadata.gz: 5f58612faf463c8b59e226d43cf680870c4317a5dcf6965fb205b0643b856297d909ffc14c7f8ec28b09818643d7ef79aa6b29b3804de7c244ff36f39c1db6dd
7
- data.tar.gz: 8c66b92310f5bc1dd5667a1f65c3fd95ba14e0e12df82f8d33567c761eea35bc3bfad5bcc989cf00945aae5297ab08b8d4eee79cf8b5cf5d4a40f10ae2cb39a8
6
+ metadata.gz: b447651efebcbba439158667a5bc0e36d726beccb866ba8a6f94208db878c33e96ba75400891548174e8c935e20514faf36b31c948018fe8e7d06b5466b7c028
7
+ data.tar.gz: f881d61487f0933c645483b2b63ab7b9e2d2ae5c8dabaeb71067b7d6f8f62738541c7fef9c713adfa1134c27eabf8359e164438351a0867a1b0c2a5bc76f4a63
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.5.6
2
+
3
+ - Sandbox support for create/delete shipments in Merchant Fulfillment [#42](https://github.com/patterninc/muffin_man/pull/42)
4
+
1
5
  # 1.5.5
2
6
 
3
7
  - Support for Merchant Fulfillment [#41](https://github.com/patterninc/muffin_man/pull/41)
@@ -19,7 +19,9 @@ module MuffinMan
19
19
  call_api
20
20
  end
21
21
 
22
+ CANCEL_SANDBOX_SHIPMENT_ID = "be7a0a53-00c3-4f6f-a63a-639f76ee9253"
22
23
  def cancel_shipment(shipment_id)
24
+ shipment_id = CANCEL_SANDBOX_SHIPMENT_ID if sandbox
23
25
  @local_var_path = "/mfn/v0/shipments/#{shipment_id}"
24
26
  @request_type = "DELETE"
25
27
  call_api
@@ -39,6 +41,11 @@ module MuffinMan
39
41
  if shipment_level_seller_inputs_list.any?
40
42
  @request_body["ShipmentLevelSellerInputsList"] = shipment_level_seller_inputs_list
41
43
  end
44
+ if sandbox
45
+ @request_body = JSON.parse(
46
+ File.read("./lib/muffin_man/sandbox_helpers/merchant_fulfillment/create_shipment_body.json")
47
+ )
48
+ end
42
49
  @request_type = "POST"
43
50
  call_api
44
51
  end
@@ -0,0 +1,38 @@
1
+ {
2
+ "ShipmentRequestDetails": {
3
+ "AmazonOrderId": "903-5563053-5647845",
4
+ "ItemList": [
5
+ {
6
+ "OrderItemId": "52986411826454",
7
+ "Quantity": 1
8
+ }
9
+ ],
10
+ "ShipFromAddress": {
11
+ "Name": "John Doe",
12
+ "AddressLine1": "300 Turnbull Ave",
13
+ "Email": "jdoeasdfllkj@yahoo.com",
14
+ "City": "Detroit",
15
+ "StateOrProvinceCode": "MI",
16
+ "PostalCode": "48123",
17
+ "CountryCode": "US",
18
+ "Phone": "7132341234"
19
+ },
20
+ "PackageDimensions": {
21
+ "Length": 10,
22
+ "Width": 10,
23
+ "Height": 10,
24
+ "Unit": "inches"
25
+ },
26
+ "Weight": {
27
+ "Value": 10,
28
+ "Unit": "oz"
29
+ },
30
+ "ShippingServiceOptions": {
31
+ "DeliveryExperience": "NoTracking",
32
+ "CarrierWillPickUp": false,
33
+ "CarrierWillPickUpOption": "ShipperWillDropOff"
34
+ }
35
+ },
36
+ "ShippingServiceId": "UPS_PTP_2ND_DAY_AIR",
37
+ "ShippingServiceOfferId": "WHgxtyn6qjGGaCzOCog1azF5HLHje5Pz3Lc2Fmt5eKoZAReW8oJ1SMumuBS8lA/Hjuglhyiu0+KRLvyJxFV0PB9YFMDhygs3VyTL0WGYkGxiuRkmuEvpqldUn9rrkWVodqnR4vx2VtXvtER/Ju6RqYoddJZGy6RS2KLzzhQ2NclN0NYXMZVqpOe5RsRBddXaGuJr7oza3M52+JzChocAHzcurIhCRynpbxfmNLzZMQEbgnpGLzuaoSMzfxg90/NaXFR/Ou01du/uKd5AbfMW/AxAKP9ht6Oi9lDHq6WkGqvjkVLW0/jj/fBgblIwcs+t"
38
+ }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuffinMan
4
- VERSION = "1.5.5"
4
+ VERSION = "1.5.6"
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.5.5
4
+ version: 1.5.6
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-11-09 00:00:00.000000000 Z
13
+ date: 2022-11-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -179,6 +179,7 @@ files:
179
179
  - lib/muffin_man/request_helpers/outbound_fulfillment/fulfillment_preview_request.rb
180
180
  - lib/muffin_man/request_helpers/outbound_fulfillment/item.rb
181
181
  - lib/muffin_man/request_helpers/outbound_fulfillment/v20200701.rb
182
+ - lib/muffin_man/sandbox_helpers/merchant_fulfillment/create_shipment_body.json
182
183
  - lib/muffin_man/solicitations/v1.rb
183
184
  - lib/muffin_man/sp_api_client.rb
184
185
  - lib/muffin_man/tokens/v20210301.rb