solidus_easypost 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +6 -0
- data/.github/stale.yml +4 -4
- data/.github_changelog_generator +2 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +3 -0
- data/.rubocop_todo.yml +12 -47
- data/CHANGELOG.md +113 -0
- data/LICENSE +1 -1
- data/README.md +111 -21
- 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 +18 -23
- data/app/models/solidus_easypost/parcel_dimension.rb +34 -0
- data/app/models/solidus_easypost/return_authorization.rb +2 -13
- data/app/overrides/spree/admin/orders/_shipment/add_postage_label.html.erb.deface +10 -0
- data/bin/rails +0 -1
- data/bin/rails-engine +0 -2
- data/bin/rails-sandbox +1 -2
- data/bin/sandbox +2 -0
- data/config/initializers/webhooks.rb +7 -0
- data/config/locales/en.yml +7 -4
- data/config/routes.rb +5 -1
- data/db/migrate/20201025110912_add_tracker_id_to_cartons.rb +6 -0
- data/lib/generators/solidus_easypost/install/install_generator.rb +7 -1
- 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 +25 -2
- 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 +1 -1
- data/lib/solidus_easypost.rb +11 -0
- data/solidus_easypost.gemspec +8 -5
- data/spec/cassettes/{Spree_Address/_easypost_address/is_an_EasyPost_Address_object.yml → address_builder/from_address.yml} +19 -23
- data/spec/cassettes/{Spree_StockLocation/_easypost_address/is_an_EasyPost_Address_object.yml → address_builder/from_stock_location.yml} +19 -23
- data/spec/cassettes/{Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/when_shipping_methods_are_front_end_visible/has_the_correct_costs.yml → estimator.yml} +0 -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/{Spree_Stock_Package/_easypost_parcel/is_an_EasyPost_Parcel_object.yml → parcel_builder/from_package.yml} +17 -22
- data/spec/cassettes/{Spree_Stock_Package/_easypost_parcel/has_the_correct_attributes.yml → parcel_builder/from_return_authorization.yml} +17 -22
- data/spec/cassettes/postage_labels/show.yml +72 -0
- data/spec/cassettes/return_authorization.yml +310 -0
- data/spec/cassettes/{Spree_Stock_Package/_easypost_shipment/is_an_EasyPost_Shipment_object.yml → shipment_builder/from_package.yml} +74 -92
- data/spec/cassettes/{Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/create_no_new_shipping_methods.yml → shipment_builder/from_return_authorization.yml} +77 -95
- 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 +7 -40
- data/spec/models/spree/carton_spec.rb +57 -0
- data/spec/models/spree/shipment_spec.rb +48 -59
- data/spec/models/spree/shipping_rate_spec.rb +14 -7
- 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/spec_helper.rb +11 -7
- data/spec/support/easypost.rb +3 -1
- 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 +1 -0
- metadata +118 -85
- data/app/decorators/models/solidus_easypost/spree/address_decorator.rb +0 -30
- data/app/decorators/models/solidus_easypost/spree/stock/estimator_decorator.rb +0 -15
- data/app/decorators/models/solidus_easypost/spree/stock/package_decorator.rb +0 -27
- data/app/decorators/models/solidus_easypost/spree/stock_location_decorator.rb +0 -26
- data/app/models/solidus_easypost/estimator.rb +0 -51
- data/lib/solidus_easypost/factories.rb +0 -24
- data/spec/cassettes/SolidusEasypost_ReturnAuthorization/_easypost_shipment/is_an_EasyPost_Shipment_object.yml +0 -271
- data/spec/cassettes/SolidusEasypost_ReturnAuthorization/_return_label/has_the_correct_fields.yml +0 -336
- data/spec/cassettes/SolidusEasypost_ReturnAuthorization/_return_label/is_an_EasyPost_PackageLabel_object.yml +0 -336
- data/spec/cassettes/Spree_Address/_easypost_address/has_the_correct_attributes.yml +0 -69
- data/spec/cassettes/Spree_Order/_refresh_shipment_rates/can_get_rates_from_easy_post.yml +0 -271
- data/spec/cassettes/Spree_Order/_refresh_shipment_rates/create_shipping_methods_for_the_rates.yml +0 -269
- data/spec/cassettes/Spree_Shipment/_buys_a_shipping_rate_after_transitioning_to_ship.yml +0 -403
- data/spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_a_new_shipment/behaves_like_an_easypost_shipment/is_an_EasyPost_Shipment_object.yml +0 -271
- data/spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_a_new_shipment/calls_the_api.yml +0 -200
- data/spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_an_existing_shipment/behaves_like_an_easypost_shipment/is_an_EasyPost_Shipment_object.yml +0 -334
- data/spec/cassettes/Spree_Shipment/_easypost_shipment/when_it_is_an_existing_shipment/loads_the_existing_shipment.yml +0 -271
- data/spec/cassettes/Spree_StockLocation/_easypost_address/has_the_correct_attributes.yml +0 -69
- data/spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_dont_exist/creates_new_shipping_methods.yml +0 -269
- data/spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_dont_exist/is_empty.yml +0 -269
- data/spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/when_shipping_methods_are_front_end_visible/has_the_correct_names.yml +0 -269
- data/spec/cassettes/Spree_Stock_Estimator/_shipping_rates/when_rates_are_found/when_shipping_methods_exist/when_shipping_methods_are_not_front_end_visible/is_empty.yml +0 -269
- data/spec/cassettes/Spree_Stock_Package/_easypost_shipment/calls_the_api.yml +0 -200
- data/spec/factories/spree_modification.rb +0 -25
- data/spec/models/spree/address_spec.rb +0 -31
- data/spec/models/spree/order_spec.rb +0 -31
- data/spec/models/spree/stock/estimator_spec.rb +0 -80
- data/spec/models/spree/stock/package_spec.rb +0 -35
- data/spec/models/spree/stock_location_spec.rb +0 -31
- data/spec/support/shipping_method_helpers.rb +0 -43
@@ -1,403 +0,0 @@
|
|
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]=200%2019th%20St&address[city]=Birmingham&address[zip]=35203&address[phone]=123456789&address[name]=Newt%20Scamander&address[state]=AL&address[country]=US
|
9
|
-
headers:
|
10
|
-
Accept:
|
11
|
-
- "*/*"
|
12
|
-
User-Agent:
|
13
|
-
- EasyPost/v2 RubyClient/3.0.1
|
14
|
-
Authorization:
|
15
|
-
- Bearer CvzYtuda6KRI9JjG7SAHbA
|
16
|
-
Content-Type:
|
17
|
-
- application/x-www-form-urlencoded
|
18
|
-
Content-Length:
|
19
|
-
- '170'
|
20
|
-
Accept-Encoding:
|
21
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
22
|
-
Host:
|
23
|
-
- api.easypost.com
|
24
|
-
response:
|
25
|
-
status:
|
26
|
-
code: 201
|
27
|
-
message: Created
|
28
|
-
headers:
|
29
|
-
X-Frame-Options:
|
30
|
-
- SAMEORIGIN
|
31
|
-
X-Xss-Protection:
|
32
|
-
- 1; mode=block
|
33
|
-
X-Content-Type-Options:
|
34
|
-
- nosniff
|
35
|
-
X-Ep-Request-Uuid:
|
36
|
-
- 43c6543d5dca6f03ee61721200010c95
|
37
|
-
Cache-Control:
|
38
|
-
- no-cache, no-store, must-revalidate, private
|
39
|
-
Pragma:
|
40
|
-
- no-cache
|
41
|
-
Expires:
|
42
|
-
- '0'
|
43
|
-
Location:
|
44
|
-
- "/api/v2/addresses/adr_c56faf78ce1d4c4f8bcfb6ac436a8409"
|
45
|
-
Content-Type:
|
46
|
-
- application/json; charset=utf-8
|
47
|
-
X-Runtime:
|
48
|
-
- '0.026591'
|
49
|
-
Transfer-Encoding:
|
50
|
-
- chunked
|
51
|
-
X-Node:
|
52
|
-
- bigweb10sj
|
53
|
-
X-Version-Label:
|
54
|
-
- easypost-201911120131-f5c72b1880-master
|
55
|
-
X-Backend:
|
56
|
-
- easypost
|
57
|
-
X-Proxied:
|
58
|
-
- extlb2wdc 2744487620
|
59
|
-
- intlb1wdc ff5a2958df
|
60
|
-
- intlb2sj ff5a2958df
|
61
|
-
Strict-Transport-Security:
|
62
|
-
- max-age=15768000; includeSubDomains; preload
|
63
|
-
body:
|
64
|
-
encoding: ASCII-8BIT
|
65
|
-
string: '{"id":"adr_c56faf78ce1d4c4f8bcfb6ac436a8409","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:19Z","name":"Newt
|
66
|
-
Scamander","company":null,"street1":"200 19th St","street2":null,"city":"Birmingham","state":"AL","zip":"35203","country":"US","phone":"123456789","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}}'
|
67
|
-
http_version:
|
68
|
-
recorded_at: Tue, 12 Nov 2019 08:36:19 GMT
|
69
|
-
- request:
|
70
|
-
method: post
|
71
|
-
uri: https://api.easypost.com/v2/addresses
|
72
|
-
body:
|
73
|
-
encoding: UTF-8
|
74
|
-
string: address[street1]=2630%20Cahaba%20Rd&address[city]=Birmingham&address[zip]=35223&address[phone]=(202)%20456-1111&address[name]=NY%20Warehouse&address[company]=NY%20Warehouse&address[state]=AL&address[country]=US
|
75
|
-
headers:
|
76
|
-
Accept:
|
77
|
-
- "*/*"
|
78
|
-
User-Agent:
|
79
|
-
- EasyPost/v2 RubyClient/3.0.1
|
80
|
-
Authorization:
|
81
|
-
- Bearer CvzYtuda6KRI9JjG7SAHbA
|
82
|
-
Content-Type:
|
83
|
-
- application/x-www-form-urlencoded
|
84
|
-
Content-Length:
|
85
|
-
- '210'
|
86
|
-
Accept-Encoding:
|
87
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
88
|
-
Host:
|
89
|
-
- api.easypost.com
|
90
|
-
response:
|
91
|
-
status:
|
92
|
-
code: 201
|
93
|
-
message: Created
|
94
|
-
headers:
|
95
|
-
X-Frame-Options:
|
96
|
-
- SAMEORIGIN
|
97
|
-
X-Xss-Protection:
|
98
|
-
- 1; mode=block
|
99
|
-
X-Content-Type-Options:
|
100
|
-
- nosniff
|
101
|
-
X-Ep-Request-Uuid:
|
102
|
-
- 43c6543d5dca6f03ee81c88800010ca4
|
103
|
-
Cache-Control:
|
104
|
-
- no-cache, no-store, must-revalidate, private
|
105
|
-
Pragma:
|
106
|
-
- no-cache
|
107
|
-
Expires:
|
108
|
-
- '0'
|
109
|
-
Location:
|
110
|
-
- "/api/v2/addresses/adr_742eb9c109a14ed1ae847b342cb7040d"
|
111
|
-
Content-Type:
|
112
|
-
- application/json; charset=utf-8
|
113
|
-
X-Runtime:
|
114
|
-
- '0.029983'
|
115
|
-
Transfer-Encoding:
|
116
|
-
- chunked
|
117
|
-
X-Node:
|
118
|
-
- bigweb9sj
|
119
|
-
X-Version-Label:
|
120
|
-
- easypost-201911120131-f5c72b1880-master
|
121
|
-
X-Backend:
|
122
|
-
- easypost
|
123
|
-
X-Proxied:
|
124
|
-
- extlb2wdc 2744487620
|
125
|
-
- intlb1sj ff5a2958df
|
126
|
-
- intlb2wdc ff5a2958df
|
127
|
-
Strict-Transport-Security:
|
128
|
-
- max-age=15768000; includeSubDomains; preload
|
129
|
-
body:
|
130
|
-
encoding: ASCII-8BIT
|
131
|
-
string: '{"id":"adr_742eb9c109a14ed1ae847b342cb7040d","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:19Z","name":"NY
|
132
|
-
Warehouse","company":"NY Warehouse","street1":"2630 Cahaba Rd","street2":null,"city":"Birmingham","state":"AL","zip":"35223","country":"US","phone":"2024561111","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}}'
|
133
|
-
http_version:
|
134
|
-
recorded_at: Tue, 12 Nov 2019 08:36:20 GMT
|
135
|
-
- request:
|
136
|
-
method: post
|
137
|
-
uri: https://api.easypost.com/v2/parcels
|
138
|
-
body:
|
139
|
-
encoding: UTF-8
|
140
|
-
string: parcel[weight]=20.0
|
141
|
-
headers:
|
142
|
-
Accept:
|
143
|
-
- "*/*"
|
144
|
-
User-Agent:
|
145
|
-
- EasyPost/v2 RubyClient/3.0.1
|
146
|
-
Authorization:
|
147
|
-
- Bearer CvzYtuda6KRI9JjG7SAHbA
|
148
|
-
Content-Type:
|
149
|
-
- application/x-www-form-urlencoded
|
150
|
-
Content-Length:
|
151
|
-
- '19'
|
152
|
-
Accept-Encoding:
|
153
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
154
|
-
Host:
|
155
|
-
- api.easypost.com
|
156
|
-
response:
|
157
|
-
status:
|
158
|
-
code: 201
|
159
|
-
message: Created
|
160
|
-
headers:
|
161
|
-
X-Frame-Options:
|
162
|
-
- SAMEORIGIN
|
163
|
-
X-Xss-Protection:
|
164
|
-
- 1; mode=block
|
165
|
-
X-Content-Type-Options:
|
166
|
-
- nosniff
|
167
|
-
X-Ep-Request-Uuid:
|
168
|
-
- 43c6543d5dca6f04ee80a32500010cb3
|
169
|
-
Cache-Control:
|
170
|
-
- no-cache, no-store, must-revalidate, private
|
171
|
-
Pragma:
|
172
|
-
- no-cache
|
173
|
-
Expires:
|
174
|
-
- '0'
|
175
|
-
Location:
|
176
|
-
- "/api/v2/parcels/prcl_212ff2d599674940a0216dd1c424dd4d"
|
177
|
-
Content-Type:
|
178
|
-
- application/json; charset=utf-8
|
179
|
-
X-Runtime:
|
180
|
-
- '0.025016'
|
181
|
-
Transfer-Encoding:
|
182
|
-
- chunked
|
183
|
-
X-Node:
|
184
|
-
- bigweb10sj
|
185
|
-
X-Version-Label:
|
186
|
-
- easypost-201911120131-f5c72b1880-master
|
187
|
-
X-Backend:
|
188
|
-
- easypost
|
189
|
-
X-Proxied:
|
190
|
-
- extlb2wdc 2744487620
|
191
|
-
- intlb1sj ff5a2958df
|
192
|
-
- intlb2wdc ff5a2958df
|
193
|
-
Strict-Transport-Security:
|
194
|
-
- max-age=15768000; includeSubDomains; preload
|
195
|
-
body:
|
196
|
-
encoding: ASCII-8BIT
|
197
|
-
string: '{"id":"prcl_212ff2d599674940a0216dd1c424dd4d","object":"Parcel","created_at":"2019-11-12T08:36:20Z","updated_at":"2019-11-12T08:36:20Z","length":null,"width":null,"height":null,"predefined_package":null,"weight":20.0,"mode":"test"}'
|
198
|
-
http_version:
|
199
|
-
recorded_at: Tue, 12 Nov 2019 08:36:20 GMT
|
200
|
-
- request:
|
201
|
-
method: post
|
202
|
-
uri: https://api.easypost.com/v2/shipments
|
203
|
-
body:
|
204
|
-
encoding: UTF-8
|
205
|
-
string: shipment[to_address][id]=adr_c56faf78ce1d4c4f8bcfb6ac436a8409&shipment[from_address][id]=adr_742eb9c109a14ed1ae847b342cb7040d&shipment[parcel][id]=prcl_212ff2d599674940a0216dd1c424dd4d
|
206
|
-
headers:
|
207
|
-
Accept:
|
208
|
-
- "*/*"
|
209
|
-
User-Agent:
|
210
|
-
- EasyPost/v2 RubyClient/3.0.1
|
211
|
-
Authorization:
|
212
|
-
- Bearer CvzYtuda6KRI9JjG7SAHbA
|
213
|
-
Content-Type:
|
214
|
-
- application/x-www-form-urlencoded
|
215
|
-
Content-Length:
|
216
|
-
- '184'
|
217
|
-
Accept-Encoding:
|
218
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
219
|
-
Host:
|
220
|
-
- api.easypost.com
|
221
|
-
response:
|
222
|
-
status:
|
223
|
-
code: 201
|
224
|
-
message: Created
|
225
|
-
headers:
|
226
|
-
X-Frame-Options:
|
227
|
-
- SAMEORIGIN
|
228
|
-
X-Xss-Protection:
|
229
|
-
- 1; mode=block
|
230
|
-
X-Content-Type-Options:
|
231
|
-
- nosniff
|
232
|
-
X-Ep-Request-Uuid:
|
233
|
-
- 43c6543d5dca6f05ee6fb88d00010cc0
|
234
|
-
Cache-Control:
|
235
|
-
- no-cache, no-store, must-revalidate, private
|
236
|
-
Pragma:
|
237
|
-
- no-cache
|
238
|
-
Expires:
|
239
|
-
- '0'
|
240
|
-
Location:
|
241
|
-
- "/api/v2/shipments/shp_af9c4da9ce6c4a15899faa7eed51a4db"
|
242
|
-
Content-Type:
|
243
|
-
- application/json; charset=utf-8
|
244
|
-
X-Runtime:
|
245
|
-
- '0.219876'
|
246
|
-
Transfer-Encoding:
|
247
|
-
- chunked
|
248
|
-
X-Node:
|
249
|
-
- bigweb7sj
|
250
|
-
X-Version-Label:
|
251
|
-
- easypost-201911120131-f5c72b1880-master
|
252
|
-
X-Backend:
|
253
|
-
- easypost
|
254
|
-
X-Canary:
|
255
|
-
- direct
|
256
|
-
X-Proxied:
|
257
|
-
- extlb2wdc 2744487620
|
258
|
-
- intlb1sj ff5a2958df
|
259
|
-
- intlb2wdc ff5a2958df
|
260
|
-
Strict-Transport-Security:
|
261
|
-
- max-age=15768000; includeSubDomains; preload
|
262
|
-
body:
|
263
|
-
encoding: ASCII-8BIT
|
264
|
-
string: '{"created_at":"2019-11-12T08:36:21Z","is_return":false,"messages":[],"mode":"test","options":{"currency":"USD","payment":{"type":"SENDER"},"label_date":null,"date_advance":0},"reference":null,"status":"unknown","tracking_code":null,"updated_at":"2019-11-12T08:36:21Z","batch_id":null,"batch_status":null,"batch_message":null,"customs_info":null,"from_address":{"id":"adr_742eb9c109a14ed1ae847b342cb7040d","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:19Z","name":"NY
|
265
|
-
Warehouse","company":"NY Warehouse","street1":"2630 Cahaba Rd","street2":null,"city":"Birmingham","state":"AL","zip":"35223","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_212ff2d599674940a0216dd1c424dd4d","object":"Parcel","created_at":"2019-11-12T08:36:20Z","updated_at":"2019-11-12T08:36:20Z","length":null,"width":null,"height":null,"predefined_package":null,"weight":20.0,"mode":"test"},"postage_label":null,"rates":[{"id":"rate_25295b5a7c2a4fea9c91e9e2f8b2128c","object":"Rate","created_at":"2019-11-12T08:36:21Z","updated_at":"2019-11-12T08:36:21Z","mode":"test","service":"Priority","carrier":"USPS","rate":"7.42","currency":"USD","retail_rate":"7.85","retail_currency":"USD","list_rate":"7.42","list_currency":"USD","delivery_days":1,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":1,"shipment_id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_352bf56489604a12afef32120e2dd283","object":"Rate","created_at":"2019-11-12T08:36:21Z","updated_at":"2019-11-12T08:36:21Z","mode":"test","service":"ParcelSelect","carrier":"USPS","rate":"7.32","currency":"USD","retail_rate":"7.32","retail_currency":"USD","list_rate":"7.32","list_currency":"USD","delivery_days":2,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":2,"shipment_id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_8fe38ca910994c08a19e1011b96d32de","object":"Rate","created_at":"2019-11-12T08:36:21Z","updated_at":"2019-11-12T08:36:21Z","mode":"test","service":"Express","carrier":"USPS","rate":"22.78","currency":"USD","retail_rate":"25.70","retail_currency":"USD","list_rate":"22.78","list_currency":"USD","delivery_days":null,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":null,"shipment_id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","carrier_account_id":"ca_mtb51Ve0"}],"refund_status":null,"scan_form":null,"selected_rate":null,"tracker":null,"to_address":{"id":"adr_c56faf78ce1d4c4f8bcfb6ac436a8409","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:19Z","name":"Newt
|
266
|
-
Scamander","company":null,"street1":"200 19th St","street2":null,"city":"Birmingham","state":"AL","zip":"35203","country":"US","phone":"123456789","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_742eb9c109a14ed1ae847b342cb7040d","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:19Z","name":"NY
|
267
|
-
Warehouse","company":"NY Warehouse","street1":"2630 Cahaba Rd","street2":null,"city":"Birmingham","state":"AL","zip":"35223","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_c56faf78ce1d4c4f8bcfb6ac436a8409","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:19Z","name":"Newt
|
268
|
-
Scamander","company":null,"street1":"200 19th St","street2":null,"city":"Birmingham","state":"AL","zip":"35203","country":"US","phone":"123456789","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}},"forms":[],"fees":[],"id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","object":"Shipment"}'
|
269
|
-
http_version:
|
270
|
-
recorded_at: Tue, 12 Nov 2019 08:36:21 GMT
|
271
|
-
- request:
|
272
|
-
method: get
|
273
|
-
uri: https://api.easypost.com/v2/shipments/shp_af9c4da9ce6c4a15899faa7eed51a4db
|
274
|
-
body:
|
275
|
-
encoding: US-ASCII
|
276
|
-
string: ''
|
277
|
-
headers:
|
278
|
-
Accept:
|
279
|
-
- "*/*"
|
280
|
-
User-Agent:
|
281
|
-
- EasyPost/v2 RubyClient/3.0.1
|
282
|
-
Authorization:
|
283
|
-
- Bearer CvzYtuda6KRI9JjG7SAHbA
|
284
|
-
Content-Type:
|
285
|
-
- application/x-www-form-urlencoded
|
286
|
-
Accept-Encoding:
|
287
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
288
|
-
Host:
|
289
|
-
- api.easypost.com
|
290
|
-
response:
|
291
|
-
status:
|
292
|
-
code: 200
|
293
|
-
message: OK
|
294
|
-
headers:
|
295
|
-
X-Frame-Options:
|
296
|
-
- SAMEORIGIN
|
297
|
-
X-Xss-Protection:
|
298
|
-
- 1; mode=block
|
299
|
-
X-Content-Type-Options:
|
300
|
-
- nosniff
|
301
|
-
X-Ep-Request-Uuid:
|
302
|
-
- 43c6543d5dca6f06ee70518c00010cdb
|
303
|
-
Cache-Control:
|
304
|
-
- no-cache, no-store, must-revalidate, private
|
305
|
-
Pragma:
|
306
|
-
- no-cache
|
307
|
-
Expires:
|
308
|
-
- '0'
|
309
|
-
Content-Type:
|
310
|
-
- application/json; charset=utf-8
|
311
|
-
X-Runtime:
|
312
|
-
- '0.110149'
|
313
|
-
Transfer-Encoding:
|
314
|
-
- chunked
|
315
|
-
X-Node:
|
316
|
-
- bigweb10sj
|
317
|
-
X-Version-Label:
|
318
|
-
- easypost-201911120131-f5c72b1880-master
|
319
|
-
X-Backend:
|
320
|
-
- easypost
|
321
|
-
X-Proxied:
|
322
|
-
- extlb2wdc 2744487620
|
323
|
-
- intlb1sj ff5a2958df
|
324
|
-
- intlb1wdc ff5a2958df
|
325
|
-
Strict-Transport-Security:
|
326
|
-
- max-age=15768000; includeSubDomains; preload
|
327
|
-
body:
|
328
|
-
encoding: ASCII-8BIT
|
329
|
-
string: '{"created_at":"2019-11-12T08:36:21Z","is_return":false,"messages":[],"mode":"test","options":{"currency":"USD","payment":{"type":"SENDER"},"label_date":null,"date_advance":0},"reference":null,"status":"unknown","tracking_code":null,"updated_at":"2019-11-12T08:36:21Z","batch_id":null,"batch_status":null,"batch_message":null,"customs_info":null,"from_address":{"id":"adr_742eb9c109a14ed1ae847b342cb7040d","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:19Z","name":"NY
|
330
|
-
Warehouse","company":"NY Warehouse","street1":"2630 Cahaba Rd","street2":null,"city":"Birmingham","state":"AL","zip":"35223","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_212ff2d599674940a0216dd1c424dd4d","object":"Parcel","created_at":"2019-11-12T08:36:20Z","updated_at":"2019-11-12T08:36:20Z","length":null,"width":null,"height":null,"predefined_package":null,"weight":20.0,"mode":"test"},"postage_label":null,"rates":[{"id":"rate_25295b5a7c2a4fea9c91e9e2f8b2128c","object":"Rate","created_at":"2019-11-12T08:36:21Z","updated_at":"2019-11-12T08:36:21Z","mode":"test","service":"Priority","carrier":"USPS","rate":"7.42","currency":"USD","retail_rate":"7.85","retail_currency":"USD","list_rate":"7.42","list_currency":"USD","delivery_days":1,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":1,"shipment_id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_352bf56489604a12afef32120e2dd283","object":"Rate","created_at":"2019-11-12T08:36:21Z","updated_at":"2019-11-12T08:36:21Z","mode":"test","service":"ParcelSelect","carrier":"USPS","rate":"7.32","currency":"USD","retail_rate":"7.32","retail_currency":"USD","list_rate":"7.32","list_currency":"USD","delivery_days":2,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":2,"shipment_id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_8fe38ca910994c08a19e1011b96d32de","object":"Rate","created_at":"2019-11-12T08:36:21Z","updated_at":"2019-11-12T08:36:21Z","mode":"test","service":"Express","carrier":"USPS","rate":"22.78","currency":"USD","retail_rate":"25.70","retail_currency":"USD","list_rate":"22.78","list_currency":"USD","delivery_days":null,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":null,"shipment_id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","carrier_account_id":"ca_mtb51Ve0"}],"refund_status":null,"scan_form":null,"selected_rate":null,"tracker":null,"to_address":{"id":"adr_c56faf78ce1d4c4f8bcfb6ac436a8409","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:19Z","name":"Newt
|
331
|
-
Scamander","company":null,"street1":"200 19th St","street2":null,"city":"Birmingham","state":"AL","zip":"35203","country":"US","phone":"123456789","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_742eb9c109a14ed1ae847b342cb7040d","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:19Z","name":"NY
|
332
|
-
Warehouse","company":"NY Warehouse","street1":"2630 Cahaba Rd","street2":null,"city":"Birmingham","state":"AL","zip":"35223","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_c56faf78ce1d4c4f8bcfb6ac436a8409","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:19Z","name":"Newt
|
333
|
-
Scamander","company":null,"street1":"200 19th St","street2":null,"city":"Birmingham","state":"AL","zip":"35203","country":"US","phone":"123456789","email":null,"mode":"test","carrier_facility":null,"residential":null,"federal_tax_id":null,"state_tax_id":null,"verifications":{}},"forms":[],"fees":[],"id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","object":"Shipment"}'
|
334
|
-
http_version:
|
335
|
-
recorded_at: Tue, 12 Nov 2019 08:36:22 GMT
|
336
|
-
- request:
|
337
|
-
method: post
|
338
|
-
uri: https://api.easypost.com/v2/shipments/shp_af9c4da9ce6c4a15899faa7eed51a4db/buy
|
339
|
-
body:
|
340
|
-
encoding: UTF-8
|
341
|
-
string: rate[id]=rate_352bf56489604a12afef32120e2dd283
|
342
|
-
headers:
|
343
|
-
Accept:
|
344
|
-
- "*/*"
|
345
|
-
User-Agent:
|
346
|
-
- EasyPost/v2 RubyClient/3.0.1
|
347
|
-
Authorization:
|
348
|
-
- Bearer CvzYtuda6KRI9JjG7SAHbA
|
349
|
-
Content-Type:
|
350
|
-
- application/x-www-form-urlencoded
|
351
|
-
Content-Length:
|
352
|
-
- '46'
|
353
|
-
Accept-Encoding:
|
354
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
355
|
-
Host:
|
356
|
-
- api.easypost.com
|
357
|
-
response:
|
358
|
-
status:
|
359
|
-
code: 200
|
360
|
-
message: OK
|
361
|
-
headers:
|
362
|
-
X-Frame-Options:
|
363
|
-
- SAMEORIGIN
|
364
|
-
X-Xss-Protection:
|
365
|
-
- 1; mode=block
|
366
|
-
X-Content-Type-Options:
|
367
|
-
- nosniff
|
368
|
-
X-Ep-Request-Uuid:
|
369
|
-
- 43c6543d5dca6f07ee738b3200010cef
|
370
|
-
Cache-Control:
|
371
|
-
- no-cache, no-store, must-revalidate, private
|
372
|
-
Pragma:
|
373
|
-
- no-cache
|
374
|
-
Expires:
|
375
|
-
- '0'
|
376
|
-
Content-Type:
|
377
|
-
- application/json; charset=utf-8
|
378
|
-
X-Runtime:
|
379
|
-
- '1.360122'
|
380
|
-
Transfer-Encoding:
|
381
|
-
- chunked
|
382
|
-
X-Node:
|
383
|
-
- bigweb8sj
|
384
|
-
X-Version-Label:
|
385
|
-
- easypost-201911120131-f5c72b1880-master
|
386
|
-
X-Backend:
|
387
|
-
- easypost
|
388
|
-
X-Proxied:
|
389
|
-
- extlb2wdc 2744487620
|
390
|
-
- intlb1wdc ff5a2958df
|
391
|
-
- intlb2sj ff5a2958df
|
392
|
-
Strict-Transport-Security:
|
393
|
-
- max-age=15768000; includeSubDomains; preload
|
394
|
-
body:
|
395
|
-
encoding: ASCII-8BIT
|
396
|
-
string: '{"created_at":"2019-11-12T08:36:21Z","is_return":false,"messages":[],"mode":"test","options":{"currency":"USD","payment":{"type":"SENDER"},"label_date":null,"date_advance":0},"reference":null,"status":"unknown","tracking_code":"9461200897846029289031","updated_at":"2019-11-12T08:36:24Z","batch_id":null,"batch_status":null,"batch_message":null,"customs_info":null,"from_address":{"id":"adr_742eb9c109a14ed1ae847b342cb7040d","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:19Z","name":"NY
|
397
|
-
Warehouse","company":"NY Warehouse","street1":"2630 Cahaba Rd","street2":null,"city":"Birmingham","state":"AL","zip":"35223","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_212ff2d599674940a0216dd1c424dd4d","object":"Parcel","created_at":"2019-11-12T08:36:20Z","updated_at":"2019-11-12T08:36:20Z","length":null,"width":null,"height":null,"predefined_package":null,"weight":20.0,"mode":"test"},"postage_label":{"object":"PostageLabel","id":"pl_5e94c9522f2e48a6837552618a9ce5db","created_at":"2019-11-12T08:36:24Z","updated_at":"2019-11-12T08:36:24Z","date_advance":0,"integrated_form":"none","label_date":"2019-11-12T08:36:24Z","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/20191112/611c21410d8646dcad83e55b72520797.png","label_pdf_url":null,"label_zpl_url":null,"label_epl2_url":null,"label_file":null},"rates":[{"id":"rate_25295b5a7c2a4fea9c91e9e2f8b2128c","object":"Rate","created_at":"2019-11-12T08:36:21Z","updated_at":"2019-11-12T08:36:21Z","mode":"test","service":"Priority","carrier":"USPS","rate":"7.42","currency":"USD","retail_rate":"7.85","retail_currency":"USD","list_rate":"7.42","list_currency":"USD","delivery_days":1,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":1,"shipment_id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_352bf56489604a12afef32120e2dd283","object":"Rate","created_at":"2019-11-12T08:36:21Z","updated_at":"2019-11-12T08:36:21Z","mode":"test","service":"ParcelSelect","carrier":"USPS","rate":"7.32","currency":"USD","retail_rate":"7.32","retail_currency":"USD","list_rate":"7.32","list_currency":"USD","delivery_days":2,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":2,"shipment_id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","carrier_account_id":"ca_mtb51Ve0"},{"id":"rate_8fe38ca910994c08a19e1011b96d32de","object":"Rate","created_at":"2019-11-12T08:36:21Z","updated_at":"2019-11-12T08:36:21Z","mode":"test","service":"Express","carrier":"USPS","rate":"22.78","currency":"USD","retail_rate":"25.70","retail_currency":"USD","list_rate":"22.78","list_currency":"USD","delivery_days":null,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":null,"shipment_id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","carrier_account_id":"ca_mtb51Ve0"}],"refund_status":null,"scan_form":null,"selected_rate":{"id":"rate_352bf56489604a12afef32120e2dd283","object":"Rate","created_at":"2019-11-12T08:36:24Z","updated_at":"2019-11-12T08:36:24Z","mode":"test","service":"ParcelSelect","carrier":"USPS","rate":"7.32","currency":"USD","retail_rate":"7.32","retail_currency":"USD","list_rate":"7.32","list_currency":"USD","delivery_days":2,"delivery_date":null,"delivery_date_guaranteed":false,"est_delivery_days":2,"shipment_id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","carrier_account_id":"ca_mtb51Ve0"},"tracker":{"id":"trk_0d32f90d02784afdb5807a129521aa38","object":"Tracker","mode":"test","tracking_code":"9461200897846029289031","status":"unknown","status_detail":"unknown","created_at":"2019-11-12T08:36:24Z","updated_at":"2019-11-12T08:36:24Z","signed_by":null,"weight":null,"est_delivery_date":null,"shipment_id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","carrier":"USPS","tracking_details":[],"fees":[],"carrier_detail":null,"public_url":"https://track.easypost.com/djE6dHJrXzBkMzJmOTBkMDI3ODRhZmRiNTgwN2ExMjk1MjFhYTM4"},"to_address":{"id":"adr_c56faf78ce1d4c4f8bcfb6ac436a8409","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:23Z","name":"Newt
|
398
|
-
Scamander","company":null,"street1":"200 19th St","street2":null,"city":"Birmingham","state":"AL","zip":"35218-1549","country":"US","phone":"123456789","email":null,"mode":"test","carrier_facility":null,"residential":true,"federal_tax_id":null,"state_tax_id":null,"verifications":{"zip4":{"success":true,"errors":[],"details":null}}},"usps_zone":1,"return_address":{"id":"adr_742eb9c109a14ed1ae847b342cb7040d","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:19Z","name":"NY
|
399
|
-
Warehouse","company":"NY Warehouse","street1":"2630 Cahaba Rd","street2":null,"city":"Birmingham","state":"AL","zip":"35223","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_c56faf78ce1d4c4f8bcfb6ac436a8409","object":"Address","created_at":"2019-11-12T08:36:19Z","updated_at":"2019-11-12T08:36:23Z","name":"Newt
|
400
|
-
Scamander","company":null,"street1":"200 19th St","street2":null,"city":"Birmingham","state":"AL","zip":"35218-1549","country":"US","phone":"123456789","email":null,"mode":"test","carrier_facility":null,"residential":true,"federal_tax_id":null,"state_tax_id":null,"verifications":{"zip4":{"success":true,"errors":[],"details":null}}},"forms":[],"fees":[{"object":"Fee","type":"LabelFee","amount":"0.01000","charged":true,"refunded":false},{"object":"Fee","type":"PostageFee","amount":"7.32000","charged":true,"refunded":false}],"id":"shp_af9c4da9ce6c4a15899faa7eed51a4db","object":"Shipment"}'
|
401
|
-
http_version:
|
402
|
-
recorded_at: Tue, 12 Nov 2019 08:36:24 GMT
|
403
|
-
recorded_with: VCR 5.0.0
|