sentdm 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +1 -27
- data/lib/sentdm/client.rb +71 -8
- data/lib/sentdm/internal/type/base_model.rb +5 -5
- data/lib/sentdm/models/contact_create_response.rb +249 -0
- data/lib/sentdm/models/contact_delete_params.rb +16 -2
- data/lib/sentdm/models/contact_list_response.rb +299 -16
- data/lib/sentdm/models/contact_retrieve_message_summary_response.rb +186 -0
- data/lib/sentdm/models/contact_retrieve_response.rb +249 -0
- data/lib/sentdm/models/contact_update_response.rb +249 -0
- data/lib/sentdm/models/conversation_list_messages_response.rb +436 -0
- data/lib/sentdm/models/conversation_list_response.rb +433 -0
- data/lib/sentdm/models/me_retrieve_response.rb +242 -12
- data/lib/sentdm/models/message_retrieve_activities_response.rb +165 -7
- data/lib/sentdm/models/message_retrieve_status_response.rb +74 -6
- data/lib/sentdm/models/message_send_response.rb +113 -28
- data/lib/sentdm/models/number_lookup_response.rb +74 -6
- data/lib/sentdm/models/profile_complete_response.rb +74 -6
- data/lib/sentdm/models/profile_create_params.rb +378 -26
- data/lib/sentdm/models/profile_create_response.rb +760 -0
- data/lib/sentdm/models/profile_delete_params.rb +16 -2
- data/lib/sentdm/models/profile_list_response.rb +825 -14
- data/lib/sentdm/models/profile_retrieve_response.rb +762 -0
- data/lib/sentdm/models/profile_update_params.rb +391 -24
- data/lib/sentdm/models/profile_update_response.rb +760 -0
- data/lib/sentdm/models/profiles/campaign_create_params.rb +156 -3
- data/lib/sentdm/models/profiles/campaign_create_response.rb +420 -0
- data/lib/sentdm/models/profiles/campaign_delete_params.rb +17 -2
- data/lib/sentdm/models/profiles/campaign_list_response.rb +421 -0
- data/lib/sentdm/models/profiles/campaign_update_params.rb +156 -3
- data/lib/sentdm/models/profiles/campaign_update_response.rb +420 -0
- data/lib/sentdm/models/template_create_response.rb +209 -0
- data/lib/sentdm/models/template_list_params.rb +9 -2
- data/lib/sentdm/models/template_list_response.rb +262 -16
- data/lib/sentdm/models/template_retrieve_response.rb +209 -0
- data/lib/sentdm/models/template_update_response.rb +209 -0
- data/lib/sentdm/models/user_invite_response.rb +201 -0
- data/lib/sentdm/models/user_list_response.rb +259 -14
- data/lib/sentdm/models/user_remove_params.rb +16 -2
- data/lib/sentdm/models/user_retrieve_response.rb +201 -0
- data/lib/sentdm/models/user_update_role_response.rb +201 -0
- data/lib/sentdm/models/webhook_create_response.rb +229 -0
- data/lib/sentdm/models/webhook_list_event_types_response.rb +213 -13
- data/lib/sentdm/models/webhook_list_events_response.rb +162 -13
- data/lib/sentdm/models/webhook_list_response.rb +280 -15
- data/lib/sentdm/models/webhook_retrieve_response.rb +229 -0
- data/lib/sentdm/models/webhook_rotate_secret_params.rb +17 -2
- data/lib/sentdm/models/webhook_rotate_secret_response.rb +74 -6
- data/lib/sentdm/models/webhook_test_response.rb +74 -6
- data/lib/sentdm/models/webhook_toggle_status_response.rb +229 -0
- data/lib/sentdm/models/webhook_update_response.rb +229 -0
- data/lib/sentdm/models.rb +0 -52
- data/lib/sentdm/resources/contacts.rb +30 -13
- data/lib/sentdm/resources/conversations.rb +12 -4
- data/lib/sentdm/resources/me.rb +6 -1
- data/lib/sentdm/resources/messages.rb +11 -1
- data/lib/sentdm/resources/numbers.rb +6 -1
- data/lib/sentdm/resources/profiles/campaigns.rb +47 -9
- data/lib/sentdm/resources/profiles.rb +134 -58
- data/lib/sentdm/resources/templates.rb +14 -8
- data/lib/sentdm/resources/users.rb +12 -7
- data/lib/sentdm/resources/webhooks.rb +19 -9
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +22 -32
- data/rbi/sentdm/client.rbi +71 -8
- data/rbi/sentdm/models/contact_create_response.rbi +407 -0
- data/rbi/sentdm/models/contact_delete_params.rbi +19 -2
- data/rbi/sentdm/models/contact_list_response.rbi +527 -21
- data/rbi/sentdm/models/contact_retrieve_message_summary_response.rbi +397 -0
- data/rbi/sentdm/models/contact_retrieve_response.rbi +409 -0
- data/rbi/sentdm/models/contact_update_response.rbi +407 -0
- data/rbi/sentdm/models/conversation_list_messages_response.rbi +843 -0
- data/rbi/sentdm/models/conversation_list_response.rbi +819 -0
- data/rbi/sentdm/models/me_retrieve_response.rbi +367 -16
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +335 -11
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +148 -8
- data/rbi/sentdm/models/message_send_response.rbi +178 -32
- data/rbi/sentdm/models/number_lookup_response.rbi +135 -8
- data/rbi/sentdm/models/profile_complete_response.rbi +137 -8
- data/rbi/sentdm/models/profile_create_params.rbi +592 -42
- data/rbi/sentdm/models/profile_create_response.rbi +1226 -0
- data/rbi/sentdm/models/profile_delete_params.rbi +19 -2
- data/rbi/sentdm/models/profile_list_response.rbi +1366 -18
- data/rbi/sentdm/models/profile_retrieve_response.rbi +1230 -0
- data/rbi/sentdm/models/profile_update_params.rbi +610 -30
- data/rbi/sentdm/models/profile_update_response.rbi +1226 -0
- data/rbi/sentdm/models/profiles/campaign_create_params.rbi +218 -4
- data/rbi/sentdm/models/profiles/campaign_create_response.rbi +674 -0
- data/rbi/sentdm/models/profiles/campaign_delete_params.rbi +14 -1
- data/rbi/sentdm/models/profiles/campaign_list_response.rbi +667 -0
- data/rbi/sentdm/models/profiles/campaign_update_params.rbi +218 -4
- data/rbi/sentdm/models/profiles/campaign_update_response.rbi +674 -0
- data/rbi/sentdm/models/template_create_response.rbi +349 -0
- data/rbi/sentdm/models/template_list_params.rbi +10 -2
- data/rbi/sentdm/models/template_list_response.rbi +469 -21
- data/rbi/sentdm/models/template_retrieve_response.rbi +355 -0
- data/rbi/sentdm/models/template_update_response.rbi +349 -0
- data/rbi/sentdm/models/user_invite_response.rbi +336 -0
- data/rbi/sentdm/models/user_list_response.rbi +463 -18
- data/rbi/sentdm/models/user_remove_params.rbi +19 -2
- data/rbi/sentdm/models/user_retrieve_response.rbi +336 -0
- data/rbi/sentdm/models/user_update_role_response.rbi +341 -0
- data/rbi/sentdm/models/webhook_create_response.rbi +361 -0
- data/rbi/sentdm/models/webhook_list_event_types_response.rbi +433 -16
- data/rbi/sentdm/models/webhook_list_events_response.rbi +319 -15
- data/rbi/sentdm/models/webhook_list_response.rbi +480 -19
- data/rbi/sentdm/models/webhook_retrieve_response.rbi +363 -0
- data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +14 -1
- data/rbi/sentdm/models/webhook_rotate_secret_response.rbi +148 -8
- data/rbi/sentdm/models/webhook_test_response.rbi +135 -8
- data/rbi/sentdm/models/webhook_toggle_status_response.rbi +379 -0
- data/rbi/sentdm/models/webhook_update_response.rbi +361 -0
- data/rbi/sentdm/models.rbi +0 -54
- data/rbi/sentdm/resources/contacts.rbi +24 -9
- data/rbi/sentdm/resources/conversations.rbi +10 -2
- data/rbi/sentdm/resources/me.rbi +6 -1
- data/rbi/sentdm/resources/messages.rbi +11 -1
- data/rbi/sentdm/resources/numbers.rbi +6 -1
- data/rbi/sentdm/resources/profiles/campaigns.rbi +36 -6
- data/rbi/sentdm/resources/profiles.rbi +174 -66
- data/rbi/sentdm/resources/templates.rbi +15 -5
- data/rbi/sentdm/resources/users.rbi +9 -4
- data/rbi/sentdm/resources/webhooks.rbi +15 -5
- data/sig/sentdm/models/contact_create_response.rbs +216 -0
- data/sig/sentdm/models/contact_delete_params.rbs +10 -6
- data/sig/sentdm/models/contact_list_response.rbs +263 -20
- data/sig/sentdm/models/contact_retrieve_message_summary_response.rbs +182 -0
- data/sig/sentdm/models/contact_retrieve_response.rbs +216 -0
- data/sig/sentdm/models/contact_update_response.rbs +216 -0
- data/sig/sentdm/models/conversation_list_messages_response.rbs +404 -0
- data/sig/sentdm/models/conversation_list_response.rbs +404 -0
- data/sig/sentdm/models/me_retrieve_response.rbs +176 -18
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +147 -12
- data/sig/sentdm/models/message_retrieve_status_response.rbs +71 -9
- data/sig/sentdm/models/message_send_response.rbs +71 -9
- data/sig/sentdm/models/number_lookup_response.rbs +71 -9
- data/sig/sentdm/models/profile_complete_response.rbs +71 -9
- data/sig/sentdm/models/profile_create_params.rbs +271 -24
- data/sig/sentdm/models/profile_create_response.rbs +559 -0
- data/sig/sentdm/models/profile_delete_params.rbs +10 -6
- data/sig/sentdm/models/profile_list_response.rbs +615 -15
- data/sig/sentdm/models/profile_retrieve_response.rbs +559 -0
- data/sig/sentdm/models/profile_update_params.rbs +263 -12
- data/sig/sentdm/models/profile_update_response.rbs +559 -0
- data/sig/sentdm/models/profiles/campaign_create_params.rbs +108 -4
- data/sig/sentdm/models/profiles/campaign_create_response.rbs +357 -0
- data/sig/sentdm/models/profiles/campaign_delete_params.rbs +15 -8
- data/sig/sentdm/models/profiles/campaign_list_response.rbs +357 -0
- data/sig/sentdm/models/profiles/campaign_update_params.rbs +108 -4
- data/sig/sentdm/models/profiles/campaign_update_response.rbs +357 -0
- data/sig/sentdm/models/template_create_response.rbs +182 -0
- data/sig/sentdm/models/template_list_response.rbs +230 -19
- data/sig/sentdm/models/template_retrieve_response.rbs +182 -0
- data/sig/sentdm/models/template_update_response.rbs +182 -0
- data/sig/sentdm/models/user_invite_response.rbs +177 -0
- data/sig/sentdm/models/user_list_response.rbs +233 -15
- data/sig/sentdm/models/user_remove_params.rbs +10 -6
- data/sig/sentdm/models/user_retrieve_response.rbs +177 -0
- data/sig/sentdm/models/user_update_role_response.rbs +177 -0
- data/sig/sentdm/models/webhook_create_response.rbs +208 -0
- data/sig/sentdm/models/webhook_list_event_types_response.rbs +203 -15
- data/sig/sentdm/models/webhook_list_events_response.rbs +142 -14
- data/sig/sentdm/models/webhook_list_response.rbs +255 -20
- data/sig/sentdm/models/webhook_retrieve_response.rbs +208 -0
- data/sig/sentdm/models/webhook_rotate_secret_params.rbs +17 -8
- data/sig/sentdm/models/webhook_rotate_secret_response.rbs +71 -9
- data/sig/sentdm/models/webhook_test_response.rbs +71 -9
- data/sig/sentdm/models/webhook_toggle_status_response.rbs +208 -0
- data/sig/sentdm/models/webhook_update_response.rbs +208 -0
- data/sig/sentdm/models.rbs +0 -52
- data/sig/sentdm/resources/contacts.rbs +4 -4
- data/sig/sentdm/resources/conversations.rbs +2 -2
- data/sig/sentdm/resources/profiles/campaigns.rbs +5 -5
- data/sig/sentdm/resources/profiles.rbs +11 -11
- data/sig/sentdm/resources/templates.rbs +3 -3
- data/sig/sentdm/resources/users.rbs +3 -3
- data/sig/sentdm/resources/webhooks.rbs +4 -4
- metadata +68 -98
- data/lib/sentdm/models/api_meta.rb +0 -34
- data/lib/sentdm/models/api_response_of_contact.rb +0 -46
- data/lib/sentdm/models/api_response_of_contact_message_summary.rb +0 -43
- data/lib/sentdm/models/api_response_of_conversation_messages_list.rb +0 -43
- data/lib/sentdm/models/api_response_of_profile_detail.rb +0 -43
- data/lib/sentdm/models/api_response_of_user.rb +0 -43
- data/lib/sentdm/models/api_response_template.rb +0 -43
- data/lib/sentdm/models/api_response_webhook.rb +0 -43
- data/lib/sentdm/models/billing_contact_info.rb +0 -47
- data/lib/sentdm/models/brand_business_info.rb +0 -114
- data/lib/sentdm/models/brand_compliance_info.rb +0 -67
- data/lib/sentdm/models/brand_contact_info.rb +0 -58
- data/lib/sentdm/models/brands_brand_data.rb +0 -34
- data/lib/sentdm/models/contact_message_summary.rb +0 -76
- data/lib/sentdm/models/contact_response.rb +0 -126
- data/lib/sentdm/models/conversation_messages_list.rb +0 -245
- data/lib/sentdm/models/error_detail.rb +0 -42
- data/lib/sentdm/models/mutation_request.rb +0 -20
- data/lib/sentdm/models/pagination_meta.rb +0 -80
- data/lib/sentdm/models/payment_details.rb +0 -44
- data/lib/sentdm/models/profile_detail.rb +0 -605
- data/lib/sentdm/models/profile_settings.rb +0 -66
- data/lib/sentdm/models/profiles/api_response_of_brand_campaign.rb +0 -45
- data/lib/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rb +0 -45
- data/lib/sentdm/models/profiles/brand_campaign.rb +0 -247
- data/lib/sentdm/models/profiles/campaign_data.rb +0 -130
- data/lib/sentdm/models/profiles/campaign_use_case.rb +0 -71
- data/lib/sentdm/models/profiles/campaign_use_case_data.rb +0 -29
- data/lib/sentdm/models/template.rb +0 -90
- data/lib/sentdm/models/user_response.rb +0 -82
- data/lib/sentdm/models/webhook_event_type.rb +0 -45
- data/lib/sentdm/models/webhook_response.rb +0 -95
- data/rbi/sentdm/models/api_meta.rbi +0 -55
- data/rbi/sentdm/models/api_response_of_contact.rbi +0 -74
- data/rbi/sentdm/models/api_response_of_contact_message_summary.rbi +0 -79
- data/rbi/sentdm/models/api_response_of_conversation_messages_list.rbi +0 -79
- data/rbi/sentdm/models/api_response_of_profile_detail.rbi +0 -74
- data/rbi/sentdm/models/api_response_of_user.rbi +0 -74
- data/rbi/sentdm/models/api_response_template.rbi +0 -74
- data/rbi/sentdm/models/api_response_webhook.rbi +0 -74
- data/rbi/sentdm/models/billing_contact_info.rbi +0 -65
- data/rbi/sentdm/models/brand_business_info.rbi +0 -162
- data/rbi/sentdm/models/brand_compliance_info.rbi +0 -84
- data/rbi/sentdm/models/brand_contact_info.rbi +0 -78
- data/rbi/sentdm/models/brands_brand_data.rbi +0 -65
- data/rbi/sentdm/models/contact_message_summary.rbi +0 -144
- data/rbi/sentdm/models/contact_response.rbi +0 -183
- data/rbi/sentdm/models/conversation_messages_list.rbi +0 -419
- data/rbi/sentdm/models/error_detail.rbi +0 -66
- data/rbi/sentdm/models/mutation_request.rbi +0 -32
- data/rbi/sentdm/models/pagination_meta.rbi +0 -135
- data/rbi/sentdm/models/payment_details.rbi +0 -59
- data/rbi/sentdm/models/profile_detail.rbi +0 -872
- data/rbi/sentdm/models/profile_settings.rbi +0 -86
- data/rbi/sentdm/models/profiles/api_response_of_brand_campaign.rbi +0 -81
- data/rbi/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rbi +0 -76
- data/rbi/sentdm/models/profiles/brand_campaign.rbi +0 -299
- data/rbi/sentdm/models/profiles/campaign_data.rbi +0 -146
- data/rbi/sentdm/models/profiles/campaign_use_case.rbi +0 -110
- data/rbi/sentdm/models/profiles/campaign_use_case_data.rbi +0 -51
- data/rbi/sentdm/models/template.rbi +0 -129
- data/rbi/sentdm/models/user_response.rbi +0 -118
- data/rbi/sentdm/models/webhook_event_type.rbi +0 -74
- data/rbi/sentdm/models/webhook_response.rbi +0 -140
- data/sig/sentdm/models/api_meta.rbs +0 -27
- data/sig/sentdm/models/api_response_of_contact.rbs +0 -39
- data/sig/sentdm/models/api_response_of_contact_message_summary.rbs +0 -39
- data/sig/sentdm/models/api_response_of_conversation_messages_list.rbs +0 -39
- data/sig/sentdm/models/api_response_of_profile_detail.rbs +0 -39
- data/sig/sentdm/models/api_response_of_user.rbs +0 -39
- data/sig/sentdm/models/api_response_template.rbs +0 -39
- data/sig/sentdm/models/api_response_webhook.rbs +0 -39
- data/sig/sentdm/models/billing_contact_info.rbs +0 -30
- data/sig/sentdm/models/brand_business_info.rbs +0 -89
- data/sig/sentdm/models/brand_compliance_info.rbs +0 -50
- data/sig/sentdm/models/brand_contact_info.rbs +0 -45
- data/sig/sentdm/models/brands_brand_data.rbs +0 -30
- data/sig/sentdm/models/contact_message_summary.rbs +0 -84
- data/sig/sentdm/models/contact_response.rbs +0 -111
- data/sig/sentdm/models/conversation_messages_list.rbs +0 -240
- data/sig/sentdm/models/error_detail.rbs +0 -39
- data/sig/sentdm/models/mutation_request.rbs +0 -15
- data/sig/sentdm/models/pagination_meta.rbs +0 -67
- data/sig/sentdm/models/payment_details.rbs +0 -30
- data/sig/sentdm/models/profile_detail.rbs +0 -469
- data/sig/sentdm/models/profile_settings.rbs +0 -50
- data/sig/sentdm/models/profiles/api_response_of_brand_campaign.rbs +0 -41
- data/sig/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rbs +0 -41
- data/sig/sentdm/models/profiles/brand_campaign.rbs +0 -194
- data/sig/sentdm/models/profiles/campaign_data.rbs +0 -87
- data/sig/sentdm/models/profiles/campaign_use_case.rbs +0 -66
- data/sig/sentdm/models/profiles/campaign_use_case_data.rbs +0 -27
- data/sig/sentdm/models/template.rbs +0 -79
- data/sig/sentdm/models/user_response.rbs +0 -72
- data/sig/sentdm/models/webhook_event_type.rbs +0 -51
- data/sig/sentdm/models/webhook_response.rbs +0 -103
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 41507ba04354a1aa51dc2607fe1e8d1af2ea3f4ec4e09616790d25b8ae139c43
|
|
4
|
+
data.tar.gz: 7da6d30368292aaad6c06df6f997c1d5f9e5aac623bad956b818b8670e4b105d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea59af208b6faa26d5134072b12e743313712f294506d3d76c465e1a7b76898c75da9144051f8ec5f902cecf7b94950d8c7f73ed067aca29c2489277ac0251c4
|
|
7
|
+
data.tar.gz: 37ea3a43dfb7ce5b482fd5972772a3d1b482d4e7085c99dba8d258f68b0023b7ba8fab94857f0bc02c105b9718967b78348e63c8e0f54569350c76b69eaf2cdb
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.28.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.27.0...v0.28.0) (2026-08-31)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** sync OpenAPI spec from production ([d1e44c2](https://github.com/sentdm/sent-dm-ruby/commit/d1e44c2f20f5397cc0d868af4ac0216f2c78baa8))
|
|
9
|
+
* **api:** sync OpenAPI spec from production ([f6354b3](https://github.com/sentdm/sent-dm-ruby/commit/f6354b3dc2a88c39d886349558b605b37a97db3e))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* sync the package version in Gemfile.lock to 0.27.0 ([d6f29cc](https://github.com/sentdm/sent-dm-ruby/commit/d6f29cc70c3d1b1786ed6e31c08dd6c9321552b0))
|
|
15
|
+
|
|
3
16
|
## [0.27.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.26.0...v0.27.0) (2026-08-17)
|
|
4
17
|
|
|
5
18
|
|
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 "sentdm", "~> 0.
|
|
20
|
+
gem "sentdm", "~> 0.28.0"
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
<!-- x-release-please-end -->
|
|
@@ -256,32 +256,6 @@ params = Sentdm::MessageSendParams.new(
|
|
|
256
256
|
sent.messages.send_(**params)
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
### Enums
|
|
260
|
-
|
|
261
|
-
Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:
|
|
262
|
-
|
|
263
|
-
```ruby
|
|
264
|
-
# :PRIVATE_PROFIT
|
|
265
|
-
puts(Sentdm::BrandBusinessInfo::EntityType::PRIVATE_PROFIT)
|
|
266
|
-
|
|
267
|
-
# Revealed type: `T.all(Sentdm::BrandBusinessInfo::EntityType, Symbol)`
|
|
268
|
-
T.reveal_type(Sentdm::BrandBusinessInfo::EntityType::PRIVATE_PROFIT)
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:
|
|
272
|
-
|
|
273
|
-
```ruby
|
|
274
|
-
Sentdm::BrandBusinessInfo.new(
|
|
275
|
-
entity_type: Sentdm::BrandBusinessInfo::EntityType::PRIVATE_PROFIT,
|
|
276
|
-
# …
|
|
277
|
-
)
|
|
278
|
-
|
|
279
|
-
Sentdm::BrandBusinessInfo.new(
|
|
280
|
-
entity_type: :PRIVATE_PROFIT,
|
|
281
|
-
# …
|
|
282
|
-
)
|
|
283
|
-
```
|
|
284
|
-
|
|
285
259
|
## Versioning
|
|
286
260
|
|
|
287
261
|
This package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. As the library is in initial development and has a major version of `0`, APIs may change at any time.
|
data/lib/sentdm/client.rb
CHANGED
|
@@ -20,38 +20,101 @@ module Sentdm
|
|
|
20
20
|
# @return [String]
|
|
21
21
|
attr_reader :api_key
|
|
22
22
|
|
|
23
|
-
#
|
|
23
|
+
# Delivery reports and inbound messages, pushed to you.
|
|
24
|
+
#
|
|
25
|
+
# Subscribe an endpoint to the event types you care about —
|
|
26
|
+
# `GET /v3/webhooks/event-types` lists them — and we POST each one as it happens,
|
|
27
|
+
# retrying on failure. Polling `GET /v3/messages/{id}` works and does not scale.
|
|
28
|
+
#
|
|
29
|
+
# **Verify the signature.** Every delivery is signed with your endpoint's secret;
|
|
30
|
+
# an unverified endpoint is one anybody can post to. `rotate-secret` replaces it,
|
|
31
|
+
# `test` sends a specimen event, and `GET /v3/webhooks/{id}/events` shows what we
|
|
32
|
+
# tried to deliver and what your endpoint answered — which is the first place to
|
|
33
|
+
# look when something appears to be missing.
|
|
24
34
|
# @return [Sentdm::Resources::Webhooks]
|
|
25
35
|
attr_reader :webhooks
|
|
26
36
|
|
|
27
|
-
#
|
|
37
|
+
# The people who can sign in to your organization, and what each may do.
|
|
38
|
+
#
|
|
39
|
+
# Users are dashboard access and nothing else — they do not send, and removing one
|
|
40
|
+
# does not affect traffic. An API key is not a user: it belongs to the
|
|
41
|
+
# organization or to a sender profile, so revoking a person's access leaves your
|
|
42
|
+
# integration running.
|
|
28
43
|
# @return [Sentdm::Resources::Users]
|
|
29
44
|
attr_reader :users
|
|
30
45
|
|
|
31
|
-
#
|
|
46
|
+
# Reusable message bodies with named variables.
|
|
47
|
+
#
|
|
48
|
+
# A template is substituted at send time from the values you pass, so the copy
|
|
49
|
+
# lives here rather than in your application. WhatsApp templates additionally need
|
|
50
|
+
# Meta's approval before they can be sent, and a template's channel status reports
|
|
51
|
+
# where that stands — an approved SMS template and an unapproved WhatsApp one are
|
|
52
|
+
# the same template in two states.
|
|
32
53
|
# @return [Sentdm::Resources::Templates]
|
|
33
54
|
attr_reader :templates
|
|
34
55
|
|
|
35
|
-
#
|
|
56
|
+
# **Deprecated — use Sender Profiles.**
|
|
57
|
+
#
|
|
58
|
+
# The original profile resource, kept because it has live callers. It still works,
|
|
59
|
+
# and its replacement is `/v3/sender-profiles`, which takes the identity and the
|
|
60
|
+
# campaign in one call instead of across three.
|
|
61
|
+
#
|
|
62
|
+
# New integrations should not start here.
|
|
36
63
|
# @return [Sentdm::Resources::Profiles]
|
|
37
64
|
attr_reader :profiles
|
|
38
65
|
|
|
39
|
-
#
|
|
66
|
+
# What a phone number actually is, before you send to it.
|
|
67
|
+
#
|
|
68
|
+
# A lookup returns the number's country, line type and carrier, which is what
|
|
69
|
+
# decides whether it is reachable on a channel and what it costs. Worth doing on
|
|
70
|
+
# import rather than on send: a landline in a contact list is a message that can
|
|
71
|
+
# never be delivered.
|
|
40
72
|
# @return [Sentdm::Resources::Numbers]
|
|
41
73
|
attr_reader :numbers
|
|
42
74
|
|
|
43
|
-
# Send and
|
|
75
|
+
# Send a message and follow what happened to it.
|
|
76
|
+
#
|
|
77
|
+
# One endpoint sends on any channel: pass `channel: "sent"` and we pick between
|
|
78
|
+
# SMS, WhatsApp and RCS per recipient using your routing rules, or name a channel
|
|
79
|
+
# to pin it. A send is accepted asynchronously — `POST /v3/messages` returns an
|
|
80
|
+
# id, and delivery is reported through `GET /v3/messages/{id}`, its activities, or
|
|
81
|
+
# a webhook.
|
|
82
|
+
#
|
|
83
|
+
# **A message needs a sender.** What you can send, where, and at what cost is
|
|
84
|
+
# decided by the markets under **Channels** — so a recipient in a country you hold
|
|
85
|
+
# no sender for is refused here rather than queued.
|
|
44
86
|
# @return [Sentdm::Resources::Messages]
|
|
45
87
|
attr_reader :messages
|
|
46
88
|
|
|
47
|
-
#
|
|
89
|
+
# The people you message, and their channel identities.
|
|
90
|
+
#
|
|
91
|
+
# A contact holds one identity per channel — a phone number, a WhatsApp number —
|
|
92
|
+
# so routing can choose between them for the same person. Opt-out is recorded
|
|
93
|
+
# against the contact and honoured on every send, whichever channel it came
|
|
94
|
+
# through.
|
|
95
|
+
#
|
|
96
|
+
# `GET /v3/contacts/{id}/message-summary` is the per-contact view of what you have
|
|
97
|
+
# sent and what happened to it.
|
|
48
98
|
# @return [Sentdm::Resources::Contacts]
|
|
49
99
|
attr_reader :contacts
|
|
50
100
|
|
|
101
|
+
# Inbound and outbound messages, grouped by the person they are with.
|
|
102
|
+
#
|
|
103
|
+
# A conversation is the thread for one contact across every channel — a reply by
|
|
104
|
+
# SMS and one by WhatsApp belong to the same conversation, because they are the
|
|
105
|
+
# same person talking to you.
|
|
106
|
+
#
|
|
107
|
+
# Read-only. Sending is **Messages**; a reply arrives here and through your
|
|
108
|
+
# webhooks.
|
|
51
109
|
# @return [Sentdm::Resources::Conversations]
|
|
52
110
|
attr_reader :conversations
|
|
53
111
|
|
|
54
|
-
#
|
|
112
|
+
# Who the current key is.
|
|
113
|
+
#
|
|
114
|
+
# `GET /v3/me` answers with the account the key authenticates as, which is the
|
|
115
|
+
# quickest way to tell a live key from a test one, an organization key from a
|
|
116
|
+
# sender profile's, and to confirm `x-profile-id` resolved to the profile you
|
|
117
|
+
# meant.
|
|
55
118
|
# @return [Sentdm::Resources::Me]
|
|
56
119
|
attr_reader :me
|
|
57
120
|
|
|
@@ -438,11 +438,11 @@ module Sentdm
|
|
|
438
438
|
# @return [Hash{Symbol=>Object}]
|
|
439
439
|
#
|
|
440
440
|
# @example
|
|
441
|
-
# # `
|
|
442
|
-
#
|
|
443
|
-
#
|
|
444
|
-
#
|
|
445
|
-
#
|
|
441
|
+
# # `inbound_message_event` is a `Sentdm::InboundMessageEvent`
|
|
442
|
+
# inbound_message_event => {
|
|
443
|
+
# event: event,
|
|
444
|
+
# field: field,
|
|
445
|
+
# payload: payload
|
|
446
446
|
# }
|
|
447
447
|
def deconstruct_keys(keys)
|
|
448
448
|
(keys || self.class.known_fields.keys)
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
# @see Sentdm::Resources::Contacts#create
|
|
6
|
+
class ContactCreateResponse < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
# Contact response for v3 API Uses snake_case for JSON property names
|
|
9
|
+
#
|
|
10
|
+
# @return [Sentdm::Models::ContactCreateResponse::Data, nil]
|
|
11
|
+
optional :data, -> { Sentdm::Models::ContactCreateResponse::Data }, nil?: true
|
|
12
|
+
|
|
13
|
+
# @!attribute error
|
|
14
|
+
# Error information
|
|
15
|
+
#
|
|
16
|
+
# @return [Sentdm::Models::ContactCreateResponse::Error, nil]
|
|
17
|
+
optional :error, -> { Sentdm::Models::ContactCreateResponse::Error }, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute meta
|
|
20
|
+
# Request and response metadata
|
|
21
|
+
#
|
|
22
|
+
# @return [Sentdm::Models::ContactCreateResponse::Meta, nil]
|
|
23
|
+
optional :meta, -> { Sentdm::Models::ContactCreateResponse::Meta }
|
|
24
|
+
|
|
25
|
+
# @!attribute success
|
|
26
|
+
# Indicates whether the request was successful
|
|
27
|
+
#
|
|
28
|
+
# @return [Boolean, nil]
|
|
29
|
+
optional :success, Sentdm::Internal::Type::Boolean
|
|
30
|
+
|
|
31
|
+
# @!method initialize(data: nil, error: nil, meta: nil, success: nil)
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Sentdm::Models::ContactCreateResponse} for more details.
|
|
34
|
+
#
|
|
35
|
+
# Standard API response envelope for all v3 endpoints
|
|
36
|
+
#
|
|
37
|
+
# @param data [Sentdm::Models::ContactCreateResponse::Data, nil] Contact response for v3 API
|
|
38
|
+
#
|
|
39
|
+
# @param error [Sentdm::Models::ContactCreateResponse::Error, nil] Error information
|
|
40
|
+
#
|
|
41
|
+
# @param meta [Sentdm::Models::ContactCreateResponse::Meta] Request and response metadata
|
|
42
|
+
#
|
|
43
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
44
|
+
|
|
45
|
+
# @see Sentdm::Models::ContactCreateResponse#data
|
|
46
|
+
class Data < Sentdm::Internal::Type::BaseModel
|
|
47
|
+
# @!attribute id
|
|
48
|
+
# Unique identifier for the contact
|
|
49
|
+
#
|
|
50
|
+
# @return [String, nil]
|
|
51
|
+
optional :id, String
|
|
52
|
+
|
|
53
|
+
# @!attribute available_channels
|
|
54
|
+
# Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
55
|
+
#
|
|
56
|
+
# @return [String, nil]
|
|
57
|
+
optional :available_channels, String
|
|
58
|
+
|
|
59
|
+
# @!attribute country_code
|
|
60
|
+
# Country calling code (e.g., 1 for US/Canada)
|
|
61
|
+
#
|
|
62
|
+
# @return [String, nil]
|
|
63
|
+
optional :country_code, String
|
|
64
|
+
|
|
65
|
+
# @!attribute created_at
|
|
66
|
+
# When the contact was created
|
|
67
|
+
#
|
|
68
|
+
# @return [Time, nil]
|
|
69
|
+
optional :created_at, Time
|
|
70
|
+
|
|
71
|
+
# @!attribute customer_id
|
|
72
|
+
# Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
73
|
+
# Says whose resource this is, which the resource's own id does not.
|
|
74
|
+
#
|
|
75
|
+
# @return [String, nil]
|
|
76
|
+
optional :customer_id, String
|
|
77
|
+
|
|
78
|
+
# @!attribute default_channel
|
|
79
|
+
# Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
80
|
+
#
|
|
81
|
+
# @return [String, nil]
|
|
82
|
+
optional :default_channel, String
|
|
83
|
+
|
|
84
|
+
# @!attribute format_e164
|
|
85
|
+
# Phone number in E.164 format (e.g., +1234567890)
|
|
86
|
+
#
|
|
87
|
+
# @return [String, nil]
|
|
88
|
+
optional :format_e164, String
|
|
89
|
+
|
|
90
|
+
# @!attribute format_international
|
|
91
|
+
# Phone number in international format (e.g., +1 234-567-890)
|
|
92
|
+
#
|
|
93
|
+
# @return [String, nil]
|
|
94
|
+
optional :format_international, String
|
|
95
|
+
|
|
96
|
+
# @!attribute format_national
|
|
97
|
+
# Phone number in national format (e.g., (234) 567-890)
|
|
98
|
+
#
|
|
99
|
+
# @return [String, nil]
|
|
100
|
+
optional :format_national, String
|
|
101
|
+
|
|
102
|
+
# @!attribute format_rfc
|
|
103
|
+
# Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
104
|
+
#
|
|
105
|
+
# @return [String, nil]
|
|
106
|
+
optional :format_rfc, String
|
|
107
|
+
|
|
108
|
+
# @!attribute is_inherited
|
|
109
|
+
# @deprecated
|
|
110
|
+
#
|
|
111
|
+
# Always false. Contacts are no longer shared or inherited between sender profiles
|
|
112
|
+
# — a profile sees only the contacts it owns. Retained so existing v3 clients
|
|
113
|
+
# reading is_inherited keep deserializing; it carries no information.
|
|
114
|
+
#
|
|
115
|
+
# @return [Boolean, nil]
|
|
116
|
+
optional :is_inherited, Sentdm::Internal::Type::Boolean
|
|
117
|
+
|
|
118
|
+
# @!attribute opt_out
|
|
119
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
120
|
+
# is per-contact, not per-channel.
|
|
121
|
+
#
|
|
122
|
+
# @return [Boolean, nil]
|
|
123
|
+
optional :opt_out, Sentdm::Internal::Type::Boolean
|
|
124
|
+
|
|
125
|
+
# @!attribute phone_number
|
|
126
|
+
# Phone number in original format
|
|
127
|
+
#
|
|
128
|
+
# @return [String, nil]
|
|
129
|
+
optional :phone_number, String
|
|
130
|
+
|
|
131
|
+
# @!attribute region_code
|
|
132
|
+
# ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
133
|
+
#
|
|
134
|
+
# @return [String, nil]
|
|
135
|
+
optional :region_code, String
|
|
136
|
+
|
|
137
|
+
# @!attribute updated_at
|
|
138
|
+
# When the contact was last updated
|
|
139
|
+
#
|
|
140
|
+
# @return [Time, nil]
|
|
141
|
+
optional :updated_at, Time, nil?: true
|
|
142
|
+
|
|
143
|
+
# @!method initialize(id: nil, available_channels: nil, country_code: nil, created_at: nil, customer_id: nil, default_channel: nil, format_e164: nil, format_international: nil, format_national: nil, format_rfc: nil, is_inherited: nil, opt_out: nil, phone_number: nil, region_code: nil, updated_at: nil)
|
|
144
|
+
# Some parameter documentations has been truncated, see
|
|
145
|
+
# {Sentdm::Models::ContactCreateResponse::Data} for more details.
|
|
146
|
+
#
|
|
147
|
+
# Contact response for v3 API Uses snake_case for JSON property names
|
|
148
|
+
#
|
|
149
|
+
# @param id [String] Unique identifier for the contact
|
|
150
|
+
#
|
|
151
|
+
# @param available_channels [String] Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
152
|
+
#
|
|
153
|
+
# @param country_code [String] Country calling code (e.g., 1 for US/Canada)
|
|
154
|
+
#
|
|
155
|
+
# @param created_at [Time] When the contact was created
|
|
156
|
+
#
|
|
157
|
+
# @param customer_id [String] Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
158
|
+
#
|
|
159
|
+
# @param default_channel [String] Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
160
|
+
#
|
|
161
|
+
# @param format_e164 [String] Phone number in E.164 format (e.g., +1234567890)
|
|
162
|
+
#
|
|
163
|
+
# @param format_international [String] Phone number in international format (e.g., +1 234-567-890)
|
|
164
|
+
#
|
|
165
|
+
# @param format_national [String] Phone number in national format (e.g., (234) 567-890)
|
|
166
|
+
#
|
|
167
|
+
# @param format_rfc [String] Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
168
|
+
#
|
|
169
|
+
# @param is_inherited [Boolean] Always false. Contacts are no longer shared or inherited between sender profiles
|
|
170
|
+
#
|
|
171
|
+
# @param opt_out [Boolean] Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
172
|
+
#
|
|
173
|
+
# @param phone_number [String] Phone number in original format
|
|
174
|
+
#
|
|
175
|
+
# @param region_code [String] ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
176
|
+
#
|
|
177
|
+
# @param updated_at [Time, nil] When the contact was last updated
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# @see Sentdm::Models::ContactCreateResponse#error
|
|
181
|
+
class Error < Sentdm::Internal::Type::BaseModel
|
|
182
|
+
# @!attribute code
|
|
183
|
+
# Machine-readable error code (e.g., "RESOURCE_001")
|
|
184
|
+
#
|
|
185
|
+
# @return [String, nil]
|
|
186
|
+
optional :code, String
|
|
187
|
+
|
|
188
|
+
# @!attribute details
|
|
189
|
+
# Additional validation error details (field-level errors)
|
|
190
|
+
#
|
|
191
|
+
# @return [Hash{Symbol=>Array<String>}, nil]
|
|
192
|
+
optional :details, Sentdm::Internal::Type::HashOf[Sentdm::Internal::Type::ArrayOf[String]], nil?: true
|
|
193
|
+
|
|
194
|
+
# @!attribute doc_url
|
|
195
|
+
# URL to documentation about this error
|
|
196
|
+
#
|
|
197
|
+
# @return [String, nil]
|
|
198
|
+
optional :doc_url, String, nil?: true
|
|
199
|
+
|
|
200
|
+
# @!attribute message
|
|
201
|
+
# Human-readable error message
|
|
202
|
+
#
|
|
203
|
+
# @return [String, nil]
|
|
204
|
+
optional :message, String
|
|
205
|
+
|
|
206
|
+
# @!method initialize(code: nil, details: nil, doc_url: nil, message: nil)
|
|
207
|
+
# Error information
|
|
208
|
+
#
|
|
209
|
+
# @param code [String] Machine-readable error code (e.g., "RESOURCE_001")
|
|
210
|
+
#
|
|
211
|
+
# @param details [Hash{Symbol=>Array<String>}, nil] Additional validation error details (field-level errors)
|
|
212
|
+
#
|
|
213
|
+
# @param doc_url [String, nil] URL to documentation about this error
|
|
214
|
+
#
|
|
215
|
+
# @param message [String] Human-readable error message
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# @see Sentdm::Models::ContactCreateResponse#meta
|
|
219
|
+
class Meta < Sentdm::Internal::Type::BaseModel
|
|
220
|
+
# @!attribute request_id
|
|
221
|
+
# Unique identifier for this request (for tracing and support)
|
|
222
|
+
#
|
|
223
|
+
# @return [String, nil]
|
|
224
|
+
optional :request_id, String
|
|
225
|
+
|
|
226
|
+
# @!attribute timestamp
|
|
227
|
+
# Server timestamp when the response was generated
|
|
228
|
+
#
|
|
229
|
+
# @return [Time, nil]
|
|
230
|
+
optional :timestamp, Time
|
|
231
|
+
|
|
232
|
+
# @!attribute version
|
|
233
|
+
# API version used for this request
|
|
234
|
+
#
|
|
235
|
+
# @return [String, nil]
|
|
236
|
+
optional :version, String
|
|
237
|
+
|
|
238
|
+
# @!method initialize(request_id: nil, timestamp: nil, version: nil)
|
|
239
|
+
# Request and response metadata
|
|
240
|
+
#
|
|
241
|
+
# @param request_id [String] Unique identifier for this request (for tracing and support)
|
|
242
|
+
#
|
|
243
|
+
# @param timestamp [Time] Server timestamp when the response was generated
|
|
244
|
+
#
|
|
245
|
+
# @param version [String] API version used for this request
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Models
|
|
5
5
|
# @see Sentdm::Resources::Contacts#delete
|
|
6
|
-
class ContactDeleteParams < Sentdm::
|
|
6
|
+
class ContactDeleteParams < Sentdm::Internal::Type::BaseModel
|
|
7
7
|
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Sentdm::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -12,14 +12,28 @@ module Sentdm
|
|
|
12
12
|
# @return [String]
|
|
13
13
|
required :id, String
|
|
14
14
|
|
|
15
|
+
# @!attribute sandbox
|
|
16
|
+
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
17
|
+
# for testing integrations without actual execution
|
|
18
|
+
#
|
|
19
|
+
# @return [Boolean, nil]
|
|
20
|
+
optional :sandbox, Sentdm::Internal::Type::Boolean
|
|
21
|
+
|
|
15
22
|
# @!attribute x_profile_id
|
|
16
23
|
#
|
|
17
24
|
# @return [String, nil]
|
|
18
25
|
optional :x_profile_id, String
|
|
19
26
|
|
|
20
|
-
# @!method initialize(id:, x_profile_id: nil, request_options: {})
|
|
27
|
+
# @!method initialize(id:, sandbox: nil, x_profile_id: nil, request_options: {})
|
|
28
|
+
# Some parameter documentations has been truncated, see
|
|
29
|
+
# {Sentdm::Models::ContactDeleteParams} for more details.
|
|
30
|
+
#
|
|
21
31
|
# @param id [String]
|
|
32
|
+
#
|
|
33
|
+
# @param sandbox [Boolean] Sandbox flag - when true, the operation is simulated without side effects
|
|
34
|
+
#
|
|
22
35
|
# @param x_profile_id [String]
|
|
36
|
+
#
|
|
23
37
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
|
|
24
38
|
end
|
|
25
39
|
end
|