easypost 3.1.4 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +71 -0
- data/.gitignore +27 -17
- data/.gitmodules +3 -0
- data/CHANGELOG.md +378 -0
- data/Gemfile +2 -0
- data/Makefile +70 -0
- data/README.md +193 -74
- 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 +178 -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/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 +35 -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/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 +32 -0
- data/lib/easypost/util.rb +167 -103
- 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 +21 -137
- metadata +253 -49
- data/.travis.yml +0 -9
- data/CHANGELOG +0 -207
- data/lib/easypost/address.rb +0 -60
- data/lib/easypost/batch.rb +0 -53
- data/lib/easypost/carrier_account.rb +0 -8
- data/lib/easypost/customs_info.rb +0 -9
- data/lib/easypost/customs_item.rb +0 -9
- data/lib/easypost/error.rb +0 -33
- data/lib/easypost/event.rb +0 -10
- data/lib/easypost/insurance.rb +0 -4
- data/lib/easypost/item.rb +0 -10
- data/lib/easypost/object.rb +0 -149
- data/lib/easypost/order.rb +0 -30
- data/lib/easypost/parcel.rb +0 -4
- data/lib/easypost/pickup.rb +0 -30
- data/lib/easypost/pickup_rate.rb +0 -5
- data/lib/easypost/postage_label.rb +0 -4
- data/lib/easypost/print_job.rb +0 -6
- data/lib/easypost/printer.rb +0 -28
- data/lib/easypost/rate.rb +0 -4
- data/lib/easypost/refund.rb +0 -4
- data/lib/easypost/report.rb +0 -31
- data/lib/easypost/resource.rb +0 -77
- data/lib/easypost/scan_form.rb +0 -8
- data/lib/easypost/shipment.rb +0 -120
- data/lib/easypost/tracker.rb +0 -15
- data/lib/easypost/user.rb +0 -47
- data/lib/easypost/webhook.rb +0 -31
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 74cc993ead7c401dc7dbd719667872b1317a83e31c93bf85e3489cdc5b322a51
|
|
4
|
+
data.tar.gz: 17095956ef150f649b12b9b974db4098b495bbfe7710fe368d594e7e6410e6ea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8708b3ed757fdcec975e84a585bbbdc5e428de0f32b34b047b3d1860fb663db7b48748a49a5841de405adb00bc3102c3bc7ffea56d7d4ff0bf7ff6a74e81015d
|
|
7
|
+
data.tar.gz: 4fb43956853af9c440f7b84a804250e5e817ea3261e9900f821236bf2ae4fc623d1a68a36a899628b655ca6b1833e9095b3b943d2224224a95af24fb6c732bca
|
data/.gitattributes
ADDED
data/.github/CODEOWNERS
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: File a bug report
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: [ "triage" ]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thank you for taking the time to report an issue in this repository. Please fill out the form below.
|
|
10
|
+
- type: input
|
|
11
|
+
id: software-version
|
|
12
|
+
attributes:
|
|
13
|
+
label: Software Version
|
|
14
|
+
# change this description for the specific repo
|
|
15
|
+
description: |
|
|
16
|
+
What version of our software are you running?
|
|
17
|
+
TIP: [Available versions](https://github.com/EasyPost/easypost-ruby/releases)
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
- type: input
|
|
21
|
+
id: language-version
|
|
22
|
+
attributes:
|
|
23
|
+
label: Language Version
|
|
24
|
+
# change this description for the specific language of the repo
|
|
25
|
+
description: |
|
|
26
|
+
What language version and/or framework are you using?
|
|
27
|
+
TIP: [How to find your Ruby version](https://blog.arkency.com/which-ruby-version-am-i-using-how-to-check/)
|
|
28
|
+
validations:
|
|
29
|
+
required: true
|
|
30
|
+
- type: input
|
|
31
|
+
id: os
|
|
32
|
+
attributes:
|
|
33
|
+
label: Operating System
|
|
34
|
+
description: What operating system are you running the software on?
|
|
35
|
+
validations:
|
|
36
|
+
required: true
|
|
37
|
+
- type: textarea
|
|
38
|
+
id: behavior
|
|
39
|
+
attributes:
|
|
40
|
+
label: What happened?
|
|
41
|
+
description: |
|
|
42
|
+
Please describe what happened in reproducible steps.
|
|
43
|
+
Include how often you see this issue, and any relevant links (i.e. GitHub issue, Stack Overflow, etc.).
|
|
44
|
+
value: |
|
|
45
|
+
1.
|
|
46
|
+
2.
|
|
47
|
+
3.
|
|
48
|
+
...
|
|
49
|
+
validations:
|
|
50
|
+
required: true
|
|
51
|
+
- type: textarea
|
|
52
|
+
id: expected-behavior
|
|
53
|
+
attributes:
|
|
54
|
+
label: What was expected?
|
|
55
|
+
description: Please describe what was expected to happen instead.
|
|
56
|
+
validations:
|
|
57
|
+
required: true
|
|
58
|
+
- type: textarea
|
|
59
|
+
id: sample-code
|
|
60
|
+
attributes:
|
|
61
|
+
label: Sample Code
|
|
62
|
+
description: |
|
|
63
|
+
Please provide any sample code that demonstrates the behavior.
|
|
64
|
+
This will be automatically formatted into the appropriate language, so no need for backticks.
|
|
65
|
+
**Do not include any private information such as API keys or passwords.**
|
|
66
|
+
# change this render to the appropriate language: https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
|
|
67
|
+
render: rb
|
|
68
|
+
validations:
|
|
69
|
+
required: false
|
|
70
|
+
- type: textarea
|
|
71
|
+
id: logs
|
|
72
|
+
attributes:
|
|
73
|
+
label: Relevant logs
|
|
74
|
+
description: |
|
|
75
|
+
Please copy and paste any relevant log output.
|
|
76
|
+
This will be automatically formatted into shell output, so no need for backticks.
|
|
77
|
+
If you have screenshots instead, please paste them below.
|
|
78
|
+
**Do not include any private information such as API keys or passwords.**
|
|
79
|
+
render: sh
|
|
80
|
+
validations:
|
|
81
|
+
required: false
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Request a new feature
|
|
3
|
+
title: "[Feat]: "
|
|
4
|
+
labels: [ "triage" ]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thank you for taking the time to request a new feature.
|
|
10
|
+
Please note, all feature requests are subject to review and approval.
|
|
11
|
+
We welcome all suggestions and ideas, but we cannot guarantee when or if we will implement them.
|
|
12
|
+
|
|
13
|
+
We also welcome pull requests, if you would like to implement the feature yourself.
|
|
14
|
+
Doing so will likely accelerate the process of implementing the requested feature.
|
|
15
|
+
- type: checkboxes
|
|
16
|
+
id: searched
|
|
17
|
+
attributes:
|
|
18
|
+
label: Feature Request Is New
|
|
19
|
+
# change issue link below for the specific repo
|
|
20
|
+
description: |
|
|
21
|
+
Before we begin, please confirm that the requested feature does not already exist or has not [already been requested](https://github.com/EasyPost/easypost-ruby/issues).
|
|
22
|
+
options:
|
|
23
|
+
- label: I have verified that the requested feature does not already exist or has not already been requested.
|
|
24
|
+
required: true
|
|
25
|
+
- type: textarea
|
|
26
|
+
id: description
|
|
27
|
+
attributes:
|
|
28
|
+
label: Description of the feature
|
|
29
|
+
description: |
|
|
30
|
+
Please provide a detailed description of the feature, including:
|
|
31
|
+
- What the feature is
|
|
32
|
+
- What value it adds to the application
|
|
33
|
+
- How it should be implemented (i.e. pseudo-code, or a high-level description of the user experience)
|
|
34
|
+
- Any other relevant information
|
|
35
|
+
validations:
|
|
36
|
+
required: true
|
|
37
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Description
|
|
2
|
+
|
|
3
|
+
<!-- Please provide a general summary of your PR changes and link any related issues or other pull requests. -->
|
|
4
|
+
|
|
5
|
+
# Testing
|
|
6
|
+
|
|
7
|
+
<!--
|
|
8
|
+
Please provide details on how you tested this code. See below.
|
|
9
|
+
|
|
10
|
+
- All pull requests must be tested (unit tests where possible with accompanying cassettes, or provide a screenshot of end-to-end testing when unit tests are not possible)
|
|
11
|
+
- New features must get a new unit test
|
|
12
|
+
- Bug fixes/refactors must re-record existing cassettes
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
# Pull Request Type
|
|
16
|
+
|
|
17
|
+
Please select the option(s) that are relevant to this PR.
|
|
18
|
+
|
|
19
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
20
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
21
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
22
|
+
- [ ] Improvement (fixing a typo, updating readme, renaming a variable name, etc)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: 'CI'
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request: ~
|
|
7
|
+
workflow_dispatch: ~
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
run-tests:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
rubyversion: ['2.6', '2.7', '3.0', '3.1', '3.2']
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout Repository
|
|
17
|
+
uses: actions/checkout@v3
|
|
18
|
+
- name: Set up Ruby
|
|
19
|
+
uses: ruby/setup-ruby@v1
|
|
20
|
+
with:
|
|
21
|
+
ruby-version: ${{ matrix.rubyversion }}
|
|
22
|
+
rubygems: '3.0.0'
|
|
23
|
+
bundler-cache: true
|
|
24
|
+
- name: Install Dependencies
|
|
25
|
+
run: make install
|
|
26
|
+
- name: run tests
|
|
27
|
+
run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make test
|
|
28
|
+
- name: Coveralls
|
|
29
|
+
if: github.ref == 'refs/heads/master'
|
|
30
|
+
uses: coverallsapp/github-action@master
|
|
31
|
+
with:
|
|
32
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
+
path-to-lcov: './coverage/lcov/easypost-ruby.lcov'
|
|
34
|
+
lint:
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
steps:
|
|
37
|
+
- name: Checkout Repository
|
|
38
|
+
uses: actions/checkout@v3
|
|
39
|
+
- name: Set up Ruby
|
|
40
|
+
uses: ruby/setup-ruby@v1
|
|
41
|
+
with:
|
|
42
|
+
ruby-version: '3.2'
|
|
43
|
+
rubygems: '3.0.0'
|
|
44
|
+
bundler-cache: true
|
|
45
|
+
- name: Install Dependencies
|
|
46
|
+
run: make install
|
|
47
|
+
- name: Install style guides
|
|
48
|
+
run: make install-styleguide
|
|
49
|
+
- name: Lint Project
|
|
50
|
+
run: make lint
|
|
51
|
+
docs:
|
|
52
|
+
if: github.ref == 'refs/heads/master'
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
steps:
|
|
55
|
+
- name: Checkout Repository
|
|
56
|
+
uses: actions/checkout@v3
|
|
57
|
+
- name: Set up Ruby
|
|
58
|
+
uses: ruby/setup-ruby@v1
|
|
59
|
+
with:
|
|
60
|
+
ruby-version: '3.2'
|
|
61
|
+
rubygems: '3.0.0'
|
|
62
|
+
bundler-cache: true
|
|
63
|
+
- name: Install Dependencies
|
|
64
|
+
run: make install
|
|
65
|
+
- name: Generate Docs
|
|
66
|
+
run: make docs
|
|
67
|
+
- name: Deploy docs
|
|
68
|
+
uses: peaceiris/actions-gh-pages@v3
|
|
69
|
+
with:
|
|
70
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
71
|
+
publish_dir: docs
|
data/.gitignore
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
._*
|
|
2
|
+
.AppleDouble
|
|
3
3
|
.bundle
|
|
4
4
|
.config
|
|
5
|
-
|
|
5
|
+
.DS_Store
|
|
6
|
+
.env
|
|
7
|
+
.idea/
|
|
8
|
+
.LSOverride
|
|
9
|
+
.Spotlight-V100
|
|
10
|
+
.Trashes
|
|
11
|
+
*.gem
|
|
12
|
+
*.rbc
|
|
6
13
|
coverage
|
|
14
|
+
dist
|
|
15
|
+
docs
|
|
16
|
+
Gemfile.lock
|
|
17
|
+
Icon
|
|
7
18
|
InstalledFiles
|
|
8
19
|
lib/bundler/man
|
|
9
20
|
pkg
|
|
@@ -12,18 +23,17 @@ spec/reports
|
|
|
12
23
|
test/tmp
|
|
13
24
|
test/version_tmp
|
|
14
25
|
tmp
|
|
15
|
-
|
|
16
|
-
# YARD artifacts
|
|
17
|
-
.yardoc
|
|
18
|
-
_yardoc
|
|
19
|
-
doc/
|
|
20
|
-
|
|
21
|
-
# iOS
|
|
22
|
-
.DS_Store
|
|
23
|
-
.AppleDouble
|
|
24
|
-
.LSOverride
|
|
25
|
-
Icon
|
|
26
|
-
._*
|
|
27
|
-
.Spotlight-V100
|
|
28
|
-
.Trashes
|
|
29
26
|
vendor/
|
|
27
|
+
/easycop.yml
|
|
28
|
+
/.rubocop.yml
|
|
29
|
+
[._]*.s[a-v][a-z]
|
|
30
|
+
[._]*.sw[a-p]
|
|
31
|
+
[._]s[a-rt-v][a-z]
|
|
32
|
+
[._]ss[a-gi-z]
|
|
33
|
+
[._]sw[a-p]
|
|
34
|
+
Session.vim
|
|
35
|
+
Sessionx.vim
|
|
36
|
+
.netrwhist
|
|
37
|
+
*~
|
|
38
|
+
tags
|
|
39
|
+
[._]*.un~
|
data/.gitmodules
ADDED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
## v5.1.0 (2023-07-28)
|
|
4
|
+
|
|
5
|
+
- Adds hooks to introspect the request and response of API calls (see `HTTP Hooks` section in the README for more details)
|
|
6
|
+
- Maps 400 status code responses to the new `BadRequestError` class
|
|
7
|
+
|
|
8
|
+
## v5.0.1 (2023-06-20)
|
|
9
|
+
|
|
10
|
+
- Fixes a bug where the params of a `customs_info` on create weren't wrapped properly which led to an empty set of `customs_items`
|
|
11
|
+
|
|
12
|
+
## v5.0.0 (2023-06-06)
|
|
13
|
+
|
|
14
|
+
See our [Upgrade Guide](UPGRADE_GUIDE.md#upgrading-from-4x-to-50) for more details.
|
|
15
|
+
|
|
16
|
+
- Library is now thread-safe. Closes GitHub Issue ([#183](https://github.com/EasyPost/easypost-ruby/issues/183))
|
|
17
|
+
- Initialize a `Client` object with an API key. Optionally set open and read timeout params
|
|
18
|
+
- Previous classes have been diverted into `Services` and `Models`
|
|
19
|
+
- All methods (i.e. `create`, `retrieve`, `all`) exist in services, accessed via property of the client (eg: `client.shipment.create()`)
|
|
20
|
+
- E.g. `bought_shipment = client.shipment.buy(shipment_id, rate)`
|
|
21
|
+
- Beta namespace changed from `easypost.beta.x` to `client.beta_x`
|
|
22
|
+
- References to `Referral` are now `ReferralCustomer` and `referral_customer` to match the API and docs
|
|
23
|
+
- References to `smartrate` are now `SmartRate` and `smart_rate` to match the API and docs
|
|
24
|
+
- Rename function `get_smartrates` to `get_smart_rates`
|
|
25
|
+
- Rename function `get_lowest_smartrate` to `get_lowest_smart_rate`
|
|
26
|
+
- Empty API response functions for `delete` return `true` instead of empty object
|
|
27
|
+
- Drops support for Ruby 2.5
|
|
28
|
+
- Bumps all dev dependencies
|
|
29
|
+
- Improves Error Deserialization to dynamically handle edge cases that have a bad format
|
|
30
|
+
- Adds `retrieve_estimated_delivery_date` function in Shipment
|
|
31
|
+
- Removes deprecated `endshipper` beta class, please use the GA one `EasyPost::Services::EndShipper`
|
|
32
|
+
|
|
33
|
+
## v4.13.0 (2023-04-04)
|
|
34
|
+
|
|
35
|
+
- Adds `get_next_page` function to each object which retrieves the next page of a collection when the `has_more` key is present in the response
|
|
36
|
+
|
|
37
|
+
## v4.12.0 (2023-02-21)
|
|
38
|
+
|
|
39
|
+
- Adds beta `retrieve_stateless_rates` function
|
|
40
|
+
- Adds `get_lowest_stateless_rate` utility
|
|
41
|
+
|
|
42
|
+
## v4.11.0 (2023-01-18)
|
|
43
|
+
|
|
44
|
+
- Added function to retrieve all pickups, accessible via `EasyPost::Pickup.all`
|
|
45
|
+
- Added payload functions `retrieve_all_payloads` and `retrieve_payload` to retrieve all payloads or a specific payload for an event.
|
|
46
|
+
|
|
47
|
+
## v4.10.0 (2023-01-11)
|
|
48
|
+
|
|
49
|
+
- Added new beta billing functionality for referral customer users, accessible via `EasyPost::Beta::Referral`
|
|
50
|
+
- `add_payment_method` to add an existing Stripe bank account or credit card to your EasyPost account
|
|
51
|
+
- `refund_by_amount` refunds you wallet balance by a specified amount
|
|
52
|
+
- `refund_by_payment_log` refunds you wallet balance by a specified payment log
|
|
53
|
+
- Fix bug where bank account and credit card payment methods were not deserializing to the `EasyPost::PaymentMethod` class
|
|
54
|
+
|
|
55
|
+
## v4.9.0 (2022-12-07)
|
|
56
|
+
|
|
57
|
+
- Routes requests for creating a carrier account with a custom workflow (eg: FedEx, UPS) to the correct endpoint when using the `create` function
|
|
58
|
+
|
|
59
|
+
## v4.8.1 (2022-10-24)
|
|
60
|
+
|
|
61
|
+
- Concatenates `error.message` if it incorrectly comes back from the API as an array
|
|
62
|
+
- Treats any HTTP status outside the `2xx` range as an error. Impact expected is minimal as this change only affects `1xx` and `3xx` HTTP status codes
|
|
63
|
+
|
|
64
|
+
## v4.8.0 (2022-09-21)
|
|
65
|
+
|
|
66
|
+
- Adds support to buy a shipment by passing in `end_shipper_id`
|
|
67
|
+
- `with_carbon_offset` can now alternatively be passed in the `params` parameter of the `shipment.buy` function
|
|
68
|
+
- Migrates Partner White Label (Referrals) to general library namespace and deprecates beta functions
|
|
69
|
+
|
|
70
|
+
## v4.7.1 (2022-09-06)
|
|
71
|
+
|
|
72
|
+
- Makes not implemented `all` calls match the `EasyPost::Resource` interface so that one can call `.to_json` on them and receive the proper error
|
|
73
|
+
|
|
74
|
+
## v4.7.0 (2022-08-25)
|
|
75
|
+
|
|
76
|
+
- Moves EndShipper out of beta to the general library namespace
|
|
77
|
+
- Ensure the Easypost object will respond to `.id` when it has one in `@values`
|
|
78
|
+
|
|
79
|
+
## v4.6.0 (2022-08-02)
|
|
80
|
+
|
|
81
|
+
- Adds Carbon Offset support
|
|
82
|
+
- Adds ability to create a shipment with carbon_offset
|
|
83
|
+
- Adds ability to buy a shipment with carbon_offset
|
|
84
|
+
- Adds ability to one-call-buy a shipment with carbon_offset
|
|
85
|
+
- Adds ability to rerate a shipment with carbon_offset
|
|
86
|
+
- Adds `validate_webhook` function that returns your webhook or raises an error if there is a `webhook_secret` mismatch
|
|
87
|
+
- Deprecated `PaymentMethod` class, please use `Billing` class for retrieve all payment method function
|
|
88
|
+
|
|
89
|
+
## v4.5.0 (2022-07-18)
|
|
90
|
+
|
|
91
|
+
- Adds ability to generate shipment forms via `generate_form` function
|
|
92
|
+
|
|
93
|
+
## v4.4.0 (2022-07-11)
|
|
94
|
+
|
|
95
|
+
- Adds `Billing.retrieve_payment_methods()`, `Billing.fund_wallet()`, and `Billing.delete_payment_method()` functions
|
|
96
|
+
- Captures OS information in the user-agent header for easier debugging
|
|
97
|
+
- Update functions now use `patch` instead of `put` under the hood to better match API behavior and documentation. The behavior of these functions should remain the same
|
|
98
|
+
|
|
99
|
+
## v4.3.0 (2022-05-19)
|
|
100
|
+
|
|
101
|
+
- Adds the `EndShipper` Beta class with `create`, `retrieve`, `all`, and `save` functions
|
|
102
|
+
- Requests will now fail fast with an error if an API key is not provided instead of making a live API call with no key
|
|
103
|
+
- Fixes a bug where the library could not properly parse the response of deleting a child user
|
|
104
|
+
- Fixes a bug where you could not update a webhook due to a `wrong number of arguments` error
|
|
105
|
+
|
|
106
|
+
## v4.2.1 (2022-05-11)
|
|
107
|
+
|
|
108
|
+
- Corrects the `Beta` namespace for the new Referral class
|
|
109
|
+
|
|
110
|
+
## v4.2.0 (2022-05-09)
|
|
111
|
+
|
|
112
|
+
- Adds a `lowest_rate()` function to Orders and Pickups
|
|
113
|
+
- Adds a `Shipment.get_lowest_smartrate()` function and a `shipment.lowest_smartrate()` function
|
|
114
|
+
- Removes the unusable `carrier` param from `Address.create_and_verify` along with the dead `message` conditional check
|
|
115
|
+
- Add beta Referral class for White Label API with these new functions: `create()`, `update_email()`, `all()`, and `add_credit_card()`
|
|
116
|
+
|
|
117
|
+
## v4.1.2 (2022-03-16)
|
|
118
|
+
|
|
119
|
+
- Rolls back the original connection behavior of establishing a new connection for every request (restores previous expectations for multithreaded implementations)
|
|
120
|
+
|
|
121
|
+
## v4.1.1 (2022-03-14)
|
|
122
|
+
|
|
123
|
+
- Fixes a bug that prematurely closed connections when using multithreading by wrapping requests in a mutex (closes #148)
|
|
124
|
+
|
|
125
|
+
## v4.1.0 (2022-03-09)
|
|
126
|
+
|
|
127
|
+
- Adds support for custom client connections (#142)
|
|
128
|
+
- Reduces memory usage by reusing connections
|
|
129
|
+
- Extends all objects with `Enumerable` allowing for iterator patterns (#143)
|
|
130
|
+
|
|
131
|
+
## v4.0.0 (2022-02-25)
|
|
132
|
+
|
|
133
|
+
- Bumps minimum Ruby version from `2.2` to `2.5`
|
|
134
|
+
- Bumps dev dependencies
|
|
135
|
+
- Documents each interface of the project in code
|
|
136
|
+
- Overhauls the test suite with full coverage
|
|
137
|
+
- Introduces `Rubocop` and lints the entire project
|
|
138
|
+
- Removes the unusable `Print` and `PrintJob` objects
|
|
139
|
+
- Removes deprecated and unusable `stamp_and_barcode_by_reference` method on the Batch object
|
|
140
|
+
- Explicitly returns an error of "not implemented" for `Rate.all` and `Parcel.all`
|
|
141
|
+
- Removes the `Shipment.get_rates` function as shipments already contain rates. If you need to get new rates for a shipment, use the `Shipment.regenerate_rates` function instead
|
|
142
|
+
- Removes the parameters from `Address.verify` as they are unusable
|
|
143
|
+
- Removes the deprecated `http_status` property of the `EasyPost::Error` object as it was replaced with `status`
|
|
144
|
+
- Fixes a bug that would append an extra `id` field to each retrieved object
|
|
145
|
+
- Various other small improvements and bug fixes
|
|
146
|
+
|
|
147
|
+
## v3.5.0 (2021-12-06)
|
|
148
|
+
|
|
149
|
+
- Adds the `update_brand` method to the user object (closes #122)
|
|
150
|
+
|
|
151
|
+
## v3.4.0 (2021-07-13)
|
|
152
|
+
|
|
153
|
+
- Removed deprecated `Item` object
|
|
154
|
+
- Sorted EasyPost Resources list
|
|
155
|
+
- Remove 2015-vintage experimental `all_updated` method on Tracker
|
|
156
|
+
- Fixes API key retrieval (#120, thanks @andychongyz)
|
|
157
|
+
- Adds `regenerate_rates` method for new rerate API
|
|
158
|
+
- Adds `deconstruct_keys` method to allow for pattern matching on EasyPost objects
|
|
159
|
+
|
|
160
|
+
## v3.3.0 (2021-06-10)
|
|
161
|
+
|
|
162
|
+
- Adds `SmartRate` functionality to the `Shipments` object (available by calling `get_smartrates` on a shipment)
|
|
163
|
+
- Fix bug where `EasyPost::CarrierAccount.types` was hitting the wrong endpoint
|
|
164
|
+
|
|
165
|
+
## v3.2.0 (2021-01-14)
|
|
166
|
+
|
|
167
|
+
- Replace Travis CI with Github Actions
|
|
168
|
+
- Add Ruby 3.0 to supported platforms (#110; thanks @maxwell)
|
|
169
|
+
|
|
170
|
+
## v3.1.5 (2020-12-16)
|
|
171
|
+
|
|
172
|
+
- Fix attribute lookup when manually constructing objects (#105; thanks @drewtempelmeyer)
|
|
173
|
+
- Flatten class names and clean up some other style issues
|
|
174
|
+
- Fix `EasyPost::Address.create_and_verify`, broken since 3.1.0 (#108; thanks @rajbirverma)
|
|
175
|
+
|
|
176
|
+
## v3.1.4 (2020-09-29)
|
|
177
|
+
|
|
178
|
+
- Don't modify params passed into Address#create (#78; thanks @TheRusskiy)
|
|
179
|
+
- Don't modify `carriers` and `services` parameters to `Shipment.lowest_rate` (#71 / #103, thanks @vladvinnikov and @jurisgalang)
|
|
180
|
+
- When constructing an easypost object, convert the key to a string (#102; thanks @Geesu)
|
|
181
|
+
- Expose the raw HTTP response as `#http_body` on `EasyPost::Error` objects (#101; thanks @Geesu)
|
|
182
|
+
|
|
183
|
+
## v3.1.3 (2020-06-26)
|
|
184
|
+
|
|
185
|
+
- Fix bug causing Authorization header to be included in User-Agent header. All users must upgrade.
|
|
186
|
+
|
|
187
|
+
## v3.1.2 (2020-06-24)
|
|
188
|
+
|
|
189
|
+
- Bad gem push. New version required.
|
|
190
|
+
|
|
191
|
+
## v3.1.1 (2020-06-23)
|
|
192
|
+
|
|
193
|
+
- Fix bug where EasyPost.http_config was invalid when not explicitly initialized.
|
|
194
|
+
|
|
195
|
+
## v3.1.0 (2020-06-23)
|
|
196
|
+
|
|
197
|
+
- Add Shipment Invoice and Refund Report
|
|
198
|
+
- Remove dependencies on `RestClient` and `MultiJson`
|
|
199
|
+
- Remove some deprecated endpoints
|
|
200
|
+
|
|
201
|
+
## v3.0.1 (2018-05-17)
|
|
202
|
+
|
|
203
|
+
- Enforce TLS certificate validity by default
|
|
204
|
+
|
|
205
|
+
## v3.0.0 (2018-02-15)
|
|
206
|
+
|
|
207
|
+
- Require use of ruby ~> 2.0 and TLSv1.2
|
|
208
|
+
|
|
209
|
+
## v2.7.3 (2018-02-05)
|
|
210
|
+
|
|
211
|
+
- Fix bug with introduced around certain JSON objects with IDs (thanks vladvinnikov!)
|
|
212
|
+
|
|
213
|
+
## v2.7.2 (2018-02-01)
|
|
214
|
+
|
|
215
|
+
- Removed unused and unsupported code paths for Container model
|
|
216
|
+
- Removed unused and unsupported code path for Stamp and Barcode methods on the Shipment model
|
|
217
|
+
- Fixed a bug with non-model JSON object with an "id" key being treated as models and raising errors
|
|
218
|
+
|
|
219
|
+
## v2.7.1 (2017-05-25)
|
|
220
|
+
|
|
221
|
+
- Allow reports to be retrieved without passing a type
|
|
222
|
+
|
|
223
|
+
## v2.7.0 (2017-04-04)
|
|
224
|
+
|
|
225
|
+
- Changed Report CRUD signatures. requires report type to be passed
|
|
226
|
+
|
|
227
|
+
## v2.6.2 (2017-02-14)
|
|
228
|
+
|
|
229
|
+
- Added get_rates method for Orders
|
|
230
|
+
|
|
231
|
+
## v2.6.1 (2017-01-19)
|
|
232
|
+
|
|
233
|
+
- Updated create method for ScanForms
|
|
234
|
+
|
|
235
|
+
## v2.6.0 (2017-01-17)
|
|
236
|
+
|
|
237
|
+
- Add basic CRUD methods for Webhooks
|
|
238
|
+
|
|
239
|
+
## v2.5.0 (2016-12-19)
|
|
240
|
+
|
|
241
|
+
- Add prefixes to report in utils
|
|
242
|
+
|
|
243
|
+
## v2.4.0 (2016-12-08)
|
|
244
|
+
|
|
245
|
+
- Add report resource to ruby client
|
|
246
|
+
|
|
247
|
+
## v2.3.0 (2016-11-25)
|
|
248
|
+
|
|
249
|
+
- Updated dependencies to allow rest-client 2.0.0 and above
|
|
250
|
+
|
|
251
|
+
## v2.2.0 (2016-07-260
|
|
252
|
+
|
|
253
|
+
- Added standalone Insurance model
|
|
254
|
+
|
|
255
|
+
## v2.1.11 (2016-02-04)
|
|
256
|
+
|
|
257
|
+
- Allowed user creation for top-level users
|
|
258
|
+
|
|
259
|
+
## v2.1.10 (2015-12-23)
|
|
260
|
+
|
|
261
|
+
- Added verify and verify_strict params to Address.create
|
|
262
|
+
- Added Tracker.create_list and Tracker.all_updated for working with large
|
|
263
|
+
numbers of Trackers.
|
|
264
|
+
|
|
265
|
+
## v2.1.9 (2015-11-04)
|
|
266
|
+
|
|
267
|
+
- Added new tests for Tracker.all
|
|
268
|
+
- Updated some old examples
|
|
269
|
+
|
|
270
|
+
## v2.1.8 (2015-10-21)
|
|
271
|
+
|
|
272
|
+
- Added Cancel method for Pickups (thanks Ramie Blatt!)
|
|
273
|
+
|
|
274
|
+
## v2.1.7 (2015-10-05)
|
|
275
|
+
|
|
276
|
+
- Fixed Address.create_and_verify and changed how errors are raised (thanks Dimitri Roche!)
|
|
277
|
+
- Require newer version of the multi_json package
|
|
278
|
+
|
|
279
|
+
## v2.1.6 (2015-06-10)
|
|
280
|
+
|
|
281
|
+
- Added Address message accessor for backwards compatability
|
|
282
|
+
|
|
283
|
+
## v2.1.5 (2015-06-10)
|
|
284
|
+
|
|
285
|
+
- Removed Address.message
|
|
286
|
+
|
|
287
|
+
## v2.1.4 (2015-06-03)
|
|
288
|
+
|
|
289
|
+
- Add Printer and PrintJob resources.
|
|
290
|
+
|
|
291
|
+
## v2.1.3 (2015-04-30)
|
|
292
|
+
|
|
293
|
+
- Bux fix, EasyPost::Errors no longer break with a nil json body.
|
|
294
|
+
|
|
295
|
+
## v2.1.2 (2015-04-29)
|
|
296
|
+
|
|
297
|
+
- EasyPost::Errors now correctly parse field errors and error codes.
|
|
298
|
+
|
|
299
|
+
## v2.1.1 (2015-04-15)
|
|
300
|
+
|
|
301
|
+
- CarrierAccount will now correctly save in-place modifications to credentials
|
|
302
|
+
- Nested variables should now be saved correctly across all models
|
|
303
|
+
- Fixed version numbering confusion (the previous version was 2.0.15, not 2.1.0)
|
|
304
|
+
|
|
305
|
+
## v2.0.15 (2015-04-15)
|
|
306
|
+
|
|
307
|
+
- Added tracker to shipment buy response
|
|
308
|
+
- Updated tracker tests
|
|
309
|
+
|
|
310
|
+
## v2.0.14 (2015-04-15)
|
|
311
|
+
|
|
312
|
+
- Added User and CarrierAccount models with CRUD functionality
|
|
313
|
+
|
|
314
|
+
## v2.0.13 (2014-10-30)
|
|
315
|
+
|
|
316
|
+
- Added Pickup, PickupRate resources.
|
|
317
|
+
- Added ability to pass api_key to a few resources that were missing it.
|
|
318
|
+
|
|
319
|
+
## v2.0.12 (2014-07-07)
|
|
320
|
+
|
|
321
|
+
- Added Item, Container, and Order resources.
|
|
322
|
+
- Fixed and added a lot of tests.
|
|
323
|
+
|
|
324
|
+
## v2.0.11 (2013-12-16)
|
|
325
|
+
|
|
326
|
+
- Added Event.receive method for parsing events sent by webhook.
|
|
327
|
+
- Fixed tests to account for the tracking code returning and array of details instead of a Hash
|
|
328
|
+
|
|
329
|
+
## v2.0.10 (2013-10-03)
|
|
330
|
+
|
|
331
|
+
- API Addition: Event resource added for webhook consumption.
|
|
332
|
+
|
|
333
|
+
## v2.0.9 (2013-09-19)
|
|
334
|
+
|
|
335
|
+
- Interface Change: Changed batch.scan_form to batch.create_scan_form to support the ability to refer to scan forms associated to batches.
|
|
336
|
+
|
|
337
|
+
## v2.0.3 (2013-07-31)
|
|
338
|
+
|
|
339
|
+
- API Addition: Tracker resource added. Trackers can be used to register any tracking code with EasyPost webhooks.
|
|
340
|
+
|
|
341
|
+
## v2.0.2 (2013-07-23)
|
|
342
|
+
|
|
343
|
+
- API Addition: Shipment.track_with_code returns tracking details for any tracking code.
|
|
344
|
+
|
|
345
|
+
## v2.0.1 (2013-07-07)
|
|
346
|
+
|
|
347
|
+
- API Addition: Address.create_and_verify returns a verified address in one step.
|
|
348
|
+
- API Addition: Shipment.label forces the creation of additional label formats (pdf, epl2, zpl).
|
|
349
|
+
- API Addition: Shipment.insure purchases insurance for a shipment.
|
|
350
|
+
- Library Update: Added the ability to negatively filter carriers and services with Shipment.lowest_rate (e.g. '!usps').
|
|
351
|
+
|
|
352
|
+
## v2.0.0 (2013-06-25)
|
|
353
|
+
|
|
354
|
+
## v1.1.3 (2013-06-05)
|
|
355
|
+
|
|
356
|
+
## v1.1.2 (2013-06-05)
|
|
357
|
+
|
|
358
|
+
## v1.1.1 (2013-02-12)
|
|
359
|
+
|
|
360
|
+
## v1.1.0 (2013-01-29)
|
|
361
|
+
|
|
362
|
+
## v1.0.8 (2012-11-19)
|
|
363
|
+
|
|
364
|
+
## v1.0.7 (2012-11-19)
|
|
365
|
+
|
|
366
|
+
## v1.0.6 (2012-11-19)
|
|
367
|
+
|
|
368
|
+
## v1.0.5 (2012-11-19)
|
|
369
|
+
|
|
370
|
+
## v1.0.4 (2012-11-14)
|
|
371
|
+
|
|
372
|
+
## v1.0.3 (2012-11-13)
|
|
373
|
+
|
|
374
|
+
## v1.0.2 (2012-11-13)
|
|
375
|
+
|
|
376
|
+
## v1.0.1 (2012-11-13)
|
|
377
|
+
|
|
378
|
+
## v1.0.0 (2012-11-02)
|
data/Gemfile
CHANGED