solidus_easypost 1.0.3 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +41 -0
- data/.gem_release.yml +5 -0
- data/.github/stale.yml +17 -0
- data/.github_changelog_generator +2 -0
- data/.gitignore +21 -0
- data/.rspec +2 -0
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +36 -0
- data/CHANGELOG.md +113 -0
- data/Gemfile +33 -0
- data/LICENSE +26 -0
- data/README.md +194 -0
- data/Rakefile +6 -0
- data/app/controllers/spree/admin/postage_labels_controller.rb +20 -0
- data/app/decorators/models/solidus_easypost/spree/carton_decorator.rb +38 -0
- data/app/decorators/models/solidus_easypost/spree/shipment_decorator.rb +47 -0
- data/app/decorators/models/solidus_easypost/spree/shipping_rate_decorator.rb +13 -0
- data/app/models/solidus_easypost/parcel_dimension.rb +34 -0
- data/app/models/solidus_easypost/return_authorization.rb +27 -0
- data/app/overrides/spree/admin/orders/_shipment/add_postage_label.html.erb.deface +10 -0
- data/bin/console +17 -0
- data/bin/rails +7 -0
- data/bin/rails-engine +13 -0
- data/bin/rails-sandbox +16 -0
- data/bin/rake +7 -0
- data/bin/sandbox +86 -0
- data/bin/setup +8 -0
- data/config/initializers/webhooks.rb +7 -0
- data/config/locales/en.yml +8 -0
- data/config/routes.rb +9 -0
- data/db/migrate/20140515024440_add_easy_post_fields_to_shipping_rate.rb +9 -0
- data/db/migrate/20201025110912_add_tracker_id_to_cartons.rb +6 -0
- data/lib/generators/solidus_easypost/install/install_generator.rb +28 -0
- data/lib/generators/solidus_easypost/install/templates/initializer.rb +26 -0
- data/lib/solidus_easypost/address_builder.rb +45 -0
- data/lib/solidus_easypost/calculator/base_dimension_calculator.rb +28 -0
- data/lib/solidus_easypost/calculator/weight_dimension_calculator.rb +22 -0
- data/lib/solidus_easypost/configuration.rb +34 -0
- data/lib/solidus_easypost/engine.rb +19 -0
- data/lib/solidus_easypost/errors/unknown_partial_resource_error.rb +11 -0
- data/lib/solidus_easypost/estimator.rb +37 -0
- data/lib/solidus_easypost/parcel_builder.rb +27 -0
- data/lib/solidus_easypost/shipment_builder.rb +32 -0
- data/lib/solidus_easypost/shipping_method_selector.rb +17 -0
- data/lib/solidus_easypost/shipping_rate_calculator.rb +9 -0
- data/lib/solidus_easypost/testing_support/factories/address_factory.rb +10 -0
- data/lib/solidus_easypost/testing_support/factories/product_factory.rb +7 -0
- data/lib/solidus_easypost/testing_support/factories/shipment_factory.rb +30 -0
- data/lib/solidus_easypost/testing_support/factories/shipping_method_factory.rb +8 -0
- data/lib/solidus_easypost/testing_support/factories/stock_location_factory.rb +10 -0
- data/lib/solidus_easypost/testing_support/factories/variant_factory.rb +7 -0
- data/lib/solidus_easypost/testing_support/factories.rb +3 -0
- data/lib/solidus_easypost/tracker_webhook_handler.rb +14 -0
- data/lib/solidus_easypost/version.rb +5 -0
- data/lib/solidus_easypost.rb +32 -0
- data/solidus_easypost.gemspec +41 -0
- data/spec/cassettes/address_builder/from_address.yml +65 -0
- data/spec/cassettes/address_builder/from_stock_location.yml +65 -0
- data/spec/cassettes/estimator.yml +269 -0
- data/spec/cassettes/integration/checkout.yml +377 -0
- data/spec/cassettes/integration/order_shipping/with_purchase_labels.yml +373 -0
- data/spec/cassettes/integration/order_shipping/without_purchase_labels.yml +251 -0
- data/spec/cassettes/parcel_builder/from_package.yml +63 -0
- data/spec/cassettes/parcel_builder/from_return_authorization.yml +63 -0
- data/spec/cassettes/postage_labels/show.yml +72 -0
- data/spec/cassettes/return_authorization.yml +310 -0
- data/spec/cassettes/shipment_builder/from_package.yml +251 -0
- data/spec/cassettes/shipment_builder/from_return_authorization.yml +251 -0
- data/spec/cassettes/shipment_builder/from_shipment.yml +250 -0
- data/spec/controllers/spree/admin/postage_labels_controller_spec.rb +18 -0
- data/spec/features/admin/postage_labels_spec.rb +18 -0
- data/spec/integration/checkout_spec.rb +45 -0
- data/spec/integration/order_shipping_spec.rb +33 -0
- data/spec/models/solidus_easypost/parcel_dimension_spec.rb +80 -0
- data/spec/models/solidus_easypost/return_authorization_spec.rb +17 -0
- data/spec/models/spree/carton_spec.rb +57 -0
- data/spec/models/spree/shipment_spec.rb +69 -0
- data/spec/models/spree/shipping_rate_spec.rb +23 -0
- data/spec/solidus_easypost/address_builder_spec.rb +17 -0
- data/spec/solidus_easypost/calculator/weight_dimension_calculator_spec.rb +39 -0
- data/spec/solidus_easypost/estimator_spec.rb +52 -0
- data/spec/solidus_easypost/parcel_builder_spec.rb +113 -0
- data/spec/solidus_easypost/shipment_builder_spec.rb +28 -0
- data/spec/solidus_easypost/shipping_method_selector_spec.rb +33 -0
- data/spec/solidus_easypost/shipping_rate_calculator_spec.rb +12 -0
- data/spec/solidus_easypost/tracker_webhook_handler_spec.rb +58 -0
- data/spec/solidus_easypost_spec.rb +19 -0
- data/spec/spec_helper.rb +31 -0
- data/spec/support/easypost.rb +5 -0
- data/spec/support/factory_bot.rb +3 -0
- data/spec/support/helpers/api_stubs.rb +40 -0
- data/spec/support/helpers/configuration.rb +28 -0
- data/spec/support/helpers/shipping_methods.rb +26 -0
- data/spec/support/solidus.rb +1 -0
- data/spec/support/vcr.rb +12 -0
- metadata +170 -142
@@ -0,0 +1,373 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.easypost.com/v2/addresses
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"address":{"street1":"215 N 7th Ave","street2":"Northwest","city":"Manville","zip":"08835","phone":"555-555-0199","company":"Company","name":"John
|
9
|
+
Doe","state":"AL","country":"US"}}'
|
10
|
+
headers:
|
11
|
+
Accept-Encoding:
|
12
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
13
|
+
Accept:
|
14
|
+
- "*/*"
|
15
|
+
User-Agent:
|
16
|
+
- EasyPost/v2 RubyClient/3.1.3 Ruby/2.7.1-p83
|
17
|
+
Content-Type:
|
18
|
+
- application/json
|
19
|
+
Authorization:
|
20
|
+
- Basic Q3Z6WXR1ZGE2S1JJOUpqRzdTQUhiQTo=
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 201
|
24
|
+
message: Created
|
25
|
+
headers:
|
26
|
+
X-Frame-Options:
|
27
|
+
- SAMEORIGIN
|
28
|
+
X-Xss-Protection:
|
29
|
+
- 1; mode=block
|
30
|
+
X-Content-Type-Options:
|
31
|
+
- nosniff
|
32
|
+
X-Ep-Request-Uuid:
|
33
|
+
- 3682484c5f6b531fee6f342e0002d1bd
|
34
|
+
Cache-Control:
|
35
|
+
- no-cache, no-store, must-revalidate, private
|
36
|
+
Pragma:
|
37
|
+
- no-cache
|
38
|
+
Expires:
|
39
|
+
- '0'
|
40
|
+
Location:
|
41
|
+
- "/api/v2/addresses/adr_2d6a11e586a74dadb28f82899ad2404c"
|
42
|
+
Content-Type:
|
43
|
+
- application/json; charset=utf-8
|
44
|
+
X-Runtime:
|
45
|
+
- '0.062109'
|
46
|
+
Transfer-Encoding:
|
47
|
+
- chunked
|
48
|
+
X-Node:
|
49
|
+
- bigweb2sj
|
50
|
+
X-Version-Label:
|
51
|
+
- easypost-202009222104-7ce76ac125-master
|
52
|
+
X-Backend:
|
53
|
+
- easypost
|
54
|
+
X-Proxied:
|
55
|
+
- extlb2sj a561deb64e
|
56
|
+
- intlb2sj 8df81f0396
|
57
|
+
Strict-Transport-Security:
|
58
|
+
- max-age=15768000; includeSubDomains; preload
|
59
|
+
body:
|
60
|
+
encoding: ASCII-8BIT
|
61
|
+
string: '{"id":"adr_2d6a11e586a74dadb28f82899ad2404c","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"John
|
62
|
+
Doe","company":"Company","street1":"215 N 7th Ave","street2":"Northwest","city":"Manville","state":"AL","zip":"08835","country":"US","phone":"5555550199","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}}'
|
63
|
+
recorded_at: Wed, 23 Sep 2020 13:52:31 GMT
|
64
|
+
- request:
|
65
|
+
method: post
|
66
|
+
uri: https://api.easypost.com/v2/addresses
|
67
|
+
body:
|
68
|
+
encoding: UTF-8
|
69
|
+
string: '{"address":{"street1":"131 S 8th Ave","city":"Manville","zip":"08835","phone":"(202)
|
70
|
+
456-1111","name":"NY Warehouse","company":"NY Warehouse","state":"NJ","country":"US"}}'
|
71
|
+
headers:
|
72
|
+
Accept-Encoding:
|
73
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
74
|
+
Accept:
|
75
|
+
- "*/*"
|
76
|
+
User-Agent:
|
77
|
+
- EasyPost/v2 RubyClient/3.1.3 Ruby/2.7.1-p83
|
78
|
+
Content-Type:
|
79
|
+
- application/json
|
80
|
+
Authorization:
|
81
|
+
- Basic Q3Z6WXR1ZGE2S1JJOUpqRzdTQUhiQTo=
|
82
|
+
response:
|
83
|
+
status:
|
84
|
+
code: 201
|
85
|
+
message: Created
|
86
|
+
headers:
|
87
|
+
X-Frame-Options:
|
88
|
+
- SAMEORIGIN
|
89
|
+
X-Xss-Protection:
|
90
|
+
- 1; mode=block
|
91
|
+
X-Content-Type-Options:
|
92
|
+
- nosniff
|
93
|
+
X-Ep-Request-Uuid:
|
94
|
+
- 3682484d5f6b531fee6f1aa30002d1d6
|
95
|
+
Cache-Control:
|
96
|
+
- no-cache, no-store, must-revalidate, private
|
97
|
+
Pragma:
|
98
|
+
- no-cache
|
99
|
+
Expires:
|
100
|
+
- '0'
|
101
|
+
Location:
|
102
|
+
- "/api/v2/addresses/adr_61be3ffea25c476bb29e5542ddab5a58"
|
103
|
+
Content-Type:
|
104
|
+
- application/json; charset=utf-8
|
105
|
+
X-Runtime:
|
106
|
+
- '0.055329'
|
107
|
+
Transfer-Encoding:
|
108
|
+
- chunked
|
109
|
+
X-Node:
|
110
|
+
- bigweb4sj
|
111
|
+
X-Version-Label:
|
112
|
+
- easypost-202009222104-7ce76ac125-master
|
113
|
+
X-Backend:
|
114
|
+
- easypost
|
115
|
+
X-Proxied:
|
116
|
+
- extlb2sj a561deb64e
|
117
|
+
- intlb2sj 8df81f0396
|
118
|
+
Strict-Transport-Security:
|
119
|
+
- max-age=15768000; includeSubDomains; preload
|
120
|
+
body:
|
121
|
+
encoding: ASCII-8BIT
|
122
|
+
string: '{"id":"adr_61be3ffea25c476bb29e5542ddab5a58","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"NY
|
123
|
+
Warehouse","company":"NY Warehouse","street1":"131 S 8th Ave","street2":null,"city":"Manville","state":"NJ","zip":"08835","country":"US","phone":"2024561111","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}}'
|
124
|
+
recorded_at: Wed, 23 Sep 2020 13:52:32 GMT
|
125
|
+
- request:
|
126
|
+
method: post
|
127
|
+
uri: https://api.easypost.com/v2/parcels
|
128
|
+
body:
|
129
|
+
encoding: UTF-8
|
130
|
+
string: '{"parcel":{"weight":"10.0"}}'
|
131
|
+
headers:
|
132
|
+
Accept-Encoding:
|
133
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
134
|
+
Accept:
|
135
|
+
- "*/*"
|
136
|
+
User-Agent:
|
137
|
+
- EasyPost/v2 RubyClient/3.1.3 Ruby/2.7.1-p83
|
138
|
+
Content-Type:
|
139
|
+
- application/json
|
140
|
+
Authorization:
|
141
|
+
- Basic Q3Z6WXR1ZGE2S1JJOUpqRzdTQUhiQTo=
|
142
|
+
response:
|
143
|
+
status:
|
144
|
+
code: 201
|
145
|
+
message: Created
|
146
|
+
headers:
|
147
|
+
X-Frame-Options:
|
148
|
+
- SAMEORIGIN
|
149
|
+
X-Xss-Protection:
|
150
|
+
- 1; mode=block
|
151
|
+
X-Content-Type-Options:
|
152
|
+
- nosniff
|
153
|
+
X-Ep-Request-Uuid:
|
154
|
+
- a371cbc15f6b5320ee82e4c600036ec2
|
155
|
+
Cache-Control:
|
156
|
+
- no-cache, no-store, must-revalidate, private
|
157
|
+
Pragma:
|
158
|
+
- no-cache
|
159
|
+
Expires:
|
160
|
+
- '0'
|
161
|
+
Location:
|
162
|
+
- "/api/v2/parcels/prcl_4e5b66d1b6504f2cab8d9fe8608314af"
|
163
|
+
Content-Type:
|
164
|
+
- application/json; charset=utf-8
|
165
|
+
X-Runtime:
|
166
|
+
- '0.029536'
|
167
|
+
Transfer-Encoding:
|
168
|
+
- chunked
|
169
|
+
X-Node:
|
170
|
+
- bigweb8sj
|
171
|
+
X-Version-Label:
|
172
|
+
- easypost-202009222104-7ce76ac125-master
|
173
|
+
X-Backend:
|
174
|
+
- easypost
|
175
|
+
X-Proxied:
|
176
|
+
- extlb2wdc a561deb64e
|
177
|
+
- intlb1wdc 8df81f0396
|
178
|
+
- intlb2sj 8df81f0396
|
179
|
+
Strict-Transport-Security:
|
180
|
+
- max-age=15768000; includeSubDomains; preload
|
181
|
+
body:
|
182
|
+
encoding: ASCII-8BIT
|
183
|
+
string: '{"id":"prcl_4e5b66d1b6504f2cab8d9fe8608314af","object":"Parcel","created_at":"2020-09-23T13:52:32Z","updated_at":"2020-09-23T13:52:32Z","length":null,"width":null,"height":null,"predefined_package":null,"weight":10.0,"mode":"test"}'
|
184
|
+
recorded_at: Wed, 23 Sep 2020 13:52:32 GMT
|
185
|
+
- request:
|
186
|
+
method: post
|
187
|
+
uri: https://api.easypost.com/v2/shipments
|
188
|
+
body:
|
189
|
+
encoding: UTF-8
|
190
|
+
string: '{"shipment":{"to_address":{"id":"adr_2d6a11e586a74dadb28f82899ad2404c"},"from_address":{"id":"adr_61be3ffea25c476bb29e5542ddab5a58"},"parcel":{"id":"prcl_4e5b66d1b6504f2cab8d9fe8608314af"}}}'
|
191
|
+
headers:
|
192
|
+
Accept-Encoding:
|
193
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
194
|
+
Accept:
|
195
|
+
- "*/*"
|
196
|
+
User-Agent:
|
197
|
+
- EasyPost/v2 RubyClient/3.1.3 Ruby/2.7.1-p83
|
198
|
+
Content-Type:
|
199
|
+
- application/json
|
200
|
+
Authorization:
|
201
|
+
- Basic Q3Z6WXR1ZGE2S1JJOUpqRzdTQUhiQTo=
|
202
|
+
response:
|
203
|
+
status:
|
204
|
+
code: 201
|
205
|
+
message: Created
|
206
|
+
headers:
|
207
|
+
X-Frame-Options:
|
208
|
+
- SAMEORIGIN
|
209
|
+
X-Xss-Protection:
|
210
|
+
- 1; mode=block
|
211
|
+
X-Content-Type-Options:
|
212
|
+
- nosniff
|
213
|
+
X-Ep-Request-Uuid:
|
214
|
+
- a371cbbd5f6b5321ee81dd2c00036edd
|
215
|
+
Cache-Control:
|
216
|
+
- no-cache, no-store, must-revalidate, private
|
217
|
+
Pragma:
|
218
|
+
- no-cache
|
219
|
+
Expires:
|
220
|
+
- '0'
|
221
|
+
Location:
|
222
|
+
- "/api/v2/shipments/shp_e1e2793b59314da98ad6cc19da13ae98"
|
223
|
+
Content-Type:
|
224
|
+
- application/json; charset=utf-8
|
225
|
+
X-Runtime:
|
226
|
+
- '0.197982'
|
227
|
+
Transfer-Encoding:
|
228
|
+
- chunked
|
229
|
+
X-Node:
|
230
|
+
- bigweb2sj
|
231
|
+
X-Version-Label:
|
232
|
+
- easypost-202009222104-7ce76ac125-master
|
233
|
+
X-Backend:
|
234
|
+
- easypost
|
235
|
+
X-Proxied:
|
236
|
+
- extlb2wdc a561deb64e
|
237
|
+
- intlb1sj 8df81f0396
|
238
|
+
- intlb2wdc 8df81f0396
|
239
|
+
Strict-Transport-Security:
|
240
|
+
- max-age=15768000; includeSubDomains; preload
|
241
|
+
body:
|
242
|
+
encoding: ASCII-8BIT
|
243
|
+
string: '{"created_at":"2020-09-23T13:52:33Z","is_return":false,"messages":[],"mode":"test","options":{"currency":"USD","payment":{"type":"SENDER"},"date_advance":0},"reference":null,"status":"unknown","tracking_code":null,"updated_at":"2020-09-23T13:52:33Z","batch_id":null,"batch_status":null,"batch_message":null,"customs_info":null,"from_address":{"id":"adr_61be3ffea25c476bb29e5542ddab5a58","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"NY
|
244
|
+
Warehouse","company":"NY Warehouse","street1":"131 S 8th Ave","street2":null,"city":"Manville","state":"NJ","zip":"08835","country":"US","phone":"2024561111","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}},"insurance":null,"order_id":null,"parcel":{"id":"prcl_4e5b66d1b6504f2cab8d9fe8608314af","object":"Parcel","created_at":"2020-09-23T13:52:32Z","updated_at":"2020-09-23T13:52:32Z","length":null,"width":null,"height":null,"predefined_package":null,"weight":10.0,"mode":"test"},"postage_label":null,"rates":[{"id":"rate_39a139afb5044dbfbc8e6fdffaf6e5f2","object":"Rate","created_at":"2020-09-23T13:52:33Z","updated_at":"2020-09-23T13:52:33Z","mode":"test","service":"First","carrier":"USPS","rate":"3.93","currency":"USD","retail_rate":"5.30","retail_currency":"USD","list_rate":"3.93","list_currency":"USD","delivery_days":2,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":2,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_ce355b22c3c54069aeb98b10ebe6c1bb","object":"Rate","created_at":"2020-09-23T13:52:33Z","updated_at":"2020-09-23T13:52:33Z","mode":"test","service":"Express","carrier":"USPS","rate":"23.00","currency":"USD","retail_rate":"26.75","retail_currency":"USD","list_rate":"23.00","list_currency":"USD","delivery_days":null,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":null,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_49e4929a64df44c5bd279eaccb4412df","object":"Rate","created_at":"2020-09-23T13:52:33Z","updated_at":"2020-09-23T13:52:33Z","mode":"test","service":"Priority","carrier":"USPS","rate":"7.02","currency":"USD","retail_rate":"7.50","retail_currency":"USD","list_rate":"7.02","list_currency":"USD","delivery_days":1,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":1,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_27ac05b45625451fa6c036688fb2ea04","object":"Rate","created_at":"2020-09-23T13:52:33Z","updated_at":"2020-09-23T13:52:33Z","mode":"test","service":"ParcelSelect","carrier":"USPS","rate":"6.92","currency":"USD","retail_rate":"6.92","retail_currency":"USD","list_rate":"6.92","list_currency":"USD","delivery_days":2,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":2,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"}],"refund_status":null,"scan_form":null,"selected_rate":null,"tracker":null,"to_address":{"id":"adr_2d6a11e586a74dadb28f82899ad2404c","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"John
|
245
|
+
Doe","company":"Company","street1":"215 N 7th Ave","street2":"Northwest","city":"Manville","state":"AL","zip":"08835","country":"US","phone":"5555550199","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}},"usps_zone":1,"return_address":{"id":"adr_61be3ffea25c476bb29e5542ddab5a58","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"NY
|
246
|
+
Warehouse","company":"NY Warehouse","street1":"131 S 8th Ave","street2":null,"city":"Manville","state":"NJ","zip":"08835","country":"US","phone":"2024561111","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}},"buyer_address":{"id":"adr_2d6a11e586a74dadb28f82899ad2404c","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"John
|
247
|
+
Doe","company":"Company","street1":"215 N 7th Ave","street2":"Northwest","city":"Manville","state":"AL","zip":"08835","country":"US","phone":"5555550199","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}},"forms":[],"fees":[],"id":"shp_e1e2793b59314da98ad6cc19da13ae98","object":"Shipment"}'
|
248
|
+
recorded_at: Wed, 23 Sep 2020 13:52:33 GMT
|
249
|
+
- request:
|
250
|
+
method: get
|
251
|
+
uri: https://api.easypost.com/v2/shipments/shp_e1e2793b59314da98ad6cc19da13ae98
|
252
|
+
body:
|
253
|
+
encoding: US-ASCII
|
254
|
+
string: ''
|
255
|
+
headers:
|
256
|
+
Accept-Encoding:
|
257
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
258
|
+
Accept:
|
259
|
+
- "*/*"
|
260
|
+
User-Agent:
|
261
|
+
- EasyPost/v2 RubyClient/3.1.3 Ruby/2.7.1-p83
|
262
|
+
Content-Type:
|
263
|
+
- application/json
|
264
|
+
Authorization:
|
265
|
+
- Basic Q3Z6WXR1ZGE2S1JJOUpqRzdTQUhiQTo=
|
266
|
+
response:
|
267
|
+
status:
|
268
|
+
code: 200
|
269
|
+
message: OK
|
270
|
+
headers:
|
271
|
+
X-Frame-Options:
|
272
|
+
- SAMEORIGIN
|
273
|
+
X-Xss-Protection:
|
274
|
+
- 1; mode=block
|
275
|
+
X-Content-Type-Options:
|
276
|
+
- nosniff
|
277
|
+
X-Ep-Request-Uuid:
|
278
|
+
- a371cbc15f6b5322ee70bbc300036ef6
|
279
|
+
Cache-Control:
|
280
|
+
- no-cache, no-store, must-revalidate, private
|
281
|
+
Pragma:
|
282
|
+
- no-cache
|
283
|
+
Expires:
|
284
|
+
- '0'
|
285
|
+
Content-Type:
|
286
|
+
- application/json; charset=utf-8
|
287
|
+
X-Runtime:
|
288
|
+
- '0.087048'
|
289
|
+
Transfer-Encoding:
|
290
|
+
- chunked
|
291
|
+
X-Node:
|
292
|
+
- bigweb9sj
|
293
|
+
X-Version-Label:
|
294
|
+
- easypost-202009222104-7ce76ac125-master
|
295
|
+
X-Backend:
|
296
|
+
- easypost
|
297
|
+
X-Proxied:
|
298
|
+
- extlb2wdc a561deb64e
|
299
|
+
- intlb1sj 8df81f0396
|
300
|
+
- intlb1wdc 8df81f0396
|
301
|
+
Strict-Transport-Security:
|
302
|
+
- max-age=15768000; includeSubDomains; preload
|
303
|
+
body:
|
304
|
+
encoding: ASCII-8BIT
|
305
|
+
string: '{"created_at":"2020-09-23T13:52:33Z","is_return":false,"messages":[],"mode":"test","options":{"currency":"USD","payment":{"type":"SENDER"},"date_advance":0},"reference":null,"status":"unknown","tracking_code":null,"updated_at":"2020-09-23T13:52:33Z","batch_id":null,"batch_status":null,"batch_message":null,"customs_info":null,"from_address":{"id":"adr_61be3ffea25c476bb29e5542ddab5a58","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"NY
|
306
|
+
Warehouse","company":"NY Warehouse","street1":"131 S 8th Ave","street2":null,"city":"Manville","state":"NJ","zip":"08835","country":"US","phone":"2024561111","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}},"insurance":null,"order_id":null,"parcel":{"id":"prcl_4e5b66d1b6504f2cab8d9fe8608314af","object":"Parcel","created_at":"2020-09-23T13:52:32Z","updated_at":"2020-09-23T13:52:32Z","length":null,"width":null,"height":null,"predefined_package":null,"weight":10.0,"mode":"test"},"postage_label":null,"rates":[{"id":"rate_39a139afb5044dbfbc8e6fdffaf6e5f2","object":"Rate","created_at":"2020-09-23T13:52:33Z","updated_at":"2020-09-23T13:52:33Z","mode":"test","service":"First","carrier":"USPS","rate":"3.93","currency":"USD","retail_rate":"5.30","retail_currency":"USD","list_rate":"3.93","list_currency":"USD","delivery_days":2,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":2,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_ce355b22c3c54069aeb98b10ebe6c1bb","object":"Rate","created_at":"2020-09-23T13:52:33Z","updated_at":"2020-09-23T13:52:33Z","mode":"test","service":"Express","carrier":"USPS","rate":"23.00","currency":"USD","retail_rate":"26.75","retail_currency":"USD","list_rate":"23.00","list_currency":"USD","delivery_days":null,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":null,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_49e4929a64df44c5bd279eaccb4412df","object":"Rate","created_at":"2020-09-23T13:52:33Z","updated_at":"2020-09-23T13:52:33Z","mode":"test","service":"Priority","carrier":"USPS","rate":"7.02","currency":"USD","retail_rate":"7.50","retail_currency":"USD","list_rate":"7.02","list_currency":"USD","delivery_days":1,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":1,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_27ac05b45625451fa6c036688fb2ea04","object":"Rate","created_at":"2020-09-23T13:52:33Z","updated_at":"2020-09-23T13:52:33Z","mode":"test","service":"ParcelSelect","carrier":"USPS","rate":"6.92","currency":"USD","retail_rate":"6.92","retail_currency":"USD","list_rate":"6.92","list_currency":"USD","delivery_days":2,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":2,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"}],"refund_status":null,"scan_form":null,"selected_rate":null,"tracker":null,"to_address":{"id":"adr_2d6a11e586a74dadb28f82899ad2404c","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"John
|
307
|
+
Doe","company":"Company","street1":"215 N 7th Ave","street2":"Northwest","city":"Manville","state":"AL","zip":"08835","country":"US","phone":"5555550199","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}},"usps_zone":1,"return_address":{"id":"adr_61be3ffea25c476bb29e5542ddab5a58","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"NY
|
308
|
+
Warehouse","company":"NY Warehouse","street1":"131 S 8th Ave","street2":null,"city":"Manville","state":"NJ","zip":"08835","country":"US","phone":"2024561111","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}},"buyer_address":{"id":"adr_2d6a11e586a74dadb28f82899ad2404c","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"John
|
309
|
+
Doe","company":"Company","street1":"215 N 7th Ave","street2":"Northwest","city":"Manville","state":"AL","zip":"08835","country":"US","phone":"5555550199","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}},"forms":[],"fees":[],"id":"shp_e1e2793b59314da98ad6cc19da13ae98","object":"Shipment"}'
|
310
|
+
recorded_at: Wed, 23 Sep 2020 13:52:34 GMT
|
311
|
+
- request:
|
312
|
+
method: post
|
313
|
+
uri: https://api.easypost.com/v2/shipments/shp_e1e2793b59314da98ad6cc19da13ae98/buy
|
314
|
+
body:
|
315
|
+
encoding: UTF-8
|
316
|
+
string: '{"rate":{"id":"rate_39a139afb5044dbfbc8e6fdffaf6e5f2"}}'
|
317
|
+
headers:
|
318
|
+
Accept-Encoding:
|
319
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
320
|
+
Accept:
|
321
|
+
- "*/*"
|
322
|
+
User-Agent:
|
323
|
+
- EasyPost/v2 RubyClient/3.1.3 Ruby/2.7.1-p83
|
324
|
+
Content-Type:
|
325
|
+
- application/json
|
326
|
+
Authorization:
|
327
|
+
- Basic Q3Z6WXR1ZGE2S1JJOUpqRzdTQUhiQTo=
|
328
|
+
response:
|
329
|
+
status:
|
330
|
+
code: 200
|
331
|
+
message: OK
|
332
|
+
headers:
|
333
|
+
X-Frame-Options:
|
334
|
+
- SAMEORIGIN
|
335
|
+
X-Xss-Protection:
|
336
|
+
- 1; mode=block
|
337
|
+
X-Content-Type-Options:
|
338
|
+
- nosniff
|
339
|
+
X-Ep-Request-Uuid:
|
340
|
+
- a371cbc15f6b5323ee8368e600036f11
|
341
|
+
Cache-Control:
|
342
|
+
- no-cache, no-store, must-revalidate, private
|
343
|
+
Pragma:
|
344
|
+
- no-cache
|
345
|
+
Expires:
|
346
|
+
- '0'
|
347
|
+
Content-Type:
|
348
|
+
- application/json; charset=utf-8
|
349
|
+
X-Runtime:
|
350
|
+
- '1.125106'
|
351
|
+
Transfer-Encoding:
|
352
|
+
- chunked
|
353
|
+
X-Node:
|
354
|
+
- bigweb10sj
|
355
|
+
X-Version-Label:
|
356
|
+
- easypost-202009222104-7ce76ac125-master
|
357
|
+
X-Backend:
|
358
|
+
- easypost
|
359
|
+
X-Proxied:
|
360
|
+
- extlb2wdc a561deb64e
|
361
|
+
- intlb1sj 8df81f0396
|
362
|
+
- intlb1wdc 8df81f0396
|
363
|
+
Strict-Transport-Security:
|
364
|
+
- max-age=15768000; includeSubDomains; preload
|
365
|
+
body:
|
366
|
+
encoding: ASCII-8BIT
|
367
|
+
string: '{"created_at":"2020-09-23T13:52:33Z","is_return":false,"messages":[],"mode":"test","options":{"currency":"USD","payment":{"type":"SENDER"},"date_advance":0},"reference":null,"status":"unknown","tracking_code":"9400100897846050155420","updated_at":"2020-09-23T13:52:36Z","batch_id":null,"batch_status":null,"batch_message":null,"customs_info":null,"from_address":{"id":"adr_61be3ffea25c476bb29e5542ddab5a58","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"NY
|
368
|
+
Warehouse","company":"NY Warehouse","street1":"131 S 8th Ave","street2":null,"city":"Manville","state":"NJ","zip":"08835","country":"US","phone":"2024561111","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}},"insurance":null,"order_id":null,"parcel":{"id":"prcl_4e5b66d1b6504f2cab8d9fe8608314af","object":"Parcel","created_at":"2020-09-23T13:52:32Z","updated_at":"2020-09-23T13:52:32Z","length":null,"width":null,"height":null,"predefined_package":null,"weight":10.0,"mode":"test"},"postage_label":{"object":"PostageLabel","id":"pl_3c41d6d181e3411baaf8adf1886aabaf","created_at":"2020-09-23T13:52:36Z","updated_at":"2020-09-23T13:52:36Z","date_advance":0,"integrated_form":"none","label_date":"2020-09-23T13:52:36Z","label_resolution":300,"label_size":"4x6","label_type":"default","label_file_type":"image/png","label_url":"https://easypost-files.s3-us-west-2.amazonaws.com/files/postage_label/20200923/71f506a8c713424296db7e97ebbba3a0.png","label_pdf_url":null,"label_zpl_url":null,"label_epl2_url":null,"label_file":null},"rates":[{"id":"rate_39a139afb5044dbfbc8e6fdffaf6e5f2","object":"Rate","created_at":"2020-09-23T13:52:33Z","updated_at":"2020-09-23T13:52:33Z","mode":"test","service":"First","carrier":"USPS","rate":"3.93","currency":"USD","retail_rate":"5.30","retail_currency":"USD","list_rate":"3.93","list_currency":"USD","delivery_days":2,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":2,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_ce355b22c3c54069aeb98b10ebe6c1bb","object":"Rate","created_at":"2020-09-23T13:52:33Z","updated_at":"2020-09-23T13:52:33Z","mode":"test","service":"Express","carrier":"USPS","rate":"23.00","currency":"USD","retail_rate":"26.75","retail_currency":"USD","list_rate":"23.00","list_currency":"USD","delivery_days":null,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":null,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_49e4929a64df44c5bd279eaccb4412df","object":"Rate","created_at":"2020-09-23T13:52:33Z","updated_at":"2020-09-23T13:52:33Z","mode":"test","service":"Priority","carrier":"USPS","rate":"7.02","currency":"USD","retail_rate":"7.50","retail_currency":"USD","list_rate":"7.02","list_currency":"USD","delivery_days":1,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":1,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_27ac05b45625451fa6c036688fb2ea04","object":"Rate","created_at":"2020-09-23T13:52:33Z","updated_at":"2020-09-23T13:52:33Z","mode":"test","service":"ParcelSelect","carrier":"USPS","rate":"6.92","currency":"USD","retail_rate":"6.92","retail_currency":"USD","list_rate":"6.92","list_currency":"USD","delivery_days":2,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":2,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"}],"refund_status":null,"scan_form":null,"selected_rate":{"id":"rate_39a139afb5044dbfbc8e6fdffaf6e5f2","object":"Rate","created_at":"2020-09-23T13:52:36Z","updated_at":"2020-09-23T13:52:36Z","mode":"test","service":"First","carrier":"USPS","rate":"3.93","currency":"USD","retail_rate":"5.30","retail_currency":"USD","list_rate":"3.93","list_currency":"USD","delivery_days":2,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":2,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier_account_id":"ca_mtb51Ve0"},"tracker":{"id":"trk_9771cc5742d04528bd05d84d843a59b0","object":"Tracker","mode":"test","tracking_code":"9400100897846050155420","status":"unknown","status_detail":"unknown","created_at":"2020-09-23T13:52:36Z","updated_at":"2020-09-23T13:52:36Z","signed_by":null,"weight":null,"est_delivery_date":null,"shipment_id":"shp_e1e2793b59314da98ad6cc19da13ae98","carrier":"USPS","tracking_details":[],"fees":[],"carrier_detail":null,"public_url":"https://track.easypost.com/djE6dHJrXzk3NzFjYzU3NDJkMDQ1MjhiZDA1ZDg0ZDg0M2E1OWIw"},"to_address":{"id":"adr_2d6a11e586a74dadb28f82899ad2404c","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"John
|
369
|
+
Doe","company":"Company","street1":"215 N 7th Ave","street2":"Northwest","city":"Manville","state":"AL","zip":"08835","country":"US","phone":"5555550199","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{"zip4":{"success":true,"errors":[],"details":null},"delivery":{"success":true,"errors":[],"details":{"latitude":40.54849,"longitude":-74.59299,"time_zone":"America/New_York"}}}},"usps_zone":1,"return_address":{"id":"adr_61be3ffea25c476bb29e5542ddab5a58","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"NY
|
370
|
+
Warehouse","company":"NY Warehouse","street1":"131 S 8th Ave","street2":null,"city":"Manville","state":"NJ","zip":"08835","country":"US","phone":"2024561111","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}},"buyer_address":{"id":"adr_2d6a11e586a74dadb28f82899ad2404c","object":"Address","created_at":"2020-09-23T13:52:31Z","updated_at":"2020-09-23T13:52:31Z","name":"John
|
371
|
+
Doe","company":"Company","street1":"215 N 7th Ave","street2":"Northwest","city":"Manville","state":"AL","zip":"08835","country":"US","phone":"5555550199","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{"zip4":{"success":true,"errors":[],"details":null},"delivery":{"success":true,"errors":[],"details":{"latitude":40.54849,"longitude":-74.59299,"time_zone":"America/New_York"}}}},"forms":[],"fees":[{"object":"Fee","type":"LabelFee","amount":"0.01000","charged":true,"refunded":false},{"object":"Fee","type":"PostageFee","amount":"3.93000","charged":true,"refunded":false}],"id":"shp_e1e2793b59314da98ad6cc19da13ae98","object":"Shipment"}'
|
372
|
+
recorded_at: Wed, 23 Sep 2020 13:52:36 GMT
|
373
|
+
recorded_with: VCR 6.0.0
|