easypost 4.8.1 → 4.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +5 -0
- data/.github/workflows/ci.yml +8 -0
- data/.gitignore +10 -14
- data/CHANGELOG.md +12 -0
- data/Makefile +10 -2
- data/README.md +7 -3
- data/VERSION +1 -1
- data/docs/EasyPost/Address.html +222 -0
- data/docs/EasyPost/ApiKey.html +99 -0
- data/docs/EasyPost/Batch.html +269 -0
- data/docs/EasyPost/Beta/EndShipper.html +225 -0
- data/docs/EasyPost/Beta/Referral.html +338 -0
- data/docs/EasyPost/Beta.html +91 -0
- data/docs/EasyPost/Billing.html +253 -0
- data/docs/EasyPost/Brand.html +140 -0
- data/docs/EasyPost/CarbonOffset.html +99 -0
- data/docs/EasyPost/CarrierAccount.html +136 -0
- data/docs/EasyPost/CarrierType.html +99 -0
- data/docs/EasyPost/CustomsInfo.html +136 -0
- data/docs/EasyPost/CustomsItem.html +136 -0
- data/docs/EasyPost/EasyPostObject.html +662 -0
- data/docs/EasyPost/EndShipper.html +175 -0
- data/docs/EasyPost/Error.html +258 -0
- data/docs/EasyPost/Event.html +136 -0
- data/docs/EasyPost/Insurance.html +99 -0
- data/docs/EasyPost/Order.html +222 -0
- data/docs/EasyPost/Parcel.html +136 -0
- data/docs/EasyPost/PaymentMethod.html +137 -0
- data/docs/EasyPost/Pickup.html +222 -0
- data/docs/EasyPost/PickupRate.html +99 -0
- data/docs/EasyPost/PostageLabel.html +99 -0
- data/docs/EasyPost/Rate.html +136 -0
- data/docs/EasyPost/Referral.html +334 -0
- data/docs/EasyPost/Refund.html +99 -0
- data/docs/EasyPost/Report.html +167 -0
- data/docs/EasyPost/Resource.html +399 -0
- data/docs/EasyPost/ScanForm.html +137 -0
- data/docs/EasyPost/Shipment.html +456 -0
- data/docs/EasyPost/TaxIdentifier.html +99 -0
- data/docs/EasyPost/Tracker.html +139 -0
- data/docs/EasyPost/User.html +307 -0
- data/docs/EasyPost/Util.html +462 -0
- data/docs/EasyPost/Webhook.html +221 -0
- data/docs/EasyPost.html +440 -0
- data/docs/created.rid +40 -0
- data/docs/css/fonts.css +167 -0
- data/docs/css/rdoc.css +639 -0
- data/docs/fonts/Lato-Light.ttf +0 -0
- data/docs/fonts/Lato-LightItalic.ttf +0 -0
- data/docs/fonts/Lato-Regular.ttf +0 -0
- data/docs/fonts/Lato-RegularItalic.ttf +0 -0
- data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
- data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
- data/docs/images/add.png +0 -0
- data/docs/images/arrow_up.png +0 -0
- data/docs/images/brick.png +0 -0
- data/docs/images/brick_link.png +0 -0
- data/docs/images/bug.png +0 -0
- data/docs/images/bullet_black.png +0 -0
- data/docs/images/bullet_toggle_minus.png +0 -0
- data/docs/images/bullet_toggle_plus.png +0 -0
- data/docs/images/date.png +0 -0
- data/docs/images/delete.png +0 -0
- data/docs/images/find.png +0 -0
- data/docs/images/loadingAnimation.gif +0 -0
- data/docs/images/macFFBgHack.png +0 -0
- data/docs/images/package.png +0 -0
- data/docs/images/page_green.png +0 -0
- data/docs/images/page_white_text.png +0 -0
- data/docs/images/page_white_width.png +0 -0
- data/docs/images/plugin.png +0 -0
- data/docs/images/ruby.png +0 -0
- data/docs/images/tag_blue.png +0 -0
- data/docs/images/tag_green.png +0 -0
- data/docs/images/transparent.png +0 -0
- data/docs/images/wrench.png +0 -0
- data/docs/images/wrench_orange.png +0 -0
- data/docs/images/zoom.png +0 -0
- data/docs/index.html +117 -0
- data/docs/js/darkfish.js +84 -0
- data/docs/js/navigation.js +105 -0
- data/docs/js/navigation.js.gz +0 -0
- data/docs/js/search.js +110 -0
- data/docs/js/search_index.js +1 -0
- data/docs/js/search_index.js.gz +0 -0
- data/docs/js/searcher.js +229 -0
- data/docs/js/searcher.js.gz +0 -0
- data/docs/table_of_contents.html +785 -0
- data/easypost.gemspec +3 -1
- data/lib/easypost/beta/payment_refund.rb +5 -0
- data/lib/easypost/beta/referral.rb +52 -4
- data/lib/easypost/carrier_account.rb +17 -0
- data/lib/easypost/payment_method.rb +2 -1
- data/lib/easypost/referral.rb +4 -4
- data/lib/easypost/shipment.rb +1 -1
- data/lib/easypost/user.rb +5 -2
- data/lib/easypost/util.rb +21 -12
- metadata +117 -11
- data/CODE_OF_CONDUCT.md +0 -16
- data/CONTRIBUTING.md +0 -47
- data/SECURITY.md +0 -7
- data/SUPPORT.md +0 -3
data/easypost.gemspec
CHANGED
@@ -23,10 +23,12 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_development_dependency 'brakeman', '~> 5.2'
|
25
25
|
spec.add_development_dependency 'pry', '~> 0.14'
|
26
|
+
spec.add_development_dependency 'psych', '~> 4.0' # TODO: pinned because rdoc has an optimistic pin of this dep and 5.0 breaks on CI
|
26
27
|
spec.add_development_dependency 'rake', '~> 13.0'
|
28
|
+
spec.add_development_dependency 'rdoc', '~> 6.4'
|
27
29
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
28
30
|
spec.add_development_dependency 'rubocop', '= 1.27' # rubocop 1.28 requires Ruby 2.6+
|
29
|
-
spec.add_development_dependency 'rubocop-rspec', '
|
31
|
+
spec.add_development_dependency 'rubocop-rspec', '= 2.10' # rubocop-rspec 2.11 requires Ruby 2.6+
|
30
32
|
spec.add_development_dependency 'simplecov', '~> 0.21'
|
31
33
|
spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
|
32
34
|
spec.add_development_dependency 'vcr', '= 6.0' # VCR 6.1 requires Ruby 2.6+
|
@@ -55,7 +55,7 @@ class EasyPost::Beta::Referral < EasyPost::Resource
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
# Create a referral
|
58
|
+
# Create a referral customer. This function requires the Partner User's API key.
|
59
59
|
# <b>DEPRECATED:</b> Please use <tt>Referral</tt> in the main namespace instead.
|
60
60
|
def self.create(params = {}, api_key = nil)
|
61
61
|
warn '[DEPRECATION] Please use `Referral.create` in the main namespace instead.'
|
@@ -63,7 +63,7 @@ class EasyPost::Beta::Referral < EasyPost::Resource
|
|
63
63
|
EasyPost::Util.convert_to_easypost_object(response, api_key)
|
64
64
|
end
|
65
65
|
|
66
|
-
# Update a referral
|
66
|
+
# Update a referral customer. This function requires the Partner User's API key.
|
67
67
|
# <b>DEPRECATED:</b> Please use <tt>Referral</tt> in the main namespace instead.
|
68
68
|
def self.update_email(email, user_id, api_key = nil)
|
69
69
|
warn '[DEPRECATION] Please use `Referral.update_email` in the main namespace instead.'
|
@@ -78,7 +78,7 @@ class EasyPost::Beta::Referral < EasyPost::Resource
|
|
78
78
|
true
|
79
79
|
end
|
80
80
|
|
81
|
-
# Retrieve a list of referral
|
81
|
+
# Retrieve a list of referral customers. This function requires the Partner User's API key.
|
82
82
|
# <b>DEPRECATED:</b> Please use <tt>Referral</tt> in the main namespace instead.
|
83
83
|
def self.all(params = {}, api_key = nil)
|
84
84
|
warn '[DEPRECATION] Please use `Referral.all` in the main namespace instead.'
|
@@ -86,7 +86,7 @@ class EasyPost::Beta::Referral < EasyPost::Resource
|
|
86
86
|
EasyPost::Util.convert_to_easypost_object(response, api_key)
|
87
87
|
end
|
88
88
|
|
89
|
-
# Add credit card to a referral
|
89
|
+
# Add credit card to a referral customer. This function requires the Referral Customer's API key.
|
90
90
|
# <b>DEPRECATED:</b> Please use <tt>Referral</tt> in the main namespace instead.
|
91
91
|
def self.add_credit_card(referral_api_key, number, expiration_month, expiration_year, cvc, priority = 'primary')
|
92
92
|
warn '[DEPRECATION] Please use `Referral.add_credit_card` in the main namespace instead.'
|
@@ -107,4 +107,52 @@ class EasyPost::Beta::Referral < EasyPost::Resource
|
|
107
107
|
response = create_easypost_credit_card(referral_api_key, stripe_credit_card_token, priority)
|
108
108
|
EasyPost::Util.convert_to_easypost_object(response, referral_api_key)
|
109
109
|
end
|
110
|
+
|
111
|
+
# Add a Stripe payment method to a Referral Customer. This function requires the Referral Customer's API key.
|
112
|
+
# @param [String] stripe_customer_id Unique customer ID provided by Stripe.
|
113
|
+
# @param [String] payment_method_reference ID of the card or bank account provided by Stripe.
|
114
|
+
# @param [String] payment_method_type Which priority to save this payment method as on EasyPost, either 'primary' or 'secondary'.
|
115
|
+
# @param [String] api_key Override the API key used for this request.
|
116
|
+
# @return [EasyPost::PaymentMethod] The newly-added payment method.
|
117
|
+
# noinspection RubyParameterNamingConvention
|
118
|
+
def self.add_payment_method(stripe_customer_id, payment_method_reference, priority = 'primary', api_key = nil)
|
119
|
+
wrapped_params = {
|
120
|
+
payment_method: {
|
121
|
+
stripe_customer_id: stripe_customer_id,
|
122
|
+
payment_method_reference: payment_method_reference,
|
123
|
+
priority: priority.downcase,
|
124
|
+
},
|
125
|
+
}
|
126
|
+
response = EasyPost.make_request(:post, '/beta/referral_customers/payment_method', api_key, wrapped_params)
|
127
|
+
# noinspection RubyMismatchedReturnType
|
128
|
+
EasyPost::Util.convert_to_easypost_object(response, api_key)
|
129
|
+
end
|
130
|
+
|
131
|
+
# Refund a Referral Customer's wallet by a specified amount. Refund will be issued to the user's original payment method.
|
132
|
+
# This function requires the Referral Customer's API key.
|
133
|
+
# @param [Integer] amount The amount to refund, in cents.
|
134
|
+
# @param [String] api_key Override the API key used for this request.
|
135
|
+
# @return [EasyPost::Beta::PaymentRefund] The newly-created refund.
|
136
|
+
def self.refund_by_amount(amount, api_key = nil)
|
137
|
+
params = {
|
138
|
+
refund_amount: amount,
|
139
|
+
}
|
140
|
+
response = EasyPost.make_request(:post, '/beta/referral_customers/refunds', api_key, params)
|
141
|
+
# noinspection RubyMismatchedReturnType
|
142
|
+
EasyPost::Util.convert_to_easypost_object(response, api_key) # TODO: Needs "object" or ID prefix to determine object class.
|
143
|
+
end
|
144
|
+
|
145
|
+
# Refund a Referral Customer's wallet for a specified payment log entry. Refund will be issued to the user's original payment method.
|
146
|
+
# This function requires the Referral Customer's API key.
|
147
|
+
# @param [String] payment_log_id Payment log ID to refund.
|
148
|
+
# @param [String] api_key Override the API key used for this request.
|
149
|
+
# @return [EasyPost::Beta::PaymentRefund] The newly-created refund.
|
150
|
+
def self.refund_by_payment_log(payment_log_id, api_key = nil)
|
151
|
+
params = {
|
152
|
+
payment_log_id: payment_log_id,
|
153
|
+
}
|
154
|
+
response = EasyPost.make_request(:post, '/beta/referral_customers/refunds', api_key, params)
|
155
|
+
# noinspection RubyMismatchedReturnType
|
156
|
+
EasyPost::Util.convert_to_easypost_object(response, api_key) # TODO: Needs "object" or ID prefix to determine object class.
|
157
|
+
end
|
110
158
|
end
|
@@ -2,8 +2,25 @@
|
|
2
2
|
|
3
3
|
# A CarrierAccount encapsulates your credentials with the carrier.
|
4
4
|
class EasyPost::CarrierAccount < EasyPost::Resource
|
5
|
+
CUSTOM_WORKFLOW_CARRIER_TYPES = %w[UpsAccount FedexAccount].freeze
|
6
|
+
|
5
7
|
# Retrieve a list of available CarrierAccount types for the authenticated User.
|
6
8
|
def self.types
|
7
9
|
EasyPost::CarrierType.all
|
8
10
|
end
|
11
|
+
|
12
|
+
def self.create(params = {}, api_key = nil)
|
13
|
+
wrapped_params = {}
|
14
|
+
wrapped_params[class_name.to_sym] = params
|
15
|
+
|
16
|
+
# For Ups and Fedex the endpoint is different
|
17
|
+
create_url = if CUSTOM_WORKFLOW_CARRIER_TYPES.include?(params[:type])
|
18
|
+
"#{url}/register"
|
19
|
+
else
|
20
|
+
url
|
21
|
+
end
|
22
|
+
|
23
|
+
response = EasyPost.make_request(:post, create_url, api_key, wrapped_params)
|
24
|
+
EasyPost::Util.convert_to_easypost_object(response, api_key)
|
25
|
+
end
|
9
26
|
end
|
@@ -2,7 +2,8 @@
|
|
2
2
|
|
3
3
|
# PaymentMethod objects represent a payment method of a user.
|
4
4
|
class EasyPost::PaymentMethod < EasyPost::Resource
|
5
|
-
#
|
5
|
+
# List all payment methods associated with the current user.
|
6
|
+
# <b>DEPRECATED:</b> Please use <tt>Billing.retrieve_payment_methods</tt> instead.
|
6
7
|
# Deprecated: v4.5.0 - v6.0.0
|
7
8
|
def self.all(_filters = {}, api_key = nil)
|
8
9
|
warn '[DEPRECATION] `all` is deprecated. Please use `Billing.retrieve_payment_methods` instead.'
|
data/lib/easypost/referral.rb
CHANGED
@@ -55,13 +55,13 @@ class EasyPost::Referral < EasyPost::Resource
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
# Create a referral
|
58
|
+
# Create a referral customer. This function requires the Partner User's API key.
|
59
59
|
def self.create(params = {}, api_key = nil)
|
60
60
|
response = EasyPost.make_request(:post, '/v2/referral_customers', api_key, { user: params })
|
61
61
|
EasyPost::Util.convert_to_easypost_object(response, api_key)
|
62
62
|
end
|
63
63
|
|
64
|
-
# Update a referral
|
64
|
+
# Update a referral customer. This function requires the Partner User's API key.
|
65
65
|
def self.update_email(email, user_id, api_key = nil)
|
66
66
|
wrapped_params = {
|
67
67
|
user: {
|
@@ -74,13 +74,13 @@ class EasyPost::Referral < EasyPost::Resource
|
|
74
74
|
true
|
75
75
|
end
|
76
76
|
|
77
|
-
# Retrieve a list of referral
|
77
|
+
# Retrieve a list of referral customers. This function requires the Partner User's API key.
|
78
78
|
def self.all(params = {}, api_key = nil)
|
79
79
|
response = EasyPost.make_request(:get, '/v2/referral_customers', api_key, params)
|
80
80
|
EasyPost::Util.convert_to_easypost_object(response, api_key)
|
81
81
|
end
|
82
82
|
|
83
|
-
# Add credit card to a referral
|
83
|
+
# Add credit card to a referral customer. This function requires the Referral Customer's API key.
|
84
84
|
def self.add_credit_card(referral_api_key, number, expiration_month, expiration_year, cvc, priority = 'primary')
|
85
85
|
easypost_stripe_api_key = retrieve_easypost_stripe_api_key
|
86
86
|
|
data/lib/easypost/shipment.rb
CHANGED
@@ -75,7 +75,7 @@ class EasyPost::Shipment < EasyPost::Resource
|
|
75
75
|
|
76
76
|
# Refund a Shipment.
|
77
77
|
def refund(params = {})
|
78
|
-
response = EasyPost.make_request(:
|
78
|
+
response = EasyPost.make_request(:post, "#{url}/refund", @api_key, params)
|
79
79
|
refresh_from(response, @api_key)
|
80
80
|
|
81
81
|
self
|
data/lib/easypost/user.rb
CHANGED
@@ -33,18 +33,21 @@ class EasyPost::User < EasyPost::Resource
|
|
33
33
|
all
|
34
34
|
end
|
35
35
|
|
36
|
-
# Retrieve a list of ApiKey objects.
|
36
|
+
# Retrieve a list of all ApiKey objects.
|
37
37
|
def self.all_api_keys
|
38
38
|
EasyPost::ApiKey.all
|
39
39
|
end
|
40
40
|
|
41
|
-
# Retrieve a list of ApiKey objects
|
41
|
+
# Retrieve a list of ApiKey objects (works for the authenticated user or a child user).
|
42
42
|
def api_keys
|
43
43
|
api_keys = EasyPost::User.all_api_keys
|
44
44
|
|
45
45
|
if api_keys.id == id
|
46
|
+
# This function was called on the authenticated user
|
46
47
|
my_api_keys = api_keys.keys
|
47
48
|
else
|
49
|
+
# This function was called on a child user (authenticated as parent, only return this child user's details).
|
50
|
+
my_api_keys = []
|
48
51
|
api_keys.children.each do |child|
|
49
52
|
if child.id == id
|
50
53
|
my_api_keys = child.keys
|
data/lib/easypost/util.rb
CHANGED
@@ -5,10 +5,13 @@ module EasyPost::Util
|
|
5
5
|
attr_accessor :os_name, :os_version, :os_arch
|
6
6
|
|
7
7
|
BY_PREFIX = {
|
8
|
+
'ak' => EasyPost::ApiKey,
|
8
9
|
'adr' => EasyPost::Address,
|
10
|
+
'bank' => EasyPost::PaymentMethod,
|
9
11
|
'batch' => EasyPost::Batch,
|
10
12
|
'brd' => EasyPost::Brand,
|
11
13
|
'ca' => EasyPost::CarrierAccount,
|
14
|
+
'card' => EasyPost::PaymentMethod,
|
12
15
|
'cstinfo' => EasyPost::CustomsInfo,
|
13
16
|
'cstitem' => EasyPost::CustomsItem,
|
14
17
|
'es' => EasyPost::EndShipper,
|
@@ -35,10 +38,13 @@ module EasyPost::Util
|
|
35
38
|
|
36
39
|
BY_TYPE = {
|
37
40
|
'Address' => EasyPost::Address,
|
41
|
+
'ApiKey' => EasyPost::ApiKey,
|
42
|
+
'BankAccount' => EasyPost::PaymentMethod,
|
38
43
|
'Batch' => EasyPost::Batch,
|
39
44
|
'Brand' => EasyPost::Brand,
|
40
45
|
'CarbonOffset' => EasyPost::CarbonOffset,
|
41
46
|
'CarrierAccount' => EasyPost::CarrierAccount,
|
47
|
+
'CreditCard' => EasyPost::PaymentMethod,
|
42
48
|
'CustomsInfo' => EasyPost::CustomsInfo,
|
43
49
|
'CustomsItem' => EasyPost::CustomsItem,
|
44
50
|
'EndShipper' => EasyPost::EndShipper,
|
@@ -144,25 +150,28 @@ module EasyPost::Util
|
|
144
150
|
when Array
|
145
151
|
response.map { |i| convert_to_easypost_object(i, api_key, parent) }
|
146
152
|
when Hash
|
147
|
-
|
153
|
+
# Determine class based on the "object" key in the JSON response
|
154
|
+
cls_name = response[:object] || response['object']
|
155
|
+
if cls_name
|
156
|
+
# Use the "object" key value to look up the class
|
148
157
|
cls = BY_TYPE[cls_name]
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
end
|
155
|
-
elsif response['id']
|
156
|
-
if response['id'].index('_').nil?
|
158
|
+
else
|
159
|
+
# Fallback to determining class based on the "id" prefix in the JSON response
|
160
|
+
id = response[:id] || response['id']
|
161
|
+
if id.nil? || id.index('_').nil?
|
162
|
+
# ID not present or prefix not present (ID malformed)
|
157
163
|
cls = EasyPost::EasyPostObject
|
158
|
-
|
159
|
-
|
164
|
+
else
|
165
|
+
# Parse the prefix from the ID and use it to look up the class
|
166
|
+
cls_prefix = id[0..id.index('_')][0..-2]
|
167
|
+
cls = BY_PREFIX[cls_prefix]
|
160
168
|
end
|
161
169
|
end
|
162
|
-
|
170
|
+
# Fallback to using the generic class if other determination methods fail (or class lookup produced no results)
|
163
171
|
cls ||= EasyPost::EasyPostObject
|
164
172
|
cls.construct_from(response, api_key, parent, name)
|
165
173
|
else
|
174
|
+
# response is neither a Hash nor Array (used mostly when dealing with final values like strings, booleans, etc.)
|
166
175
|
response
|
167
176
|
end
|
168
177
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easypost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- EasyPost Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brakeman
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.14'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: psych
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '4.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '4.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +66,20 @@ dependencies:
|
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '13.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rdoc
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '6.4'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '6.4'
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: rspec
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +112,16 @@ dependencies:
|
|
84
112
|
name: rubocop-rspec
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
|
-
- -
|
115
|
+
- - '='
|
88
116
|
- !ruby/object:Gem::Version
|
89
|
-
version: '2.
|
117
|
+
version: '2.10'
|
90
118
|
type: :development
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
|
-
- -
|
122
|
+
- - '='
|
95
123
|
- !ruby/object:Gem::Version
|
96
|
-
version: '2.
|
124
|
+
version: '2.10'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: simplecov
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -167,18 +195,95 @@ files:
|
|
167
195
|
- ".gitmodules"
|
168
196
|
- ".rubocop.yml"
|
169
197
|
- CHANGELOG.md
|
170
|
-
- CODE_OF_CONDUCT.md
|
171
|
-
- CONTRIBUTING.md
|
172
198
|
- Gemfile
|
173
199
|
- LICENSE
|
174
200
|
- Makefile
|
175
201
|
- README.md
|
176
202
|
- Rakefile
|
177
|
-
- SECURITY.md
|
178
|
-
- SUPPORT.md
|
179
203
|
- UPGRADE_GUIDE.md
|
180
204
|
- VERSION
|
181
205
|
- bin/easypost-irb
|
206
|
+
- docs/EasyPost.html
|
207
|
+
- docs/EasyPost/Address.html
|
208
|
+
- docs/EasyPost/ApiKey.html
|
209
|
+
- docs/EasyPost/Batch.html
|
210
|
+
- docs/EasyPost/Beta.html
|
211
|
+
- docs/EasyPost/Beta/EndShipper.html
|
212
|
+
- docs/EasyPost/Beta/Referral.html
|
213
|
+
- docs/EasyPost/Billing.html
|
214
|
+
- docs/EasyPost/Brand.html
|
215
|
+
- docs/EasyPost/CarbonOffset.html
|
216
|
+
- docs/EasyPost/CarrierAccount.html
|
217
|
+
- docs/EasyPost/CarrierType.html
|
218
|
+
- docs/EasyPost/CustomsInfo.html
|
219
|
+
- docs/EasyPost/CustomsItem.html
|
220
|
+
- docs/EasyPost/EasyPostObject.html
|
221
|
+
- docs/EasyPost/EndShipper.html
|
222
|
+
- docs/EasyPost/Error.html
|
223
|
+
- docs/EasyPost/Event.html
|
224
|
+
- docs/EasyPost/Insurance.html
|
225
|
+
- docs/EasyPost/Order.html
|
226
|
+
- docs/EasyPost/Parcel.html
|
227
|
+
- docs/EasyPost/PaymentMethod.html
|
228
|
+
- docs/EasyPost/Pickup.html
|
229
|
+
- docs/EasyPost/PickupRate.html
|
230
|
+
- docs/EasyPost/PostageLabel.html
|
231
|
+
- docs/EasyPost/Rate.html
|
232
|
+
- docs/EasyPost/Referral.html
|
233
|
+
- docs/EasyPost/Refund.html
|
234
|
+
- docs/EasyPost/Report.html
|
235
|
+
- docs/EasyPost/Resource.html
|
236
|
+
- docs/EasyPost/ScanForm.html
|
237
|
+
- docs/EasyPost/Shipment.html
|
238
|
+
- docs/EasyPost/TaxIdentifier.html
|
239
|
+
- docs/EasyPost/Tracker.html
|
240
|
+
- docs/EasyPost/User.html
|
241
|
+
- docs/EasyPost/Util.html
|
242
|
+
- docs/EasyPost/Webhook.html
|
243
|
+
- docs/created.rid
|
244
|
+
- docs/css/fonts.css
|
245
|
+
- docs/css/rdoc.css
|
246
|
+
- docs/fonts/Lato-Light.ttf
|
247
|
+
- docs/fonts/Lato-LightItalic.ttf
|
248
|
+
- docs/fonts/Lato-Regular.ttf
|
249
|
+
- docs/fonts/Lato-RegularItalic.ttf
|
250
|
+
- docs/fonts/SourceCodePro-Bold.ttf
|
251
|
+
- docs/fonts/SourceCodePro-Regular.ttf
|
252
|
+
- docs/images/add.png
|
253
|
+
- docs/images/arrow_up.png
|
254
|
+
- docs/images/brick.png
|
255
|
+
- docs/images/brick_link.png
|
256
|
+
- docs/images/bug.png
|
257
|
+
- docs/images/bullet_black.png
|
258
|
+
- docs/images/bullet_toggle_minus.png
|
259
|
+
- docs/images/bullet_toggle_plus.png
|
260
|
+
- docs/images/date.png
|
261
|
+
- docs/images/delete.png
|
262
|
+
- docs/images/find.png
|
263
|
+
- docs/images/loadingAnimation.gif
|
264
|
+
- docs/images/macFFBgHack.png
|
265
|
+
- docs/images/package.png
|
266
|
+
- docs/images/page_green.png
|
267
|
+
- docs/images/page_white_text.png
|
268
|
+
- docs/images/page_white_width.png
|
269
|
+
- docs/images/plugin.png
|
270
|
+
- docs/images/ruby.png
|
271
|
+
- docs/images/tag_blue.png
|
272
|
+
- docs/images/tag_green.png
|
273
|
+
- docs/images/transparent.png
|
274
|
+
- docs/images/wrench.png
|
275
|
+
- docs/images/wrench_orange.png
|
276
|
+
- docs/images/zoom.png
|
277
|
+
- docs/index.html
|
278
|
+
- docs/js/darkfish.js
|
279
|
+
- docs/js/navigation.js
|
280
|
+
- docs/js/navigation.js.gz
|
281
|
+
- docs/js/search.js
|
282
|
+
- docs/js/search_index.js
|
283
|
+
- docs/js/search_index.js.gz
|
284
|
+
- docs/js/searcher.js
|
285
|
+
- docs/js/searcher.js.gz
|
286
|
+
- docs/table_of_contents.html
|
182
287
|
- easycop.yml
|
183
288
|
- easypost.gemspec
|
184
289
|
- lib/easypost.rb
|
@@ -187,6 +292,7 @@ files:
|
|
187
292
|
- lib/easypost/batch.rb
|
188
293
|
- lib/easypost/beta.rb
|
189
294
|
- lib/easypost/beta/end_shipper.rb
|
295
|
+
- lib/easypost/beta/payment_refund.rb
|
190
296
|
- lib/easypost/beta/referral.rb
|
191
297
|
- lib/easypost/billing.rb
|
192
298
|
- lib/easypost/brand.rb
|
@@ -239,7 +345,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
345
|
- !ruby/object:Gem::Version
|
240
346
|
version: '0'
|
241
347
|
requirements: []
|
242
|
-
rubygems_version: 3.3.
|
348
|
+
rubygems_version: 3.3.26
|
243
349
|
signing_key:
|
244
350
|
specification_version: 4
|
245
351
|
summary: EasyPost Ruby Client Library
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# Code of Conduct
|
2
|
-
|
3
|
-
> Remember the golden rule? Treat others as you'd like to be treated
|
4
|
-
|
5
|
-
## Standards
|
6
|
-
|
7
|
-
- Create a welcoming and safe community for `everyone`
|
8
|
-
- Demonstrate empathy towards others, realize that everyone has a different `level of experience`
|
9
|
-
- Be respectful of others opinions, viewpoints, and experiences
|
10
|
-
- Give and receive respectful constructive feedback
|
11
|
-
- Accept responsibility and apologize when necessary
|
12
|
-
- Focus on what is best for the overall community
|
13
|
-
|
14
|
-
## Failure to Follow Standards
|
15
|
-
|
16
|
-
If there is a failure to follow the standards laid out above, the user will first be warned. If the offending behavior continues, the user may be blocked entirely.
|
data/CONTRIBUTING.md
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
# Contributing Guide
|
2
|
-
|
3
|
-
Please read this document in its entirety.
|
4
|
-
|
5
|
-
## General
|
6
|
-
|
7
|
-
- Be nice and respectful of maintainers’ and contributors’ time and viewpoints
|
8
|
-
- Be as descriptive as possible! More info is always better than not enough
|
9
|
-
- Be patient, there may be a lot of in-flight work, some of it across multiple projects not related to the repo being contributed to
|
10
|
-
- Have fun!
|
11
|
-
|
12
|
-
## Contributing
|
13
|
-
|
14
|
-
Contributing comes in many forms! We are incredibly grateful to anyone who can do any of the following:
|
15
|
-
|
16
|
-
- Add new features
|
17
|
-
- Fix bugs
|
18
|
-
- Fix typos
|
19
|
-
- Improve docs
|
20
|
-
- Improve tests
|
21
|
-
- Triage issues
|
22
|
-
- Review pull requests
|
23
|
-
- Share opinions and viewpoints on issues
|
24
|
-
|
25
|
-
## Issues
|
26
|
-
|
27
|
-
- If your issue is security related, please follow the [SECURITY guide](https://github.com/easypost/.github/SECURITY.md)
|
28
|
-
- Before opening a new issue, check for existing issues that are related, including closed ones
|
29
|
-
- Provide as much information as possible about the issue, including how to reproduce the problem and the expected behavior
|
30
|
-
- Don't needlessly bump issues (eg: if there hasn’t been progress for more than a few weeks, feel free to reach back out)
|
31
|
-
|
32
|
-
## Pull Requests
|
33
|
-
|
34
|
-
- All Pull Requests should be accompanied first by an issue describing the reason why the Pull Request is needed
|
35
|
-
- Be as descriptive as possible in your PR description about why the changes are being made and what the changes contain
|
36
|
-
- Pull Requests should be as small as possible
|
37
|
-
- Don't make unrelated changes in your Pull Request
|
38
|
-
- Don't open a Pull Request if you don't plan to see it through. PRs submitted by individuals that cannot complete additional work to get a PR merged may be closed without completion
|
39
|
-
- Adhere to the existing code style of the repo, even if it differs from your personal preference
|
40
|
-
- When applicable, add tests that provide ample coverage of the logic added or changed
|
41
|
-
- Pull Requests should come from branches and never the default `master` branch
|
42
|
-
- Pull Requests must pass CI, including linting and testing
|
43
|
-
- Pull Requests must go through code review before they can be merged to the main branch
|
44
|
-
- Do not include "version bump" changes in the same PR as your code changes; these will be handled as a separate PR and releasing process
|
45
|
-
- Make sure the `Allow edits from maintainers` checkbox is checked. That way EasyPost engineers can make certain minor changes as needed, allowing your pull request to be merged sooner.
|
46
|
-
|
47
|
-
You agree and acknowledge that you have necessary intellectual property rights to provide your Contribution and hereby assign to EasyPost all right, title and interest in such Contribution.
|
data/SECURITY.md
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
# Security Guide
|
2
|
-
|
3
|
-
We take security seriously at EasyPost. If you find a security issue or vulnerability in our open source projects, please abide by the following guidelines:
|
4
|
-
|
5
|
-
- Please read our [Responsible Disclosure Policy](https://www.easypost.com/privacy#disclosure-policy).
|
6
|
-
- Do not open an issue on GitHub about the security vulnerability. Doing so draws attention to the issue and exposes it to the public.
|
7
|
-
- Send an email to `security-abuse@easypost.com` including as many details as possible.
|
data/SUPPORT.md
DELETED
@@ -1,3 +0,0 @@
|
|
1
|
-
# Support Guide
|
2
|
-
|
3
|
-
Looking for support for one of our projects? If your question is related to our API, please contact our support team at `support@easypost.com`. If you need support regarding this project, create an issue on GitHub with as many details as possible and we’ll take a look.
|