muffin_man 1.5.10 → 1.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8f077ec0f83f067c863c9c704d1bbafe089fb2a86163334aec78a6c7b314e80
4
- data.tar.gz: 3d08c4f8b1669946ae37402a60e0a587dd86fb1c9178c90d930014a78dc5808f
3
+ metadata.gz: 526c64f895aaaaa85524610880e5c0b7234891f2bc96ab96bd06fba80543abf4
4
+ data.tar.gz: 3867cb62c7cf5c5fea6d28e271a3859591055d5e40debb13c21bcbd65749e8f7
5
5
  SHA512:
6
- metadata.gz: 37a390862e651d6d234253c3b5cf590ddee5299d53408b0c83a4a1a214a4e829ec94be63565d193191d0e5c714c24642054f20741a2b71175311f652aa4a3c1b
7
- data.tar.gz: 788dd07230db3c66e64d049db004e09b483120bba67bb17e5aa4d72d6624c5f9e07f6d4520ce33dad8bdcbb56db34a034eff17f98f9e24f5e7c10fcb902c8d4f
6
+ metadata.gz: 617efb9dec4d967e99b9b0cd7d3ecc7423b4b38d4904a51db80dd4f947c6b66fc935fcb7bd9b7964b74d0535012186b948a4863f4780c663f0099c2fcf6e8216
7
+ data.tar.gz: 0fe69dabf49c80198a53bd6b5a1d375bd0a17199cec2875f40d2597e79741f47e6ea411d9482d6d755226a5faf75554dd5dc59d3eb7253e98af3b8e572854453
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 1.5.12 [#45](https://github.com/patterninc/muffin_man/pull/45)
2
+
3
+ - Small update to putTransportDetails
4
+
5
+ # 1.5.11
6
+
7
+ - Add sandbox support for inbound small parcel get labels
8
+
1
9
  # 1.5.10
2
10
 
3
11
  - Add sandbox support for inbound small parcel
@@ -63,18 +63,28 @@ module MuffinMan
63
63
  call_api
64
64
  end
65
65
 
66
+ SANDBOX_GET_LABELS_PARAMS = {
67
+ "shipmentId" => "348975493",
68
+ "PageType" => "PackageLabel_Letter_2",
69
+ "LabelType" => "BARCODE_2D"
70
+ }.freeze
66
71
  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)
67
- @local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/labels"
68
72
  @query_params = {
69
73
  "shipmentID" => shipment_id,
70
74
  "PageType" => page_type,
71
75
  "LabelType" => label_type
72
76
  }
73
- @query_params["NumberOfPackages"] = number_of_packages unless number_of_packages.nil?
74
- @query_params["PackageLabelsToPrint"] = package_labels_to_print.join(",") if package_labels_to_print.any?
75
- @query_params["NumberOfPallets"] = number_of_pallets unless number_of_pallets.nil?
76
- @query_params["PageSize"] = page_size unless page_size.nil?
77
- @query_params["PageStartIndex"] = page_start_index unless page_start_index.nil?
77
+ if sandbox
78
+ shipment_id = SANDBOX_GET_LABELS_PARAMS["shipmentId"]
79
+ @query_params = SANDBOX_GET_LABELS_PARAMS.except("shipmentId")
80
+ else
81
+ @query_params["NumberOfPackages"] = number_of_packages unless number_of_packages.nil?
82
+ @query_params["PackageLabelsToPrint"] = package_labels_to_print.join(",") if package_labels_to_print.any?
83
+ @query_params["NumberOfPallets"] = number_of_pallets unless number_of_pallets.nil?
84
+ @query_params["PageSize"] = page_size unless page_size.nil?
85
+ @query_params["PageStartIndex"] = page_start_index unless page_start_index.nil?
86
+ end
87
+ @local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/labels"
78
88
  @request_type = "GET"
79
89
  call_api
80
90
  end
@@ -91,7 +101,6 @@ module MuffinMan
91
101
  def put_transport_details(shipment_id, is_partnered, shipment_type, transport_details)
92
102
  @local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/transport"
93
103
  @request_body = {
94
- "shipmentId": shipment_id,
95
104
  "IsPartnered": is_partnered,
96
105
  "ShipmentType": shipment_type,
97
106
  "TransportDetails": transport_details,
@@ -100,7 +109,7 @@ module MuffinMan
100
109
  call_api
101
110
  end
102
111
 
103
- SANDBOX_SHIPMENT_ID = "shipmentId1"
112
+ SANDBOX_SHIPMENT_ID = "shipmentId1".freeze
104
113
  def estimate_transport(shipment_id)
105
114
  shipment_id = SANDBOX_SHIPMENT_ID if sandbox
106
115
  @local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/estimate"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuffinMan
4
- VERSION = "1.5.10"
4
+ VERSION = "1.5.12"
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.10
4
+ version: 1.5.12
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-12-14 00:00:00.000000000 Z
13
+ date: 2023-01-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec