muffin_man 1.5.9 → 1.5.11
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/muffin_man/fulfillment_inbound/v0.rb +22 -7
- data/lib/muffin_man/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21fbfbb3bf571a2579796ea01ae15ba51937fe467ea02273bbece69c42bc3f7f
|
4
|
+
data.tar.gz: '009d147c869d9db1e7f88e19354c2f35d33aafcad9a4fe6cccde702883616f9b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b513821bcab220af5aa041e170426cb56cfffd3c14ff1e63569e28fa096fefb2af52e81d3c105dd9ec3c83b0155f5da59968c8640a9c91cd20f51da1173f0ebf
|
7
|
+
data.tar.gz: ec2675bd5c997d6279572c86defdae611d230fcc01c24045e2ed0c1838f04153227219bc1a75a162a1a52e36500a3ebff1f9f3119a1433dc8a7b1bef19637454
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 1.5.11
|
2
|
+
|
3
|
+
- Add sandbox support for inbound small parcel get labels
|
4
|
+
|
5
|
+
# 1.5.10
|
6
|
+
|
7
|
+
- Add sandbox support for inbound small parcel
|
8
|
+
|
1
9
|
# 1.5.9
|
2
10
|
|
3
11
|
- Support for estimateTransport, getTransportDetails, confirmTransport, and voidTransport [#44](https://github.com/patterninc/muffin_man/pull/44)
|
@@ -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
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
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
|
@@ -100,25 +110,30 @@ module MuffinMan
|
|
100
110
|
call_api
|
101
111
|
end
|
102
112
|
|
113
|
+
SANDBOX_SHIPMENT_ID = "shipmentId1"
|
103
114
|
def estimate_transport(shipment_id)
|
115
|
+
shipment_id = SANDBOX_SHIPMENT_ID if sandbox
|
104
116
|
@local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/estimate"
|
105
117
|
@request_type = "POST"
|
106
118
|
call_api
|
107
119
|
end
|
108
120
|
|
109
121
|
def get_transport_details(shipment_id)
|
110
|
-
|
122
|
+
shipment_id = SANDBOX_SHIPMENT_ID if sandbox
|
123
|
+
@local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/transport"
|
111
124
|
@request_type = "GET"
|
112
125
|
call_api
|
113
126
|
end
|
114
127
|
|
115
128
|
def confirm_transport(shipment_id)
|
129
|
+
shipment_id = SANDBOX_SHIPMENT_ID if sandbox
|
116
130
|
@local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/confirm"
|
117
131
|
@request_type = "POST"
|
118
132
|
call_api
|
119
133
|
end
|
120
134
|
|
121
135
|
def void_transport(shipment_id)
|
136
|
+
shipment_id = SANDBOX_SHIPMENT_ID if sandbox
|
122
137
|
@local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/void"
|
123
138
|
@request_type = "POST"
|
124
139
|
call_api
|
data/lib/muffin_man/version.rb
CHANGED