flexops 2.1.0 → 2.2.0
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/README.md +5 -1
- data/lib/flexops/resources/shipping.rb +7 -1
- data/lib/flexops/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: 7266826af89b91d17327ba0dda3a7318081657cd7d63805be1c7a2665ffcc69c
|
|
4
|
+
data.tar.gz: ab7acc1c279b73e6c84dcf57513368d28f5b85386928260bc23b806226f2fd85
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '08dcd0f4f95c49a14ef83017a81352a4d5f3e9144ec9724b2af6d86882154d1abf7efd54eb2a9dfaa5a8509871c6686f428b90dc13b8834ef605315ff00fc6bd'
|
|
7
|
+
data.tar.gz: 6a854d05d30916be65b30cca8d6c03873bf8f5174df48721c1193c6c54d8aa5cd742767d285b9fd3d8a96c37dff72ac0ca99213d533c926f5302b8d0eaf3bf95
|
data/README.md
CHANGED
|
@@ -213,13 +213,17 @@ client.email_templates.preview(subject_template: "Hi {{recipient_name}}", html_b
|
|
|
213
213
|
|
|
214
214
|
One order shipped in several boxes with the same carrier and service; each box gets its own label and
|
|
215
215
|
a box that fails does not stop the others. Multi-package labels cannot carry HAZMAT: send
|
|
216
|
-
`FlexOps::HazmatClassification::NONE` or leave `hazmatClassification` out.
|
|
216
|
+
`FlexOps::HazmatClassification::NONE` or leave `hazmatClassification` out. `maximumPostageAmount` is required: the
|
|
217
|
+
most the whole shipment may cost in USD (positive, at most two decimals). The Gateway refuses to buy a box that would
|
|
218
|
+
take the total above it (`PriceCeilingExceeded`; once the amount is used up the remaining boxes report
|
|
219
|
+
`PriceCeilingReached`), and a request without a valid ceiling is 400 `ApprovalRequired`.
|
|
217
220
|
|
|
218
221
|
```ruby
|
|
219
222
|
begin
|
|
220
223
|
shipment = client.shipping.create_multi_package(
|
|
221
224
|
{ orderId: 12345, carrierCode: "USPS", serviceCode: "PRIORITY",
|
|
222
225
|
hazmatClassification: FlexOps::HazmatClassification::NONE,
|
|
226
|
+
maximumPostageAmount: 25.00, # required: the most the whole shipment may cost, in USD
|
|
223
227
|
packages: [{ weightInOunces: 16, lengthInInches: 10, widthInInches: 8, heightInInches: 4, packageReference: "Box 1 of 2" },
|
|
224
228
|
{ weightInOunces: 8, lengthInInches: 6, widthInInches: 6, heightInInches: 6, packageReference: "Box 2 of 2" }] },
|
|
225
229
|
idempotency_key: "order-12345-boxes" # optional; reuse it when you retry
|
|
@@ -64,12 +64,18 @@ module FlexOps
|
|
|
64
64
|
# (POST /api/shipping/multi-package, the Gateway MultiPackageShipmentRequest):
|
|
65
65
|
#
|
|
66
66
|
# { orderId: 12345, carrierCode: "USPS", serviceCode: (optional), labelFormat: (optional),
|
|
67
|
-
# shipDate: (optional), hazmatClassification: (optional),
|
|
67
|
+
# shipDate: (optional), hazmatClassification: (optional), maximumPostageAmount: 25.00,
|
|
68
68
|
# packages: [{ weightInOunces:, lengthInInches:, widthInInches:, heightInInches:,
|
|
69
69
|
# deliveryConfirmationRequired: (optional), signatureConfirmationRequired: (optional),
|
|
70
70
|
# insuranceCoverageRequested: (optional), insuredValue: (optional),
|
|
71
71
|
# packageReference: (optional) }] }
|
|
72
72
|
#
|
|
73
|
+
# maximumPostageAmount is required: the most the whole shipment may cost, in USD (positive, at most
|
|
74
|
+
# two decimals). The Gateway refuses to buy a box that would take the total above it, so you never
|
|
75
|
+
# pay more: a box priced above what is left reports PriceCeilingExceeded, and once the amount is
|
|
76
|
+
# used up the remaining boxes report PriceCeilingReached and are not bought. Boxes already bought
|
|
77
|
+
# stay bought. A missing or invalid value is 400 ApprovalRequired.
|
|
78
|
+
#
|
|
73
79
|
# Weight is in ounces and every dimension in inches; all four are required. Multi-package
|
|
74
80
|
# labels cannot carry HAZMAT yet: send HazmatClassification::NONE or leave hazmatClassification
|
|
75
81
|
# out (any other class is refused with 400 HazmatNotSupported).
|
data/lib/flexops/version.rb
CHANGED