surge_api 0.21.0 → 0.22.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/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/lib/surge_api/models/account_retrieve_params.rb +22 -0
- data/lib/surge_api/models/campaign.rb +0 -1
- data/lib/surge_api/models.rb +2 -0
- data/lib/surge_api/resources/accounts.rb +20 -0
- data/lib/surge_api/version.rb +1 -1
- data/lib/surge_api.rb +1 -0
- data/rbi/surge_api/models/account_retrieve_params.rbi +40 -0
- data/rbi/surge_api/models/campaign.rbi +0 -1
- data/rbi/surge_api/models.rbi +2 -0
- data/rbi/surge_api/resources/accounts.rbi +14 -0
- data/sig/surge_api/models/account_retrieve_params.rbs +20 -0
- data/sig/surge_api/models/campaign.rbs +1 -3
- data/sig/surge_api/models.rbs +2 -0
- data/sig/surge_api/resources/accounts.rbs +5 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81364bbceadc7ad152045b898442649e7b8b3207eefc535a0e8636d8bdb89ead
|
|
4
|
+
data.tar.gz: cca60516b813bfcbc472bf934a9a2bccc7754511cfa674e76dd28b6482994e04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96dfe4fc1d1abe42a82b4321e1ccdd93763beec2595feb89c7bbfdee1e0ba7bdfaf757c5246e5cce2f1febf6185f7e9eced094e215f6a53f64336eeca3d94640
|
|
7
|
+
data.tar.gz: 8c580d749e58ad608241186d4cadfc61265299314c3c9cbecca34ca80f4e3a1c726ea4a4c6364cb9e87702113680eacea3d692d2bf7099b93f5a14fbec83ecac
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.22.0 (2026-08-04)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.21.0...v0.22.0](https://github.com/surgeapi/ruby-sdk/compare/v0.21.0...v0.22.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add get account endpoint ([011b8a3](https://github.com/surgeapi/ruby-sdk/commit/011b8a3c03d8cf5175e58944e5783ea7974a1188))
|
|
10
|
+
* **api:** remove campaign rejected status ([c5b66f9](https://github.com/surgeapi/ruby-sdk/commit/c5b66f919658888a3bb649c91cbb13252cd468ef))
|
|
11
|
+
|
|
3
12
|
## 0.21.0 (2026-07-22)
|
|
4
13
|
|
|
5
14
|
Full Changelog: [v0.20.0...v0.21.0](https://github.com/surgeapi/ruby-sdk/compare/v0.20.0...v0.21.0)
|
data/README.md
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SurgeAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see SurgeAPI::Resources::Accounts#retrieve
|
|
6
|
+
class AccountRetrieveParams < SurgeAPI::Internal::Type::BaseModel
|
|
7
|
+
extend SurgeAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include SurgeAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
# The ID of the account to retrieve.
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(id:, request_options: {})
|
|
17
|
+
# @param id [String] The ID of the account to retrieve.
|
|
18
|
+
#
|
|
19
|
+
# @param request_options [SurgeAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
data/lib/surge_api/models.rb
CHANGED
|
@@ -47,6 +47,8 @@ module SurgeAPI
|
|
|
47
47
|
|
|
48
48
|
AccountListParams = SurgeAPI::Models::AccountListParams
|
|
49
49
|
|
|
50
|
+
AccountRetrieveParams = SurgeAPI::Models::AccountRetrieveParams
|
|
51
|
+
|
|
50
52
|
AccountRetrieveStatusParams = SurgeAPI::Models::AccountRetrieveStatusParams
|
|
51
53
|
|
|
52
54
|
AccountStatus = SurgeAPI::Models::AccountStatus
|
|
@@ -34,6 +34,26 @@ module SurgeAPI
|
|
|
34
34
|
)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
# Retrieves an Account object.
|
|
38
|
+
#
|
|
39
|
+
# @overload retrieve(id, request_options: {})
|
|
40
|
+
#
|
|
41
|
+
# @param id [String] The ID of the account to retrieve.
|
|
42
|
+
#
|
|
43
|
+
# @param request_options [SurgeAPI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
44
|
+
#
|
|
45
|
+
# @return [SurgeAPI::Models::Account]
|
|
46
|
+
#
|
|
47
|
+
# @see SurgeAPI::Models::AccountRetrieveParams
|
|
48
|
+
def retrieve(id, params = {})
|
|
49
|
+
@client.request(
|
|
50
|
+
method: :get,
|
|
51
|
+
path: ["accounts/%1$s", id],
|
|
52
|
+
model: SurgeAPI::Account,
|
|
53
|
+
options: params[:request_options]
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
37
57
|
# Some parameter documentations has been truncated, see
|
|
38
58
|
# {SurgeAPI::Models::AccountUpdateParams} for more details.
|
|
39
59
|
#
|
data/lib/surge_api/version.rb
CHANGED
data/lib/surge_api.rb
CHANGED
|
@@ -60,6 +60,7 @@ require_relative "surge_api/models/account"
|
|
|
60
60
|
require_relative "surge_api/models/account_archive_params"
|
|
61
61
|
require_relative "surge_api/models/account_create_params"
|
|
62
62
|
require_relative "surge_api/models/account_list_params"
|
|
63
|
+
require_relative "surge_api/models/account_retrieve_params"
|
|
63
64
|
require_relative "surge_api/models/account_retrieve_status_params"
|
|
64
65
|
require_relative "surge_api/models/account_status"
|
|
65
66
|
require_relative "surge_api/models/account_update_params"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module SurgeAPI
|
|
4
|
+
module Models
|
|
5
|
+
class AccountRetrieveParams < SurgeAPI::Internal::Type::BaseModel
|
|
6
|
+
extend SurgeAPI::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include SurgeAPI::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(SurgeAPI::AccountRetrieveParams, SurgeAPI::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The ID of the account to retrieve.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
params(
|
|
20
|
+
id: String,
|
|
21
|
+
request_options: SurgeAPI::RequestOptions::OrHash
|
|
22
|
+
).returns(T.attached_class)
|
|
23
|
+
end
|
|
24
|
+
def self.new(
|
|
25
|
+
# The ID of the account to retrieve.
|
|
26
|
+
id:,
|
|
27
|
+
request_options: {}
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
sig do
|
|
32
|
+
override.returns(
|
|
33
|
+
{ id: String, request_options: SurgeAPI::RequestOptions }
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
def to_hash
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -276,7 +276,6 @@ module SurgeAPI
|
|
|
276
276
|
DEACTIVATED =
|
|
277
277
|
T.let(:deactivated, SurgeAPI::Campaign::Status::TaggedSymbol)
|
|
278
278
|
IN_REVIEW = T.let(:in_review, SurgeAPI::Campaign::Status::TaggedSymbol)
|
|
279
|
-
REJECTED = T.let(:rejected, SurgeAPI::Campaign::Status::TaggedSymbol)
|
|
280
279
|
|
|
281
280
|
sig do
|
|
282
281
|
override.returns(T::Array[SurgeAPI::Campaign::Status::TaggedSymbol])
|
data/rbi/surge_api/models.rbi
CHANGED
|
@@ -9,6 +9,8 @@ module SurgeAPI
|
|
|
9
9
|
|
|
10
10
|
AccountListParams = SurgeAPI::Models::AccountListParams
|
|
11
11
|
|
|
12
|
+
AccountRetrieveParams = SurgeAPI::Models::AccountRetrieveParams
|
|
13
|
+
|
|
12
14
|
AccountRetrieveStatusParams = SurgeAPI::Models::AccountRetrieveStatusParams
|
|
13
15
|
|
|
14
16
|
AccountStatus = SurgeAPI::Models::AccountStatus
|
|
@@ -33,6 +33,20 @@ module SurgeAPI
|
|
|
33
33
|
)
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
# Retrieves an Account object.
|
|
37
|
+
sig do
|
|
38
|
+
params(
|
|
39
|
+
id: String,
|
|
40
|
+
request_options: SurgeAPI::RequestOptions::OrHash
|
|
41
|
+
).returns(SurgeAPI::Account)
|
|
42
|
+
end
|
|
43
|
+
def retrieve(
|
|
44
|
+
# The ID of the account to retrieve.
|
|
45
|
+
id,
|
|
46
|
+
request_options: {}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
36
50
|
# Updates an Account
|
|
37
51
|
sig do
|
|
38
52
|
params(
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module SurgeAPI
|
|
2
|
+
module Models
|
|
3
|
+
type account_retrieve_params =
|
|
4
|
+
{ id: String } & SurgeAPI::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class AccountRetrieveParams < SurgeAPI::Internal::Type::BaseModel
|
|
7
|
+
extend SurgeAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include SurgeAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
id: String,
|
|
14
|
+
?request_options: SurgeAPI::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> { id: String, request_options: SurgeAPI::RequestOptions }
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -83,8 +83,7 @@ module SurgeAPI
|
|
|
83
83
|
def self?.values: -> ::Array[SurgeAPI::Models::Campaign::include_]
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
type status =
|
|
87
|
-
:active | :canceled | :created | :deactivated | :in_review | :rejected
|
|
86
|
+
type status = :active | :canceled | :created | :deactivated | :in_review
|
|
88
87
|
|
|
89
88
|
module Status
|
|
90
89
|
extend SurgeAPI::Internal::Type::Enum
|
|
@@ -94,7 +93,6 @@ module SurgeAPI
|
|
|
94
93
|
CREATED: :created
|
|
95
94
|
DEACTIVATED: :deactivated
|
|
96
95
|
IN_REVIEW: :in_review
|
|
97
|
-
REJECTED: :rejected
|
|
98
96
|
|
|
99
97
|
def self?.values: -> ::Array[SurgeAPI::Models::Campaign::status]
|
|
100
98
|
end
|
data/sig/surge_api/models.rbs
CHANGED
|
@@ -7,6 +7,8 @@ module SurgeAPI
|
|
|
7
7
|
|
|
8
8
|
class AccountListParams = SurgeAPI::Models::AccountListParams
|
|
9
9
|
|
|
10
|
+
class AccountRetrieveParams = SurgeAPI::Models::AccountRetrieveParams
|
|
11
|
+
|
|
10
12
|
class AccountRetrieveStatusParams = SurgeAPI::Models::AccountRetrieveStatusParams
|
|
11
13
|
|
|
12
14
|
class AccountStatus = SurgeAPI::Models::AccountStatus
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: surge_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.22.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Surge
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-08-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -88,6 +88,7 @@ files:
|
|
|
88
88
|
- lib/surge_api/models/account_archive_params.rb
|
|
89
89
|
- lib/surge_api/models/account_create_params.rb
|
|
90
90
|
- lib/surge_api/models/account_list_params.rb
|
|
91
|
+
- lib/surge_api/models/account_retrieve_params.rb
|
|
91
92
|
- lib/surge_api/models/account_retrieve_status_params.rb
|
|
92
93
|
- lib/surge_api/models/account_status.rb
|
|
93
94
|
- lib/surge_api/models/account_update_params.rb
|
|
@@ -201,6 +202,7 @@ files:
|
|
|
201
202
|
- rbi/surge_api/models/account_archive_params.rbi
|
|
202
203
|
- rbi/surge_api/models/account_create_params.rbi
|
|
203
204
|
- rbi/surge_api/models/account_list_params.rbi
|
|
205
|
+
- rbi/surge_api/models/account_retrieve_params.rbi
|
|
204
206
|
- rbi/surge_api/models/account_retrieve_status_params.rbi
|
|
205
207
|
- rbi/surge_api/models/account_status.rbi
|
|
206
208
|
- rbi/surge_api/models/account_update_params.rbi
|
|
@@ -313,6 +315,7 @@ files:
|
|
|
313
315
|
- sig/surge_api/models/account_archive_params.rbs
|
|
314
316
|
- sig/surge_api/models/account_create_params.rbs
|
|
315
317
|
- sig/surge_api/models/account_list_params.rbs
|
|
318
|
+
- sig/surge_api/models/account_retrieve_params.rbs
|
|
316
319
|
- sig/surge_api/models/account_retrieve_status_params.rbs
|
|
317
320
|
- sig/surge_api/models/account_status.rbs
|
|
318
321
|
- sig/surge_api/models/account_update_params.rbs
|