easypost 6.4.0 → 6.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 643a95f0b48e9abedc30e67d868ec3538d8d896b9c385734966805c83e72bd90
4
- data.tar.gz: a532de25388ea110f152e77205bea2104228e83e7279dc66d0b500238d5b8416
3
+ metadata.gz: cc0f7030b523713e8c1e2a0b870c63f69cd9024ccea7fd5c6959f923e6f72547
4
+ data.tar.gz: dfdcf85da989c0f824e8fb84322098549c170c100beebc4abbc954709f634cf5
5
5
  SHA512:
6
- metadata.gz: 94b9cf67261d5c9bba01183812bef018d0b4918cc5f3593befdff2884095816299585bf33d86ee0de14015814c53ddd2911b9de85692c9c73421e1133cd57605
7
- data.tar.gz: ba8c81ed037de3ccad7441eba06111eefb7430e69ac36169dd3409efa7965a092b18bc114d3767610dcb15453a6bfeed584073f35a986214b96f5eab4c6e2dcb
6
+ metadata.gz: e92cef64a1a092f00e1064e57057504b43d7f3d07207bb7daedaa9e1d5579b72fea7e97e20f1d6fbe585d13ace12e1569b33b5193eb7c74479620deab4872ae0
7
+ data.tar.gz: 979eb782073f63d9dc0acba422aa694f0c14e9eaf8c5a67ad384d266a0e5972e807a90f3632714b7dbe6bfd8b84487bc25d4f52b37a304ba2ff3c60ff512cdbd
@@ -13,10 +13,8 @@ jobs:
13
13
  matrix:
14
14
  rubyversion: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
15
15
  steps:
16
- - name: Checkout Repository
17
- uses: actions/checkout@v3
18
- - name: Set up Ruby
19
- uses: ruby/setup-ruby@v1
16
+ - uses: actions/checkout@v4
17
+ - uses: ruby/setup-ruby@v1
20
18
  with:
21
19
  ruby-version: ${{ matrix.rubyversion }}
22
20
  rubygems: '3.3.0'
@@ -34,10 +32,8 @@ jobs:
34
32
  lint:
35
33
  runs-on: ubuntu-latest
36
34
  steps:
37
- - name: Checkout Repository
38
- uses: actions/checkout@v3
39
- - name: Set up Ruby
40
- uses: ruby/setup-ruby@v1
35
+ - uses: actions/checkout@v4
36
+ - uses: ruby/setup-ruby@v1
41
37
  with:
42
38
  ruby-version: '3.3'
43
39
  rubygems: '3.3.0'
@@ -52,10 +48,8 @@ jobs:
52
48
  if: github.ref == 'refs/heads/master'
53
49
  runs-on: ubuntu-latest
54
50
  steps:
55
- - name: Checkout Repository
56
- uses: actions/checkout@v3
57
- - name: Set up Ruby
58
- uses: ruby/setup-ruby@v1
51
+ - uses: actions/checkout@v4
52
+ - uses: ruby/setup-ruby@v1
59
53
  with:
60
54
  ruby-version: '3.3'
61
55
  rubygems: '3.3.0'
@@ -0,0 +1,33 @@
1
+ name: release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch: ~
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: '3.3'
16
+ rubygems: '3.3.0'
17
+ bundler-cache: true
18
+ - name: Build Package
19
+ run: make install build
20
+ - name: Publish to RubyGems
21
+ run: |
22
+ mkdir -p $HOME/.gem
23
+ touch $HOME/.gem/credentials
24
+ chmod 0600 $HOME/.gem/credentials
25
+ printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
26
+ gem push dist/*.gem
27
+ env:
28
+ RUBYGEMS_API_KEY: '${{secrets.RUBYGEMS_API_KEY}}'
29
+ - name: Upload assets to release
30
+ uses: AButler/upload-release-assets@v3.0
31
+ with:
32
+ files: 'dist/*'
33
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v6.4.1 (2024-08-09)
4
+
5
+ - Send GET requests as query parameters instead of JSON body parameters
6
+ - Fix get_next_page_of_children function for User service with correct filter key
7
+
3
8
  ## v6.4.0 (2024-07-24)
4
9
 
5
10
  - Adds new `Claim` service for filing claims on EasyPost shipments and insurances
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.4.0
1
+ 6.4.1
@@ -74,17 +74,17 @@ class EasyPost::Client
74
74
  #
75
75
  # @param method [Symbol] the HTTP Verb (get, method, put, post, etc.)
76
76
  # @param endpoint [String] URI path of the resource
77
- # @param body [Object] (nil) object to be dumped to JSON
77
+ # @param params [Object] (nil) object to be used as the request parameters
78
78
  # @param api_version [String] the version of API to hit
79
79
  # @raise [EasyPost::Error] if the response has a non-2xx status code
80
80
  # @return [Hash] JSON object parsed from the response body
81
81
  def make_request(
82
82
  method,
83
83
  endpoint,
84
- body = nil,
84
+ params = nil,
85
85
  api_version = EasyPost::InternalUtilities::Constants::API_VERSION
86
86
  )
87
- response = @http_client.request(method, endpoint, nil, body, api_version)
87
+ response = @http_client.request(method, endpoint, nil, params, api_version)
88
88
 
89
89
  potential_error = EasyPost::Errors::ApiError.handle_api_error(response)
90
90
  raise potential_error unless potential_error.nil?
@@ -14,26 +14,35 @@ class EasyPost::HttpClient
14
14
  method,
15
15
  path,
16
16
  headers = nil,
17
- body = nil,
17
+ params = nil,
18
18
  api_version = EasyPost::InternalUtilities::Constants::API_VERSION
19
19
  )
20
20
  # Remove leading slash from path.
21
21
  path = path[1..] if path[0] == '/'
22
22
 
23
- uri = URI.parse("#{@base_url}/#{api_version}/#{path}")
24
23
  headers = @config[:headers].merge(headers || {})
25
- serialized_body = JSON.dump(EasyPost::InternalUtilities.objects_to_ids(body)) if body
26
24
  open_timeout = @config[:open_timeout]
27
25
  read_timeout = @config[:read_timeout]
28
26
  request_timestamp = Time.now
29
27
  request_uuid = SecureRandom.uuid
30
28
 
29
+ uri = URI.parse("#{@base_url}/#{api_version}/#{path}")
30
+ serialized_body = nil
31
+
32
+ if params
33
+ if [:get, :delete].include?(method)
34
+ uri.query = URI.encode_www_form(params)
35
+ elsif params
36
+ serialized_body = JSON.dump(EasyPost::InternalUtilities.objects_to_ids(params))
37
+ end
38
+ end
39
+
31
40
  if EasyPost::Hooks.any_subscribers?(:request)
32
41
  request_context = EasyPost::Hooks::RequestContext.new(
33
42
  method: method,
34
43
  path: uri.to_s,
35
44
  headers: headers,
36
- request_body: body,
45
+ request_body: serialized_body,
37
46
  request_timestamp: request_timestamp,
38
47
  request_uuid: request_uuid,
39
48
  )
@@ -90,7 +90,7 @@ Please use `retrieve_api_keys_for_user` in the `api_key` service instead.'
90
90
  def get_next_page_of_children(collection, page_size = nil)
91
91
  raise EasyPost::Errors::EndOfPaginationError.new unless more_pages?(collection)
92
92
 
93
- params = { before_id: collection.children.last.id }
93
+ params = { after_id: collection.children.last.id }
94
94
  params[:page_size] = page_size unless page_size.nil?
95
95
 
96
96
  all_children(params)
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: 6.4.0
4
+ version: 6.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - EasyPost Developers
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-24 00:00:00.000000000 Z
11
+ date: 2024-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: brakeman
@@ -205,6 +205,7 @@ files:
205
205
  - ".github/ISSUE_TEMPLATE/feature_request.yml"
206
206
  - ".github/PULL_REQUEST_TEMPLATE.md"
207
207
  - ".github/workflows/ci.yml"
208
+ - ".github/workflows/release.yml"
208
209
  - ".gitignore"
209
210
  - ".gitmodules"
210
211
  - CHANGELOG.md
@@ -326,7 +327,7 @@ homepage: https://www.easypost.com/docs
326
327
  licenses:
327
328
  - MIT
328
329
  metadata: {}
329
- post_install_message:
330
+ post_install_message:
330
331
  rdoc_options: []
331
332
  require_paths:
332
333
  - lib
@@ -341,8 +342,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
341
342
  - !ruby/object:Gem::Version
342
343
  version: '0'
343
344
  requirements: []
344
- rubygems_version: 3.3.3
345
- signing_key:
345
+ rubygems_version: 3.5.11
346
+ signing_key:
346
347
  specification_version: 4
347
348
  summary: EasyPost Ruby Client Library
348
349
  test_files: []