easypost 3.5.1 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +9 -0
- data/.github/CODEOWNERS +2 -0
- data/.github/ISSUE_TEMPLATE/bug_report.yml +81 -0
- data/.github/ISSUE_TEMPLATE/feature_request.yml +37 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +22 -0
- data/.github/workflows/ci.yml +54 -5
- data/.gitignore +27 -17
- data/.gitmodules +3 -0
- data/CHANGELOG.md +295 -119
- data/Gemfile +2 -0
- data/Makefile +70 -0
- data/README.md +184 -72
- data/Rakefile +2 -1
- data/UPGRADE_GUIDE.md +181 -0
- data/VERSION +1 -1
- data/bin/easypost-irb +5 -3
- data/easypost.gemspec +27 -20
- data/lib/easypost/client.rb +179 -0
- data/lib/easypost/connection.rb +64 -0
- data/lib/easypost/constants.rb +15 -0
- data/lib/easypost/errors/api/api_error.rb +108 -0
- data/lib/easypost/errors/api/bad_request_error.rb +6 -0
- data/lib/easypost/errors/api/connection_error.rb +6 -0
- data/lib/easypost/errors/api/external_api_error.rb +18 -0
- data/lib/easypost/errors/api/forbidden_error.rb +6 -0
- data/lib/easypost/errors/api/gateway_timeout_error.rb +6 -0
- data/lib/easypost/errors/api/internal_server_error.rb +6 -0
- data/lib/easypost/errors/api/invalid_request_error.rb +6 -0
- data/lib/easypost/errors/api/method_not_allowed_error.rb +6 -0
- data/lib/easypost/errors/api/not_found_error.rb +6 -0
- data/lib/easypost/errors/api/payment_error.rb +6 -0
- data/lib/easypost/errors/api/proxy_error.rb +6 -0
- data/lib/easypost/errors/api/rate_limit_error.rb +6 -0
- data/lib/easypost/errors/api/redirect_error.rb +6 -0
- data/lib/easypost/errors/api/retry_error.rb +6 -0
- data/lib/easypost/errors/api/service_unavailable_error.rb +6 -0
- data/lib/easypost/errors/api/ssl_error.rb +6 -0
- data/lib/easypost/errors/api/timeout_error.rb +6 -0
- data/lib/easypost/errors/api/unauthorized_error.rb +6 -0
- data/lib/easypost/errors/api/unknown_api_error.rb +6 -0
- data/lib/easypost/errors/easy_post_error.rb +7 -0
- data/lib/easypost/errors/end_of_pagination_error.rb +7 -0
- data/lib/easypost/errors/filtering_error.rb +4 -0
- data/lib/easypost/errors/invalid_object_error.rb +4 -0
- data/lib/easypost/errors/invalid_parameter_error.rb +11 -0
- data/lib/easypost/errors/missing_parameter_error.rb +9 -0
- data/lib/easypost/errors/signature_verification_error.rb +4 -0
- data/lib/easypost/errors.rb +32 -0
- data/lib/easypost/hooks/request_context.rb +16 -0
- data/lib/easypost/hooks/response_context.rb +23 -0
- data/lib/easypost/hooks.rb +34 -0
- data/lib/easypost/http_client.rb +117 -0
- data/lib/easypost/internal_utilities.rb +66 -0
- data/lib/easypost/models/address.rb +5 -0
- data/lib/easypost/models/api_key.rb +5 -0
- data/lib/easypost/models/base.rb +58 -0
- data/lib/easypost/models/batch.rb +5 -0
- data/lib/easypost/models/brand.rb +5 -0
- data/lib/easypost/models/carbon_offset.rb +5 -0
- data/lib/easypost/models/carrier_account.rb +5 -0
- data/lib/easypost/models/carrier_type.rb +5 -0
- data/lib/easypost/models/customs_info.rb +5 -0
- data/lib/easypost/models/customs_item.rb +5 -0
- data/lib/easypost/models/end_shipper.rb +5 -0
- data/lib/easypost/models/error.rb +21 -0
- data/lib/easypost/models/event.rb +5 -0
- data/lib/easypost/models/insurance.rb +6 -0
- data/lib/easypost/models/order.rb +9 -0
- data/lib/easypost/models/parcel.rb +5 -0
- data/lib/easypost/models/payload.rb +5 -0
- data/lib/easypost/models/payment_method.rb +5 -0
- data/lib/easypost/models/pickup.rb +9 -0
- data/lib/easypost/models/pickup_rate.rb +5 -0
- data/lib/easypost/models/postage_label.rb +5 -0
- data/lib/easypost/models/rate.rb +5 -0
- data/lib/easypost/models/referral.rb +5 -0
- data/lib/easypost/models/refund.rb +5 -0
- data/lib/easypost/models/report.rb +5 -0
- data/lib/easypost/models/scan_form.rb +6 -0
- data/lib/easypost/models/shipment.rb +10 -0
- data/lib/easypost/models/tax_identifier.rb +6 -0
- data/lib/easypost/models/tracker.rb +5 -0
- data/lib/easypost/models/user.rb +5 -0
- data/lib/easypost/models/webhook.rb +6 -0
- data/lib/easypost/models.rb +36 -0
- data/lib/easypost/services/address.rb +50 -0
- data/lib/easypost/services/api_key.rb +8 -0
- data/lib/easypost/services/base.rb +27 -0
- data/lib/easypost/services/batch.rb +53 -0
- data/lib/easypost/services/beta_rate.rb +12 -0
- data/lib/easypost/services/beta_referral_customer.rb +40 -0
- data/lib/easypost/services/billing.rb +75 -0
- data/lib/easypost/services/carrier_account.rb +44 -0
- data/lib/easypost/services/carrier_metadata.rb +22 -0
- data/lib/easypost/services/carrier_type.rb +10 -0
- data/lib/easypost/services/customs_info.rb +17 -0
- data/lib/easypost/services/customs_item.rb +15 -0
- data/lib/easypost/services/end_shipper.rb +31 -0
- data/lib/easypost/services/event.rb +32 -0
- data/lib/easypost/services/insurance.rb +26 -0
- data/lib/easypost/services/order.rb +30 -0
- data/lib/easypost/services/parcel.rb +16 -0
- data/lib/easypost/services/pickup.rb +40 -0
- data/lib/easypost/services/rate.rb +8 -0
- data/lib/easypost/services/referral_customer.rb +103 -0
- data/lib/easypost/services/refund.rb +26 -0
- data/lib/easypost/services/report.rb +42 -0
- data/lib/easypost/services/scan_form.rb +25 -0
- data/lib/easypost/services/shipment.rb +106 -0
- data/lib/easypost/services/tracker.rb +38 -0
- data/lib/easypost/services/user.rb +66 -0
- data/lib/easypost/services/webhook.rb +34 -0
- data/lib/easypost/services.rb +33 -0
- data/lib/easypost/util.rb +160 -116
- data/lib/easypost/utilities/constants.rb +5 -0
- data/lib/easypost/utilities/json.rb +23 -0
- data/lib/easypost/utilities/static_mapper.rb +73 -0
- data/lib/easypost/utilities/system.rb +36 -0
- data/lib/easypost/version.rb +3 -1
- data/lib/easypost.rb +20 -143
- metadata +249 -46
- data/lib/easypost/address.rb +0 -58
- data/lib/easypost/api_key.rb +0 -2
- data/lib/easypost/batch.rb +0 -49
- data/lib/easypost/brand.rb +0 -9
- data/lib/easypost/carrier_account.rb +0 -5
- data/lib/easypost/carrier_type.rb +0 -2
- data/lib/easypost/customs_info.rb +0 -5
- data/lib/easypost/customs_item.rb +0 -5
- data/lib/easypost/error.rb +0 -31
- data/lib/easypost/event.rb +0 -7
- data/lib/easypost/insurance.rb +0 -2
- data/lib/easypost/object.rb +0 -151
- data/lib/easypost/order.rb +0 -28
- data/lib/easypost/parcel.rb +0 -2
- data/lib/easypost/pickup.rb +0 -26
- data/lib/easypost/pickup_rate.rb +0 -3
- data/lib/easypost/postage_label.rb +0 -2
- data/lib/easypost/print_job.rb +0 -2
- data/lib/easypost/printer.rb +0 -24
- data/lib/easypost/rate.rb +0 -2
- data/lib/easypost/refund.rb +0 -2
- data/lib/easypost/report.rb +0 -29
- data/lib/easypost/resource.rb +0 -75
- data/lib/easypost/scan_form.rb +0 -6
- data/lib/easypost/shipment.rb +0 -129
- data/lib/easypost/tax_identifier.rb +0 -2
- data/lib/easypost/tracker.rb +0 -7
- data/lib/easypost/user.rb +0 -56
- data/lib/easypost/webhook.rb +0 -29
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../models'
|
4
|
+
|
5
|
+
module EasyPost::InternalUtilities::StaticMapper
|
6
|
+
BY_PREFIX = {
|
7
|
+
'adr' => EasyPost::Models::Address,
|
8
|
+
'ak' => EasyPost::Models::ApiKey,
|
9
|
+
'bank' => EasyPost::Models::PaymentMethod,
|
10
|
+
'batch' => EasyPost::Models::Batch,
|
11
|
+
'brd' => EasyPost::Models::Brand,
|
12
|
+
'ca' => EasyPost::Models::CarrierAccount,
|
13
|
+
'card' => EasyPost::Models::PaymentMethod,
|
14
|
+
'cstinfo' => EasyPost::Models::CustomsInfo,
|
15
|
+
'cstitem' => EasyPost::Models::CustomsItem,
|
16
|
+
'es' => EasyPost::Models::EndShipper,
|
17
|
+
'evt' => EasyPost::Models::Event,
|
18
|
+
'hook' => EasyPost::Models::Webhook,
|
19
|
+
'ins' => EasyPost::Models::Insurance,
|
20
|
+
'order' => EasyPost::Models::Order,
|
21
|
+
'payload' => EasyPost::Models::Payload,
|
22
|
+
'pickup' => EasyPost::Models::Pickup,
|
23
|
+
'pickuprate' => EasyPost::Models::PickupRate,
|
24
|
+
'pl' => EasyPost::Models::PostageLabel,
|
25
|
+
'plrep' => EasyPost::Models::Report,
|
26
|
+
'prcl' => EasyPost::Models::Parcel,
|
27
|
+
'rate' => EasyPost::Models::Rate,
|
28
|
+
'refrep' => EasyPost::Models::Report,
|
29
|
+
'rfnd' => EasyPost::Models::Refund,
|
30
|
+
'sf' => EasyPost::Models::ScanForm,
|
31
|
+
'shp' => EasyPost::Models::Shipment,
|
32
|
+
'shpinvrep' => EasyPost::Models::Report,
|
33
|
+
'shprep' => EasyPost::Models::Report,
|
34
|
+
'trk' => EasyPost::Models::Tracker,
|
35
|
+
'trkrep' => EasyPost::Models::Report,
|
36
|
+
'user' => EasyPost::Models::User,
|
37
|
+
}.freeze
|
38
|
+
|
39
|
+
BY_TYPE = {
|
40
|
+
'Address' => EasyPost::Models::Address,
|
41
|
+
'ApiKey' => EasyPost::Models::ApiKey,
|
42
|
+
'BankAccount' => EasyPost::Models::PaymentMethod,
|
43
|
+
'Batch' => EasyPost::Models::Batch,
|
44
|
+
'Brand' => EasyPost::Models::Brand,
|
45
|
+
'CarbonOffset' => EasyPost::Models::CarbonOffset,
|
46
|
+
'CarrierAccount' => EasyPost::Models::CarrierAccount,
|
47
|
+
'CreditCard' => EasyPost::Models::PaymentMethod,
|
48
|
+
'CustomsInfo' => EasyPost::Models::CustomsInfo,
|
49
|
+
'CustomsItem' => EasyPost::Models::CustomsItem,
|
50
|
+
'EndShipper' => EasyPost::Models::EndShipper,
|
51
|
+
'Event' => EasyPost::Models::Event,
|
52
|
+
'Insurance' => EasyPost::Models::Insurance,
|
53
|
+
'Order' => EasyPost::Models::Order,
|
54
|
+
'Parcel' => EasyPost::Models::Parcel,
|
55
|
+
'PaymentLogReport' => EasyPost::Models::Report,
|
56
|
+
'Pickup' => EasyPost::Models::Pickup,
|
57
|
+
'PickupRate' => EasyPost::Models::PickupRate,
|
58
|
+
'PostageLabel' => EasyPost::Models::PostageLabel,
|
59
|
+
'Rate' => EasyPost::Models::Rate,
|
60
|
+
'Refund' => EasyPost::Models::Refund,
|
61
|
+
'RefundReport' => EasyPost::Models::Report,
|
62
|
+
'Report' => EasyPost::Models::Report,
|
63
|
+
'ScanForm' => EasyPost::Models::ScanForm,
|
64
|
+
'Shipment' => EasyPost::Models::Shipment,
|
65
|
+
'ShipmentInvoiceReport' => EasyPost::Models::Report,
|
66
|
+
'ShipmentReport' => EasyPost::Models::Report,
|
67
|
+
'TaxIdentifier' => EasyPost::Models::TaxIdentifier,
|
68
|
+
'Tracker' => EasyPost::Models::Tracker,
|
69
|
+
'TrackerReport' => EasyPost::Models::Report,
|
70
|
+
'User' => EasyPost::Models::User,
|
71
|
+
'Webhook' => EasyPost::Models::Webhook,
|
72
|
+
}.freeze
|
73
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EasyPost::InternalUtilities::System
|
4
|
+
def self.os_name
|
5
|
+
case RUBY_PLATFORM
|
6
|
+
when /linux/i
|
7
|
+
'Linux'
|
8
|
+
when /darwin/i
|
9
|
+
'Darwin'
|
10
|
+
when /cygwin|mswin|mingw|bccwin|wince|emx/i
|
11
|
+
'Windows'
|
12
|
+
else
|
13
|
+
'Unknown'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.os_version
|
18
|
+
Gem::Platform.local.version
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.os_arch
|
22
|
+
Gem::Platform.local.cpu
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.ruby_version
|
26
|
+
RUBY_VERSION
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.ruby_patchlevel
|
30
|
+
RUBY_PATCHLEVEL
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.lib_version
|
34
|
+
File.open(File.expand_path('../../VERSION', __dir__)).read.strip
|
35
|
+
end
|
36
|
+
end
|
data/lib/easypost/version.rb
CHANGED
data/lib/easypost.rb
CHANGED
@@ -1,154 +1,31 @@
|
|
1
|
-
|
2
|
-
require "cgi"
|
3
|
-
require "net/http"
|
1
|
+
# frozen_string_literal: true
|
4
2
|
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require "easypost/resource"
|
9
|
-
require "easypost/error"
|
10
|
-
|
11
|
-
# Resources
|
12
|
-
require "easypost/address"
|
13
|
-
require "easypost/api_key"
|
14
|
-
require "easypost/batch"
|
15
|
-
require "easypost/brand"
|
16
|
-
require "easypost/carrier_account"
|
17
|
-
require "easypost/carrier_type"
|
18
|
-
require "easypost/customs_info"
|
19
|
-
require "easypost/customs_item"
|
20
|
-
require "easypost/event"
|
21
|
-
require "easypost/insurance"
|
22
|
-
require "easypost/order"
|
23
|
-
require "easypost/parcel"
|
24
|
-
require "easypost/pickup_rate"
|
25
|
-
require "easypost/pickup"
|
26
|
-
require "easypost/postage_label"
|
27
|
-
require "easypost/print_job"
|
28
|
-
require "easypost/printer"
|
29
|
-
require "easypost/rate"
|
30
|
-
require "easypost/refund"
|
31
|
-
require "easypost/report"
|
32
|
-
require "easypost/scan_form"
|
33
|
-
require "easypost/shipment"
|
34
|
-
require "easypost/tax_identifier"
|
35
|
-
require "easypost/tracker"
|
36
|
-
require "easypost/user"
|
37
|
-
require "easypost/webhook"
|
3
|
+
require 'base64'
|
4
|
+
require 'cgi'
|
5
|
+
require 'net/http'
|
38
6
|
|
7
|
+
require 'easypost/version'
|
8
|
+
require 'easypost/connection'
|
39
9
|
require 'easypost/util'
|
40
10
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
def self.api_key=(api_key)
|
46
|
-
@api_key = api_key
|
47
|
-
end
|
48
|
-
|
49
|
-
def self.api_key
|
50
|
-
@api_key
|
51
|
-
end
|
52
|
-
|
53
|
-
def self.api_base=(api_base)
|
54
|
-
@api_base = api_base
|
55
|
-
end
|
56
|
-
|
57
|
-
def self.api_base
|
58
|
-
@api_base
|
59
|
-
end
|
60
|
-
|
61
|
-
def self.reset_http_config
|
62
|
-
@http_config = {
|
63
|
-
timeout: 60,
|
64
|
-
open_timeout: 30,
|
65
|
-
verify_ssl: OpenSSL::SSL::VERIFY_PEER,
|
66
|
-
}
|
67
|
-
|
68
|
-
ruby_version = Gem::Version.new(RUBY_VERSION)
|
69
|
-
if ruby_version >= Gem::Version.new("2.5.0")
|
70
|
-
@http_config[:min_version] = OpenSSL::SSL::TLS1_2_VERSION
|
71
|
-
else
|
72
|
-
@http_config[:ssl_version] = :TLSv1_2
|
73
|
-
end
|
74
|
-
|
75
|
-
@http_config
|
76
|
-
end
|
11
|
+
# Client
|
12
|
+
require 'easypost/client'
|
13
|
+
require 'easypost/http_client'
|
77
14
|
|
78
|
-
|
79
|
-
|
80
|
-
end
|
15
|
+
# Services
|
16
|
+
require 'easypost/services'
|
81
17
|
|
82
|
-
|
83
|
-
|
84
|
-
end
|
18
|
+
# Models
|
19
|
+
require 'easypost/models'
|
85
20
|
|
86
|
-
|
87
|
-
|
88
|
-
proxy_uri = URI(http_config[:proxy])
|
89
|
-
Net::HTTP.new(
|
90
|
-
uri.host,
|
91
|
-
uri.port,
|
92
|
-
proxy_uri.host,
|
93
|
-
proxy_uri.port,
|
94
|
-
proxy_uri.user,
|
95
|
-
proxy_uri.password
|
96
|
-
)
|
97
|
-
else
|
98
|
-
Net::HTTP.new(uri.host, uri.port)
|
99
|
-
end
|
100
|
-
client.use_ssl = true
|
21
|
+
# Exceptions
|
22
|
+
require 'easypost/errors'
|
101
23
|
|
102
|
-
|
103
|
-
|
104
|
-
if name == :verify_ssl
|
105
|
-
name = :verify_mode
|
106
|
-
elsif name == :timeout
|
107
|
-
name = :read_timeout
|
108
|
-
end
|
24
|
+
# Internal Utilities
|
25
|
+
require 'easypost/internal_utilities'
|
109
26
|
|
110
|
-
|
111
|
-
|
112
|
-
next
|
113
|
-
end
|
27
|
+
# Hooks
|
28
|
+
require 'easypost/hooks'
|
114
29
|
|
115
|
-
|
116
|
-
end
|
117
|
-
|
118
|
-
client
|
119
|
-
end
|
120
|
-
|
121
|
-
def self.make_request(method, path, api_key=nil, body=nil)
|
122
|
-
client = make_client(URI(@api_base))
|
123
|
-
|
124
|
-
request = Net::HTTP.const_get(method.capitalize).new(path)
|
125
|
-
if body
|
126
|
-
request.body = JSON.dump(EasyPost::Util.objects_to_ids(body))
|
127
|
-
end
|
128
|
-
|
129
|
-
request["Content-Type"] = "application/json"
|
130
|
-
request["User-Agent"] = "EasyPost/v2 RubyClient/#{EasyPost::VERSION} Ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} " \
|
131
|
-
"OS/#{EasyPost::Util.os_name} OSVersion/#{EasyPost::Util.os_version} " \
|
132
|
-
"OSArch/#{EasyPost::Util.os_arch}"
|
133
|
-
if api_key = api_key || @api_key
|
134
|
-
request["Authorization"] = "Basic #{Base64.strict_encode64("#{api_key}:")}"
|
135
|
-
end
|
136
|
-
|
137
|
-
response = client.request(request)
|
138
|
-
|
139
|
-
if (400..599).include? response.code.to_i
|
140
|
-
error = JSON.parse(response.body)["error"]
|
141
|
-
raise EasyPost::Error.new(error["message"], response.code.to_i, error["code"], error["errors"], response.body)
|
142
|
-
end
|
143
|
-
|
144
|
-
if response["Content-Type"].include? "application/json"
|
145
|
-
JSON.parse(response.body)
|
146
|
-
else
|
147
|
-
response.body
|
148
|
-
end
|
149
|
-
rescue JSON::ParserError
|
150
|
-
raise RuntimeError.new(
|
151
|
-
"Invalid response object from API, unable to decode.\n#{response.body}"
|
152
|
-
)
|
153
|
-
end
|
30
|
+
module EasyPost
|
154
31
|
end
|
metadata
CHANGED
@@ -1,31 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easypost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
- Andrew Tribone
|
9
|
-
- James Brown
|
7
|
+
- EasyPost Developers
|
10
8
|
autorequire:
|
11
9
|
bindir: bin
|
12
10
|
cert_chain: []
|
13
|
-
date:
|
11
|
+
date: 2023-09-14 00:00:00.000000000 Z
|
14
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: brakeman
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5.4'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5.4'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.7.5
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.7.5
|
15
41
|
- !ruby/object:Gem::Dependency
|
16
42
|
name: pry
|
17
43
|
requirement: !ruby/object:Gem::Requirement
|
18
44
|
requirements:
|
19
45
|
- - "~>"
|
20
46
|
- !ruby/object:Gem::Version
|
21
|
-
version: '0.
|
47
|
+
version: '0.14'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.14'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: psych
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.1'
|
22
62
|
type: :development
|
23
63
|
prerelease: false
|
24
64
|
version_requirements: !ruby/object:Gem::Requirement
|
25
65
|
requirements:
|
26
66
|
- - "~>"
|
27
67
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
68
|
+
version: '5.1'
|
29
69
|
- !ruby/object:Gem::Dependency
|
30
70
|
name: rake
|
31
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -40,97 +80,260 @@ dependencies:
|
|
40
80
|
- - "~>"
|
41
81
|
- !ruby/object:Gem::Version
|
42
82
|
version: '13.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rdoc
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '6.5'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '6.5'
|
43
97
|
- !ruby/object:Gem::Dependency
|
44
98
|
name: rspec
|
45
99
|
requirement: !ruby/object:Gem::Requirement
|
46
100
|
requirements:
|
47
101
|
- - "~>"
|
48
102
|
- !ruby/object:Gem::Version
|
49
|
-
version: '3.
|
103
|
+
version: '3.12'
|
50
104
|
type: :development
|
51
105
|
prerelease: false
|
52
106
|
version_requirements: !ruby/object:Gem::Requirement
|
53
107
|
requirements:
|
54
108
|
- - "~>"
|
55
109
|
- !ruby/object:Gem::Version
|
56
|
-
version: '3.
|
110
|
+
version: '3.12'
|
57
111
|
- !ruby/object:Gem::Dependency
|
58
|
-
name:
|
112
|
+
name: rubocop
|
59
113
|
requirement: !ruby/object:Gem::Requirement
|
60
114
|
requirements:
|
61
115
|
- - "~>"
|
62
116
|
- !ruby/object:Gem::Version
|
63
|
-
version: '
|
117
|
+
version: '1.49'
|
64
118
|
type: :development
|
65
119
|
prerelease: false
|
66
120
|
version_requirements: !ruby/object:Gem::Requirement
|
67
121
|
requirements:
|
68
122
|
- - "~>"
|
69
123
|
- !ruby/object:Gem::Version
|
70
|
-
version: '
|
124
|
+
version: '1.49'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '2.19'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '2.19'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.22'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.22'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: simplecov-lcov
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.8'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0.8'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: typhoeus
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 1.4.0
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 1.4.0
|
71
181
|
- !ruby/object:Gem::Dependency
|
72
182
|
name: vcr
|
73
183
|
requirement: !ruby/object:Gem::Requirement
|
74
184
|
requirements:
|
75
185
|
- - "~>"
|
76
186
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
187
|
+
version: '6.1'
|
78
188
|
type: :development
|
79
189
|
prerelease: false
|
80
190
|
version_requirements: !ruby/object:Gem::Requirement
|
81
191
|
requirements:
|
82
192
|
- - "~>"
|
83
193
|
- !ruby/object:Gem::Version
|
84
|
-
version: '
|
194
|
+
version: '6.1'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: webmock
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '3.18'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '3.18'
|
85
209
|
description: Client library for accessing the EasyPost shipping API via Ruby.
|
86
|
-
email:
|
210
|
+
email: oss@easypost.com
|
87
211
|
executables:
|
88
212
|
- easypost-irb
|
89
213
|
extensions: []
|
90
214
|
extra_rdoc_files: []
|
91
215
|
files:
|
216
|
+
- ".gitattributes"
|
217
|
+
- ".github/CODEOWNERS"
|
218
|
+
- ".github/ISSUE_TEMPLATE/bug_report.yml"
|
219
|
+
- ".github/ISSUE_TEMPLATE/feature_request.yml"
|
220
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
92
221
|
- ".github/workflows/ci.yml"
|
93
222
|
- ".gitignore"
|
223
|
+
- ".gitmodules"
|
94
224
|
- CHANGELOG.md
|
95
225
|
- Gemfile
|
96
226
|
- LICENSE
|
227
|
+
- Makefile
|
97
228
|
- README.md
|
98
229
|
- Rakefile
|
230
|
+
- UPGRADE_GUIDE.md
|
99
231
|
- VERSION
|
100
232
|
- bin/easypost-irb
|
101
233
|
- easypost.gemspec
|
102
234
|
- lib/easypost.rb
|
103
|
-
- lib/easypost/
|
104
|
-
- lib/easypost/
|
105
|
-
- lib/easypost/
|
106
|
-
- lib/easypost/
|
107
|
-
- lib/easypost/
|
108
|
-
- lib/easypost/
|
109
|
-
- lib/easypost/
|
110
|
-
- lib/easypost/
|
111
|
-
- lib/easypost/
|
112
|
-
- lib/easypost/
|
113
|
-
- lib/easypost/
|
114
|
-
- lib/easypost/
|
115
|
-
- lib/easypost/
|
116
|
-
- lib/easypost/
|
117
|
-
- lib/easypost/
|
118
|
-
- lib/easypost/
|
119
|
-
- lib/easypost/
|
120
|
-
- lib/easypost/
|
121
|
-
- lib/easypost/
|
122
|
-
- lib/easypost/
|
123
|
-
- lib/easypost/
|
124
|
-
- lib/easypost/
|
125
|
-
- lib/easypost/
|
126
|
-
- lib/easypost/
|
127
|
-
- lib/easypost/
|
128
|
-
- lib/easypost/
|
129
|
-
- lib/easypost/
|
130
|
-
- lib/easypost/
|
235
|
+
- lib/easypost/client.rb
|
236
|
+
- lib/easypost/connection.rb
|
237
|
+
- lib/easypost/constants.rb
|
238
|
+
- lib/easypost/errors.rb
|
239
|
+
- lib/easypost/errors/api/api_error.rb
|
240
|
+
- lib/easypost/errors/api/bad_request_error.rb
|
241
|
+
- lib/easypost/errors/api/connection_error.rb
|
242
|
+
- lib/easypost/errors/api/external_api_error.rb
|
243
|
+
- lib/easypost/errors/api/forbidden_error.rb
|
244
|
+
- lib/easypost/errors/api/gateway_timeout_error.rb
|
245
|
+
- lib/easypost/errors/api/internal_server_error.rb
|
246
|
+
- lib/easypost/errors/api/invalid_request_error.rb
|
247
|
+
- lib/easypost/errors/api/method_not_allowed_error.rb
|
248
|
+
- lib/easypost/errors/api/not_found_error.rb
|
249
|
+
- lib/easypost/errors/api/payment_error.rb
|
250
|
+
- lib/easypost/errors/api/proxy_error.rb
|
251
|
+
- lib/easypost/errors/api/rate_limit_error.rb
|
252
|
+
- lib/easypost/errors/api/redirect_error.rb
|
253
|
+
- lib/easypost/errors/api/retry_error.rb
|
254
|
+
- lib/easypost/errors/api/service_unavailable_error.rb
|
255
|
+
- lib/easypost/errors/api/ssl_error.rb
|
256
|
+
- lib/easypost/errors/api/timeout_error.rb
|
257
|
+
- lib/easypost/errors/api/unauthorized_error.rb
|
258
|
+
- lib/easypost/errors/api/unknown_api_error.rb
|
259
|
+
- lib/easypost/errors/easy_post_error.rb
|
260
|
+
- lib/easypost/errors/end_of_pagination_error.rb
|
261
|
+
- lib/easypost/errors/filtering_error.rb
|
262
|
+
- lib/easypost/errors/invalid_object_error.rb
|
263
|
+
- lib/easypost/errors/invalid_parameter_error.rb
|
264
|
+
- lib/easypost/errors/missing_parameter_error.rb
|
265
|
+
- lib/easypost/errors/signature_verification_error.rb
|
266
|
+
- lib/easypost/hooks.rb
|
267
|
+
- lib/easypost/hooks/request_context.rb
|
268
|
+
- lib/easypost/hooks/response_context.rb
|
269
|
+
- lib/easypost/http_client.rb
|
270
|
+
- lib/easypost/internal_utilities.rb
|
271
|
+
- lib/easypost/models.rb
|
272
|
+
- lib/easypost/models/address.rb
|
273
|
+
- lib/easypost/models/api_key.rb
|
274
|
+
- lib/easypost/models/base.rb
|
275
|
+
- lib/easypost/models/batch.rb
|
276
|
+
- lib/easypost/models/brand.rb
|
277
|
+
- lib/easypost/models/carbon_offset.rb
|
278
|
+
- lib/easypost/models/carrier_account.rb
|
279
|
+
- lib/easypost/models/carrier_type.rb
|
280
|
+
- lib/easypost/models/customs_info.rb
|
281
|
+
- lib/easypost/models/customs_item.rb
|
282
|
+
- lib/easypost/models/end_shipper.rb
|
283
|
+
- lib/easypost/models/error.rb
|
284
|
+
- lib/easypost/models/event.rb
|
285
|
+
- lib/easypost/models/insurance.rb
|
286
|
+
- lib/easypost/models/order.rb
|
287
|
+
- lib/easypost/models/parcel.rb
|
288
|
+
- lib/easypost/models/payload.rb
|
289
|
+
- lib/easypost/models/payment_method.rb
|
290
|
+
- lib/easypost/models/pickup.rb
|
291
|
+
- lib/easypost/models/pickup_rate.rb
|
292
|
+
- lib/easypost/models/postage_label.rb
|
293
|
+
- lib/easypost/models/rate.rb
|
294
|
+
- lib/easypost/models/referral.rb
|
295
|
+
- lib/easypost/models/refund.rb
|
296
|
+
- lib/easypost/models/report.rb
|
297
|
+
- lib/easypost/models/scan_form.rb
|
298
|
+
- lib/easypost/models/shipment.rb
|
299
|
+
- lib/easypost/models/tax_identifier.rb
|
300
|
+
- lib/easypost/models/tracker.rb
|
301
|
+
- lib/easypost/models/user.rb
|
302
|
+
- lib/easypost/models/webhook.rb
|
303
|
+
- lib/easypost/services.rb
|
304
|
+
- lib/easypost/services/address.rb
|
305
|
+
- lib/easypost/services/api_key.rb
|
306
|
+
- lib/easypost/services/base.rb
|
307
|
+
- lib/easypost/services/batch.rb
|
308
|
+
- lib/easypost/services/beta_rate.rb
|
309
|
+
- lib/easypost/services/beta_referral_customer.rb
|
310
|
+
- lib/easypost/services/billing.rb
|
311
|
+
- lib/easypost/services/carrier_account.rb
|
312
|
+
- lib/easypost/services/carrier_metadata.rb
|
313
|
+
- lib/easypost/services/carrier_type.rb
|
314
|
+
- lib/easypost/services/customs_info.rb
|
315
|
+
- lib/easypost/services/customs_item.rb
|
316
|
+
- lib/easypost/services/end_shipper.rb
|
317
|
+
- lib/easypost/services/event.rb
|
318
|
+
- lib/easypost/services/insurance.rb
|
319
|
+
- lib/easypost/services/order.rb
|
320
|
+
- lib/easypost/services/parcel.rb
|
321
|
+
- lib/easypost/services/pickup.rb
|
322
|
+
- lib/easypost/services/rate.rb
|
323
|
+
- lib/easypost/services/referral_customer.rb
|
324
|
+
- lib/easypost/services/refund.rb
|
325
|
+
- lib/easypost/services/report.rb
|
326
|
+
- lib/easypost/services/scan_form.rb
|
327
|
+
- lib/easypost/services/shipment.rb
|
328
|
+
- lib/easypost/services/tracker.rb
|
329
|
+
- lib/easypost/services/user.rb
|
330
|
+
- lib/easypost/services/webhook.rb
|
131
331
|
- lib/easypost/util.rb
|
332
|
+
- lib/easypost/utilities/constants.rb
|
333
|
+
- lib/easypost/utilities/json.rb
|
334
|
+
- lib/easypost/utilities/static_mapper.rb
|
335
|
+
- lib/easypost/utilities/system.rb
|
132
336
|
- lib/easypost/version.rb
|
133
|
-
- lib/easypost/webhook.rb
|
134
337
|
homepage: https://www.easypost.com/docs
|
135
338
|
licenses:
|
136
339
|
- MIT
|
@@ -143,14 +346,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
143
346
|
requirements:
|
144
347
|
- - ">="
|
145
348
|
- !ruby/object:Gem::Version
|
146
|
-
version: '2.
|
349
|
+
version: '2.6'
|
147
350
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
351
|
requirements:
|
149
352
|
- - ">="
|
150
353
|
- !ruby/object:Gem::Version
|
151
354
|
version: '0'
|
152
355
|
requirements: []
|
153
|
-
rubygems_version: 3.
|
356
|
+
rubygems_version: 3.4.10
|
154
357
|
signing_key:
|
155
358
|
specification_version: 4
|
156
359
|
summary: EasyPost Ruby Client Library
|