surge_api 0.22.0 → 0.24.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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +1 -1
  4. data/lib/surge_api/models/account_create_params.rb +8 -4
  5. data/lib/surge_api/models/account_retrieve_status_params.rb +1 -0
  6. data/lib/surge_api/models/account_update_params.rb +8 -4
  7. data/lib/surge_api/models/campaign.rb +6 -6
  8. data/lib/surge_api/models/campaign_params.rb +5 -6
  9. data/lib/surge_api/models/contact.rb +9 -1
  10. data/lib/surge_api/models/contact_create_params.rb +9 -1
  11. data/lib/surge_api/models/contact_update_params.rb +9 -1
  12. data/lib/surge_api/models/message.rb +25 -1
  13. data/lib/surge_api/models/message_delivered_webhook_event.rb +21 -1
  14. data/lib/surge_api/models/message_failed_webhook_event.rb +21 -1
  15. data/lib/surge_api/models/message_params.rb +9 -1
  16. data/lib/surge_api/models/message_received_webhook_event.rb +21 -1
  17. data/lib/surge_api/models/message_sent_webhook_event.rb +21 -1
  18. data/lib/surge_api/models/organization.rb +8 -4
  19. data/lib/surge_api/models/phone_number_imported_webhook_event.rb +152 -0
  20. data/lib/surge_api/models/unwrap_webhook_event.rb +3 -1
  21. data/lib/surge_api/models.rb +2 -0
  22. data/lib/surge_api/resources/contacts.rb +6 -2
  23. data/lib/surge_api/resources/webhooks.rb +1 -1
  24. data/lib/surge_api/version.rb +1 -1
  25. data/lib/surge_api.rb +1 -0
  26. data/rbi/surge_api/models/account_create_params.rbi +15 -5
  27. data/rbi/surge_api/models/account_retrieve_status_params.rbi +5 -0
  28. data/rbi/surge_api/models/account_update_params.rbi +15 -5
  29. data/rbi/surge_api/models/campaign.rbi +9 -10
  30. data/rbi/surge_api/models/campaign_params.rbi +8 -10
  31. data/rbi/surge_api/models/contact.rbi +14 -3
  32. data/rbi/surge_api/models/contact_create_params.rbi +11 -0
  33. data/rbi/surge_api/models/contact_update_params.rbi +11 -0
  34. data/rbi/surge_api/models/message.rbi +34 -3
  35. data/rbi/surge_api/models/message_delivered_webhook_event.rbi +44 -0
  36. data/rbi/surge_api/models/message_failed_webhook_event.rbi +40 -0
  37. data/rbi/surge_api/models/message_params.rbi +14 -3
  38. data/rbi/surge_api/models/message_received_webhook_event.rbi +41 -0
  39. data/rbi/surge_api/models/message_sent_webhook_event.rbi +38 -0
  40. data/rbi/surge_api/models/organization.rbi +11 -5
  41. data/rbi/surge_api/models/phone_number_imported_webhook_event.rbi +310 -0
  42. data/rbi/surge_api/models/unwrap_webhook_event.rbi +1 -0
  43. data/rbi/surge_api/models.rbi +3 -0
  44. data/rbi/surge_api/resources/contacts.rbi +6 -0
  45. data/rbi/surge_api/resources/webhooks.rbi +1 -0
  46. data/sig/surge_api/models/account_create_params.rbs +2 -1
  47. data/sig/surge_api/models/account_retrieve_status_params.rbs +2 -1
  48. data/sig/surge_api/models/account_update_params.rbs +2 -1
  49. data/sig/surge_api/models/campaign.rbs +3 -1
  50. data/sig/surge_api/models/contact.rbs +10 -3
  51. data/sig/surge_api/models/contact_create_params.rbs +8 -1
  52. data/sig/surge_api/models/contact_update_params.rbs +8 -1
  53. data/sig/surge_api/models/message.rbs +26 -3
  54. data/sig/surge_api/models/message_delivered_webhook_event.rbs +15 -0
  55. data/sig/surge_api/models/message_failed_webhook_event.rbs +15 -0
  56. data/sig/surge_api/models/message_params.rbs +10 -3
  57. data/sig/surge_api/models/message_received_webhook_event.rbs +15 -0
  58. data/sig/surge_api/models/message_sent_webhook_event.rbs +15 -0
  59. data/sig/surge_api/models/organization.rbs +2 -1
  60. data/sig/surge_api/models/phone_number_imported_webhook_event.rbs +125 -0
  61. data/sig/surge_api/models/unwrap_webhook_event.rbs +1 -0
  62. data/sig/surge_api/models.rbs +2 -0
  63. data/sig/surge_api/resources/contacts.rbs +2 -0
  64. data/sig/surge_api/resources/webhooks.rbs +1 -0
  65. metadata +5 -2
@@ -19,6 +19,7 @@ module SurgeAPI
19
19
  SurgeAPI::MessageReceivedWebhookEvent,
20
20
  SurgeAPI::MessageSentWebhookEvent,
21
21
  SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent,
22
+ SurgeAPI::PhoneNumberImportedWebhookEvent,
22
23
  SurgeAPI::RecordingCompletedWebhookEvent,
23
24
  SurgeAPI::VoicemailReceivedWebhookEvent
24
25
  )
@@ -94,6 +94,9 @@ module SurgeAPI
94
94
  PhoneNumberAttachedToCampaignWebhookEvent =
95
95
  SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent
96
96
 
97
+ PhoneNumberImportedWebhookEvent =
98
+ SurgeAPI::Models::PhoneNumberImportedWebhookEvent
99
+
97
100
  PhoneNumberListAvailableNumbersParams =
98
101
  SurgeAPI::Models::PhoneNumberListAvailableNumbersParams
99
102
 
@@ -12,6 +12,7 @@ module SurgeAPI
12
12
  first_name: String,
13
13
  last_name: String,
14
14
  metadata: T::Hash[Symbol, String],
15
+ outbound_disabled: T::Boolean,
15
16
  request_options: SurgeAPI::RequestOptions::OrHash
16
17
  ).returns(SurgeAPI::Contact)
17
18
  end
@@ -28,6 +29,8 @@ module SurgeAPI
28
29
  last_name: nil,
29
30
  # Set of key-value pairs that will be stored with the object.
30
31
  metadata: nil,
32
+ # Whether outbound messaging should be manually disabled for the contact.
33
+ outbound_disabled: nil,
31
34
  request_options: {}
32
35
  )
33
36
  end
@@ -56,6 +59,7 @@ module SurgeAPI
56
59
  first_name: String,
57
60
  last_name: String,
58
61
  metadata: T::Hash[Symbol, String],
62
+ outbound_disabled: T::Boolean,
59
63
  request_options: SurgeAPI::RequestOptions::OrHash
60
64
  ).returns(SurgeAPI::Contact)
61
65
  end
@@ -72,6 +76,8 @@ module SurgeAPI
72
76
  last_name: nil,
73
77
  # Set of key-value pairs that will be stored with the object.
74
78
  metadata: nil,
79
+ # Whether outbound messaging should be manually disabled for the contact.
80
+ outbound_disabled: nil,
75
81
  request_options: {}
76
82
  )
77
83
  end
@@ -21,6 +21,7 @@ module SurgeAPI
21
21
  SurgeAPI::MessageReceivedWebhookEvent,
22
22
  SurgeAPI::MessageSentWebhookEvent,
23
23
  SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent,
24
+ SurgeAPI::PhoneNumberImportedWebhookEvent,
24
25
  SurgeAPI::RecordingCompletedWebhookEvent,
25
26
  SurgeAPI::VoicemailReceivedWebhookEvent
26
27
  )
@@ -234,13 +234,14 @@ module SurgeAPI
234
234
  end
235
235
  end
236
236
 
237
- type identifier_type = :ein | :cbn
237
+ type identifier_type = :ein | :cbn | :vat
238
238
 
239
239
  module IdentifierType
240
240
  extend SurgeAPI::Internal::Type::Enum
241
241
 
242
242
  EIN: :ein
243
243
  CBN: :cbn
244
+ VAT: :vat
244
245
 
245
246
  def self?.values: -> ::Array[SurgeAPI::Models::AccountCreateParams::Organization::identifier_type]
246
247
  end
@@ -31,12 +31,13 @@ module SurgeAPI
31
31
  request_options: SurgeAPI::RequestOptions
32
32
  }
33
33
 
34
- type capability = :local_messaging
34
+ type capability = :local_messaging | :toll_free_messaging
35
35
 
36
36
  module Capability
37
37
  extend SurgeAPI::Internal::Type::Enum
38
38
 
39
39
  LOCAL_MESSAGING: :local_messaging
40
+ TOLL_FREE_MESSAGING: :toll_free_messaging
40
41
 
41
42
  def self?.values: -> ::Array[SurgeAPI::Models::AccountRetrieveStatusParams::capability]
42
43
  end
@@ -241,13 +241,14 @@ module SurgeAPI
241
241
  end
242
242
  end
243
243
 
244
- type identifier_type = :ein | :cbn
244
+ type identifier_type = :ein | :cbn | :vat
245
245
 
246
246
  module IdentifierType
247
247
  extend SurgeAPI::Internal::Type::Enum
248
248
 
249
249
  EIN: :ein
250
250
  CBN: :cbn
251
+ VAT: :vat
251
252
 
252
253
  def self?.values: -> ::Array[SurgeAPI::Models::AccountUpdateParams::Organization::identifier_type]
253
254
  end
@@ -83,13 +83,15 @@ module SurgeAPI
83
83
  def self?.values: -> ::Array[SurgeAPI::Models::Campaign::include_]
84
84
  end
85
85
 
86
- type status = :active | :canceled | :created | :deactivated | :in_review
86
+ type status =
87
+ :active | :canceled | :rejected | :created | :deactivated | :in_review
87
88
 
88
89
  module Status
89
90
  extend SurgeAPI::Internal::Type::Enum
90
91
 
91
92
  ACTIVE: :active
92
93
  CANCELED: :canceled
94
+ REJECTED: :rejected
93
95
  CREATED: :created
94
96
  DEACTIVATED: :deactivated
95
97
  IN_REVIEW: :in_review
@@ -7,7 +7,8 @@ module SurgeAPI
7
7
  email: String,
8
8
  first_name: String,
9
9
  last_name: String,
10
- metadata: ::Hash[Symbol, String]
10
+ metadata: ::Hash[Symbol, String],
11
+ outbound_disabled: bool
11
12
  }
12
13
 
13
14
  class Contact < SurgeAPI::Internal::Type::BaseModel
@@ -31,13 +32,18 @@ module SurgeAPI
31
32
 
32
33
  def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
33
34
 
35
+ attr_reader outbound_disabled: bool?
36
+
37
+ def outbound_disabled=: (bool) -> bool
38
+
34
39
  def initialize: (
35
40
  id: String,
36
41
  phone_number: String,
37
42
  ?email: String,
38
43
  ?first_name: String,
39
44
  ?last_name: String,
40
- ?metadata: ::Hash[Symbol, String]
45
+ ?metadata: ::Hash[Symbol, String],
46
+ ?outbound_disabled: bool
41
47
  ) -> void
42
48
 
43
49
  def to_hash: -> {
@@ -46,7 +52,8 @@ module SurgeAPI
46
52
  email: String,
47
53
  first_name: String,
48
54
  last_name: String,
49
- metadata: ::Hash[Symbol, String]
55
+ metadata: ::Hash[Symbol, String],
56
+ outbound_disabled: bool
50
57
  }
51
58
  end
52
59
  end
@@ -7,7 +7,8 @@ module SurgeAPI
7
7
  email: String,
8
8
  first_name: String,
9
9
  last_name: String,
10
- metadata: ::Hash[Symbol, String]
10
+ metadata: ::Hash[Symbol, String],
11
+ outbound_disabled: bool
11
12
  }
12
13
  & SurgeAPI::Internal::Type::request_parameters
13
14
 
@@ -35,6 +36,10 @@ module SurgeAPI
35
36
 
36
37
  def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
37
38
 
39
+ attr_reader outbound_disabled: bool?
40
+
41
+ def outbound_disabled=: (bool) -> bool
42
+
38
43
  def initialize: (
39
44
  account_id: String,
40
45
  phone_number: String,
@@ -42,6 +47,7 @@ module SurgeAPI
42
47
  ?first_name: String,
43
48
  ?last_name: String,
44
49
  ?metadata: ::Hash[Symbol, String],
50
+ ?outbound_disabled: bool,
45
51
  ?request_options: SurgeAPI::request_opts
46
52
  ) -> void
47
53
 
@@ -52,6 +58,7 @@ module SurgeAPI
52
58
  first_name: String,
53
59
  last_name: String,
54
60
  metadata: ::Hash[Symbol, String],
61
+ outbound_disabled: bool,
55
62
  request_options: SurgeAPI::RequestOptions
56
63
  }
57
64
  end
@@ -7,7 +7,8 @@ module SurgeAPI
7
7
  email: String,
8
8
  first_name: String,
9
9
  last_name: String,
10
- metadata: ::Hash[Symbol, String]
10
+ metadata: ::Hash[Symbol, String],
11
+ outbound_disabled: bool
11
12
  }
12
13
  & SurgeAPI::Internal::Type::request_parameters
13
14
 
@@ -35,6 +36,10 @@ module SurgeAPI
35
36
 
36
37
  def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
37
38
 
39
+ attr_reader outbound_disabled: bool?
40
+
41
+ def outbound_disabled=: (bool) -> bool
42
+
38
43
  def initialize: (
39
44
  id: String,
40
45
  phone_number: String,
@@ -42,6 +47,7 @@ module SurgeAPI
42
47
  ?first_name: String,
43
48
  ?last_name: String,
44
49
  ?metadata: ::Hash[Symbol, String],
50
+ ?outbound_disabled: bool,
45
51
  ?request_options: SurgeAPI::request_opts
46
52
  ) -> void
47
53
 
@@ -52,6 +58,7 @@ module SurgeAPI
52
58
  first_name: String,
53
59
  last_name: String,
54
60
  metadata: ::Hash[Symbol, String],
61
+ outbound_disabled: bool,
55
62
  request_options: SurgeAPI::RequestOptions
56
63
  }
57
64
  end
@@ -7,7 +7,8 @@ module SurgeAPI
7
7
  blast_id: String?,
8
8
  body: String?,
9
9
  conversation: SurgeAPI::Message::Conversation,
10
- metadata: ::Hash[Symbol, String]
10
+ metadata: ::Hash[Symbol, String],
11
+ status: SurgeAPI::Models::Message::status
11
12
  }
12
13
 
13
14
  class Message < SurgeAPI::Internal::Type::BaseModel
@@ -35,13 +36,20 @@ module SurgeAPI
35
36
 
36
37
  def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
37
38
 
39
+ attr_reader status: SurgeAPI::Models::Message::status?
40
+
41
+ def status=: (
42
+ SurgeAPI::Models::Message::status
43
+ ) -> SurgeAPI::Models::Message::status
44
+
38
45
  def initialize: (
39
46
  ?id: String,
40
47
  ?attachments: ::Array[SurgeAPI::Message::Attachment],
41
48
  ?blast_id: String?,
42
49
  ?body: String?,
43
50
  ?conversation: SurgeAPI::Message::Conversation,
44
- ?metadata: ::Hash[Symbol, String]
51
+ ?metadata: ::Hash[Symbol, String],
52
+ ?status: SurgeAPI::Models::Message::status
45
53
  ) -> void
46
54
 
47
55
  def to_hash: -> {
@@ -50,7 +58,8 @@ module SurgeAPI
50
58
  blast_id: String?,
51
59
  body: String?,
52
60
  conversation: SurgeAPI::Message::Conversation,
53
- metadata: ::Hash[Symbol, String]
61
+ metadata: ::Hash[Symbol, String],
62
+ status: SurgeAPI::Models::Message::status
54
63
  }
55
64
 
56
65
  type attachment =
@@ -177,6 +186,20 @@ module SurgeAPI
177
186
  end
178
187
  end
179
188
  end
189
+
190
+ type status = :pending | :received | :sent | :delivered | :failed
191
+
192
+ module Status
193
+ extend SurgeAPI::Internal::Type::Enum
194
+
195
+ PENDING: :pending
196
+ RECEIVED: :received
197
+ SENT: :sent
198
+ DELIVERED: :delivered
199
+ FAILED: :failed
200
+
201
+ def self?.values: -> ::Array[SurgeAPI::Models::Message::status]
202
+ end
180
203
  end
181
204
  end
182
205
  end
@@ -38,6 +38,7 @@ module SurgeAPI
38
38
  conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
39
39
  delivered_at: Time,
40
40
  metadata: ::Hash[Symbol, String],
41
+ status: SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::status,
41
42
  attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment],
42
43
  blast_id: String
43
44
  }
@@ -53,6 +54,8 @@ module SurgeAPI
53
54
 
54
55
  attr_accessor metadata: ::Hash[Symbol, String]
55
56
 
57
+ attr_accessor status: SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::status
58
+
56
59
  attr_reader attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment]?
57
60
 
58
61
  def attachments=: (
@@ -69,6 +72,7 @@ module SurgeAPI
69
72
  conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
70
73
  delivered_at: Time,
71
74
  metadata: ::Hash[Symbol, String],
75
+ status: SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::status,
72
76
  ?attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment],
73
77
  ?blast_id: String
74
78
  ) -> void
@@ -79,6 +83,7 @@ module SurgeAPI
79
83
  conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
80
84
  delivered_at: Time,
81
85
  metadata: ::Hash[Symbol, String],
86
+ status: SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::status,
82
87
  attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment],
83
88
  blast_id: String
84
89
  }
@@ -110,6 +115,16 @@ module SurgeAPI
110
115
  }
111
116
  end
112
117
 
118
+ type status = :delivered
119
+
120
+ module Status
121
+ extend SurgeAPI::Internal::Type::Enum
122
+
123
+ DELIVERED: :delivered
124
+
125
+ def self?.values: -> ::Array[SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::status]
126
+ end
127
+
113
128
  type attachment =
114
129
  {
115
130
  id: String,
@@ -39,6 +39,7 @@ module SurgeAPI
39
39
  failed_at: Time,
40
40
  failure_reason: String,
41
41
  metadata: ::Hash[Symbol, String],
42
+ status: SurgeAPI::Models::MessageFailedWebhookEvent::Data::status,
42
43
  attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment],
43
44
  blast_id: String
44
45
  }
@@ -56,6 +57,8 @@ module SurgeAPI
56
57
 
57
58
  attr_accessor metadata: ::Hash[Symbol, String]
58
59
 
60
+ attr_accessor status: SurgeAPI::Models::MessageFailedWebhookEvent::Data::status
61
+
59
62
  attr_reader attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment]?
60
63
 
61
64
  def attachments=: (
@@ -73,6 +76,7 @@ module SurgeAPI
73
76
  failed_at: Time,
74
77
  failure_reason: String,
75
78
  metadata: ::Hash[Symbol, String],
79
+ status: SurgeAPI::Models::MessageFailedWebhookEvent::Data::status,
76
80
  ?attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment],
77
81
  ?blast_id: String
78
82
  ) -> void
@@ -84,6 +88,7 @@ module SurgeAPI
84
88
  failed_at: Time,
85
89
  failure_reason: String,
86
90
  metadata: ::Hash[Symbol, String],
91
+ status: SurgeAPI::Models::MessageFailedWebhookEvent::Data::status,
87
92
  attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment],
88
93
  blast_id: String
89
94
  }
@@ -115,6 +120,16 @@ module SurgeAPI
115
120
  }
116
121
  end
117
122
 
123
+ type status = :failed
124
+
125
+ module Status
126
+ extend SurgeAPI::Internal::Type::Enum
127
+
128
+ FAILED: :failed
129
+
130
+ def self?.values: -> ::Array[SurgeAPI::Models::MessageFailedWebhookEvent::Data::status]
131
+ end
132
+
118
133
  type attachment =
119
134
  {
120
135
  id: String,
@@ -91,7 +91,8 @@ module SurgeAPI
91
91
  email: String,
92
92
  first_name: String,
93
93
  last_name: String,
94
- metadata: ::Hash[Symbol, String]
94
+ metadata: ::Hash[Symbol, String],
95
+ outbound_disabled: bool
95
96
  }
96
97
 
97
98
  class Contact < SurgeAPI::Internal::Type::BaseModel
@@ -113,12 +114,17 @@ module SurgeAPI
113
114
 
114
115
  def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
115
116
 
117
+ attr_reader outbound_disabled: bool?
118
+
119
+ def outbound_disabled=: (bool) -> bool
120
+
116
121
  def initialize: (
117
122
  phone_number: String,
118
123
  ?email: String,
119
124
  ?first_name: String,
120
125
  ?last_name: String,
121
- ?metadata: ::Hash[Symbol, String]
126
+ ?metadata: ::Hash[Symbol, String],
127
+ ?outbound_disabled: bool
122
128
  ) -> void
123
129
 
124
130
  def to_hash: -> {
@@ -126,7 +132,8 @@ module SurgeAPI
126
132
  email: String,
127
133
  first_name: String,
128
134
  last_name: String,
129
- metadata: ::Hash[Symbol, String]
135
+ metadata: ::Hash[Symbol, String],
136
+ outbound_disabled: bool
130
137
  }
131
138
  end
132
139
  end
@@ -38,6 +38,7 @@ module SurgeAPI
38
38
  conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
39
39
  metadata: ::Hash[Symbol, String],
40
40
  received_at: Time,
41
+ status: SurgeAPI::Models::MessageReceivedWebhookEvent::Data::status,
41
42
  attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment],
42
43
  blast_id: String
43
44
  }
@@ -53,6 +54,8 @@ module SurgeAPI
53
54
 
54
55
  attr_accessor received_at: Time
55
56
 
57
+ attr_accessor status: SurgeAPI::Models::MessageReceivedWebhookEvent::Data::status
58
+
56
59
  attr_reader attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment]?
57
60
 
58
61
  def attachments=: (
@@ -69,6 +72,7 @@ module SurgeAPI
69
72
  conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
70
73
  metadata: ::Hash[Symbol, String],
71
74
  received_at: Time,
75
+ status: SurgeAPI::Models::MessageReceivedWebhookEvent::Data::status,
72
76
  ?attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment],
73
77
  ?blast_id: String
74
78
  ) -> void
@@ -79,6 +83,7 @@ module SurgeAPI
79
83
  conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
80
84
  metadata: ::Hash[Symbol, String],
81
85
  received_at: Time,
86
+ status: SurgeAPI::Models::MessageReceivedWebhookEvent::Data::status,
82
87
  attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment],
83
88
  blast_id: String
84
89
  }
@@ -110,6 +115,16 @@ module SurgeAPI
110
115
  }
111
116
  end
112
117
 
118
+ type status = :received
119
+
120
+ module Status
121
+ extend SurgeAPI::Internal::Type::Enum
122
+
123
+ RECEIVED: :received
124
+
125
+ def self?.values: -> ::Array[SurgeAPI::Models::MessageReceivedWebhookEvent::Data::status]
126
+ end
127
+
113
128
  type attachment =
114
129
  {
115
130
  id: String,
@@ -38,6 +38,7 @@ module SurgeAPI
38
38
  conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
39
39
  metadata: ::Hash[Symbol, String],
40
40
  sent_at: Time,
41
+ status: SurgeAPI::Models::MessageSentWebhookEvent::Data::status,
41
42
  attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
42
43
  blast_id: String
43
44
  }
@@ -53,6 +54,8 @@ module SurgeAPI
53
54
 
54
55
  attr_accessor sent_at: Time
55
56
 
57
+ attr_accessor status: SurgeAPI::Models::MessageSentWebhookEvent::Data::status
58
+
56
59
  attr_reader attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment]?
57
60
 
58
61
  def attachments=: (
@@ -69,6 +72,7 @@ module SurgeAPI
69
72
  conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
70
73
  metadata: ::Hash[Symbol, String],
71
74
  sent_at: Time,
75
+ status: SurgeAPI::Models::MessageSentWebhookEvent::Data::status,
72
76
  ?attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
73
77
  ?blast_id: String
74
78
  ) -> void
@@ -79,6 +83,7 @@ module SurgeAPI
79
83
  conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
80
84
  metadata: ::Hash[Symbol, String],
81
85
  sent_at: Time,
86
+ status: SurgeAPI::Models::MessageSentWebhookEvent::Data::status,
82
87
  attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
83
88
  blast_id: String
84
89
  }
@@ -110,6 +115,16 @@ module SurgeAPI
110
115
  }
111
116
  end
112
117
 
118
+ type status = :sent
119
+
120
+ module Status
121
+ extend SurgeAPI::Internal::Type::Enum
122
+
123
+ SENT: :sent
124
+
125
+ def self?.values: -> ::Array[SurgeAPI::Models::MessageSentWebhookEvent::Data::status]
126
+ end
127
+
113
128
  type attachment =
114
129
  {
115
130
  id: String,
@@ -187,13 +187,14 @@ module SurgeAPI
187
187
  end
188
188
  end
189
189
 
190
- type identifier_type = :ein | :cbn
190
+ type identifier_type = :ein | :cbn | :vat
191
191
 
192
192
  module IdentifierType
193
193
  extend SurgeAPI::Internal::Type::Enum
194
194
 
195
195
  EIN: :ein
196
196
  CBN: :cbn
197
+ VAT: :vat
197
198
 
198
199
  def self?.values: -> ::Array[SurgeAPI::Models::Organization::identifier_type]
199
200
  end
@@ -0,0 +1,125 @@
1
+ module SurgeAPI
2
+ module Models
3
+ type phone_number_imported_webhook_event =
4
+ {
5
+ account_id: String,
6
+ data: SurgeAPI::PhoneNumberImportedWebhookEvent::Data,
7
+ timestamp: Time,
8
+ type: :"phone_number.imported"
9
+ }
10
+
11
+ class PhoneNumberImportedWebhookEvent < SurgeAPI::Internal::Type::BaseModel
12
+ attr_accessor account_id: String
13
+
14
+ attr_accessor data: SurgeAPI::PhoneNumberImportedWebhookEvent::Data
15
+
16
+ attr_accessor timestamp: Time
17
+
18
+ attr_accessor type: :"phone_number.imported"
19
+
20
+ def initialize: (
21
+ account_id: String,
22
+ data: SurgeAPI::PhoneNumberImportedWebhookEvent::Data,
23
+ timestamp: Time,
24
+ ?type: :"phone_number.imported"
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ account_id: String,
29
+ data: SurgeAPI::PhoneNumberImportedWebhookEvent::Data,
30
+ timestamp: Time,
31
+ type: :"phone_number.imported"
32
+ }
33
+
34
+ type data =
35
+ {
36
+ id: String,
37
+ campaign: SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign?,
38
+ campaign_id: String?,
39
+ name: String?,
40
+ number: String,
41
+ type: SurgeAPI::Models::PhoneNumberImportedWebhookEvent::Data::type_
42
+ }
43
+
44
+ class Data < SurgeAPI::Internal::Type::BaseModel
45
+ attr_accessor id: String
46
+
47
+ attr_accessor campaign: SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign?
48
+
49
+ attr_accessor campaign_id: String?
50
+
51
+ attr_accessor name: String?
52
+
53
+ attr_accessor number: String
54
+
55
+ attr_accessor type: SurgeAPI::Models::PhoneNumberImportedWebhookEvent::Data::type_
56
+
57
+ def initialize: (
58
+ id: String,
59
+ campaign: SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign?,
60
+ campaign_id: String?,
61
+ name: String?,
62
+ number: String,
63
+ type: SurgeAPI::Models::PhoneNumberImportedWebhookEvent::Data::type_
64
+ ) -> void
65
+
66
+ def to_hash: -> {
67
+ id: String,
68
+ campaign: SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign?,
69
+ campaign_id: String?,
70
+ name: String?,
71
+ number: String,
72
+ type: SurgeAPI::Models::PhoneNumberImportedWebhookEvent::Data::type_
73
+ }
74
+
75
+ type campaign =
76
+ {
77
+ id: String,
78
+ attachment_status: SurgeAPI::Models::PhoneNumberImportedWebhookEvent::Data::Campaign::attachment_status
79
+ }
80
+
81
+ class Campaign < SurgeAPI::Internal::Type::BaseModel
82
+ attr_accessor id: String
83
+
84
+ attr_accessor attachment_status: SurgeAPI::Models::PhoneNumberImportedWebhookEvent::Data::Campaign::attachment_status
85
+
86
+ def initialize: (
87
+ id: String,
88
+ attachment_status: SurgeAPI::Models::PhoneNumberImportedWebhookEvent::Data::Campaign::attachment_status
89
+ ) -> void
90
+
91
+ def to_hash: -> {
92
+ id: String,
93
+ attachment_status: SurgeAPI::Models::PhoneNumberImportedWebhookEvent::Data::Campaign::attachment_status
94
+ }
95
+
96
+ type attachment_status =
97
+ :attached | :attachment_pending | :detached | :detachment_pending
98
+
99
+ module AttachmentStatus
100
+ extend SurgeAPI::Internal::Type::Enum
101
+
102
+ ATTACHED: :attached
103
+ ATTACHMENT_PENDING: :attachment_pending
104
+ DETACHED: :detached
105
+ DETACHMENT_PENDING: :detachment_pending
106
+
107
+ def self?.values: -> ::Array[SurgeAPI::Models::PhoneNumberImportedWebhookEvent::Data::Campaign::attachment_status]
108
+ end
109
+ end
110
+
111
+ type type_ = :local | :short_code | :toll_free
112
+
113
+ module Type
114
+ extend SurgeAPI::Internal::Type::Enum
115
+
116
+ LOCAL: :local
117
+ SHORT_CODE: :short_code
118
+ TOLL_FREE: :toll_free
119
+
120
+ def self?.values: -> ::Array[SurgeAPI::Models::PhoneNumberImportedWebhookEvent::Data::type_]
121
+ end
122
+ end
123
+ end
124
+ end
125
+ end