easypost 6.0.0 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/VERSION +1 -1
- data/lib/easypost/services/base.rb +5 -2
- data/lib/easypost/services/user.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e4fdfe13e13bd17de295a018e87a4b05c015b9c7b0d523b15720647bd2c9301
|
4
|
+
data.tar.gz: 6fa130eae97f8b84172683a51f03c29c31dc983dc0b47efa2462b906e8d7ce07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ebe1b2763c764ca26f5515deb1616f9caf6df8b23c446ed4ee3fd0752fd704f51d3ded775f1f3bcfb751c4de2c8b8b631eb013f168a6feaf503e47d84c14be3
|
7
|
+
data.tar.gz: de858e402e5121112ff2466f44dad3f9a94bd529bcc6916c5d92406fdbeaf8c46e077ac7582b1cdcb50b4e3b345a3dc4ff08cdc879e12a16791406db31b7f091
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v6.1.0 (2024-01-08)
|
4
|
+
|
5
|
+
- Add `all_children` and `get_next_page_of_children` in `user` service
|
6
|
+
|
3
7
|
## v6.0.0 (2023-12-06)
|
4
8
|
|
5
9
|
- Removes `with_carbon_offset` parameter from `create`, `buy` and `regenerate_rates` methods in the shipment service since now EasyPost offers carbon neutral shipments by default for free
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.
|
1
|
+
6.1.0
|
@@ -10,8 +10,11 @@ class EasyPost::Services::Service
|
|
10
10
|
|
11
11
|
protected
|
12
12
|
|
13
|
-
def get_all_helper(endpoint, cls, params, filters = nil)
|
14
|
-
response = @client.make_request(
|
13
|
+
def get_all_helper(endpoint, cls, params, filters = nil, beta = false)
|
14
|
+
response = @client.make_request(
|
15
|
+
:get, endpoint, params,
|
16
|
+
beta ? 'beta' : EasyPost::InternalUtilities::Constants::API_VERSION,
|
17
|
+
)
|
15
18
|
|
16
19
|
response[EasyPost::InternalUtilities::Constants::FILTERS_KEY] = filters unless filters.nil?
|
17
20
|
|
@@ -78,4 +78,21 @@ Please use `retrieve_api_keys_for_user` in the `api_key` service instead.'
|
|
78
78
|
|
79
79
|
EasyPost::InternalUtilities::Json.convert_json_to_object(response, EasyPost::Models::Brand)
|
80
80
|
end
|
81
|
+
|
82
|
+
# Retrieve all child Users.
|
83
|
+
def all_children(params = {})
|
84
|
+
filters = { key: 'children' }
|
85
|
+
|
86
|
+
get_all_helper('users/children', EasyPost::Models::User, params, filters)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Get the next page of child users.
|
90
|
+
def get_next_page_of_children(collection, page_size = nil)
|
91
|
+
raise EasyPost::Errors::EndOfPaginationError.new unless more_pages?(collection)
|
92
|
+
|
93
|
+
params = { before_id: collection.children.last.id }
|
94
|
+
params[:page_size] = page_size unless page_size.nil?
|
95
|
+
|
96
|
+
all_children(params)
|
97
|
+
end
|
81
98
|
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: 6.
|
4
|
+
version: 6.1.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: 2024-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brakeman
|