surge_api 0.23.0 → 0.25.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 (112) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +28 -0
  3. data/README.md +9 -9
  4. data/lib/surge_api/client.rb +4 -0
  5. data/lib/surge_api/internal/type/union.rb +2 -2
  6. data/lib/surge_api/models/account_retrieve_status_params.rb +1 -0
  7. data/lib/surge_api/models/call_ended_webhook_event.rb +8 -3
  8. data/lib/surge_api/models/campaign.rb +21 -13
  9. data/lib/surge_api/models/campaign_approved_webhook_event.rb +9 -1
  10. data/lib/surge_api/models/campaign_params.rb +11 -12
  11. data/lib/surge_api/models/campaign_rejected_webhook_event.rb +135 -0
  12. data/lib/surge_api/models/campaign_submitted_webhook_event.rb +74 -0
  13. data/lib/surge_api/models/campaign_update_params.rb +188 -1
  14. data/lib/surge_api/models/campaign_warning_webhook_event.rb +134 -0
  15. data/lib/surge_api/models/message.rb +42 -2
  16. data/lib/surge_api/models/message_delivered_webhook_event.rb +29 -1
  17. data/lib/surge_api/models/message_failed_webhook_event.rb +26 -5
  18. data/lib/surge_api/models/message_received_webhook_event.rb +29 -1
  19. data/lib/surge_api/models/message_sent_webhook_event.rb +29 -1
  20. data/lib/surge_api/models/phone_number.rb +9 -1
  21. data/lib/surge_api/models/phone_number_attached_to_campaign_webhook_event.rb +9 -1
  22. data/lib/surge_api/models/phone_number_imported_webhook_event.rb +160 -0
  23. data/lib/surge_api/models/phone_number_purchase_params.rb +9 -1
  24. data/lib/surge_api/models/phone_number_update_params.rb +9 -1
  25. data/lib/surge_api/models/toll_free_campaign.rb +132 -0
  26. data/lib/surge_api/models/toll_free_campaign_consent_flow.rb +176 -0
  27. data/lib/surge_api/models/toll_free_campaign_create_params.rb +22 -0
  28. data/lib/surge_api/models/toll_free_campaign_list_params.rb +42 -0
  29. data/lib/surge_api/models/toll_free_campaign_params.rb +286 -0
  30. data/lib/surge_api/models/toll_free_campaign_retrieve_params.rb +22 -0
  31. data/lib/surge_api/models/toll_free_campaign_update_params.rb +278 -0
  32. data/lib/surge_api/models/unwrap_webhook_event.rb +9 -1
  33. data/lib/surge_api/models/user_create_token_params.rb +15 -1
  34. data/lib/surge_api/models.rb +22 -0
  35. data/lib/surge_api/resources/accounts.rb +2 -2
  36. data/lib/surge_api/resources/campaigns.rb +26 -8
  37. data/lib/surge_api/resources/phone_numbers.rb +6 -2
  38. data/lib/surge_api/resources/toll_free_campaigns.rb +140 -0
  39. data/lib/surge_api/resources/users.rb +6 -1
  40. data/lib/surge_api/resources/webhooks.rb +1 -1
  41. data/lib/surge_api/version.rb +1 -1
  42. data/lib/surge_api.rb +12 -0
  43. data/rbi/surge_api/client.rbi +3 -0
  44. data/rbi/surge_api/models/account_retrieve_status_params.rbi +5 -0
  45. data/rbi/surge_api/models/call_ended_webhook_event.rbi +6 -3
  46. data/rbi/surge_api/models/campaign.rbi +26 -19
  47. data/rbi/surge_api/models/campaign_approved_webhook_event.rbi +8 -0
  48. data/rbi/surge_api/models/campaign_params.rbi +17 -19
  49. data/rbi/surge_api/models/campaign_rejected_webhook_event.rbi +269 -0
  50. data/rbi/surge_api/models/campaign_submitted_webhook_event.rbi +149 -0
  51. data/rbi/surge_api/models/campaign_update_params.rbi +378 -1
  52. data/rbi/surge_api/models/campaign_warning_webhook_event.rbi +259 -0
  53. data/rbi/surge_api/models/message.rbi +50 -3
  54. data/rbi/surge_api/models/message_delivered_webhook_event.rbi +52 -0
  55. data/rbi/surge_api/models/message_failed_webhook_event.rbi +47 -5
  56. data/rbi/surge_api/models/message_received_webhook_event.rbi +49 -0
  57. data/rbi/surge_api/models/message_sent_webhook_event.rbi +46 -0
  58. data/rbi/surge_api/models/phone_number.rbi +8 -0
  59. data/rbi/surge_api/models/phone_number_attached_to_campaign_webhook_event.rbi +8 -0
  60. data/rbi/surge_api/models/phone_number_imported_webhook_event.rbi +318 -0
  61. data/rbi/surge_api/models/phone_number_purchase_params.rbi +11 -0
  62. data/rbi/surge_api/models/phone_number_update_params.rbi +11 -0
  63. data/rbi/surge_api/models/toll_free_campaign.rbi +230 -0
  64. data/rbi/surge_api/models/toll_free_campaign_consent_flow.rbi +476 -0
  65. data/rbi/surge_api/models/toll_free_campaign_create_params.rbi +43 -0
  66. data/rbi/surge_api/models/toll_free_campaign_list_params.rbi +70 -0
  67. data/rbi/surge_api/models/toll_free_campaign_params.rbi +711 -0
  68. data/rbi/surge_api/models/toll_free_campaign_retrieve_params.rbi +43 -0
  69. data/rbi/surge_api/models/toll_free_campaign_update_params.rbi +760 -0
  70. data/rbi/surge_api/models/unwrap_webhook_event.rbi +4 -0
  71. data/rbi/surge_api/models/user_create_token_params.rbi +17 -0
  72. data/rbi/surge_api/models.rbi +25 -0
  73. data/rbi/surge_api/resources/accounts.rbi +2 -2
  74. data/rbi/surge_api/resources/campaigns.rbi +94 -12
  75. data/rbi/surge_api/resources/phone_numbers.rbi +6 -0
  76. data/rbi/surge_api/resources/toll_free_campaigns.rbi +129 -0
  77. data/rbi/surge_api/resources/users.rbi +6 -0
  78. data/rbi/surge_api/resources/webhooks.rbi +4 -0
  79. data/sig/surge_api/client.rbs +2 -0
  80. data/sig/surge_api/models/account_retrieve_status_params.rbs +2 -1
  81. data/sig/surge_api/models/campaign.rbs +8 -1
  82. data/sig/surge_api/models/campaign_approved_webhook_event.rbs +5 -0
  83. data/sig/surge_api/models/campaign_rejected_webhook_event.rbs +115 -0
  84. data/sig/surge_api/models/campaign_submitted_webhook_event.rbs +67 -0
  85. data/sig/surge_api/models/campaign_update_params.rbs +128 -2
  86. data/sig/surge_api/models/campaign_warning_webhook_event.rbs +114 -0
  87. data/sig/surge_api/models/message.rbs +36 -3
  88. data/sig/surge_api/models/message_delivered_webhook_event.rbs +20 -0
  89. data/sig/surge_api/models/message_failed_webhook_event.rbs +19 -4
  90. data/sig/surge_api/models/message_received_webhook_event.rbs +20 -0
  91. data/sig/surge_api/models/message_sent_webhook_event.rbs +20 -0
  92. data/sig/surge_api/models/phone_number.rbs +5 -0
  93. data/sig/surge_api/models/phone_number_attached_to_campaign_webhook_event.rbs +5 -0
  94. data/sig/surge_api/models/phone_number_imported_webhook_event.rbs +130 -0
  95. data/sig/surge_api/models/phone_number_purchase_params.rbs +7 -0
  96. data/sig/surge_api/models/phone_number_update_params.rbs +12 -1
  97. data/sig/surge_api/models/toll_free_campaign.rbs +126 -0
  98. data/sig/surge_api/models/toll_free_campaign_consent_flow.rbs +207 -0
  99. data/sig/surge_api/models/toll_free_campaign_create_params.rbs +25 -0
  100. data/sig/surge_api/models/toll_free_campaign_list_params.rbs +36 -0
  101. data/sig/surge_api/models/toll_free_campaign_params.rbs +321 -0
  102. data/sig/surge_api/models/toll_free_campaign_retrieve_params.rbs +23 -0
  103. data/sig/surge_api/models/toll_free_campaign_update_params.rbs +332 -0
  104. data/sig/surge_api/models/unwrap_webhook_event.rbs +4 -0
  105. data/sig/surge_api/models/user_create_token_params.rbs +7 -1
  106. data/sig/surge_api/models.rbs +22 -0
  107. data/sig/surge_api/resources/campaigns.rbs +9 -1
  108. data/sig/surge_api/resources/phone_numbers.rbs +2 -0
  109. data/sig/surge_api/resources/toll_free_campaigns.rbs +44 -0
  110. data/sig/surge_api/resources/users.rbs +1 -0
  111. data/sig/surge_api/resources/webhooks.rbs +4 -0
  112. metadata +53 -7
@@ -97,11 +97,11 @@ module SurgeAPI
97
97
  # This will be one of the following:
98
98
  #
99
99
  # - `low` - The campaign will be allowed to send up to 2000 SMS segments to
100
- # T-Mobile customers each day. In this case your platform will be charged for
101
- # the setup fee for a low volume number upon receipt of the API request.
100
+ # T-Mobile customers each day. In this case your project will be charged for the
101
+ # setup fee for a low volume number upon receipt of the API request.
102
102
  # - `high` - The campaign will be allowed to send up to 200k SMS segments to
103
103
  # T-Mobile customers each day, depending on the trust score assigned by The
104
- # Campaign Registry. Your platform will be charged for the setup fee for a high
104
+ # Campaign Registry. Your project will be charged for the setup fee for a high
105
105
  # volume number upon receipt of the API request, and phone numbers will be
106
106
  # charged as high volume numbers going forward.
107
107
  sig do
@@ -141,11 +141,10 @@ module SurgeAPI
141
141
  end
142
142
  attr_writer :includes
143
143
 
144
- # A sample link that might be sent by this campaign. If links from other domains
145
- # are sent through this campaign, they are much more likely to be filtered by the
146
- # carriers. If link shortening is enabled for the account, the link shortener URL
147
- # will be used instead of what is provided. Reach out to support if you would like
148
- # to disable automatic link shortening.
144
+ # A sample link that might be sent by this campaign. This is required when
145
+ # `includes` contains `links`. Provide the same URL or domain that the campaign
146
+ # will use in production. If links from other domains are sent through this
147
+ # campaign, they are much more likely to be filtered by the carriers.
149
148
  sig { returns(T.nilable(String)) }
150
149
  attr_reader :link_sample
151
150
 
@@ -229,11 +228,11 @@ module SurgeAPI
229
228
  # This will be one of the following:
230
229
  #
231
230
  # - `low` - The campaign will be allowed to send up to 2000 SMS segments to
232
- # T-Mobile customers each day. In this case your platform will be charged for
233
- # the setup fee for a low volume number upon receipt of the API request.
231
+ # T-Mobile customers each day. In this case your project will be charged for the
232
+ # setup fee for a low volume number upon receipt of the API request.
234
233
  # - `high` - The campaign will be allowed to send up to 200k SMS segments to
235
234
  # T-Mobile customers each day, depending on the trust score assigned by The
236
- # Campaign Registry. Your platform will be charged for the setup fee for a high
235
+ # Campaign Registry. Your project will be charged for the setup fee for a high
237
236
  # volume number upon receipt of the API request, and phone numbers will be
238
237
  # charged as high volume numbers going forward.
239
238
  volume:,
@@ -247,11 +246,10 @@ module SurgeAPI
247
246
  # - `direct_lending` - whether the campaign contains content related to direct
248
247
  # lending or other loan arrangements
249
248
  includes: nil,
250
- # A sample link that might be sent by this campaign. If links from other domains
251
- # are sent through this campaign, they are much more likely to be filtered by the
252
- # carriers. If link shortening is enabled for the account, the link shortener URL
253
- # will be used instead of what is provided. Reach out to support if you would like
254
- # to disable automatic link shortening.
249
+ # A sample link that might be sent by this campaign. This is required when
250
+ # `includes` contains `links`. Provide the same URL or domain that the campaign
251
+ # will use in production. If links from other domains are sent through this
252
+ # campaign, they are much more likely to be filtered by the carriers.
255
253
  link_sample: nil
256
254
  )
257
255
  end
@@ -358,11 +356,11 @@ module SurgeAPI
358
356
  # This will be one of the following:
359
357
  #
360
358
  # - `low` - The campaign will be allowed to send up to 2000 SMS segments to
361
- # T-Mobile customers each day. In this case your platform will be charged for
362
- # the setup fee for a low volume number upon receipt of the API request.
359
+ # T-Mobile customers each day. In this case your project will be charged for the
360
+ # setup fee for a low volume number upon receipt of the API request.
363
361
  # - `high` - The campaign will be allowed to send up to 200k SMS segments to
364
362
  # T-Mobile customers each day, depending on the trust score assigned by The
365
- # Campaign Registry. Your platform will be charged for the setup fee for a high
363
+ # Campaign Registry. Your project will be charged for the setup fee for a high
366
364
  # volume number upon receipt of the API request, and phone numbers will be
367
365
  # charged as high volume numbers going forward.
368
366
  module Volume
@@ -0,0 +1,269 @@
1
+ # typed: strong
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ class CampaignRejectedWebhookEvent < SurgeAPI::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ SurgeAPI::CampaignRejectedWebhookEvent,
10
+ SurgeAPI::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The ID of the account in which this event occurred
15
+ sig { returns(String) }
16
+ attr_accessor :account_id
17
+
18
+ # The data associated with the event
19
+ sig { returns(SurgeAPI::CampaignRejectedWebhookEvent::Data) }
20
+ attr_reader :data
21
+
22
+ sig do
23
+ params(data: SurgeAPI::CampaignRejectedWebhookEvent::Data::OrHash).void
24
+ end
25
+ attr_writer :data
26
+
27
+ # The timestamp when this event occurred, in ISO8601 format
28
+ sig { returns(Time) }
29
+ attr_accessor :timestamp
30
+
31
+ # The type of the event. Always `campaign.rejected` for this event.
32
+ sig { returns(Symbol) }
33
+ attr_accessor :type
34
+
35
+ sig do
36
+ params(
37
+ account_id: String,
38
+ data: SurgeAPI::CampaignRejectedWebhookEvent::Data::OrHash,
39
+ timestamp: Time,
40
+ type: Symbol
41
+ ).returns(T.attached_class)
42
+ end
43
+ def self.new(
44
+ # The ID of the account in which this event occurred
45
+ account_id:,
46
+ # The data associated with the event
47
+ data:,
48
+ # The timestamp when this event occurred, in ISO8601 format
49
+ timestamp:,
50
+ # The type of the event. Always `campaign.rejected` for this event.
51
+ type: :"campaign.rejected"
52
+ )
53
+ end
54
+
55
+ sig do
56
+ override.returns(
57
+ {
58
+ account_id: String,
59
+ data: SurgeAPI::CampaignRejectedWebhookEvent::Data,
60
+ timestamp: Time,
61
+ type: Symbol
62
+ }
63
+ )
64
+ end
65
+ def to_hash
66
+ end
67
+
68
+ class Data < SurgeAPI::Internal::Type::BaseModel
69
+ OrHash =
70
+ T.type_alias do
71
+ T.any(
72
+ SurgeAPI::CampaignRejectedWebhookEvent::Data,
73
+ SurgeAPI::Internal::AnyHash
74
+ )
75
+ end
76
+
77
+ # The unique identifier for the campaign
78
+ sig { returns(String) }
79
+ attr_accessor :id
80
+
81
+ # Customer-visible field-level registration feedback. Rejection events may include
82
+ # non-blocking warnings alongside changes-needed items.
83
+ sig do
84
+ returns(
85
+ T::Array[SurgeAPI::CampaignRejectedWebhookEvent::Data::Feedback]
86
+ )
87
+ end
88
+ attr_accessor :feedback
89
+
90
+ # The public campaign status. Always `rejected` for this event.
91
+ sig do
92
+ returns(
93
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Status::TaggedSymbol
94
+ )
95
+ end
96
+ attr_accessor :status
97
+
98
+ # The data associated with the event
99
+ sig do
100
+ params(
101
+ id: String,
102
+ feedback:
103
+ T::Array[
104
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Feedback::OrHash
105
+ ],
106
+ status:
107
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Status::OrSymbol
108
+ ).returns(T.attached_class)
109
+ end
110
+ def self.new(
111
+ # The unique identifier for the campaign
112
+ id:,
113
+ # Customer-visible field-level registration feedback. Rejection events may include
114
+ # non-blocking warnings alongside changes-needed items.
115
+ feedback:,
116
+ # The public campaign status. Always `rejected` for this event.
117
+ status:
118
+ )
119
+ end
120
+
121
+ sig do
122
+ override.returns(
123
+ {
124
+ id: String,
125
+ feedback:
126
+ T::Array[
127
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Feedback
128
+ ],
129
+ status:
130
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Status::TaggedSymbol
131
+ }
132
+ )
133
+ end
134
+ def to_hash
135
+ end
136
+
137
+ class Feedback < SurgeAPI::Internal::Type::BaseModel
138
+ OrHash =
139
+ T.type_alias do
140
+ T.any(
141
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Feedback,
142
+ SurgeAPI::Internal::AnyHash
143
+ )
144
+ end
145
+
146
+ # The stable registration field key
147
+ sig { returns(String) }
148
+ attr_accessor :field
149
+
150
+ # Actionable review feedback
151
+ sig { returns(String) }
152
+ attr_accessor :message
153
+
154
+ # Whether the feedback blocks registration or is a non-blocking warning
155
+ sig do
156
+ returns(
157
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Feedback::Outcome::TaggedSymbol
158
+ )
159
+ end
160
+ attr_accessor :outcome
161
+
162
+ # A suggested replacement value, or null when none is suggested
163
+ sig { returns(T.nilable(String)) }
164
+ attr_accessor :suggested_value
165
+
166
+ sig do
167
+ params(
168
+ field: String,
169
+ message: String,
170
+ outcome:
171
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Feedback::Outcome::OrSymbol,
172
+ suggested_value: T.nilable(String)
173
+ ).returns(T.attached_class)
174
+ end
175
+ def self.new(
176
+ # The stable registration field key
177
+ field:,
178
+ # Actionable review feedback
179
+ message:,
180
+ # Whether the feedback blocks registration or is a non-blocking warning
181
+ outcome:,
182
+ # A suggested replacement value, or null when none is suggested
183
+ suggested_value:
184
+ )
185
+ end
186
+
187
+ sig do
188
+ override.returns(
189
+ {
190
+ field: String,
191
+ message: String,
192
+ outcome:
193
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Feedback::Outcome::TaggedSymbol,
194
+ suggested_value: T.nilable(String)
195
+ }
196
+ )
197
+ end
198
+ def to_hash
199
+ end
200
+
201
+ # Whether the feedback blocks registration or is a non-blocking warning
202
+ module Outcome
203
+ extend SurgeAPI::Internal::Type::Enum
204
+
205
+ TaggedSymbol =
206
+ T.type_alias do
207
+ T.all(
208
+ Symbol,
209
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Feedback::Outcome
210
+ )
211
+ end
212
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
213
+
214
+ CHANGES_NEEDED =
215
+ T.let(
216
+ :changes_needed,
217
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Feedback::Outcome::TaggedSymbol
218
+ )
219
+ WARNING =
220
+ T.let(
221
+ :warning,
222
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Feedback::Outcome::TaggedSymbol
223
+ )
224
+
225
+ sig do
226
+ override.returns(
227
+ T::Array[
228
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Feedback::Outcome::TaggedSymbol
229
+ ]
230
+ )
231
+ end
232
+ def self.values
233
+ end
234
+ end
235
+ end
236
+
237
+ # The public campaign status. Always `rejected` for this event.
238
+ module Status
239
+ extend SurgeAPI::Internal::Type::Enum
240
+
241
+ TaggedSymbol =
242
+ T.type_alias do
243
+ T.all(
244
+ Symbol,
245
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Status
246
+ )
247
+ end
248
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
249
+
250
+ REJECTED =
251
+ T.let(
252
+ :rejected,
253
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Status::TaggedSymbol
254
+ )
255
+
256
+ sig do
257
+ override.returns(
258
+ T::Array[
259
+ SurgeAPI::CampaignRejectedWebhookEvent::Data::Status::TaggedSymbol
260
+ ]
261
+ )
262
+ end
263
+ def self.values
264
+ end
265
+ end
266
+ end
267
+ end
268
+ end
269
+ end
@@ -0,0 +1,149 @@
1
+ # typed: strong
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ class CampaignSubmittedWebhookEvent < SurgeAPI::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ SurgeAPI::CampaignSubmittedWebhookEvent,
10
+ SurgeAPI::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The ID of the account in which this event occurred
15
+ sig { returns(String) }
16
+ attr_accessor :account_id
17
+
18
+ # The data associated with the event
19
+ sig { returns(SurgeAPI::CampaignSubmittedWebhookEvent::Data) }
20
+ attr_reader :data
21
+
22
+ sig do
23
+ params(data: SurgeAPI::CampaignSubmittedWebhookEvent::Data::OrHash).void
24
+ end
25
+ attr_writer :data
26
+
27
+ # The timestamp when this event occurred, in ISO8601 format
28
+ sig { returns(Time) }
29
+ attr_accessor :timestamp
30
+
31
+ # The type of the event. Always `campaign.submitted` for this event.
32
+ sig { returns(Symbol) }
33
+ attr_accessor :type
34
+
35
+ sig do
36
+ params(
37
+ account_id: String,
38
+ data: SurgeAPI::CampaignSubmittedWebhookEvent::Data::OrHash,
39
+ timestamp: Time,
40
+ type: Symbol
41
+ ).returns(T.attached_class)
42
+ end
43
+ def self.new(
44
+ # The ID of the account in which this event occurred
45
+ account_id:,
46
+ # The data associated with the event
47
+ data:,
48
+ # The timestamp when this event occurred, in ISO8601 format
49
+ timestamp:,
50
+ # The type of the event. Always `campaign.submitted` for this event.
51
+ type: :"campaign.submitted"
52
+ )
53
+ end
54
+
55
+ sig do
56
+ override.returns(
57
+ {
58
+ account_id: String,
59
+ data: SurgeAPI::CampaignSubmittedWebhookEvent::Data,
60
+ timestamp: Time,
61
+ type: Symbol
62
+ }
63
+ )
64
+ end
65
+ def to_hash
66
+ end
67
+
68
+ class Data < SurgeAPI::Internal::Type::BaseModel
69
+ OrHash =
70
+ T.type_alias do
71
+ T.any(
72
+ SurgeAPI::CampaignSubmittedWebhookEvent::Data,
73
+ SurgeAPI::Internal::AnyHash
74
+ )
75
+ end
76
+
77
+ # The unique identifier for the campaign
78
+ sig { returns(String) }
79
+ attr_accessor :id
80
+
81
+ # The public campaign status. Always `in_review` for this event.
82
+ sig do
83
+ returns(
84
+ SurgeAPI::CampaignSubmittedWebhookEvent::Data::Status::TaggedSymbol
85
+ )
86
+ end
87
+ attr_accessor :status
88
+
89
+ # The data associated with the event
90
+ sig do
91
+ params(
92
+ id: String,
93
+ status:
94
+ SurgeAPI::CampaignSubmittedWebhookEvent::Data::Status::OrSymbol
95
+ ).returns(T.attached_class)
96
+ end
97
+ def self.new(
98
+ # The unique identifier for the campaign
99
+ id:,
100
+ # The public campaign status. Always `in_review` for this event.
101
+ status:
102
+ )
103
+ end
104
+
105
+ sig do
106
+ override.returns(
107
+ {
108
+ id: String,
109
+ status:
110
+ SurgeAPI::CampaignSubmittedWebhookEvent::Data::Status::TaggedSymbol
111
+ }
112
+ )
113
+ end
114
+ def to_hash
115
+ end
116
+
117
+ # The public campaign status. Always `in_review` for this event.
118
+ module Status
119
+ extend SurgeAPI::Internal::Type::Enum
120
+
121
+ TaggedSymbol =
122
+ T.type_alias do
123
+ T.all(
124
+ Symbol,
125
+ SurgeAPI::CampaignSubmittedWebhookEvent::Data::Status
126
+ )
127
+ end
128
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
129
+
130
+ IN_REVIEW =
131
+ T.let(
132
+ :in_review,
133
+ SurgeAPI::CampaignSubmittedWebhookEvent::Data::Status::TaggedSymbol
134
+ )
135
+
136
+ sig do
137
+ override.returns(
138
+ T::Array[
139
+ SurgeAPI::CampaignSubmittedWebhookEvent::Data::Status::TaggedSymbol
140
+ ]
141
+ )
142
+ end
143
+ def self.values
144
+ end
145
+ end
146
+ end
147
+ end
148
+ end
149
+ end