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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81364bbceadc7ad152045b898442649e7b8b3207eefc535a0e8636d8bdb89ead
4
- data.tar.gz: cca60516b813bfcbc472bf934a9a2bccc7754511cfa674e76dd28b6482994e04
3
+ metadata.gz: b5716cf1bf5c2e7a858c9c7a706c388a3a174518d8d1170c4254b5a813e7bd0d
4
+ data.tar.gz: 6a184865cd4ac3b7a8498431c2b229b64794624768f7e4782ad7d74b2d7b98e3
5
5
  SHA512:
6
- metadata.gz: 96dfe4fc1d1abe42a82b4321e1ccdd93763beec2595feb89c7bbfdee1e0ba7bdfaf757c5246e5cce2f1febf6185f7e9eced094e215f6a53f64336eeca3d94640
7
- data.tar.gz: 8c580d749e58ad608241186d4cadfc61265299314c3c9cbecca34ca80f4e3a1c726ea4a4c6364cb9e87702113680eacea3d692d2bf7099b93f5a14fbec83ecac
6
+ metadata.gz: 4a2f8940ada65f353148d318d9167f83d25a145a766018d83245aa8fece4f6cb27d419f2ecf164e0a4a03b253a443cfcdd543ac0cdaaf55d01459d8ca87e6959
7
+ data.tar.gz: f65c4af57e2f91a1604c54b119285014d42beb0e070e98cf91610bb4a77b17bf1a7dc8246710d5f970a1c37661eed4e4413bb3caa9b0d505b49807765ed5ba47
data/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.24.0 (2026-09-04)
4
+
5
+ Full Changelog: [v0.23.0...v0.24.0](https://github.com/surgeapi/ruby-sdk/compare/v0.23.0...v0.24.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** add status to messages ([1a1b928](https://github.com/surgeapi/ruby-sdk/commit/1a1b9288784e37ae35e8c01f814eb39e952a24b0))
10
+ * **api:** add toll free messaging capability to accounts ([87fff80](https://github.com/surgeapi/ruby-sdk/commit/87fff8049ea378688bd2ca8df6b4f5e9919ee832))
11
+ * **api:** phone number imported webhook event ([358bf6d](https://github.com/surgeapi/ruby-sdk/commit/358bf6d5128520687260208216f8923a6c37db29))
12
+
13
+
14
+ ### Documentation
15
+
16
+ * **api:** add note about links in messages for campaigns ([0b7c72d](https://github.com/surgeapi/ruby-sdk/commit/0b7c72ddf56ff3a92959ff50b484a55f62807e42))
17
+ * **api:** add note about links in messages for campaigns (continued) ([0847773](https://github.com/surgeapi/ruby-sdk/commit/0847773d88887971ec454d1ff89ac3a979ed9e0d))
18
+
19
+ ## 0.23.0 (2026-08-19)
20
+
21
+ Full Changelog: [v0.22.0...v0.23.0](https://github.com/surgeapi/ruby-sdk/compare/v0.22.0...v0.23.0)
22
+
23
+ ### Features
24
+
25
+ * **api:** allow non us/canadian organizations ([d558bb0](https://github.com/surgeapi/ruby-sdk/commit/d558bb011a766c052623418137ad13c977f750d5))
26
+ * **api:** disable outbound for contacts ([8689417](https://github.com/surgeapi/ruby-sdk/commit/8689417b03df27a4aadd6b48cc611b48264ed03f))
27
+
3
28
  ## 0.22.0 (2026-08-04)
4
29
 
5
30
  Full Changelog: [v0.21.0...v0.22.0](https://github.com/surgeapi/ruby-sdk/compare/v0.21.0...v0.22.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.22.0"
20
+ gem "surge_api", "~> 0.24.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -89,14 +89,16 @@ module SurgeAPI
89
89
  # @!attribute identifier
90
90
  # The value of the identifier whose type is specified in the identifier_type
91
91
  # field. For EIN, can be formatted with or without the hyphen. For CBN, must be
92
- # exactly 9 digits.
92
+ # exactly 9 digits. For VAT, provide only the numeric portion, between 2 and 20
93
+ # digits.
93
94
  #
94
95
  # @return [String, nil]
95
96
  optional :identifier, String, nil?: true
96
97
 
97
98
  # @!attribute identifier_type
98
99
  # The type of identifier being provided for the organization. Use "ein" for US
99
- # businesses or "cbn" for Canadian businesses.
100
+ # organizations, "cbn" for Canadian organizations, or "vat" for supported
101
+ # international organizations.
100
102
  #
101
103
  # @return [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::IdentifierType, nil]
102
104
  optional :identifier_type,
@@ -180,7 +182,7 @@ module SurgeAPI
180
182
  #
181
183
  # @param identifier [String, nil] The value of the identifier whose type is specified in the identifier_type field
182
184
  #
183
- # @param identifier_type [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::IdentifierType, nil] The type of identifier being provided for the organization. Use "ein" for US bus
185
+ # @param identifier_type [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::IdentifierType, nil] The type of identifier being provided for the organization. Use "ein" for US org
184
186
  #
185
187
  # @param industry [Symbol, SurgeAPI::Models::AccountCreateParams::Organization::Industry, nil] The industry in which the organization operates.
186
188
  #
@@ -355,7 +357,8 @@ module SurgeAPI
355
357
  end
356
358
 
357
359
  # The type of identifier being provided for the organization. Use "ein" for US
358
- # businesses or "cbn" for Canadian businesses.
360
+ # organizations, "cbn" for Canadian organizations, or "vat" for supported
361
+ # international organizations.
359
362
  #
360
363
  # @see SurgeAPI::Models::AccountCreateParams::Organization#identifier_type
361
364
  module IdentifierType
@@ -363,6 +366,7 @@ module SurgeAPI
363
366
 
364
367
  EIN = :ein
365
368
  CBN = :cbn
369
+ VAT = :vat
366
370
 
367
371
  # @!method self.values
368
372
  # @return [Array<Symbol>]
@@ -31,6 +31,7 @@ module SurgeAPI
31
31
  extend SurgeAPI::Internal::Type::Enum
32
32
 
33
33
  LOCAL_MESSAGING = :local_messaging
34
+ TOLL_FREE_MESSAGING = :toll_free_messaging
34
35
 
35
36
  # @!method self.values
36
37
  # @return [Array<Symbol>]
@@ -96,14 +96,16 @@ module SurgeAPI
96
96
  # @!attribute identifier
97
97
  # The value of the identifier whose type is specified in the identifier_type
98
98
  # field. For EIN, can be formatted with or without the hyphen. For CBN, must be
99
- # exactly 9 digits.
99
+ # exactly 9 digits. For VAT, provide only the numeric portion, between 2 and 20
100
+ # digits.
100
101
  #
101
102
  # @return [String, nil]
102
103
  optional :identifier, String, nil?: true
103
104
 
104
105
  # @!attribute identifier_type
105
106
  # The type of identifier being provided for the organization. Use "ein" for US
106
- # businesses or "cbn" for Canadian businesses.
107
+ # organizations, "cbn" for Canadian organizations, or "vat" for supported
108
+ # international organizations.
107
109
  #
108
110
  # @return [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::IdentifierType, nil]
109
111
  optional :identifier_type,
@@ -187,7 +189,7 @@ module SurgeAPI
187
189
  #
188
190
  # @param identifier [String, nil] The value of the identifier whose type is specified in the identifier_type field
189
191
  #
190
- # @param identifier_type [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::IdentifierType, nil] The type of identifier being provided for the organization. Use "ein" for US bus
192
+ # @param identifier_type [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::IdentifierType, nil] The type of identifier being provided for the organization. Use "ein" for US org
191
193
  #
192
194
  # @param industry [Symbol, SurgeAPI::Models::AccountUpdateParams::Organization::Industry, nil] The industry in which the organization operates.
193
195
  #
@@ -362,7 +364,8 @@ module SurgeAPI
362
364
  end
363
365
 
364
366
  # The type of identifier being provided for the organization. Use "ein" for US
365
- # businesses or "cbn" for Canadian businesses.
367
+ # organizations, "cbn" for Canadian organizations, or "vat" for supported
368
+ # international organizations.
366
369
  #
367
370
  # @see SurgeAPI::Models::AccountUpdateParams::Organization#identifier_type
368
371
  module IdentifierType
@@ -370,6 +373,7 @@ module SurgeAPI
370
373
 
371
374
  EIN = :ein
372
375
  CBN = :cbn
376
+ VAT = :vat
373
377
 
374
378
  # @!method self.values
375
379
  # @return [Array<Symbol>]
@@ -113,11 +113,10 @@ module SurgeAPI
113
113
  required :volume, enum: -> { SurgeAPI::Campaign::Volume }
114
114
 
115
115
  # @!attribute link_sample
116
- # A sample link that might be sent by this campaign. If links from other domains
117
- # are sent through this campaign, they are much more likely to be filtered by the
118
- # carriers. If link shortening is enabled for the account, the link shortener URL
119
- # will be used instead of what is provided. Reach out to support if you would like
120
- # to disable automatic link shortening.
116
+ # A sample link that might be sent by this campaign. This is required when
117
+ # `includes` contains `links`. Provide the same URL or domain that the campaign
118
+ # will use in production. If links from other domains are sent through this
119
+ # campaign, they are much more likely to be filtered by the carriers.
121
120
  #
122
121
  # @return [String, nil]
123
122
  optional :link_sample, String
@@ -156,7 +155,7 @@ module SurgeAPI
156
155
  #
157
156
  # @param volume [Symbol, SurgeAPI::Models::Campaign::Volume] This will be one of the following:
158
157
  #
159
- # @param link_sample [String] A sample link that might be sent by this campaign. If links from other domains a
158
+ # @param link_sample [String] A sample link that might be sent by this campaign. This is required when `includ
160
159
  #
161
160
  # @param terms_and_conditions_url [String] The URL of the terms and conditions presented to end users when they opt in to m
162
161
 
@@ -180,6 +179,7 @@ module SurgeAPI
180
179
 
181
180
  ACTIVE = :active
182
181
  CANCELED = :canceled
182
+ REJECTED = :rejected
183
183
  CREATED = :created
184
184
  DEACTIVATED = :deactivated
185
185
  IN_REVIEW = :in_review
@@ -122,11 +122,10 @@ module SurgeAPI
122
122
  -> { SurgeAPI::Internal::Type::ArrayOf[enum: SurgeAPI::CampaignParams::StandardCampaignParams::Include] }
123
123
 
124
124
  # @!attribute link_sample
125
- # A sample link that might be sent by this campaign. If links from other domains
126
- # are sent through this campaign, they are much more likely to be filtered by the
127
- # carriers. If link shortening is enabled for the account, the link shortener URL
128
- # will be used instead of what is provided. Reach out to support if you would like
129
- # to disable automatic link shortening.
125
+ # A sample link that might be sent by this campaign. This is required when
126
+ # `includes` contains `links`. Provide the same URL or domain that the campaign
127
+ # will use in production. If links from other domains are sent through this
128
+ # campaign, they are much more likely to be filtered by the carriers.
130
129
  #
131
130
  # @return [String, nil]
132
131
  optional :link_sample, String
@@ -153,7 +152,7 @@ module SurgeAPI
153
152
  #
154
153
  # @param includes [Array<Symbol, SurgeAPI::Models::CampaignParams::StandardCampaignParams::Include>] A list of properties that this campaign should include. These properties can be
155
154
  #
156
- # @param link_sample [String] A sample link that might be sent by this campaign. If links from other domains a
155
+ # @param link_sample [String] A sample link that might be sent by this campaign. This is required when `includ
157
156
 
158
157
  module UseCase
159
158
  extend SurgeAPI::Internal::Type::Enum
@@ -40,7 +40,13 @@ module SurgeAPI
40
40
  # @return [Hash{Symbol=>String}, nil]
41
41
  optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
42
42
 
43
- # @!method initialize(id:, phone_number:, email: nil, first_name: nil, last_name: nil, metadata: nil)
43
+ # @!attribute outbound_disabled
44
+ # Whether outbound messaging has been manually disabled for the contact.
45
+ #
46
+ # @return [Boolean, nil]
47
+ optional :outbound_disabled, SurgeAPI::Internal::Type::Boolean
48
+
49
+ # @!method initialize(id:, phone_number:, email: nil, first_name: nil, last_name: nil, metadata: nil, outbound_disabled: nil)
44
50
  # A contact who has consented to receive messages
45
51
  #
46
52
  # @param id [String] Unique identifier for the object.
@@ -54,6 +60,8 @@ module SurgeAPI
54
60
  # @param last_name [String] The contact's last name.
55
61
  #
56
62
  # @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
63
+ #
64
+ # @param outbound_disabled [Boolean] Whether outbound messaging has been manually disabled for the contact.
57
65
  end
58
66
  end
59
67
  end
@@ -43,7 +43,13 @@ module SurgeAPI
43
43
  # @return [Hash{Symbol=>String}, nil]
44
44
  optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
45
45
 
46
- # @!method initialize(account_id:, phone_number:, email: nil, first_name: nil, last_name: nil, metadata: nil, request_options: {})
46
+ # @!attribute outbound_disabled
47
+ # Whether outbound messaging should be manually disabled for the contact.
48
+ #
49
+ # @return [Boolean, nil]
50
+ optional :outbound_disabled, SurgeAPI::Internal::Type::Boolean
51
+
52
+ # @!method initialize(account_id:, phone_number:, email: nil, first_name: nil, last_name: nil, metadata: nil, outbound_disabled: nil, request_options: {})
47
53
  # @param account_id [String] The account for which the contact should be created.
48
54
  #
49
55
  # @param phone_number [String] The contact's phone number in E.164 format.
@@ -56,6 +62,8 @@ module SurgeAPI
56
62
  #
57
63
  # @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
58
64
  #
65
+ # @param outbound_disabled [Boolean] Whether outbound messaging should be manually disabled for the contact.
66
+ #
59
67
  # @param request_options [SurgeAPI::RequestOptions, Hash{Symbol=>Object}]
60
68
  end
61
69
  end
@@ -43,7 +43,13 @@ module SurgeAPI
43
43
  # @return [Hash{Symbol=>String}, nil]
44
44
  optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
45
45
 
46
- # @!method initialize(id:, phone_number:, email: nil, first_name: nil, last_name: nil, metadata: nil, request_options: {})
46
+ # @!attribute outbound_disabled
47
+ # Whether outbound messaging should be manually disabled for the contact.
48
+ #
49
+ # @return [Boolean, nil]
50
+ optional :outbound_disabled, SurgeAPI::Internal::Type::Boolean
51
+
52
+ # @!method initialize(id:, phone_number:, email: nil, first_name: nil, last_name: nil, metadata: nil, outbound_disabled: nil, request_options: {})
47
53
  # @param id [String] The ID of the contact to update.
48
54
  #
49
55
  # @param phone_number [String] The contact's phone number in E.164 format.
@@ -56,6 +62,8 @@ module SurgeAPI
56
62
  #
57
63
  # @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
58
64
  #
65
+ # @param outbound_disabled [Boolean] Whether outbound messaging should be manually disabled for the contact.
66
+ #
59
67
  # @param request_options [SurgeAPI::RequestOptions, Hash{Symbol=>Object}]
60
68
  end
61
69
  end
@@ -40,7 +40,13 @@ module SurgeAPI
40
40
  # @return [Hash{Symbol=>String}, nil]
41
41
  optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
42
42
 
43
- # @!method initialize(id: nil, attachments: nil, blast_id: nil, body: nil, conversation: nil, metadata: nil)
43
+ # @!attribute status
44
+ # The current status of the message.
45
+ #
46
+ # @return [Symbol, SurgeAPI::Models::Message::Status, nil]
47
+ optional :status, enum: -> { SurgeAPI::Message::Status }
48
+
49
+ # @!method initialize(id: nil, attachments: nil, blast_id: nil, body: nil, conversation: nil, metadata: nil, status: nil)
44
50
  # Some parameter documentations has been truncated, see
45
51
  # {SurgeAPI::Models::Message} for more details.
46
52
  #
@@ -57,6 +63,8 @@ module SurgeAPI
57
63
  # @param conversation [SurgeAPI::Models::Message::Conversation] A conversation with a Contact
58
64
  #
59
65
  # @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
66
+ #
67
+ # @param status [Symbol, SurgeAPI::Models::Message::Status] The current status of the message.
60
68
 
61
69
  class Attachment < SurgeAPI::Internal::Type::BaseModel
62
70
  # @!attribute id
@@ -185,6 +193,22 @@ module SurgeAPI
185
193
  end
186
194
  end
187
195
  end
196
+
197
+ # The current status of the message.
198
+ #
199
+ # @see SurgeAPI::Models::Message#status
200
+ module Status
201
+ extend SurgeAPI::Internal::Type::Enum
202
+
203
+ PENDING = :pending
204
+ RECEIVED = :received
205
+ SENT = :sent
206
+ DELIVERED = :delivered
207
+ FAILED = :failed
208
+
209
+ # @!method self.values
210
+ # @return [Array<Symbol>]
211
+ end
188
212
  end
189
213
  end
190
214
  end
@@ -68,6 +68,12 @@ module SurgeAPI
68
68
  # @return [Hash{Symbol=>String}]
69
69
  required :metadata, SurgeAPI::Internal::Type::HashOf[String]
70
70
 
71
+ # @!attribute status
72
+ # The message status represented by this event
73
+ #
74
+ # @return [Symbol, SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::Status]
75
+ required :status, enum: -> { SurgeAPI::MessageDeliveredWebhookEvent::Data::Status }
76
+
71
77
  # @!attribute attachments
72
78
  # Attachments included with the message
73
79
  #
@@ -82,7 +88,7 @@ module SurgeAPI
82
88
  # @return [String, nil]
83
89
  optional :blast_id, String
84
90
 
85
- # @!method initialize(id:, body:, conversation:, delivered_at:, metadata:, attachments: nil, blast_id: nil)
91
+ # @!method initialize(id:, body:, conversation:, delivered_at:, metadata:, status:, attachments: nil, blast_id: nil)
86
92
  # Some parameter documentations has been truncated, see
87
93
  # {SurgeAPI::Models::MessageDeliveredWebhookEvent::Data} for more details.
88
94
  #
@@ -98,6 +104,8 @@ module SurgeAPI
98
104
  #
99
105
  # @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
100
106
  #
107
+ # @param status [Symbol, SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::Status] The message status represented by this event
108
+ #
101
109
  # @param attachments [Array<SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::Attachment>] Attachments included with the message
102
110
  #
103
111
  # @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
@@ -132,6 +140,18 @@ module SurgeAPI
132
140
  # @param phone_number [SurgeAPI::Models::PhoneNumber] A phone number that can be used to send and receive messages and calls
133
141
  end
134
142
 
143
+ # The message status represented by this event
144
+ #
145
+ # @see SurgeAPI::Models::MessageDeliveredWebhookEvent::Data#status
146
+ module Status
147
+ extend SurgeAPI::Internal::Type::Enum
148
+
149
+ DELIVERED = :delivered
150
+
151
+ # @!method self.values
152
+ # @return [Array<Symbol>]
153
+ end
154
+
135
155
  class Attachment < SurgeAPI::Internal::Type::BaseModel
136
156
  # @!attribute id
137
157
  # The unique identifier for the attachment
@@ -74,6 +74,12 @@ module SurgeAPI
74
74
  # @return [Hash{Symbol=>String}]
75
75
  required :metadata, SurgeAPI::Internal::Type::HashOf[String]
76
76
 
77
+ # @!attribute status
78
+ # The message status represented by this event
79
+ #
80
+ # @return [Symbol, SurgeAPI::Models::MessageFailedWebhookEvent::Data::Status]
81
+ required :status, enum: -> { SurgeAPI::MessageFailedWebhookEvent::Data::Status }
82
+
77
83
  # @!attribute attachments
78
84
  # Attachments included with the message
79
85
  #
@@ -88,7 +94,7 @@ module SurgeAPI
88
94
  # @return [String, nil]
89
95
  optional :blast_id, String
90
96
 
91
- # @!method initialize(id:, body:, conversation:, failed_at:, failure_reason:, metadata:, attachments: nil, blast_id: nil)
97
+ # @!method initialize(id:, body:, conversation:, failed_at:, failure_reason:, metadata:, status:, attachments: nil, blast_id: nil)
92
98
  # Some parameter documentations has been truncated, see
93
99
  # {SurgeAPI::Models::MessageFailedWebhookEvent::Data} for more details.
94
100
  #
@@ -106,6 +112,8 @@ module SurgeAPI
106
112
  #
107
113
  # @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
108
114
  #
115
+ # @param status [Symbol, SurgeAPI::Models::MessageFailedWebhookEvent::Data::Status] The message status represented by this event
116
+ #
109
117
  # @param attachments [Array<SurgeAPI::Models::MessageFailedWebhookEvent::Data::Attachment>] Attachments included with the message
110
118
  #
111
119
  # @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
@@ -140,6 +148,18 @@ module SurgeAPI
140
148
  # @param phone_number [SurgeAPI::Models::PhoneNumber] A phone number that can be used to send and receive messages and calls
141
149
  end
142
150
 
151
+ # The message status represented by this event
152
+ #
153
+ # @see SurgeAPI::Models::MessageFailedWebhookEvent::Data#status
154
+ module Status
155
+ extend SurgeAPI::Internal::Type::Enum
156
+
157
+ FAILED = :failed
158
+
159
+ # @!method self.values
160
+ # @return [Array<Symbol>]
161
+ end
162
+
143
163
  class Attachment < SurgeAPI::Internal::Type::BaseModel
144
164
  # @!attribute id
145
165
  # The unique identifier for the attachment
@@ -132,7 +132,13 @@ module SurgeAPI
132
132
  # @return [Hash{Symbol=>String}, nil]
133
133
  optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
134
134
 
135
- # @!method initialize(phone_number:, email: nil, first_name: nil, last_name: nil, metadata: nil)
135
+ # @!attribute outbound_disabled
136
+ # Whether outbound messaging should be manually disabled for the contact.
137
+ #
138
+ # @return [Boolean, nil]
139
+ optional :outbound_disabled, SurgeAPI::Internal::Type::Boolean
140
+
141
+ # @!method initialize(phone_number:, email: nil, first_name: nil, last_name: nil, metadata: nil, outbound_disabled: nil)
136
142
  # Parameters for creating a contact
137
143
  #
138
144
  # @param phone_number [String] The contact's phone number in E.164 format.
@@ -144,6 +150,8 @@ module SurgeAPI
144
150
  # @param last_name [String] The contact's last name.
145
151
  #
146
152
  # @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
153
+ #
154
+ # @param outbound_disabled [Boolean] Whether outbound messaging should be manually disabled for the contact.
147
155
  end
148
156
  end
149
157
 
@@ -68,6 +68,12 @@ module SurgeAPI
68
68
  # @return [Time]
69
69
  required :received_at, Time
70
70
 
71
+ # @!attribute status
72
+ # The message status represented by this event
73
+ #
74
+ # @return [Symbol, SurgeAPI::Models::MessageReceivedWebhookEvent::Data::Status]
75
+ required :status, enum: -> { SurgeAPI::MessageReceivedWebhookEvent::Data::Status }
76
+
71
77
  # @!attribute attachments
72
78
  # Attachments included with the message
73
79
  #
@@ -82,7 +88,7 @@ module SurgeAPI
82
88
  # @return [String, nil]
83
89
  optional :blast_id, String
84
90
 
85
- # @!method initialize(id:, body:, conversation:, metadata:, received_at:, attachments: nil, blast_id: nil)
91
+ # @!method initialize(id:, body:, conversation:, metadata:, received_at:, status:, attachments: nil, blast_id: nil)
86
92
  # Some parameter documentations has been truncated, see
87
93
  # {SurgeAPI::Models::MessageReceivedWebhookEvent::Data} for more details.
88
94
  #
@@ -98,6 +104,8 @@ module SurgeAPI
98
104
  #
99
105
  # @param received_at [Time] When the message was received
100
106
  #
107
+ # @param status [Symbol, SurgeAPI::Models::MessageReceivedWebhookEvent::Data::Status] The message status represented by this event
108
+ #
101
109
  # @param attachments [Array<SurgeAPI::Models::MessageReceivedWebhookEvent::Data::Attachment>] Attachments included with the message
102
110
  #
103
111
  # @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
@@ -132,6 +140,18 @@ module SurgeAPI
132
140
  # @param phone_number [SurgeAPI::Models::PhoneNumber] A phone number that can be used to send and receive messages and calls
133
141
  end
134
142
 
143
+ # The message status represented by this event
144
+ #
145
+ # @see SurgeAPI::Models::MessageReceivedWebhookEvent::Data#status
146
+ module Status
147
+ extend SurgeAPI::Internal::Type::Enum
148
+
149
+ RECEIVED = :received
150
+
151
+ # @!method self.values
152
+ # @return [Array<Symbol>]
153
+ end
154
+
135
155
  class Attachment < SurgeAPI::Internal::Type::BaseModel
136
156
  # @!attribute id
137
157
  # The unique identifier for the attachment
@@ -68,6 +68,12 @@ module SurgeAPI
68
68
  # @return [Time]
69
69
  required :sent_at, Time
70
70
 
71
+ # @!attribute status
72
+ # The message status represented by this event
73
+ #
74
+ # @return [Symbol, SurgeAPI::Models::MessageSentWebhookEvent::Data::Status]
75
+ required :status, enum: -> { SurgeAPI::MessageSentWebhookEvent::Data::Status }
76
+
71
77
  # @!attribute attachments
72
78
  # Attachments included with the message
73
79
  #
@@ -82,7 +88,7 @@ module SurgeAPI
82
88
  # @return [String, nil]
83
89
  optional :blast_id, String
84
90
 
85
- # @!method initialize(id:, body:, conversation:, metadata:, sent_at:, attachments: nil, blast_id: nil)
91
+ # @!method initialize(id:, body:, conversation:, metadata:, sent_at:, status:, attachments: nil, blast_id: nil)
86
92
  # Some parameter documentations has been truncated, see
87
93
  # {SurgeAPI::Models::MessageSentWebhookEvent::Data} for more details.
88
94
  #
@@ -98,6 +104,8 @@ module SurgeAPI
98
104
  #
99
105
  # @param sent_at [Time] When the message was sent
100
106
  #
107
+ # @param status [Symbol, SurgeAPI::Models::MessageSentWebhookEvent::Data::Status] The message status represented by this event
108
+ #
101
109
  # @param attachments [Array<SurgeAPI::Models::MessageSentWebhookEvent::Data::Attachment>] Attachments included with the message
102
110
  #
103
111
  # @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
@@ -132,6 +140,18 @@ module SurgeAPI
132
140
  # @param phone_number [SurgeAPI::Models::PhoneNumber] A phone number that can be used to send and receive messages and calls
133
141
  end
134
142
 
143
+ # The message status represented by this event
144
+ #
145
+ # @see SurgeAPI::Models::MessageSentWebhookEvent::Data#status
146
+ module Status
147
+ extend SurgeAPI::Internal::Type::Enum
148
+
149
+ SENT = :sent
150
+
151
+ # @!method self.values
152
+ # @return [Array<Symbol>]
153
+ end
154
+
135
155
  class Attachment < SurgeAPI::Internal::Type::BaseModel
136
156
  # @!attribute id
137
157
  # The unique identifier for the attachment
@@ -36,14 +36,16 @@ module SurgeAPI
36
36
  # @!attribute identifier
37
37
  # The value of the identifier whose type is specified in the identifier_type
38
38
  # field. For EIN, can be formatted with or without the hyphen. For CBN, must be
39
- # exactly 9 digits.
39
+ # exactly 9 digits. For VAT, provide only the numeric portion, between 2 and 20
40
+ # digits.
40
41
  #
41
42
  # @return [String, nil]
42
43
  required :identifier, String, nil?: true
43
44
 
44
45
  # @!attribute identifier_type
45
46
  # The type of identifier being provided for the organization. Use "ein" for US
46
- # businesses or "cbn" for Canadian businesses.
47
+ # organizations, "cbn" for Canadian organizations, or "vat" for supported
48
+ # international organizations.
47
49
  #
48
50
  # @return [Symbol, SurgeAPI::Models::Organization::IdentifierType, nil]
49
51
  required :identifier_type, enum: -> { SurgeAPI::Organization::IdentifierType }, nil?: true
@@ -120,7 +122,7 @@ module SurgeAPI
120
122
  #
121
123
  # @param identifier [String, nil] The value of the identifier whose type is specified in the identifier_type field
122
124
  #
123
- # @param identifier_type [Symbol, SurgeAPI::Models::Organization::IdentifierType, nil] The type of identifier being provided for the organization. Use "ein" for US bus
125
+ # @param identifier_type [Symbol, SurgeAPI::Models::Organization::IdentifierType, nil] The type of identifier being provided for the organization. Use "ein" for US org
124
126
  #
125
127
  # @param industry [Symbol, SurgeAPI::Models::Organization::Industry, nil] The industry in which the organization operates.
126
128
  #
@@ -287,7 +289,8 @@ module SurgeAPI
287
289
  end
288
290
 
289
291
  # The type of identifier being provided for the organization. Use "ein" for US
290
- # businesses or "cbn" for Canadian businesses.
292
+ # organizations, "cbn" for Canadian organizations, or "vat" for supported
293
+ # international organizations.
291
294
  #
292
295
  # @see SurgeAPI::Models::Organization#identifier_type
293
296
  module IdentifierType
@@ -295,6 +298,7 @@ module SurgeAPI
295
298
 
296
299
  EIN = :ein
297
300
  CBN = :cbn
301
+ VAT = :vat
298
302
 
299
303
  # @!method self.values
300
304
  # @return [Array<Symbol>]