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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf70e2dc494e17135e948383614cf4a98b4710b5cc11ef211a7a4abeb62bfd26
4
- data.tar.gz: 0bfd0eb5612a801a91a5d3dc0910de65ce1ed7c245466af750734e63902de8a9
3
+ metadata.gz: 81364bbceadc7ad152045b898442649e7b8b3207eefc535a0e8636d8bdb89ead
4
+ data.tar.gz: cca60516b813bfcbc472bf934a9a2bccc7754511cfa674e76dd28b6482994e04
5
5
  SHA512:
6
- metadata.gz: 229908ae959ad10bbc76146860cb9ed15b8f05a872fb8d651ec1160acd733bfcb10c6f0465395d7c4bec0fa4b11a5883b25ad8e912fe804c1741c4955bbea11b
7
- data.tar.gz: 9cfb4c1a4474c9663bd9f590a0f2ef034d544ebe2b14369e152702d2e01981a759c4c3f05b23d3f58351b42a5b0d17f97364423fe80ea209843f58007b8f0df8
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
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "surge_api", "~> 0.21.0"
20
+ gem "surge_api", "~> 0.22.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -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
@@ -183,7 +183,6 @@ module SurgeAPI
183
183
  CREATED = :created
184
184
  DEACTIVATED = :deactivated
185
185
  IN_REVIEW = :in_review
186
- REJECTED = :rejected
187
186
 
188
187
  # @!method self.values
189
188
  # @return [Array<Symbol>]
@@ -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
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SurgeAPI
4
- VERSION = "0.21.0"
4
+ VERSION = "0.22.0"
5
5
  end
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])
@@ -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
@@ -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
@@ -9,6 +9,11 @@ module SurgeAPI
9
9
  ?request_options: SurgeAPI::request_opts
10
10
  ) -> SurgeAPI::Account
11
11
 
12
+ def retrieve: (
13
+ String id,
14
+ ?request_options: SurgeAPI::request_opts
15
+ ) -> SurgeAPI::Account
16
+
12
17
  def update: (
13
18
  String id,
14
19
  ?brand_name: String,
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.21.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-07-22 00:00:00.000000000 Z
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