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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0176ab2f4e6ee84a35449cc7c3cc2b0d13708b62fdef7552013db7cce25bff08
4
- data.tar.gz: d6c47bc34a6f23aa44bb799c4a1165c87eab2a592439a8e8a10bd39774f5e6f4
3
+ metadata.gz: 7266826af89b91d17327ba0dda3a7318081657cd7d63805be1c7a2665ffcc69c
4
+ data.tar.gz: ab7acc1c279b73e6c84dcf57513368d28f5b85386928260bc23b806226f2fd85
5
5
  SHA512:
6
- metadata.gz: cf5f9b203dbf64a94243192fd7db18fc131275b0da8ceff6a5165bc88fb64b85e26efb0d71062e030a1acf45cec9e5a3717da17833636ab6685ddc010dcb6b62
7
- data.tar.gz: 570d832da16f3449283d3d064197efe2eeba19e6fad36183179490564829a1217f488038bd81970357a67bfef685be2d3dd06b1a3ced0e6eb0ac1272cc48a752
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).
@@ -7,5 +7,5 @@
7
7
  # ***********************************************************************
8
8
 
9
9
  module FlexOps
10
- VERSION = "2.1.0"
10
+ VERSION = "2.2.0"
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexops
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - FlexOps, LLC