surge_api 0.11.0 → 0.13.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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/README.md +1 -1
  4. data/lib/surge_api/internal/util.rb +31 -0
  5. data/lib/surge_api/models/blast_create_params.rb +4 -4
  6. data/lib/surge_api/models/campaign.rb +0 -1
  7. data/lib/surge_api/models/phone_number.rb +9 -1
  8. data/lib/surge_api/models/phone_number_attached_to_campaign_webhook_event.rb +96 -0
  9. data/lib/surge_api/models/recording_list_params.rb +34 -0
  10. data/lib/surge_api/models/recording_list_response.rb +101 -0
  11. data/lib/surge_api/models/recording_retrieve_params.rb +14 -0
  12. data/lib/surge_api/models/recording_retrieve_response.rb +101 -0
  13. data/lib/surge_api/models/unwrap_webhook_event.rb +3 -1
  14. data/lib/surge_api/models/user_list_params.rb +34 -0
  15. data/lib/surge_api/models.rb +8 -0
  16. data/lib/surge_api/resources/accounts.rb +2 -1
  17. data/lib/surge_api/resources/blasts.rb +1 -1
  18. data/lib/surge_api/resources/campaigns.rb +2 -1
  19. data/lib/surge_api/resources/contacts.rb +2 -1
  20. data/lib/surge_api/resources/messages.rb +2 -1
  21. data/lib/surge_api/resources/phone_numbers.rb +2 -1
  22. data/lib/surge_api/resources/recordings.rb +51 -0
  23. data/lib/surge_api/resources/users.rb +31 -0
  24. data/lib/surge_api/resources/webhooks.rb +1 -1
  25. data/lib/surge_api/version.rb +1 -1
  26. data/lib/surge_api.rb +6 -0
  27. data/rbi/surge_api/internal/util.rbi +20 -0
  28. data/rbi/surge_api/models/blast_create_params.rbi +4 -4
  29. data/rbi/surge_api/models/campaign.rbi +0 -1
  30. data/rbi/surge_api/models/phone_number.rbi +8 -0
  31. data/rbi/surge_api/models/phone_number_attached_to_campaign_webhook_event.rbi +181 -0
  32. data/rbi/surge_api/models/recording_list_params.rbi +59 -0
  33. data/rbi/surge_api/models/recording_list_response.rbi +209 -0
  34. data/rbi/surge_api/models/recording_retrieve_params.rbi +27 -0
  35. data/rbi/surge_api/models/recording_retrieve_response.rbi +211 -0
  36. data/rbi/surge_api/models/unwrap_webhook_event.rbi +1 -0
  37. data/rbi/surge_api/models/user_list_params.rbi +59 -0
  38. data/rbi/surge_api/models.rbi +9 -0
  39. data/rbi/surge_api/resources/blasts.rbi +2 -2
  40. data/rbi/surge_api/resources/recordings.rbi +37 -0
  41. data/rbi/surge_api/resources/users.rbi +21 -0
  42. data/rbi/surge_api/resources/webhooks.rbi +1 -0
  43. data/sig/surge_api/internal/util.rbs +10 -0
  44. data/sig/surge_api/models/campaign.rbs +1 -8
  45. data/sig/surge_api/models/phone_number.rbs +10 -1
  46. data/sig/surge_api/models/phone_number_attached_to_campaign_webhook_event.rbs +79 -0
  47. data/sig/surge_api/models/recording_list_params.rbs +32 -0
  48. data/sig/surge_api/models/recording_list_response.rbs +94 -0
  49. data/sig/surge_api/models/recording_retrieve_params.rbs +15 -0
  50. data/sig/surge_api/models/recording_retrieve_response.rbs +94 -0
  51. data/sig/surge_api/models/unwrap_webhook_event.rbs +1 -0
  52. data/sig/surge_api/models/user_list_params.rbs +32 -0
  53. data/sig/surge_api/models.rbs +8 -0
  54. data/sig/surge_api/resources/recordings.rbs +12 -0
  55. data/sig/surge_api/resources/users.rbs +7 -0
  56. data/sig/surge_api/resources/webhooks.rbs +1 -0
  57. metadata +20 -2
@@ -0,0 +1,209 @@
1
+ # typed: strong
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ class RecordingListResponse < SurgeAPI::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ SurgeAPI::Models::RecordingListResponse,
10
+ SurgeAPI::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The unique identifier for the recording
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # The call that produced this recording
19
+ sig { returns(SurgeAPI::Models::RecordingListResponse::Call) }
20
+ attr_reader :call
21
+
22
+ sig do
23
+ params(call: SurgeAPI::Models::RecordingListResponse::Call::OrHash).void
24
+ end
25
+ attr_writer :call
26
+
27
+ # The duration of the recording in seconds
28
+ sig { returns(Integer) }
29
+ attr_accessor :duration
30
+
31
+ # A call recording
32
+ sig do
33
+ params(
34
+ id: String,
35
+ call: SurgeAPI::Models::RecordingListResponse::Call::OrHash,
36
+ duration: Integer
37
+ ).returns(T.attached_class)
38
+ end
39
+ def self.new(
40
+ # The unique identifier for the recording
41
+ id:,
42
+ # The call that produced this recording
43
+ call:,
44
+ # The duration of the recording in seconds
45
+ duration:
46
+ )
47
+ end
48
+
49
+ sig do
50
+ override.returns(
51
+ {
52
+ id: String,
53
+ call: SurgeAPI::Models::RecordingListResponse::Call,
54
+ duration: Integer
55
+ }
56
+ )
57
+ end
58
+ def to_hash
59
+ end
60
+
61
+ class Call < SurgeAPI::Internal::Type::BaseModel
62
+ OrHash =
63
+ T.type_alias do
64
+ T.any(
65
+ SurgeAPI::Models::RecordingListResponse::Call,
66
+ SurgeAPI::Internal::AnyHash
67
+ )
68
+ end
69
+
70
+ # The unique identifier for the call
71
+ sig { returns(String) }
72
+ attr_accessor :id
73
+
74
+ # A contact who has consented to receive messages
75
+ sig { returns(SurgeAPI::Contact) }
76
+ attr_reader :contact
77
+
78
+ sig { params(contact: SurgeAPI::Contact::OrHash).void }
79
+ attr_writer :contact
80
+
81
+ # The duration of the call in seconds
82
+ sig { returns(Integer) }
83
+ attr_accessor :duration
84
+
85
+ # When the call was initiated
86
+ sig { returns(Time) }
87
+ attr_accessor :initiated_at
88
+
89
+ # The status of the call
90
+ sig do
91
+ returns(
92
+ SurgeAPI::Models::RecordingListResponse::Call::Status::TaggedSymbol
93
+ )
94
+ end
95
+ attr_accessor :status
96
+
97
+ # The call that produced this recording
98
+ sig do
99
+ params(
100
+ id: String,
101
+ contact: SurgeAPI::Contact::OrHash,
102
+ duration: Integer,
103
+ initiated_at: Time,
104
+ status:
105
+ SurgeAPI::Models::RecordingListResponse::Call::Status::OrSymbol
106
+ ).returns(T.attached_class)
107
+ end
108
+ def self.new(
109
+ # The unique identifier for the call
110
+ id:,
111
+ # A contact who has consented to receive messages
112
+ contact:,
113
+ # The duration of the call in seconds
114
+ duration:,
115
+ # When the call was initiated
116
+ initiated_at:,
117
+ # The status of the call
118
+ status:
119
+ )
120
+ end
121
+
122
+ sig do
123
+ override.returns(
124
+ {
125
+ id: String,
126
+ contact: SurgeAPI::Contact,
127
+ duration: Integer,
128
+ initiated_at: Time,
129
+ status:
130
+ SurgeAPI::Models::RecordingListResponse::Call::Status::TaggedSymbol
131
+ }
132
+ )
133
+ end
134
+ def to_hash
135
+ end
136
+
137
+ # The status of the call
138
+ module Status
139
+ extend SurgeAPI::Internal::Type::Enum
140
+
141
+ TaggedSymbol =
142
+ T.type_alias do
143
+ T.all(
144
+ Symbol,
145
+ SurgeAPI::Models::RecordingListResponse::Call::Status
146
+ )
147
+ end
148
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
149
+
150
+ BUSY =
151
+ T.let(
152
+ :busy,
153
+ SurgeAPI::Models::RecordingListResponse::Call::Status::TaggedSymbol
154
+ )
155
+ CANCELED =
156
+ T.let(
157
+ :canceled,
158
+ SurgeAPI::Models::RecordingListResponse::Call::Status::TaggedSymbol
159
+ )
160
+ COMPLETED =
161
+ T.let(
162
+ :completed,
163
+ SurgeAPI::Models::RecordingListResponse::Call::Status::TaggedSymbol
164
+ )
165
+ FAILED =
166
+ T.let(
167
+ :failed,
168
+ SurgeAPI::Models::RecordingListResponse::Call::Status::TaggedSymbol
169
+ )
170
+ IN_PROGRESS =
171
+ T.let(
172
+ :in_progress,
173
+ SurgeAPI::Models::RecordingListResponse::Call::Status::TaggedSymbol
174
+ )
175
+ MISSED =
176
+ T.let(
177
+ :missed,
178
+ SurgeAPI::Models::RecordingListResponse::Call::Status::TaggedSymbol
179
+ )
180
+ NO_ANSWER =
181
+ T.let(
182
+ :no_answer,
183
+ SurgeAPI::Models::RecordingListResponse::Call::Status::TaggedSymbol
184
+ )
185
+ QUEUED =
186
+ T.let(
187
+ :queued,
188
+ SurgeAPI::Models::RecordingListResponse::Call::Status::TaggedSymbol
189
+ )
190
+ RINGING =
191
+ T.let(
192
+ :ringing,
193
+ SurgeAPI::Models::RecordingListResponse::Call::Status::TaggedSymbol
194
+ )
195
+
196
+ sig do
197
+ override.returns(
198
+ T::Array[
199
+ SurgeAPI::Models::RecordingListResponse::Call::Status::TaggedSymbol
200
+ ]
201
+ )
202
+ end
203
+ def self.values
204
+ end
205
+ end
206
+ end
207
+ end
208
+ end
209
+ end
@@ -0,0 +1,27 @@
1
+ # typed: strong
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ class RecordingRetrieveParams < 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::RecordingRetrieveParams, SurgeAPI::Internal::AnyHash)
12
+ end
13
+
14
+ sig do
15
+ params(request_options: SurgeAPI::RequestOptions::OrHash).returns(
16
+ T.attached_class
17
+ )
18
+ end
19
+ def self.new(request_options: {})
20
+ end
21
+
22
+ sig { override.returns({ request_options: SurgeAPI::RequestOptions }) }
23
+ def to_hash
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,211 @@
1
+ # typed: strong
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ class RecordingRetrieveResponse < SurgeAPI::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ SurgeAPI::Models::RecordingRetrieveResponse,
10
+ SurgeAPI::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The unique identifier for the recording
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # The call that produced this recording
19
+ sig { returns(SurgeAPI::Models::RecordingRetrieveResponse::Call) }
20
+ attr_reader :call
21
+
22
+ sig do
23
+ params(
24
+ call: SurgeAPI::Models::RecordingRetrieveResponse::Call::OrHash
25
+ ).void
26
+ end
27
+ attr_writer :call
28
+
29
+ # The duration of the recording in seconds
30
+ sig { returns(Integer) }
31
+ attr_accessor :duration
32
+
33
+ # A call recording
34
+ sig do
35
+ params(
36
+ id: String,
37
+ call: SurgeAPI::Models::RecordingRetrieveResponse::Call::OrHash,
38
+ duration: Integer
39
+ ).returns(T.attached_class)
40
+ end
41
+ def self.new(
42
+ # The unique identifier for the recording
43
+ id:,
44
+ # The call that produced this recording
45
+ call:,
46
+ # The duration of the recording in seconds
47
+ duration:
48
+ )
49
+ end
50
+
51
+ sig do
52
+ override.returns(
53
+ {
54
+ id: String,
55
+ call: SurgeAPI::Models::RecordingRetrieveResponse::Call,
56
+ duration: Integer
57
+ }
58
+ )
59
+ end
60
+ def to_hash
61
+ end
62
+
63
+ class Call < SurgeAPI::Internal::Type::BaseModel
64
+ OrHash =
65
+ T.type_alias do
66
+ T.any(
67
+ SurgeAPI::Models::RecordingRetrieveResponse::Call,
68
+ SurgeAPI::Internal::AnyHash
69
+ )
70
+ end
71
+
72
+ # The unique identifier for the call
73
+ sig { returns(String) }
74
+ attr_accessor :id
75
+
76
+ # A contact who has consented to receive messages
77
+ sig { returns(SurgeAPI::Contact) }
78
+ attr_reader :contact
79
+
80
+ sig { params(contact: SurgeAPI::Contact::OrHash).void }
81
+ attr_writer :contact
82
+
83
+ # The duration of the call in seconds
84
+ sig { returns(Integer) }
85
+ attr_accessor :duration
86
+
87
+ # When the call was initiated
88
+ sig { returns(Time) }
89
+ attr_accessor :initiated_at
90
+
91
+ # The status of the call
92
+ sig do
93
+ returns(
94
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::TaggedSymbol
95
+ )
96
+ end
97
+ attr_accessor :status
98
+
99
+ # The call that produced this recording
100
+ sig do
101
+ params(
102
+ id: String,
103
+ contact: SurgeAPI::Contact::OrHash,
104
+ duration: Integer,
105
+ initiated_at: Time,
106
+ status:
107
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::OrSymbol
108
+ ).returns(T.attached_class)
109
+ end
110
+ def self.new(
111
+ # The unique identifier for the call
112
+ id:,
113
+ # A contact who has consented to receive messages
114
+ contact:,
115
+ # The duration of the call in seconds
116
+ duration:,
117
+ # When the call was initiated
118
+ initiated_at:,
119
+ # The status of the call
120
+ status:
121
+ )
122
+ end
123
+
124
+ sig do
125
+ override.returns(
126
+ {
127
+ id: String,
128
+ contact: SurgeAPI::Contact,
129
+ duration: Integer,
130
+ initiated_at: Time,
131
+ status:
132
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::TaggedSymbol
133
+ }
134
+ )
135
+ end
136
+ def to_hash
137
+ end
138
+
139
+ # The status of the call
140
+ module Status
141
+ extend SurgeAPI::Internal::Type::Enum
142
+
143
+ TaggedSymbol =
144
+ T.type_alias do
145
+ T.all(
146
+ Symbol,
147
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status
148
+ )
149
+ end
150
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
151
+
152
+ BUSY =
153
+ T.let(
154
+ :busy,
155
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::TaggedSymbol
156
+ )
157
+ CANCELED =
158
+ T.let(
159
+ :canceled,
160
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::TaggedSymbol
161
+ )
162
+ COMPLETED =
163
+ T.let(
164
+ :completed,
165
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::TaggedSymbol
166
+ )
167
+ FAILED =
168
+ T.let(
169
+ :failed,
170
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::TaggedSymbol
171
+ )
172
+ IN_PROGRESS =
173
+ T.let(
174
+ :in_progress,
175
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::TaggedSymbol
176
+ )
177
+ MISSED =
178
+ T.let(
179
+ :missed,
180
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::TaggedSymbol
181
+ )
182
+ NO_ANSWER =
183
+ T.let(
184
+ :no_answer,
185
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::TaggedSymbol
186
+ )
187
+ QUEUED =
188
+ T.let(
189
+ :queued,
190
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::TaggedSymbol
191
+ )
192
+ RINGING =
193
+ T.let(
194
+ :ringing,
195
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::TaggedSymbol
196
+ )
197
+
198
+ sig do
199
+ override.returns(
200
+ T::Array[
201
+ SurgeAPI::Models::RecordingRetrieveResponse::Call::Status::TaggedSymbol
202
+ ]
203
+ )
204
+ end
205
+ def self.values
206
+ end
207
+ end
208
+ end
209
+ end
210
+ end
211
+ end
@@ -18,6 +18,7 @@ module SurgeAPI
18
18
  SurgeAPI::MessageFailedWebhookEvent,
19
19
  SurgeAPI::MessageReceivedWebhookEvent,
20
20
  SurgeAPI::MessageSentWebhookEvent,
21
+ SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent,
21
22
  SurgeAPI::RecordingCompletedWebhookEvent,
22
23
  SurgeAPI::VoicemailReceivedWebhookEvent
23
24
  )
@@ -0,0 +1,59 @@
1
+ # typed: strong
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ class UserListParams < 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::UserListParams, SurgeAPI::Internal::AnyHash)
12
+ end
13
+
14
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_reader :after
17
+
18
+ sig { params(after: String).void }
19
+ attr_writer :after
20
+
21
+ # Cursor for backward pagination. Use the previous_cursor from a previous
22
+ # response.
23
+ sig { returns(T.nilable(String)) }
24
+ attr_reader :before
25
+
26
+ sig { params(before: String).void }
27
+ attr_writer :before
28
+
29
+ sig do
30
+ params(
31
+ after: String,
32
+ before: String,
33
+ request_options: SurgeAPI::RequestOptions::OrHash
34
+ ).returns(T.attached_class)
35
+ end
36
+ def self.new(
37
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
38
+ after: nil,
39
+ # Cursor for backward pagination. Use the previous_cursor from a previous
40
+ # response.
41
+ before: nil,
42
+ request_options: {}
43
+ )
44
+ end
45
+
46
+ sig do
47
+ override.returns(
48
+ {
49
+ after: String,
50
+ before: String,
51
+ request_options: SurgeAPI::RequestOptions
52
+ }
53
+ )
54
+ end
55
+ def to_hash
56
+ end
57
+ end
58
+ end
59
+ end
@@ -74,6 +74,9 @@ module SurgeAPI
74
74
 
75
75
  PhoneNumber = SurgeAPI::Models::PhoneNumber
76
76
 
77
+ PhoneNumberAttachedToCampaignWebhookEvent =
78
+ SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent
79
+
77
80
  PhoneNumberListParams = SurgeAPI::Models::PhoneNumberListParams
78
81
 
79
82
  PhoneNumberPurchaseParams = SurgeAPI::Models::PhoneNumberPurchaseParams
@@ -85,6 +88,10 @@ module SurgeAPI
85
88
 
86
89
  RecordingGetFileParams = SurgeAPI::Models::RecordingGetFileParams
87
90
 
91
+ RecordingListParams = SurgeAPI::Models::RecordingListParams
92
+
93
+ RecordingRetrieveParams = SurgeAPI::Models::RecordingRetrieveParams
94
+
88
95
  UnwrapWebhookEvent = SurgeAPI::Models::UnwrapWebhookEvent
89
96
 
90
97
  User = SurgeAPI::Models::User
@@ -95,6 +102,8 @@ module SurgeAPI
95
102
 
96
103
  UserDeleteParams = SurgeAPI::Models::UserDeleteParams
97
104
 
105
+ UserListParams = SurgeAPI::Models::UserListParams
106
+
98
107
  UserRetrieveParams = SurgeAPI::Models::UserRetrieveParams
99
108
 
100
109
  UserTokenResponse = SurgeAPI::Models::UserTokenResponse
@@ -33,12 +33,12 @@ module SurgeAPI
33
33
  from: nil,
34
34
  # Optional name for the blast.
35
35
  name: nil,
36
- # Deprecated. Use `to` instead.
36
+ # Deprecated. Use `to` with audience IDs instead.
37
37
  segments: nil,
38
38
  # When to send the blast. If not provided, sends immediately.
39
39
  send_at: nil,
40
40
  # List of recipients to whom the blast should be sent. This can be a combination
41
- # of contact IDs, segment IDs, and phone numbers.
41
+ # of contact IDs, audience IDs, and phone numbers.
42
42
  to: nil,
43
43
  request_options: {}
44
44
  )
@@ -3,6 +3,43 @@
3
3
  module SurgeAPI
4
4
  module Resources
5
5
  class Recordings
6
+ # Retrieves a Recording object.
7
+ sig do
8
+ params(
9
+ id: String,
10
+ request_options: SurgeAPI::RequestOptions::OrHash
11
+ ).returns(SurgeAPI::Models::RecordingRetrieveResponse)
12
+ end
13
+ def retrieve(
14
+ # The ID of the recording to retrieve.
15
+ id,
16
+ request_options: {}
17
+ )
18
+ end
19
+
20
+ # List all recordings for an account with cursor-based pagination.
21
+ sig do
22
+ params(
23
+ account_id: String,
24
+ after: String,
25
+ before: String,
26
+ request_options: SurgeAPI::RequestOptions::OrHash
27
+ ).returns(
28
+ SurgeAPI::Internal::Cursor[SurgeAPI::Models::RecordingListResponse]
29
+ )
30
+ end
31
+ def list(
32
+ # The account ID to list recordings for.
33
+ account_id,
34
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
35
+ after: nil,
36
+ # Cursor for backward pagination. Use the previous_cursor from a previous
37
+ # response.
38
+ before: nil,
39
+ request_options: {}
40
+ )
41
+ end
42
+
6
43
  # Deletes a recording. The recording file will be removed from storage
7
44
  # asynchronously.
8
45
  sig do
@@ -69,6 +69,27 @@ module SurgeAPI
69
69
  )
70
70
  end
71
71
 
72
+ # List all users for an account with cursor-based pagination.
73
+ sig do
74
+ params(
75
+ account_id: String,
76
+ after: String,
77
+ before: String,
78
+ request_options: SurgeAPI::RequestOptions::OrHash
79
+ ).returns(SurgeAPI::Internal::Cursor[SurgeAPI::User])
80
+ end
81
+ def list(
82
+ # The account ID to list users for.
83
+ account_id,
84
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
85
+ after: nil,
86
+ # Cursor for backward pagination. Use the previous_cursor from a previous
87
+ # response.
88
+ before: nil,
89
+ request_options: {}
90
+ )
91
+ end
92
+
72
93
  # Deletes a user.
73
94
  #
74
95
  # Once a user has been deleted, they will no longer be permitted to access any of
@@ -16,6 +16,7 @@ module SurgeAPI
16
16
  SurgeAPI::MessageFailedWebhookEvent,
17
17
  SurgeAPI::MessageReceivedWebhookEvent,
18
18
  SurgeAPI::MessageSentWebhookEvent,
19
+ SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent,
19
20
  SurgeAPI::RecordingCompletedWebhookEvent,
20
21
  SurgeAPI::VoicemailReceivedWebhookEvent
21
22
  )
@@ -106,6 +106,16 @@ module SurgeAPI
106
106
  JSON_CONTENT: Regexp
107
107
  JSONL_CONTENT: Regexp
108
108
 
109
+ def encode_query_params: (
110
+ ::Hash[Symbol, top] query
111
+ ) -> ::Hash[Symbol, top]
112
+
113
+ private def write_query_param_element!: (
114
+ ::Hash[Symbol, top] collection,
115
+ String key,
116
+ top element
117
+ ) -> nil
118
+
109
119
  def self?.write_multipart_content: (
110
120
  Enumerator::Yielder y,
111
121
  val: top,
@@ -84,13 +84,7 @@ module SurgeAPI
84
84
  end
85
85
 
86
86
  type status =
87
- :active
88
- | :canceled
89
- | :created
90
- | :deactivated
91
- | :in_review
92
- | :pending
93
- | :rejected
87
+ :active | :canceled | :created | :deactivated | :in_review | :rejected
94
88
 
95
89
  module Status
96
90
  extend SurgeAPI::Internal::Type::Enum
@@ -100,7 +94,6 @@ module SurgeAPI
100
94
  CREATED: :created
101
95
  DEACTIVATED: :deactivated
102
96
  IN_REVIEW: :in_review
103
- PENDING: :pending
104
97
  REJECTED: :rejected
105
98
 
106
99
  def self?.values: -> ::Array[SurgeAPI::Models::Campaign::status]