friendly_shipping 0.8.1 → 0.9.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 +1 -1
- data/.env.template +3 -0
- data/.env.test.local.template +6 -0
- data/.gitignore +1 -0
- data/.rubocop-relaxed.yml +7 -23
- data/.rubocop.yml +11 -2
- data/.rubocop_todo.yml +21 -0
- data/.yardopts +6 -0
- data/CHANGELOG.md +71 -0
- data/Gemfile +17 -0
- data/friendly_shipping.gemspec +4 -13
- data/lib/friendly_shipping/api_error.rb +6 -4
- data/lib/friendly_shipping/api_error_handler.rb +10 -6
- data/lib/friendly_shipping/api_failure.rb +4 -0
- data/lib/friendly_shipping/api_result.rb +16 -4
- data/lib/friendly_shipping/carrier.rb +28 -8
- data/lib/friendly_shipping/http_client.rb +25 -2
- data/lib/friendly_shipping/inflections.rb +10 -0
- data/lib/friendly_shipping/item_options.rb +3 -0
- data/lib/friendly_shipping/label.rb +41 -20
- data/lib/friendly_shipping/package_options.rb +21 -2
- data/lib/friendly_shipping/rate.rb +50 -15
- data/lib/friendly_shipping/request.rb +23 -7
- data/lib/friendly_shipping/response.rb +21 -6
- data/lib/friendly_shipping/services/rl/api_error.rb +33 -0
- data/lib/friendly_shipping/services/rl/bol_options.rb +107 -0
- data/lib/friendly_shipping/services/rl/bol_packages_serializer.rb +32 -0
- data/lib/friendly_shipping/services/rl/bol_structures_serializer.rb +31 -0
- data/lib/friendly_shipping/services/rl/item_options.rb +38 -0
- data/lib/friendly_shipping/services/rl/package_options.rb +40 -0
- data/lib/friendly_shipping/services/rl/parse_create_bol_response.rb +46 -0
- data/lib/friendly_shipping/services/rl/parse_invoice_response.rb +50 -0
- data/lib/friendly_shipping/services/rl/parse_print_bol_response.rb +47 -0
- data/lib/friendly_shipping/services/rl/parse_print_shipping_labels_response.rb +47 -0
- data/lib/friendly_shipping/services/rl/parse_rate_quote_response.rb +66 -0
- data/lib/friendly_shipping/services/rl/parse_transit_times_response.rb +76 -0
- data/lib/friendly_shipping/services/rl/rate_quote_options.rb +86 -0
- data/lib/friendly_shipping/services/rl/rate_quote_packages_serializer.rb +54 -0
- data/lib/friendly_shipping/services/rl/rate_quote_structures_serializer.rb +53 -0
- data/lib/friendly_shipping/services/rl/serialize_create_bol_request.rb +86 -0
- data/lib/friendly_shipping/services/rl/serialize_location.rb +46 -0
- data/lib/friendly_shipping/services/rl/serialize_rate_quote_request.rb +69 -0
- data/lib/friendly_shipping/services/rl/serialize_transit_times_request.rb +38 -0
- data/lib/friendly_shipping/services/rl/shipment_document.rb +40 -0
- data/lib/friendly_shipping/services/rl/shipment_information.rb +41 -0
- data/lib/friendly_shipping/services/rl/shipment_options.rb +50 -0
- data/lib/friendly_shipping/services/rl/shipping_methods.rb +28 -0
- data/lib/friendly_shipping/services/rl/structure_options.rb +13 -0
- data/lib/friendly_shipping/services/rl.rb +204 -0
- data/lib/friendly_shipping/services/ship_engine/api_error.rb +33 -0
- data/lib/friendly_shipping/services/ship_engine/customs_items_serializer.rb +36 -0
- data/lib/friendly_shipping/services/ship_engine/label_customs_options.rb +10 -7
- data/lib/friendly_shipping/services/ship_engine/label_item_options.rb +10 -5
- data/lib/friendly_shipping/services/ship_engine/label_options.rb +31 -14
- data/lib/friendly_shipping/services/ship_engine/label_package_options.rb +18 -11
- data/lib/friendly_shipping/services/ship_engine/parse_address_validation_response.rb +77 -0
- data/lib/friendly_shipping/services/ship_engine/parse_carrier_response.rb +9 -0
- data/lib/friendly_shipping/services/ship_engine/parse_label_response.rb +4 -0
- data/lib/friendly_shipping/services/ship_engine/{parse_rate_estimate_response.rb → parse_rate_estimates_response.rb} +26 -6
- data/lib/friendly_shipping/services/ship_engine/parse_rates_response.rb +101 -0
- data/lib/friendly_shipping/services/ship_engine/parse_void_response.rb +4 -0
- data/lib/friendly_shipping/services/ship_engine/rate_estimates_options.rb +17 -4
- data/lib/friendly_shipping/services/ship_engine/rates_item_options.rb +28 -0
- data/lib/friendly_shipping/services/ship_engine/rates_options.rb +61 -0
- data/lib/friendly_shipping/services/ship_engine/rates_package_options.rb +20 -0
- data/lib/friendly_shipping/services/ship_engine/serialize_address_residential_indicator.rb +27 -0
- data/lib/friendly_shipping/services/ship_engine/serialize_address_validation_request.rb +31 -0
- data/lib/friendly_shipping/services/ship_engine/serialize_label_shipment.rb +22 -27
- data/lib/friendly_shipping/services/ship_engine/serialize_rate_estimate_request.rb +41 -16
- data/lib/friendly_shipping/services/ship_engine/serialize_rates_request.rb +126 -0
- data/lib/friendly_shipping/services/ship_engine.rb +94 -21
- data/lib/friendly_shipping/services/ship_engine_ltl/api_error.rb +12 -0
- data/lib/friendly_shipping/services/ship_engine_ltl/item_options.rb +24 -5
- data/lib/friendly_shipping/services/ship_engine_ltl/package_options.rb +39 -4
- data/lib/friendly_shipping/services/ship_engine_ltl/parse_carrier_response.rb +4 -0
- data/lib/friendly_shipping/services/ship_engine_ltl/parse_quote_response.rb +10 -0
- data/lib/friendly_shipping/services/ship_engine_ltl/quote_options.rb +29 -11
- data/lib/friendly_shipping/services/ship_engine_ltl/serialize_packages.rb +7 -2
- data/lib/friendly_shipping/services/ship_engine_ltl/serialize_quote_request.rb +50 -16
- data/lib/friendly_shipping/services/ship_engine_ltl/serialize_structures.rb +42 -0
- data/lib/friendly_shipping/services/ship_engine_ltl/shipment_options.rb +47 -0
- data/lib/friendly_shipping/services/ship_engine_ltl/structure_options.rb +17 -0
- data/lib/friendly_shipping/services/ship_engine_ltl.rb +50 -30
- data/lib/friendly_shipping/services/tforce_freight/access_token.rb +43 -0
- data/lib/friendly_shipping/services/tforce_freight/api_error.rb +42 -0
- data/lib/friendly_shipping/services/tforce_freight/bol_options.rb +180 -0
- data/lib/friendly_shipping/services/tforce_freight/document_options.rb +100 -0
- data/lib/friendly_shipping/services/tforce_freight/generate_commodity_information.rb +92 -0
- data/lib/friendly_shipping/services/tforce_freight/generate_create_bol_request_hash.rb +165 -0
- data/lib/friendly_shipping/services/tforce_freight/generate_document_options_hash.rb +36 -0
- data/lib/friendly_shipping/services/tforce_freight/generate_handling_units_hash.rb +51 -0
- data/lib/friendly_shipping/services/tforce_freight/generate_location_hash.rb +25 -0
- data/lib/friendly_shipping/services/tforce_freight/generate_pickup_request_hash.rb +113 -0
- data/lib/friendly_shipping/services/tforce_freight/generate_rates_request_hash.rb +65 -0
- data/lib/friendly_shipping/services/tforce_freight/generate_reference_hash.rb +28 -0
- data/lib/friendly_shipping/services/tforce_freight/item_options.rb +93 -0
- data/lib/friendly_shipping/services/tforce_freight/package_options.rb +121 -0
- data/lib/friendly_shipping/services/tforce_freight/parse_create_bol_response.rb +94 -0
- data/lib/friendly_shipping/services/tforce_freight/parse_pickup_response.rb +45 -0
- data/lib/friendly_shipping/services/tforce_freight/parse_rates_response.rb +58 -0
- data/lib/friendly_shipping/services/tforce_freight/parse_shipment_document.rb +31 -0
- data/lib/friendly_shipping/services/tforce_freight/pickup_options.rb +82 -0
- data/lib/friendly_shipping/services/tforce_freight/rates_item_options.rb +12 -0
- data/lib/friendly_shipping/services/tforce_freight/rates_options.rb +162 -0
- data/lib/friendly_shipping/services/tforce_freight/rates_package_options.rb +12 -0
- data/lib/friendly_shipping/services/tforce_freight/shipment_document.rb +38 -0
- data/lib/friendly_shipping/services/tforce_freight/shipment_information.rb +104 -0
- data/lib/friendly_shipping/services/tforce_freight/shipment_options.rb +49 -0
- data/lib/friendly_shipping/services/tforce_freight/shipping_methods.rb +25 -0
- data/lib/friendly_shipping/services/tforce_freight/structure_options.rb +44 -0
- data/lib/friendly_shipping/services/tforce_freight.rb +202 -0
- data/lib/friendly_shipping/services/ups/label_options.rb +14 -2
- data/lib/friendly_shipping/services/ups/label_package_options.rb +1 -1
- data/lib/friendly_shipping/services/ups/parse_modifier_element.rb +29 -0
- data/lib/friendly_shipping/services/ups/parse_rate_response.rb +12 -0
- data/lib/friendly_shipping/services/ups/parse_time_in_transit_response.rb +1 -1
- data/lib/friendly_shipping/services/ups/rate_estimate_options.rb +14 -1
- data/lib/friendly_shipping/services/ups/serialize_rating_service_selection_request.rb +10 -1
- data/lib/friendly_shipping/services/ups/serialize_shipment_accept_request.rb +1 -1
- data/lib/friendly_shipping/services/ups/serialize_shipment_confirm_request.rb +2 -1
- data/lib/friendly_shipping/services/ups/shipping_methods.rb +1 -1
- data/lib/friendly_shipping/services/ups.rb +1 -1
- data/lib/friendly_shipping/services/ups_freight/api_error.rb +8 -5
- data/lib/friendly_shipping/services/ups_freight/generate_commodity_information.rb +65 -19
- data/lib/friendly_shipping/services/ups_freight/generate_freight_rate_request_hash.rb +3 -20
- data/lib/friendly_shipping/services/ups_freight/generate_freight_ship_request_hash.rb +2 -20
- data/lib/friendly_shipping/services/ups_freight/generate_handling_units_hash.rb +54 -0
- data/lib/friendly_shipping/services/ups_freight/label_options.rb +36 -10
- data/lib/friendly_shipping/services/ups_freight/label_structure_options.rb +13 -0
- data/lib/friendly_shipping/services/ups_freight/parse_freight_label_response.rb +2 -2
- data/lib/friendly_shipping/services/ups_freight/parse_shipment_document.rb +1 -1
- data/lib/friendly_shipping/services/ups_freight/rates_item_options.rb +18 -9
- data/lib/friendly_shipping/services/ups_freight/rates_options.rb +31 -21
- data/lib/friendly_shipping/services/ups_freight/rates_package_options.rb +79 -8
- data/lib/friendly_shipping/services/ups_freight/rates_structure_options.rb +46 -0
- data/lib/friendly_shipping/services/ups_freight/shipment_information.rb +7 -3
- data/lib/friendly_shipping/services/ups_freight/shipment_options.rb +49 -0
- data/lib/friendly_shipping/services/ups_freight.rb +3 -1
- data/lib/friendly_shipping/services/ups_json/access_token.rb +29 -0
- data/lib/friendly_shipping/services/ups_json/api_error.rb +29 -0
- data/lib/friendly_shipping/services/ups_json/generate_address_classification_payload.rb +29 -0
- data/lib/friendly_shipping/services/ups_json/generate_address_hash.rb +30 -0
- data/lib/friendly_shipping/services/ups_json/generate_labels_payload.rb +211 -0
- data/lib/friendly_shipping/services/ups_json/generate_package_hash.rb +76 -0
- data/lib/friendly_shipping/services/ups_json/generate_rates_payload.rb +86 -0
- data/lib/friendly_shipping/services/ups_json/generate_timings_payload.rb +44 -0
- data/lib/friendly_shipping/services/ups_json/label.rb +20 -0
- data/lib/friendly_shipping/services/ups_json/label_billing_options.rb +41 -0
- data/lib/friendly_shipping/services/ups_json/label_item_options.rb +77 -0
- data/lib/friendly_shipping/services/ups_json/label_options.rb +177 -0
- data/lib/friendly_shipping/services/ups_json/label_package_options.rb +51 -0
- data/lib/friendly_shipping/services/ups_json/parse_address_classification_response.rb +31 -0
- data/lib/friendly_shipping/services/ups_json/parse_json_response.rb +44 -0
- data/lib/friendly_shipping/services/ups_json/parse_labels_response.rb +71 -0
- data/lib/friendly_shipping/services/ups_json/parse_money_hash.rb +128 -0
- data/lib/friendly_shipping/services/ups_json/parse_rate_modifier_hash.rb +28 -0
- data/lib/friendly_shipping/services/ups_json/parse_rates_response.rb +105 -0
- data/lib/friendly_shipping/services/ups_json/parse_timings_response.rb +56 -0
- data/lib/friendly_shipping/services/ups_json/parse_void_response.rb +32 -0
- data/lib/friendly_shipping/services/ups_json/rates_item_options.rb +22 -0
- data/lib/friendly_shipping/services/ups_json/rates_options.rb +113 -0
- data/lib/friendly_shipping/services/ups_json/rates_package_options.rb +17 -0
- data/lib/friendly_shipping/services/ups_json/shipping_methods.rb +111 -0
- data/lib/friendly_shipping/services/ups_json/timings_options.rb +33 -0
- data/lib/friendly_shipping/services/ups_json.rb +216 -0
- data/lib/friendly_shipping/services/usps/choose_package_rate.rb +3 -3
- data/lib/friendly_shipping/services/usps/machinable_package.rb +1 -1
- data/lib/friendly_shipping/services/usps/parse_package_rate.rb +6 -6
- data/lib/friendly_shipping/services/usps/parse_time_in_transit_response.rb +6 -6
- data/lib/friendly_shipping/services/usps/rate_estimate_options.rb +1 -1
- data/lib/friendly_shipping/services/usps/rate_estimate_package_options.rb +6 -1
- data/lib/friendly_shipping/services/usps/serialize_rate_request.rb +2 -2
- data/lib/friendly_shipping/services/usps/shipping_methods.rb +4 -3
- data/lib/friendly_shipping/services/usps.rb +1 -1
- data/lib/friendly_shipping/services/usps_international/parse_package_rate.rb +3 -3
- data/lib/friendly_shipping/services/usps_international/rate_estimate_options.rb +1 -1
- data/lib/friendly_shipping/services/usps_international/serialize_rate_request.rb +1 -1
- data/lib/friendly_shipping/services/usps_international.rb +1 -1
- data/lib/friendly_shipping/services/usps_ship/access_token.rb +37 -0
- data/lib/friendly_shipping/services/usps_ship/api_error.rb +29 -0
- data/lib/friendly_shipping/services/usps_ship/machinable_package.rb +53 -0
- data/lib/friendly_shipping/services/usps_ship/parse_rate_estimates_response.rb +80 -0
- data/lib/friendly_shipping/services/usps_ship/parse_timings_response.rb +80 -0
- data/lib/friendly_shipping/services/usps_ship/rate_estimate_options.rb +45 -0
- data/lib/friendly_shipping/services/usps_ship/rate_estimate_package_options.rb +124 -0
- data/lib/friendly_shipping/services/usps_ship/serialize_rate_estimates_request.rb +55 -0
- data/lib/friendly_shipping/services/usps_ship/shipping_methods.rb +38 -0
- data/lib/friendly_shipping/services/{ship_engine_ltl/bad_request.rb → usps_ship/timing_options.rb} +2 -2
- data/lib/friendly_shipping/services/usps_ship.rb +199 -0
- data/lib/friendly_shipping/shipment_options.rb +13 -1
- data/lib/friendly_shipping/shipping_method.rb +38 -11
- data/lib/friendly_shipping/structure_options.rb +38 -0
- data/lib/friendly_shipping/timing.rb +42 -7
- data/lib/friendly_shipping/version.rb +1 -1
- data/lib/friendly_shipping.rb +6 -0
- metadata +140 -174
- data/lib/friendly_shipping/services/ship_engine/bad_request.rb +0 -29
- data/lib/friendly_shipping/services/ship_engine/bad_request_handler.rb +0 -33
- data/lib/friendly_shipping/services/ship_engine_ltl/bad_request_handler.rb +0 -33
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: friendly_shipping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Meyerhoff
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-05-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dry-monads
|
@@ -25,6 +25,20 @@ dependencies:
|
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: jwt
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '2.7'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '2.7'
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: money
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,20 +73,20 @@ dependencies:
|
|
59
73
|
requirements:
|
60
74
|
- - "~>"
|
61
75
|
- !ruby/object:Gem::Version
|
62
|
-
version: '0.
|
76
|
+
version: '0.5'
|
63
77
|
- - ">="
|
64
78
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.
|
79
|
+
version: 0.5.1
|
66
80
|
type: :runtime
|
67
81
|
prerelease: false
|
68
82
|
version_requirements: !ruby/object:Gem::Requirement
|
69
83
|
requirements:
|
70
84
|
- - "~>"
|
71
85
|
- !ruby/object:Gem::Version
|
72
|
-
version: '0.
|
86
|
+
version: '0.5'
|
73
87
|
- - ">="
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
89
|
+
version: 0.5.1
|
76
90
|
- !ruby/object:Gem::Dependency
|
77
91
|
name: rest-client
|
78
92
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,166 +101,6 @@ dependencies:
|
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '2.0'
|
90
|
-
- !ruby/object:Gem::Dependency
|
91
|
-
name: bundler
|
92
|
-
requirement: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 2.1.4
|
97
|
-
- - "<"
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '3'
|
100
|
-
type: :development
|
101
|
-
prerelease: false
|
102
|
-
version_requirements: !ruby/object:Gem::Requirement
|
103
|
-
requirements:
|
104
|
-
- - ">="
|
105
|
-
- !ruby/object:Gem::Version
|
106
|
-
version: 2.1.4
|
107
|
-
- - "<"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '3'
|
110
|
-
- !ruby/object:Gem::Dependency
|
111
|
-
name: dotenv
|
112
|
-
requirement: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - "~>"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '2.7'
|
117
|
-
type: :development
|
118
|
-
prerelease: false
|
119
|
-
version_requirements: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - "~>"
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '2.7'
|
124
|
-
- !ruby/object:Gem::Dependency
|
125
|
-
name: factory_bot
|
126
|
-
requirement: !ruby/object:Gem::Requirement
|
127
|
-
requirements:
|
128
|
-
- - "~>"
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '6.2'
|
131
|
-
type: :development
|
132
|
-
prerelease: false
|
133
|
-
version_requirements: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - "~>"
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '6.2'
|
138
|
-
- !ruby/object:Gem::Dependency
|
139
|
-
name: pry
|
140
|
-
requirement: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - "~>"
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '0.12'
|
145
|
-
type: :development
|
146
|
-
prerelease: false
|
147
|
-
version_requirements: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - "~>"
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '0.12'
|
152
|
-
- !ruby/object:Gem::Dependency
|
153
|
-
name: rake
|
154
|
-
requirement: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - ">="
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: 12.3.3
|
159
|
-
type: :development
|
160
|
-
prerelease: false
|
161
|
-
version_requirements: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - ">="
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: 12.3.3
|
166
|
-
- !ruby/object:Gem::Dependency
|
167
|
-
name: rspec
|
168
|
-
requirement: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - "~>"
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '3.0'
|
173
|
-
type: :development
|
174
|
-
prerelease: false
|
175
|
-
version_requirements: !ruby/object:Gem::Requirement
|
176
|
-
requirements:
|
177
|
-
- - "~>"
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: '3.0'
|
180
|
-
- !ruby/object:Gem::Dependency
|
181
|
-
name: rspec_junit_formatter
|
182
|
-
requirement: !ruby/object:Gem::Requirement
|
183
|
-
requirements:
|
184
|
-
- - "~>"
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
version: '0.4'
|
187
|
-
type: :development
|
188
|
-
prerelease: false
|
189
|
-
version_requirements: !ruby/object:Gem::Requirement
|
190
|
-
requirements:
|
191
|
-
- - "~>"
|
192
|
-
- !ruby/object:Gem::Version
|
193
|
-
version: '0.4'
|
194
|
-
- !ruby/object:Gem::Dependency
|
195
|
-
name: rubocop
|
196
|
-
requirement: !ruby/object:Gem::Requirement
|
197
|
-
requirements:
|
198
|
-
- - ">="
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
version: '0'
|
201
|
-
type: :development
|
202
|
-
prerelease: false
|
203
|
-
version_requirements: !ruby/object:Gem::Requirement
|
204
|
-
requirements:
|
205
|
-
- - ">="
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
version: '0'
|
208
|
-
- !ruby/object:Gem::Dependency
|
209
|
-
name: simplecov
|
210
|
-
requirement: !ruby/object:Gem::Requirement
|
211
|
-
requirements:
|
212
|
-
- - "~>"
|
213
|
-
- !ruby/object:Gem::Version
|
214
|
-
version: '0.17'
|
215
|
-
type: :development
|
216
|
-
prerelease: false
|
217
|
-
version_requirements: !ruby/object:Gem::Requirement
|
218
|
-
requirements:
|
219
|
-
- - "~>"
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: '0.17'
|
222
|
-
- !ruby/object:Gem::Dependency
|
223
|
-
name: vcr
|
224
|
-
requirement: !ruby/object:Gem::Requirement
|
225
|
-
requirements:
|
226
|
-
- - "~>"
|
227
|
-
- !ruby/object:Gem::Version
|
228
|
-
version: '6.0'
|
229
|
-
type: :development
|
230
|
-
prerelease: false
|
231
|
-
version_requirements: !ruby/object:Gem::Requirement
|
232
|
-
requirements:
|
233
|
-
- - "~>"
|
234
|
-
- !ruby/object:Gem::Version
|
235
|
-
version: '6.0'
|
236
|
-
- !ruby/object:Gem::Dependency
|
237
|
-
name: webmock
|
238
|
-
requirement: !ruby/object:Gem::Requirement
|
239
|
-
requirements:
|
240
|
-
- - "~>"
|
241
|
-
- !ruby/object:Gem::Version
|
242
|
-
version: '3.6'
|
243
|
-
type: :development
|
244
|
-
prerelease: false
|
245
|
-
version_requirements: !ruby/object:Gem::Requirement
|
246
|
-
requirements:
|
247
|
-
- - "~>"
|
248
|
-
- !ruby/object:Gem::Version
|
249
|
-
version: '3.6'
|
250
104
|
description: Allows you to quote or ship a Physical::Shipment object
|
251
105
|
email:
|
252
106
|
- mamhoff@gmail.com
|
@@ -257,12 +111,15 @@ files:
|
|
257
111
|
- ".circleci/config.yml"
|
258
112
|
- ".env.template"
|
259
113
|
- ".env.test"
|
114
|
+
- ".env.test.local.template"
|
260
115
|
- ".github/dependabot.yml"
|
261
116
|
- ".gitignore"
|
262
117
|
- ".rspec"
|
263
118
|
- ".rubocop-relaxed.yml"
|
264
119
|
- ".rubocop.yml"
|
120
|
+
- ".rubocop_todo.yml"
|
265
121
|
- ".travis.yml"
|
122
|
+
- ".yardopts"
|
266
123
|
- CHANGELOG.md
|
267
124
|
- CODE_OF_CONDUCT.md
|
268
125
|
- Gemfile
|
@@ -279,29 +136,62 @@ files:
|
|
279
136
|
- lib/friendly_shipping/api_result.rb
|
280
137
|
- lib/friendly_shipping/carrier.rb
|
281
138
|
- lib/friendly_shipping/http_client.rb
|
139
|
+
- lib/friendly_shipping/inflections.rb
|
282
140
|
- lib/friendly_shipping/item_options.rb
|
283
141
|
- lib/friendly_shipping/label.rb
|
284
142
|
- lib/friendly_shipping/package_options.rb
|
285
143
|
- lib/friendly_shipping/rate.rb
|
286
144
|
- lib/friendly_shipping/request.rb
|
287
145
|
- lib/friendly_shipping/response.rb
|
146
|
+
- lib/friendly_shipping/services/rl.rb
|
147
|
+
- lib/friendly_shipping/services/rl/api_error.rb
|
148
|
+
- lib/friendly_shipping/services/rl/bol_options.rb
|
149
|
+
- lib/friendly_shipping/services/rl/bol_packages_serializer.rb
|
150
|
+
- lib/friendly_shipping/services/rl/bol_structures_serializer.rb
|
151
|
+
- lib/friendly_shipping/services/rl/item_options.rb
|
152
|
+
- lib/friendly_shipping/services/rl/package_options.rb
|
153
|
+
- lib/friendly_shipping/services/rl/parse_create_bol_response.rb
|
154
|
+
- lib/friendly_shipping/services/rl/parse_invoice_response.rb
|
155
|
+
- lib/friendly_shipping/services/rl/parse_print_bol_response.rb
|
156
|
+
- lib/friendly_shipping/services/rl/parse_print_shipping_labels_response.rb
|
157
|
+
- lib/friendly_shipping/services/rl/parse_rate_quote_response.rb
|
158
|
+
- lib/friendly_shipping/services/rl/parse_transit_times_response.rb
|
159
|
+
- lib/friendly_shipping/services/rl/rate_quote_options.rb
|
160
|
+
- lib/friendly_shipping/services/rl/rate_quote_packages_serializer.rb
|
161
|
+
- lib/friendly_shipping/services/rl/rate_quote_structures_serializer.rb
|
162
|
+
- lib/friendly_shipping/services/rl/serialize_create_bol_request.rb
|
163
|
+
- lib/friendly_shipping/services/rl/serialize_location.rb
|
164
|
+
- lib/friendly_shipping/services/rl/serialize_rate_quote_request.rb
|
165
|
+
- lib/friendly_shipping/services/rl/serialize_transit_times_request.rb
|
166
|
+
- lib/friendly_shipping/services/rl/shipment_document.rb
|
167
|
+
- lib/friendly_shipping/services/rl/shipment_information.rb
|
168
|
+
- lib/friendly_shipping/services/rl/shipment_options.rb
|
169
|
+
- lib/friendly_shipping/services/rl/shipping_methods.rb
|
170
|
+
- lib/friendly_shipping/services/rl/structure_options.rb
|
288
171
|
- lib/friendly_shipping/services/ship_engine.rb
|
289
|
-
- lib/friendly_shipping/services/ship_engine/
|
290
|
-
- lib/friendly_shipping/services/ship_engine/
|
172
|
+
- lib/friendly_shipping/services/ship_engine/api_error.rb
|
173
|
+
- lib/friendly_shipping/services/ship_engine/customs_items_serializer.rb
|
291
174
|
- lib/friendly_shipping/services/ship_engine/label_customs_options.rb
|
292
175
|
- lib/friendly_shipping/services/ship_engine/label_item_options.rb
|
293
176
|
- lib/friendly_shipping/services/ship_engine/label_options.rb
|
294
177
|
- lib/friendly_shipping/services/ship_engine/label_package_options.rb
|
178
|
+
- lib/friendly_shipping/services/ship_engine/parse_address_validation_response.rb
|
295
179
|
- lib/friendly_shipping/services/ship_engine/parse_carrier_response.rb
|
296
180
|
- lib/friendly_shipping/services/ship_engine/parse_label_response.rb
|
297
|
-
- lib/friendly_shipping/services/ship_engine/
|
181
|
+
- lib/friendly_shipping/services/ship_engine/parse_rate_estimates_response.rb
|
182
|
+
- lib/friendly_shipping/services/ship_engine/parse_rates_response.rb
|
298
183
|
- lib/friendly_shipping/services/ship_engine/parse_void_response.rb
|
299
184
|
- lib/friendly_shipping/services/ship_engine/rate_estimates_options.rb
|
185
|
+
- lib/friendly_shipping/services/ship_engine/rates_item_options.rb
|
186
|
+
- lib/friendly_shipping/services/ship_engine/rates_options.rb
|
187
|
+
- lib/friendly_shipping/services/ship_engine/rates_package_options.rb
|
188
|
+
- lib/friendly_shipping/services/ship_engine/serialize_address_residential_indicator.rb
|
189
|
+
- lib/friendly_shipping/services/ship_engine/serialize_address_validation_request.rb
|
300
190
|
- lib/friendly_shipping/services/ship_engine/serialize_label_shipment.rb
|
301
191
|
- lib/friendly_shipping/services/ship_engine/serialize_rate_estimate_request.rb
|
192
|
+
- lib/friendly_shipping/services/ship_engine/serialize_rates_request.rb
|
302
193
|
- lib/friendly_shipping/services/ship_engine_ltl.rb
|
303
|
-
- lib/friendly_shipping/services/ship_engine_ltl/
|
304
|
-
- lib/friendly_shipping/services/ship_engine_ltl/bad_request_handler.rb
|
194
|
+
- lib/friendly_shipping/services/ship_engine_ltl/api_error.rb
|
305
195
|
- lib/friendly_shipping/services/ship_engine_ltl/item_options.rb
|
306
196
|
- lib/friendly_shipping/services/ship_engine_ltl/package_options.rb
|
307
197
|
- lib/friendly_shipping/services/ship_engine_ltl/parse_carrier_response.rb
|
@@ -309,6 +199,37 @@ files:
|
|
309
199
|
- lib/friendly_shipping/services/ship_engine_ltl/quote_options.rb
|
310
200
|
- lib/friendly_shipping/services/ship_engine_ltl/serialize_packages.rb
|
311
201
|
- lib/friendly_shipping/services/ship_engine_ltl/serialize_quote_request.rb
|
202
|
+
- lib/friendly_shipping/services/ship_engine_ltl/serialize_structures.rb
|
203
|
+
- lib/friendly_shipping/services/ship_engine_ltl/shipment_options.rb
|
204
|
+
- lib/friendly_shipping/services/ship_engine_ltl/structure_options.rb
|
205
|
+
- lib/friendly_shipping/services/tforce_freight.rb
|
206
|
+
- lib/friendly_shipping/services/tforce_freight/access_token.rb
|
207
|
+
- lib/friendly_shipping/services/tforce_freight/api_error.rb
|
208
|
+
- lib/friendly_shipping/services/tforce_freight/bol_options.rb
|
209
|
+
- lib/friendly_shipping/services/tforce_freight/document_options.rb
|
210
|
+
- lib/friendly_shipping/services/tforce_freight/generate_commodity_information.rb
|
211
|
+
- lib/friendly_shipping/services/tforce_freight/generate_create_bol_request_hash.rb
|
212
|
+
- lib/friendly_shipping/services/tforce_freight/generate_document_options_hash.rb
|
213
|
+
- lib/friendly_shipping/services/tforce_freight/generate_handling_units_hash.rb
|
214
|
+
- lib/friendly_shipping/services/tforce_freight/generate_location_hash.rb
|
215
|
+
- lib/friendly_shipping/services/tforce_freight/generate_pickup_request_hash.rb
|
216
|
+
- lib/friendly_shipping/services/tforce_freight/generate_rates_request_hash.rb
|
217
|
+
- lib/friendly_shipping/services/tforce_freight/generate_reference_hash.rb
|
218
|
+
- lib/friendly_shipping/services/tforce_freight/item_options.rb
|
219
|
+
- lib/friendly_shipping/services/tforce_freight/package_options.rb
|
220
|
+
- lib/friendly_shipping/services/tforce_freight/parse_create_bol_response.rb
|
221
|
+
- lib/friendly_shipping/services/tforce_freight/parse_pickup_response.rb
|
222
|
+
- lib/friendly_shipping/services/tforce_freight/parse_rates_response.rb
|
223
|
+
- lib/friendly_shipping/services/tforce_freight/parse_shipment_document.rb
|
224
|
+
- lib/friendly_shipping/services/tforce_freight/pickup_options.rb
|
225
|
+
- lib/friendly_shipping/services/tforce_freight/rates_item_options.rb
|
226
|
+
- lib/friendly_shipping/services/tforce_freight/rates_options.rb
|
227
|
+
- lib/friendly_shipping/services/tforce_freight/rates_package_options.rb
|
228
|
+
- lib/friendly_shipping/services/tforce_freight/shipment_document.rb
|
229
|
+
- lib/friendly_shipping/services/tforce_freight/shipment_information.rb
|
230
|
+
- lib/friendly_shipping/services/tforce_freight/shipment_options.rb
|
231
|
+
- lib/friendly_shipping/services/tforce_freight/shipping_methods.rb
|
232
|
+
- lib/friendly_shipping/services/tforce_freight/structure_options.rb
|
312
233
|
- lib/friendly_shipping/services/ups.rb
|
313
234
|
- lib/friendly_shipping/services/ups/label.rb
|
314
235
|
- lib/friendly_shipping/services/ups/label_billing_options.rb
|
@@ -318,6 +239,7 @@ files:
|
|
318
239
|
- lib/friendly_shipping/services/ups/parse_address_classification_response.rb
|
319
240
|
- lib/friendly_shipping/services/ups/parse_address_validation_response.rb
|
320
241
|
- lib/friendly_shipping/services/ups/parse_city_state_lookup_response.rb
|
242
|
+
- lib/friendly_shipping/services/ups/parse_modifier_element.rb
|
321
243
|
- lib/friendly_shipping/services/ups/parse_money_element.rb
|
322
244
|
- lib/friendly_shipping/services/ups/parse_rate_response.rb
|
323
245
|
- lib/friendly_shipping/services/ups/parse_shipment_accept_response.rb
|
@@ -348,6 +270,7 @@ files:
|
|
348
270
|
- lib/friendly_shipping/services/ups_freight/generate_email_options_hash.rb
|
349
271
|
- lib/friendly_shipping/services/ups_freight/generate_freight_rate_request_hash.rb
|
350
272
|
- lib/friendly_shipping/services/ups_freight/generate_freight_ship_request_hash.rb
|
273
|
+
- lib/friendly_shipping/services/ups_freight/generate_handling_units_hash.rb
|
351
274
|
- lib/friendly_shipping/services/ups_freight/generate_location_hash.rb
|
352
275
|
- lib/friendly_shipping/services/ups_freight/generate_pickup_options_hash.rb
|
353
276
|
- lib/friendly_shipping/services/ups_freight/generate_pickup_request_hash.rb
|
@@ -359,6 +282,7 @@ files:
|
|
359
282
|
- lib/friendly_shipping/services/ups_freight/label_options.rb
|
360
283
|
- lib/friendly_shipping/services/ups_freight/label_package_options.rb
|
361
284
|
- lib/friendly_shipping/services/ups_freight/label_pickup_options.rb
|
285
|
+
- lib/friendly_shipping/services/ups_freight/label_structure_options.rb
|
362
286
|
- lib/friendly_shipping/services/ups_freight/parse_freight_label_response.rb
|
363
287
|
- lib/friendly_shipping/services/ups_freight/parse_freight_rate_response.rb
|
364
288
|
- lib/friendly_shipping/services/ups_freight/parse_shipment_document.rb
|
@@ -366,9 +290,38 @@ files:
|
|
366
290
|
- lib/friendly_shipping/services/ups_freight/rates_item_options.rb
|
367
291
|
- lib/friendly_shipping/services/ups_freight/rates_options.rb
|
368
292
|
- lib/friendly_shipping/services/ups_freight/rates_package_options.rb
|
293
|
+
- lib/friendly_shipping/services/ups_freight/rates_structure_options.rb
|
369
294
|
- lib/friendly_shipping/services/ups_freight/shipment_document.rb
|
370
295
|
- lib/friendly_shipping/services/ups_freight/shipment_information.rb
|
296
|
+
- lib/friendly_shipping/services/ups_freight/shipment_options.rb
|
371
297
|
- lib/friendly_shipping/services/ups_freight/shipping_methods.rb
|
298
|
+
- lib/friendly_shipping/services/ups_json.rb
|
299
|
+
- lib/friendly_shipping/services/ups_json/access_token.rb
|
300
|
+
- lib/friendly_shipping/services/ups_json/api_error.rb
|
301
|
+
- lib/friendly_shipping/services/ups_json/generate_address_classification_payload.rb
|
302
|
+
- lib/friendly_shipping/services/ups_json/generate_address_hash.rb
|
303
|
+
- lib/friendly_shipping/services/ups_json/generate_labels_payload.rb
|
304
|
+
- lib/friendly_shipping/services/ups_json/generate_package_hash.rb
|
305
|
+
- lib/friendly_shipping/services/ups_json/generate_rates_payload.rb
|
306
|
+
- lib/friendly_shipping/services/ups_json/generate_timings_payload.rb
|
307
|
+
- lib/friendly_shipping/services/ups_json/label.rb
|
308
|
+
- lib/friendly_shipping/services/ups_json/label_billing_options.rb
|
309
|
+
- lib/friendly_shipping/services/ups_json/label_item_options.rb
|
310
|
+
- lib/friendly_shipping/services/ups_json/label_options.rb
|
311
|
+
- lib/friendly_shipping/services/ups_json/label_package_options.rb
|
312
|
+
- lib/friendly_shipping/services/ups_json/parse_address_classification_response.rb
|
313
|
+
- lib/friendly_shipping/services/ups_json/parse_json_response.rb
|
314
|
+
- lib/friendly_shipping/services/ups_json/parse_labels_response.rb
|
315
|
+
- lib/friendly_shipping/services/ups_json/parse_money_hash.rb
|
316
|
+
- lib/friendly_shipping/services/ups_json/parse_rate_modifier_hash.rb
|
317
|
+
- lib/friendly_shipping/services/ups_json/parse_rates_response.rb
|
318
|
+
- lib/friendly_shipping/services/ups_json/parse_timings_response.rb
|
319
|
+
- lib/friendly_shipping/services/ups_json/parse_void_response.rb
|
320
|
+
- lib/friendly_shipping/services/ups_json/rates_item_options.rb
|
321
|
+
- lib/friendly_shipping/services/ups_json/rates_options.rb
|
322
|
+
- lib/friendly_shipping/services/ups_json/rates_package_options.rb
|
323
|
+
- lib/friendly_shipping/services/ups_json/shipping_methods.rb
|
324
|
+
- lib/friendly_shipping/services/ups_json/timings_options.rb
|
372
325
|
- lib/friendly_shipping/services/usps.rb
|
373
326
|
- lib/friendly_shipping/services/usps/choose_package_rate.rb
|
374
327
|
- lib/friendly_shipping/services/usps/machinable_package.rb
|
@@ -393,15 +346,28 @@ files:
|
|
393
346
|
- lib/friendly_shipping/services/usps_international/rate_estimate_package_options.rb
|
394
347
|
- lib/friendly_shipping/services/usps_international/serialize_rate_request.rb
|
395
348
|
- lib/friendly_shipping/services/usps_international/shipping_methods.rb
|
349
|
+
- lib/friendly_shipping/services/usps_ship.rb
|
350
|
+
- lib/friendly_shipping/services/usps_ship/access_token.rb
|
351
|
+
- lib/friendly_shipping/services/usps_ship/api_error.rb
|
352
|
+
- lib/friendly_shipping/services/usps_ship/machinable_package.rb
|
353
|
+
- lib/friendly_shipping/services/usps_ship/parse_rate_estimates_response.rb
|
354
|
+
- lib/friendly_shipping/services/usps_ship/parse_timings_response.rb
|
355
|
+
- lib/friendly_shipping/services/usps_ship/rate_estimate_options.rb
|
356
|
+
- lib/friendly_shipping/services/usps_ship/rate_estimate_package_options.rb
|
357
|
+
- lib/friendly_shipping/services/usps_ship/serialize_rate_estimates_request.rb
|
358
|
+
- lib/friendly_shipping/services/usps_ship/shipping_methods.rb
|
359
|
+
- lib/friendly_shipping/services/usps_ship/timing_options.rb
|
396
360
|
- lib/friendly_shipping/shipment_options.rb
|
397
361
|
- lib/friendly_shipping/shipping_method.rb
|
362
|
+
- lib/friendly_shipping/structure_options.rb
|
398
363
|
- lib/friendly_shipping/timing.rb
|
399
364
|
- lib/friendly_shipping/types.rb
|
400
365
|
- lib/friendly_shipping/version.rb
|
401
366
|
homepage: https://github.com/friendlycart/friendly_shipping
|
402
367
|
licenses:
|
403
368
|
- MIT
|
404
|
-
metadata:
|
369
|
+
metadata:
|
370
|
+
rubygems_mfa_required: 'true'
|
405
371
|
post_install_message:
|
406
372
|
rdoc_options: []
|
407
373
|
require_paths:
|
@@ -410,14 +376,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
410
376
|
requirements:
|
411
377
|
- - ">="
|
412
378
|
- !ruby/object:Gem::Version
|
413
|
-
version: '
|
379
|
+
version: '3.0'
|
414
380
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
415
381
|
requirements:
|
416
382
|
- - ">="
|
417
383
|
- !ruby/object:Gem::Version
|
418
384
|
version: '0'
|
419
385
|
requirements: []
|
420
|
-
rubygems_version: 3.4.
|
386
|
+
rubygems_version: 3.4.20
|
421
387
|
signing_key:
|
422
388
|
specification_version: 4
|
423
389
|
summary: An integration layer for shipping services
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'json'
|
4
|
-
|
5
|
-
module FriendlyShipping
|
6
|
-
module Services
|
7
|
-
class ShipEngine
|
8
|
-
class BadRequest < StandardError
|
9
|
-
attr_reader :rest_error, :response
|
10
|
-
|
11
|
-
def initialize(rest_error)
|
12
|
-
@rest_error = rest_error
|
13
|
-
@response = rest_error.response
|
14
|
-
super parse_json_errors || rest_error
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def parse_json_errors
|
20
|
-
parsed_body = JSON.parse(response.body)
|
21
|
-
messages = parsed_body.fetch('errors')&.map { |e| e.fetch('message') }
|
22
|
-
messages&.join(', ')
|
23
|
-
rescue JSON::ParserError, KeyError => _e
|
24
|
-
nil
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'friendly_shipping/services/ship_engine/bad_request'
|
4
|
-
|
5
|
-
module FriendlyShipping
|
6
|
-
module Services
|
7
|
-
class ShipEngine
|
8
|
-
class BadRequestHandler
|
9
|
-
extend Dry::Monads::Result::Mixin
|
10
|
-
|
11
|
-
def self.call(error, original_request: nil, original_response: nil)
|
12
|
-
if error.http_code == 400
|
13
|
-
Failure(
|
14
|
-
ApiFailure.new(
|
15
|
-
BadRequest.new(error),
|
16
|
-
original_request: original_request,
|
17
|
-
original_response: original_response
|
18
|
-
)
|
19
|
-
)
|
20
|
-
else
|
21
|
-
Failure(
|
22
|
-
ApiFailure.new(
|
23
|
-
error,
|
24
|
-
original_request: original_request,
|
25
|
-
original_response: original_response
|
26
|
-
)
|
27
|
-
)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'friendly_shipping/services/ship_engine_ltl/bad_request'
|
4
|
-
|
5
|
-
module FriendlyShipping
|
6
|
-
module Services
|
7
|
-
class ShipEngineLTL
|
8
|
-
class BadRequestHandler
|
9
|
-
extend Dry::Monads::Result::Mixin
|
10
|
-
|
11
|
-
def self.call(error, original_request: nil, original_response: nil)
|
12
|
-
if error.http_code == 400
|
13
|
-
Failure(
|
14
|
-
ApiFailure.new(
|
15
|
-
BadRequest.new(error),
|
16
|
-
original_request: original_request,
|
17
|
-
original_response: original_response
|
18
|
-
)
|
19
|
-
)
|
20
|
-
else
|
21
|
-
Failure(
|
22
|
-
ApiFailure.new(
|
23
|
-
error,
|
24
|
-
original_request: original_request,
|
25
|
-
original_response: original_response
|
26
|
-
)
|
27
|
-
)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|