sentdm 0.29.0 → 0.31.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 +24 -0
- data/README.md +55 -1
- data/lib/sentdm/internal/contacts_page.rb +115 -0
- data/lib/sentdm/internal/conversations_page.rb +115 -0
- data/lib/sentdm/internal/templates_page.rb +115 -0
- data/lib/sentdm/internal/type/base_model.rb +5 -5
- data/lib/sentdm/internal/webhook_events_page.rb +115 -0
- data/lib/sentdm/internal/webhooks_page.rb +115 -0
- data/lib/sentdm/models/api_meta.rb +34 -0
- data/lib/sentdm/models/api_response_of_contact.rb +46 -0
- data/lib/sentdm/models/api_response_of_contact_message_summary.rb +43 -0
- data/lib/sentdm/models/api_response_of_conversation_messages_list.rb +42 -0
- data/lib/sentdm/models/api_response_of_profile_detail.rb +43 -0
- data/lib/sentdm/models/api_response_of_user.rb +43 -0
- data/lib/sentdm/models/api_response_template.rb +43 -0
- data/lib/sentdm/models/api_response_webhook.rb +43 -0
- data/lib/sentdm/models/billing_contact_info.rb +47 -0
- data/lib/sentdm/models/brand_business_info.rb +114 -0
- data/lib/sentdm/models/brand_compliance_info.rb +59 -0
- data/lib/sentdm/models/brand_contact_info.rb +58 -0
- data/lib/sentdm/models/brands_brand_data.rb +34 -0
- data/lib/sentdm/models/contact_delete_params.rb +2 -16
- data/lib/sentdm/models/contact_list_params.rb +13 -13
- data/lib/sentdm/models/contact_message_summary.rb +76 -0
- data/lib/sentdm/models/contact_response.rb +140 -0
- data/lib/sentdm/models/conversation_list_messages_params.rb +5 -5
- data/lib/sentdm/models/conversation_list_params.rb +5 -5
- data/lib/sentdm/models/conversation_messages_list.rb +245 -0
- data/lib/sentdm/models/error_detail.rb +42 -0
- data/lib/sentdm/models/me_retrieve_response.rb +12 -242
- data/lib/sentdm/models/message_retrieve_activities_response.rb +9 -159
- data/lib/sentdm/models/message_retrieve_status_response.rb +6 -74
- data/lib/sentdm/models/message_send_response.rb +6 -74
- data/lib/sentdm/models/mutation_request.rb +20 -0
- data/lib/sentdm/models/number_lookup_response.rb +6 -74
- data/lib/sentdm/models/pagination_meta.rb +84 -0
- data/lib/sentdm/models/payment_details.rb +40 -0
- data/lib/sentdm/models/profile_complete_response.rb +6 -74
- data/lib/sentdm/models/profile_create_params.rb +9 -345
- data/lib/sentdm/models/profile_delete_params.rb +2 -16
- data/lib/sentdm/models/profile_detail.rb +650 -0
- data/lib/sentdm/models/profile_list_response.rb +12 -815
- data/lib/sentdm/models/profile_settings.rb +85 -0
- data/lib/sentdm/models/profile_update_params.rb +9 -345
- data/lib/sentdm/models/profiles/api_response_of_brand_campaign.rb +45 -0
- data/lib/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rb +45 -0
- data/lib/sentdm/models/profiles/brand_campaign.rb +247 -0
- data/lib/sentdm/models/profiles/campaign_create_params.rb +3 -156
- data/lib/sentdm/models/profiles/campaign_data.rb +136 -0
- data/lib/sentdm/models/profiles/campaign_delete_params.rb +2 -17
- data/lib/sentdm/models/profiles/campaign_update_params.rb +3 -156
- data/lib/sentdm/models/profiles/campaign_use_case.rb +71 -0
- data/lib/sentdm/models/profiles/campaign_use_case_data.rb +29 -0
- data/lib/sentdm/models/template.rb +103 -0
- data/lib/sentdm/models/template_list_params.rb +17 -17
- data/lib/sentdm/models/user_list_response.rb +12 -249
- data/lib/sentdm/models/user_remove_params.rb +2 -16
- data/lib/sentdm/models/user_response.rb +94 -0
- data/lib/sentdm/models/webhook_event_type.rb +45 -0
- data/lib/sentdm/models/webhook_list_event_types_response.rb +12 -203
- data/lib/sentdm/models/webhook_list_events_params.rb +5 -5
- data/lib/sentdm/models/webhook_list_events_response.rb +87 -295
- data/lib/sentdm/models/webhook_list_params.rb +11 -11
- data/lib/sentdm/models/webhook_response.rb +121 -0
- data/lib/sentdm/models/webhook_rotate_secret_params.rb +2 -17
- data/lib/sentdm/models/webhook_rotate_secret_response.rb +6 -74
- data/lib/sentdm/models/webhook_test_response.rb +6 -74
- data/lib/sentdm/models.rb +52 -0
- data/lib/sentdm/resources/contacts.rb +16 -15
- data/lib/sentdm/resources/conversations.rb +10 -8
- data/lib/sentdm/resources/profiles/campaigns.rb +8 -8
- data/lib/sentdm/resources/profiles.rb +12 -12
- data/lib/sentdm/resources/templates.rb +16 -15
- data/lib/sentdm/resources/users.rb +6 -6
- data/lib/sentdm/resources/webhooks.rb +20 -18
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +37 -25
- data/rbi/sentdm/internal/contacts_page.rbi +71 -0
- data/rbi/sentdm/internal/conversations_page.rbi +71 -0
- data/rbi/sentdm/internal/templates_page.rbi +71 -0
- data/rbi/sentdm/internal/webhook_events_page.rbi +71 -0
- data/rbi/sentdm/internal/webhooks_page.rbi +71 -0
- data/rbi/sentdm/models/api_meta.rbi +55 -0
- data/rbi/sentdm/models/api_response_of_contact.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_contact_message_summary.rbi +79 -0
- data/rbi/sentdm/models/api_response_of_conversation_messages_list.rbi +79 -0
- data/rbi/sentdm/models/api_response_of_profile_detail.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_user.rbi +74 -0
- data/rbi/sentdm/models/api_response_template.rbi +74 -0
- data/rbi/sentdm/models/api_response_webhook.rbi +74 -0
- data/rbi/sentdm/models/billing_contact_info.rbi +65 -0
- data/rbi/sentdm/models/brand_business_info.rbi +162 -0
- data/rbi/sentdm/models/brand_compliance_info.rbi +76 -0
- data/rbi/sentdm/models/brand_contact_info.rbi +78 -0
- data/rbi/sentdm/models/brands_brand_data.rbi +65 -0
- data/rbi/sentdm/models/contact_delete_params.rbi +2 -19
- data/rbi/sentdm/models/contact_list_params.rbi +19 -13
- data/rbi/sentdm/models/contact_message_summary.rbi +144 -0
- data/rbi/sentdm/models/contact_response.rbi +200 -0
- data/rbi/sentdm/models/conversation_list_messages_params.rbi +12 -6
- data/rbi/sentdm/models/conversation_list_params.rbi +16 -5
- data/rbi/sentdm/models/conversation_messages_list.rbi +419 -0
- data/rbi/sentdm/models/error_detail.rbi +66 -0
- data/rbi/sentdm/models/me_retrieve_response.rbi +16 -367
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +12 -325
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +8 -148
- data/rbi/sentdm/models/message_send_response.rbi +8 -135
- data/rbi/sentdm/models/mutation_request.rbi +32 -0
- data/rbi/sentdm/models/number_lookup_response.rbi +8 -135
- data/rbi/sentdm/models/pagination_meta.rbi +135 -0
- data/rbi/sentdm/models/payment_details.rbi +56 -0
- data/rbi/sentdm/models/profile_complete_response.rbi +8 -137
- data/rbi/sentdm/models/profile_create_params.rbi +12 -546
- data/rbi/sentdm/models/profile_delete_params.rbi +2 -19
- data/rbi/sentdm/models/profile_detail.rbi +918 -0
- data/rbi/sentdm/models/profile_list_response.rbi +16 -1347
- data/rbi/sentdm/models/profile_settings.rbi +102 -0
- data/rbi/sentdm/models/profile_update_params.rbi +12 -546
- data/rbi/sentdm/models/profiles/api_response_of_brand_campaign.rbi +81 -0
- data/rbi/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rbi +76 -0
- data/rbi/sentdm/models/profiles/brand_campaign.rbi +299 -0
- data/rbi/sentdm/models/profiles/campaign_create_params.rbi +4 -218
- data/rbi/sentdm/models/profiles/campaign_data.rbi +158 -0
- data/rbi/sentdm/models/profiles/campaign_delete_params.rbi +1 -14
- data/rbi/sentdm/models/profiles/campaign_update_params.rbi +4 -218
- data/rbi/sentdm/models/profiles/campaign_use_case.rbi +110 -0
- data/rbi/sentdm/models/profiles/campaign_use_case_data.rbi +51 -0
- data/rbi/sentdm/models/template.rbi +139 -0
- data/rbi/sentdm/models/template_list_params.rbi +22 -16
- data/rbi/sentdm/models/user_list_response.rbi +16 -444
- data/rbi/sentdm/models/user_remove_params.rbi +2 -19
- data/rbi/sentdm/models/user_response.rbi +131 -0
- data/rbi/sentdm/models/webhook_event_type.rbi +74 -0
- data/rbi/sentdm/models/webhook_list_event_types_response.rbi +16 -414
- data/rbi/sentdm/models/webhook_list_events_params.rbi +12 -6
- data/rbi/sentdm/models/webhook_list_events_response.rbi +113 -564
- data/rbi/sentdm/models/webhook_list_params.rbi +16 -10
- data/rbi/sentdm/models/webhook_response.rbi +153 -0
- data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +1 -14
- data/rbi/sentdm/models/webhook_rotate_secret_response.rbi +8 -148
- data/rbi/sentdm/models/webhook_test_response.rbi +8 -135
- data/rbi/sentdm/models.rbi +54 -0
- data/rbi/sentdm/resources/contacts.rbi +10 -10
- data/rbi/sentdm/resources/conversations.rbi +14 -6
- data/rbi/sentdm/resources/profiles/campaigns.rbi +5 -5
- data/rbi/sentdm/resources/profiles.rbi +9 -13
- data/rbi/sentdm/resources/templates.rbi +10 -10
- data/rbi/sentdm/resources/users.rbi +3 -3
- data/rbi/sentdm/resources/webhooks.rbi +16 -12
- data/sig/sentdm/internal/contacts_page.rbs +41 -0
- data/sig/sentdm/internal/conversations_page.rbs +41 -0
- data/sig/sentdm/internal/templates_page.rbs +44 -0
- data/sig/sentdm/internal/webhook_events_page.rbs +41 -0
- data/sig/sentdm/internal/webhooks_page.rbs +41 -0
- data/sig/sentdm/models/api_meta.rbs +27 -0
- data/sig/sentdm/models/api_response_of_contact.rbs +39 -0
- data/sig/sentdm/models/api_response_of_contact_message_summary.rbs +39 -0
- data/sig/sentdm/models/api_response_of_conversation_messages_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_profile_detail.rbs +39 -0
- data/sig/sentdm/models/api_response_of_user.rbs +39 -0
- data/sig/sentdm/models/api_response_template.rbs +39 -0
- data/sig/sentdm/models/api_response_webhook.rbs +39 -0
- data/sig/sentdm/models/billing_contact_info.rbs +30 -0
- data/sig/sentdm/models/brand_business_info.rbs +89 -0
- data/sig/sentdm/models/brand_compliance_info.rbs +45 -0
- data/sig/sentdm/models/brand_contact_info.rbs +45 -0
- data/sig/sentdm/models/brands_brand_data.rbs +30 -0
- data/sig/sentdm/models/contact_delete_params.rbs +6 -10
- data/sig/sentdm/models/contact_list_params.rbs +11 -7
- data/sig/sentdm/models/contact_message_summary.rbs +84 -0
- data/sig/sentdm/models/contact_response.rbs +118 -0
- data/sig/sentdm/models/conversation_list_messages_params.rbs +8 -4
- data/sig/sentdm/models/conversation_list_params.rbs +8 -4
- data/sig/sentdm/models/conversation_messages_list.rbs +240 -0
- data/sig/sentdm/models/error_detail.rbs +39 -0
- data/sig/sentdm/models/me_retrieve_response.rbs +18 -176
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +14 -142
- data/sig/sentdm/models/message_retrieve_status_response.rbs +9 -71
- data/sig/sentdm/models/message_send_response.rbs +9 -71
- data/sig/sentdm/models/mutation_request.rbs +15 -0
- data/sig/sentdm/models/number_lookup_response.rbs +9 -71
- data/sig/sentdm/models/pagination_meta.rbs +67 -0
- data/sig/sentdm/models/payment_details.rbs +30 -0
- data/sig/sentdm/models/profile_complete_response.rbs +9 -71
- data/sig/sentdm/models/profile_create_params.rbs +12 -263
- data/sig/sentdm/models/profile_delete_params.rbs +6 -10
- data/sig/sentdm/models/profile_detail.rbs +461 -0
- data/sig/sentdm/models/profile_list_response.rbs +20 -606
- data/sig/sentdm/models/profile_settings.rbs +50 -0
- data/sig/sentdm/models/profile_update_params.rbs +12 -263
- data/sig/sentdm/models/profiles/api_response_of_brand_campaign.rbs +41 -0
- data/sig/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rbs +41 -0
- data/sig/sentdm/models/profiles/brand_campaign.rbs +194 -0
- data/sig/sentdm/models/profiles/campaign_create_params.rbs +4 -108
- data/sig/sentdm/models/profiles/campaign_data.rbs +87 -0
- data/sig/sentdm/models/profiles/campaign_delete_params.rbs +8 -15
- data/sig/sentdm/models/profiles/campaign_update_params.rbs +4 -108
- data/sig/sentdm/models/profiles/campaign_use_case.rbs +66 -0
- data/sig/sentdm/models/profiles/campaign_use_case_data.rbs +27 -0
- data/sig/sentdm/models/template.rbs +84 -0
- data/sig/sentdm/models/template_list_params.rbs +14 -10
- data/sig/sentdm/models/user_list_response.rbs +20 -224
- data/sig/sentdm/models/user_remove_params.rbs +6 -10
- data/sig/sentdm/models/user_response.rbs +79 -0
- data/sig/sentdm/models/webhook_event_type.rbs +51 -0
- data/sig/sentdm/models/webhook_list_event_types_response.rbs +20 -196
- data/sig/sentdm/models/webhook_list_events_params.rbs +8 -4
- data/sig/sentdm/models/webhook_list_events_response.rbs +63 -255
- data/sig/sentdm/models/webhook_list_params.rbs +11 -7
- data/sig/sentdm/models/webhook_response.rbs +110 -0
- data/sig/sentdm/models/webhook_rotate_secret_params.rbs +8 -17
- data/sig/sentdm/models/webhook_rotate_secret_response.rbs +9 -71
- data/sig/sentdm/models/webhook_test_response.rbs +9 -71
- data/sig/sentdm/models.rbs +52 -0
- data/sig/sentdm/resources/contacts.rbs +7 -7
- data/sig/sentdm/resources/conversations.rbs +6 -6
- data/sig/sentdm/resources/profiles/campaigns.rbs +5 -5
- data/sig/sentdm/resources/profiles.rbs +9 -9
- data/sig/sentdm/resources/templates.rbs +6 -6
- data/sig/sentdm/resources/users.rbs +3 -3
- data/sig/sentdm/resources/webhooks.rbs +10 -10
- metadata +113 -77
- data/lib/sentdm/models/contact_create_response.rb +0 -249
- data/lib/sentdm/models/contact_list_response.rb +0 -348
- data/lib/sentdm/models/contact_retrieve_message_summary_response.rb +0 -186
- data/lib/sentdm/models/contact_retrieve_response.rb +0 -249
- data/lib/sentdm/models/contact_update_response.rb +0 -249
- data/lib/sentdm/models/conversation_list_messages_response.rb +0 -436
- data/lib/sentdm/models/conversation_list_response.rb +0 -433
- data/lib/sentdm/models/profile_create_response.rb +0 -760
- data/lib/sentdm/models/profile_retrieve_response.rb +0 -762
- data/lib/sentdm/models/profile_update_response.rb +0 -760
- data/lib/sentdm/models/profiles/campaign_create_response.rb +0 -420
- data/lib/sentdm/models/profiles/campaign_list_response.rb +0 -421
- data/lib/sentdm/models/profiles/campaign_update_response.rb +0 -420
- data/lib/sentdm/models/template_create_response.rb +0 -209
- data/lib/sentdm/models/template_list_response.rb +0 -311
- data/lib/sentdm/models/template_retrieve_response.rb +0 -209
- data/lib/sentdm/models/template_update_response.rb +0 -209
- data/lib/sentdm/models/user_invite_response.rb +0 -201
- data/lib/sentdm/models/user_retrieve_response.rb +0 -201
- data/lib/sentdm/models/user_update_role_response.rb +0 -201
- data/lib/sentdm/models/webhook_create_response.rb +0 -229
- data/lib/sentdm/models/webhook_list_response.rb +0 -329
- data/lib/sentdm/models/webhook_retrieve_response.rb +0 -229
- data/lib/sentdm/models/webhook_toggle_status_response.rb +0 -229
- data/lib/sentdm/models/webhook_update_response.rb +0 -229
- data/rbi/sentdm/models/contact_create_response.rbi +0 -407
- data/rbi/sentdm/models/contact_list_response.rbi +0 -634
- data/rbi/sentdm/models/contact_retrieve_message_summary_response.rbi +0 -397
- data/rbi/sentdm/models/contact_retrieve_response.rbi +0 -409
- data/rbi/sentdm/models/contact_update_response.rbi +0 -407
- data/rbi/sentdm/models/conversation_list_messages_response.rbi +0 -843
- data/rbi/sentdm/models/conversation_list_response.rbi +0 -819
- data/rbi/sentdm/models/profile_create_response.rbi +0 -1226
- data/rbi/sentdm/models/profile_retrieve_response.rbi +0 -1230
- data/rbi/sentdm/models/profile_update_response.rbi +0 -1226
- data/rbi/sentdm/models/profiles/campaign_create_response.rbi +0 -674
- data/rbi/sentdm/models/profiles/campaign_list_response.rbi +0 -667
- data/rbi/sentdm/models/profiles/campaign_update_response.rbi +0 -674
- data/rbi/sentdm/models/template_create_response.rbi +0 -349
- data/rbi/sentdm/models/template_list_response.rbi +0 -576
- data/rbi/sentdm/models/template_retrieve_response.rbi +0 -355
- data/rbi/sentdm/models/template_update_response.rbi +0 -349
- data/rbi/sentdm/models/user_invite_response.rbi +0 -336
- data/rbi/sentdm/models/user_retrieve_response.rbi +0 -336
- data/rbi/sentdm/models/user_update_role_response.rbi +0 -341
- data/rbi/sentdm/models/webhook_create_response.rbi +0 -361
- data/rbi/sentdm/models/webhook_list_response.rbi +0 -587
- data/rbi/sentdm/models/webhook_retrieve_response.rbi +0 -363
- data/rbi/sentdm/models/webhook_toggle_status_response.rbi +0 -379
- data/rbi/sentdm/models/webhook_update_response.rbi +0 -361
- data/sig/sentdm/models/contact_create_response.rbs +0 -216
- data/sig/sentdm/models/contact_list_response.rbs +0 -310
- data/sig/sentdm/models/contact_retrieve_message_summary_response.rbs +0 -182
- data/sig/sentdm/models/contact_retrieve_response.rbs +0 -216
- data/sig/sentdm/models/contact_update_response.rbs +0 -216
- data/sig/sentdm/models/conversation_list_messages_response.rbs +0 -404
- data/sig/sentdm/models/conversation_list_response.rbs +0 -404
- data/sig/sentdm/models/profile_create_response.rbs +0 -559
- data/sig/sentdm/models/profile_retrieve_response.rbs +0 -559
- data/sig/sentdm/models/profile_update_response.rbs +0 -559
- data/sig/sentdm/models/profiles/campaign_create_response.rbs +0 -357
- data/sig/sentdm/models/profiles/campaign_list_response.rbs +0 -357
- data/sig/sentdm/models/profiles/campaign_update_response.rbs +0 -357
- data/sig/sentdm/models/template_create_response.rbs +0 -182
- data/sig/sentdm/models/template_list_response.rbs +0 -276
- data/sig/sentdm/models/template_retrieve_response.rbs +0 -182
- data/sig/sentdm/models/template_update_response.rbs +0 -182
- data/sig/sentdm/models/user_invite_response.rbs +0 -177
- data/sig/sentdm/models/user_retrieve_response.rbs +0 -177
- data/sig/sentdm/models/user_update_role_response.rbs +0 -177
- data/sig/sentdm/models/webhook_create_response.rbs +0 -208
- data/sig/sentdm/models/webhook_list_response.rbs +0 -302
- data/sig/sentdm/models/webhook_retrieve_response.rbs +0 -208
- data/sig/sentdm/models/webhook_toggle_status_response.rbs +0 -208
- data/sig/sentdm/models/webhook_update_response.rbs +0 -208
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Internal
|
|
5
|
+
# @generic Elem
|
|
6
|
+
#
|
|
7
|
+
# @example
|
|
8
|
+
# if webhooks_page.has_next?
|
|
9
|
+
# webhooks_page = webhooks_page.next_page
|
|
10
|
+
# end
|
|
11
|
+
#
|
|
12
|
+
# @example
|
|
13
|
+
# webhooks_page.auto_paging_each do |webhook|
|
|
14
|
+
# puts(webhook)
|
|
15
|
+
# end
|
|
16
|
+
class WebhooksPage
|
|
17
|
+
include Sentdm::Internal::Type::BasePage
|
|
18
|
+
|
|
19
|
+
# @return [Data]
|
|
20
|
+
attr_accessor :data
|
|
21
|
+
|
|
22
|
+
# @return [Boolean]
|
|
23
|
+
def next_page?
|
|
24
|
+
data&.pagination&.has_more
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# @raise [Sentdm::HTTP::Error]
|
|
28
|
+
# @return [self]
|
|
29
|
+
def next_page
|
|
30
|
+
unless next_page?
|
|
31
|
+
message = "No more pages available. Please check #next_page? before calling ##{__method__}"
|
|
32
|
+
raise RuntimeError.new(message)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
req = Sentdm::Internal::Util.deep_merge(
|
|
36
|
+
@req,
|
|
37
|
+
{query: {page: @req.fetch(:query).fetch(:page, 1).to_i.succ}}
|
|
38
|
+
)
|
|
39
|
+
@client.request(req)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# @param blk [Proc]
|
|
43
|
+
#
|
|
44
|
+
# @yieldparam [generic<Elem>]
|
|
45
|
+
def auto_paging_each(&blk)
|
|
46
|
+
unless block_given?
|
|
47
|
+
raise ArgumentError.new("A block must be given to ##{__method__}")
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
page = self
|
|
51
|
+
loop do
|
|
52
|
+
page.data&.webhooks&.each(&blk)
|
|
53
|
+
|
|
54
|
+
break unless page.next_page?
|
|
55
|
+
page = page.next_page
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# @api private
|
|
60
|
+
#
|
|
61
|
+
# @param client [Sentdm::Internal::Transport::BaseClient]
|
|
62
|
+
# @param req [Hash{Symbol=>Object}]
|
|
63
|
+
# @param headers [Hash{String=>String}]
|
|
64
|
+
# @param page_data [Hash{Symbol=>Object}]
|
|
65
|
+
def initialize(client:, req:, headers:, page_data:)
|
|
66
|
+
super
|
|
67
|
+
|
|
68
|
+
case page_data
|
|
69
|
+
in {data: Hash | nil => data}
|
|
70
|
+
if (webhooks = data[:webhooks]).is_a?(Array)
|
|
71
|
+
data = {**data, webhooks: webhooks.map { Sentdm::Internal::Type::Converter.coerce(@model, _1) }}
|
|
72
|
+
end
|
|
73
|
+
@data = Sentdm::Internal::Type::Converter.coerce(Sentdm::Internal::WebhooksPage::Data, data)
|
|
74
|
+
else
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# @api private
|
|
79
|
+
#
|
|
80
|
+
# @return [String]
|
|
81
|
+
def inspect
|
|
82
|
+
model = Sentdm::Internal::Type::Converter.inspect(@model, depth: 1)
|
|
83
|
+
|
|
84
|
+
"#<#{self.class}[#{model}]:0x#{object_id.to_s(16)}>"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
class Data < Sentdm::Internal::Type::BaseModel
|
|
88
|
+
# @!attribute pagination
|
|
89
|
+
#
|
|
90
|
+
# @return [Data::Pagination, nil]
|
|
91
|
+
optional :pagination, -> { Data::Pagination }
|
|
92
|
+
|
|
93
|
+
# @!attribute webhooks
|
|
94
|
+
#
|
|
95
|
+
# @return [Array<Object>, nil]
|
|
96
|
+
optional :webhooks, Sentdm::Internal::Type::ArrayOf[Sentdm::Internal::Type::Unknown]
|
|
97
|
+
|
|
98
|
+
# @!method initialize(pagination: nil, webhooks: nil)
|
|
99
|
+
# @param pagination [Data::Pagination]
|
|
100
|
+
# @param webhooks [Array<Object>]
|
|
101
|
+
|
|
102
|
+
# @see Data#pagination
|
|
103
|
+
class Pagination < Sentdm::Internal::Type::BaseModel
|
|
104
|
+
# @!attribute has_more
|
|
105
|
+
#
|
|
106
|
+
# @return [Boolean, nil]
|
|
107
|
+
optional :has_more, Sentdm::Internal::Type::Boolean
|
|
108
|
+
|
|
109
|
+
# @!method initialize(has_more: nil)
|
|
110
|
+
# @param has_more [Boolean]
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class APIMeta < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute request_id
|
|
7
|
+
# Unique identifier for this request (for tracing and support)
|
|
8
|
+
#
|
|
9
|
+
# @return [String, nil]
|
|
10
|
+
optional :request_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute timestamp
|
|
13
|
+
# Server timestamp when the response was generated
|
|
14
|
+
#
|
|
15
|
+
# @return [Time, nil]
|
|
16
|
+
optional :timestamp, Time
|
|
17
|
+
|
|
18
|
+
# @!attribute version
|
|
19
|
+
# API version used for this request
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :version, String
|
|
23
|
+
|
|
24
|
+
# @!method initialize(request_id: nil, timestamp: nil, version: nil)
|
|
25
|
+
# Request and response metadata
|
|
26
|
+
#
|
|
27
|
+
# @param request_id [String] Unique identifier for this request (for tracing and support)
|
|
28
|
+
#
|
|
29
|
+
# @param timestamp [Time] Server timestamp when the response was generated
|
|
30
|
+
#
|
|
31
|
+
# @param version [String] API version used for this request
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
# @see Sentdm::Resources::Contacts#create
|
|
6
|
+
class APIResponseOfContact < 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::ContactResponse, nil]
|
|
11
|
+
optional :data, -> { Sentdm::ContactResponse }, nil?: true
|
|
12
|
+
|
|
13
|
+
# @!attribute error
|
|
14
|
+
# Error information
|
|
15
|
+
#
|
|
16
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
17
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute meta
|
|
20
|
+
# Request and response metadata
|
|
21
|
+
#
|
|
22
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
23
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
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::APIResponseOfContact} for more details.
|
|
34
|
+
#
|
|
35
|
+
# Standard API response envelope for all v3 endpoints
|
|
36
|
+
#
|
|
37
|
+
# @param data [Sentdm::Models::ContactResponse, nil] Contact response for v3 API
|
|
38
|
+
#
|
|
39
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
40
|
+
#
|
|
41
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
42
|
+
#
|
|
43
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
# @see Sentdm::Resources::Contacts#retrieve_message_summary
|
|
6
|
+
class APIResponseOfContactMessageSummary < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
# The response data (null if error)
|
|
9
|
+
#
|
|
10
|
+
# @return [Sentdm::Models::ContactMessageSummary, nil]
|
|
11
|
+
optional :data, -> { Sentdm::ContactMessageSummary }, nil?: true
|
|
12
|
+
|
|
13
|
+
# @!attribute error
|
|
14
|
+
# Error information
|
|
15
|
+
#
|
|
16
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
17
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute meta
|
|
20
|
+
# Request and response metadata
|
|
21
|
+
#
|
|
22
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
23
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
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
|
+
# Standard API response envelope for all v3 endpoints
|
|
33
|
+
#
|
|
34
|
+
# @param data [Sentdm::Models::ContactMessageSummary, nil] The response data (null if error)
|
|
35
|
+
#
|
|
36
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
37
|
+
#
|
|
38
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
39
|
+
#
|
|
40
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class APIResponseOfConversationMessagesList < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute data
|
|
7
|
+
# A paginated list of messages — used by both conversation read endpoints.
|
|
8
|
+
#
|
|
9
|
+
# @return [Sentdm::Models::ConversationMessagesList, nil]
|
|
10
|
+
optional :data, -> { Sentdm::ConversationMessagesList }, nil?: true
|
|
11
|
+
|
|
12
|
+
# @!attribute error
|
|
13
|
+
# Error information
|
|
14
|
+
#
|
|
15
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
16
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
17
|
+
|
|
18
|
+
# @!attribute meta
|
|
19
|
+
# Request and response metadata
|
|
20
|
+
#
|
|
21
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
22
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
23
|
+
|
|
24
|
+
# @!attribute success
|
|
25
|
+
# Indicates whether the request was successful
|
|
26
|
+
#
|
|
27
|
+
# @return [Boolean, nil]
|
|
28
|
+
optional :success, Sentdm::Internal::Type::Boolean
|
|
29
|
+
|
|
30
|
+
# @!method initialize(data: nil, error: nil, meta: nil, success: nil)
|
|
31
|
+
# Standard API response envelope for all v3 endpoints
|
|
32
|
+
#
|
|
33
|
+
# @param data [Sentdm::Models::ConversationMessagesList, nil] A paginated list of messages — used by both conversation read endpoints.
|
|
34
|
+
#
|
|
35
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
36
|
+
#
|
|
37
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
38
|
+
#
|
|
39
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
# @see Sentdm::Resources::Profiles#create
|
|
6
|
+
class APIResponseOfProfileDetail < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
# Detailed profile response for v3 API
|
|
9
|
+
#
|
|
10
|
+
# @return [Sentdm::Models::ProfileDetail, nil]
|
|
11
|
+
optional :data, -> { Sentdm::ProfileDetail }, nil?: true
|
|
12
|
+
|
|
13
|
+
# @!attribute error
|
|
14
|
+
# Error information
|
|
15
|
+
#
|
|
16
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
17
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute meta
|
|
20
|
+
# Request and response metadata
|
|
21
|
+
#
|
|
22
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
23
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
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
|
+
# Standard API response envelope for all v3 endpoints
|
|
33
|
+
#
|
|
34
|
+
# @param data [Sentdm::Models::ProfileDetail, nil] Detailed profile response for v3 API
|
|
35
|
+
#
|
|
36
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
37
|
+
#
|
|
38
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
39
|
+
#
|
|
40
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
# @see Sentdm::Resources::Users#retrieve
|
|
6
|
+
class APIResponseOfUser < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
# User response for v3 API
|
|
9
|
+
#
|
|
10
|
+
# @return [Sentdm::Models::UserResponse, nil]
|
|
11
|
+
optional :data, -> { Sentdm::UserResponse }, nil?: true
|
|
12
|
+
|
|
13
|
+
# @!attribute error
|
|
14
|
+
# Error information
|
|
15
|
+
#
|
|
16
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
17
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute meta
|
|
20
|
+
# Request and response metadata
|
|
21
|
+
#
|
|
22
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
23
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
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
|
+
# Standard API response envelope for all v3 endpoints
|
|
33
|
+
#
|
|
34
|
+
# @param data [Sentdm::Models::UserResponse, nil] User response for v3 API
|
|
35
|
+
#
|
|
36
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
37
|
+
#
|
|
38
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
39
|
+
#
|
|
40
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
# @see Sentdm::Resources::Templates#create
|
|
6
|
+
class APIResponseTemplate < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
# Template response for v3 API
|
|
9
|
+
#
|
|
10
|
+
# @return [Sentdm::Models::Template, nil]
|
|
11
|
+
optional :data, -> { Sentdm::Template }, nil?: true
|
|
12
|
+
|
|
13
|
+
# @!attribute error
|
|
14
|
+
# Error information
|
|
15
|
+
#
|
|
16
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
17
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute meta
|
|
20
|
+
# Request and response metadata
|
|
21
|
+
#
|
|
22
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
23
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
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
|
+
# Standard API response envelope for all v3 endpoints
|
|
33
|
+
#
|
|
34
|
+
# @param data [Sentdm::Models::Template, nil] Template response for v3 API
|
|
35
|
+
#
|
|
36
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
37
|
+
#
|
|
38
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
39
|
+
#
|
|
40
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
# @see Sentdm::Resources::Webhooks#create
|
|
6
|
+
class APIResponseWebhook < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
# The response data (null if error)
|
|
9
|
+
#
|
|
10
|
+
# @return [Sentdm::Models::WebhookResponse, nil]
|
|
11
|
+
optional :data, -> { Sentdm::WebhookResponse }, nil?: true
|
|
12
|
+
|
|
13
|
+
# @!attribute error
|
|
14
|
+
# Error information
|
|
15
|
+
#
|
|
16
|
+
# @return [Sentdm::Models::ErrorDetail, nil]
|
|
17
|
+
optional :error, -> { Sentdm::ErrorDetail }, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute meta
|
|
20
|
+
# Request and response metadata
|
|
21
|
+
#
|
|
22
|
+
# @return [Sentdm::Models::APIMeta, nil]
|
|
23
|
+
optional :meta, -> { Sentdm::APIMeta }
|
|
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
|
+
# Standard API response envelope for all v3 endpoints
|
|
33
|
+
#
|
|
34
|
+
# @param data [Sentdm::Models::WebhookResponse, nil] The response data (null if error)
|
|
35
|
+
#
|
|
36
|
+
# @param error [Sentdm::Models::ErrorDetail, nil] Error information
|
|
37
|
+
#
|
|
38
|
+
# @param meta [Sentdm::Models::APIMeta] Request and response metadata
|
|
39
|
+
#
|
|
40
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class BillingContactInfo < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute email
|
|
7
|
+
# Email address where invoices will be sent (required)
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :email, String
|
|
11
|
+
|
|
12
|
+
# @!attribute name
|
|
13
|
+
# Full name of the billing contact or company (required)
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :name, String
|
|
17
|
+
|
|
18
|
+
# @!attribute address
|
|
19
|
+
# Billing address (optional). Free-form text including street, city, state, postal
|
|
20
|
+
# code, and country.
|
|
21
|
+
#
|
|
22
|
+
# @return [String, nil]
|
|
23
|
+
optional :address, String, nil?: true
|
|
24
|
+
|
|
25
|
+
# @!attribute phone
|
|
26
|
+
# Phone number for the billing contact (optional)
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
optional :phone, String, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!method initialize(email:, name:, address: nil, phone: nil)
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Sentdm::Models::BillingContactInfo} for more details.
|
|
34
|
+
#
|
|
35
|
+
# Billing contact information for a profile. Required when billing_model is
|
|
36
|
+
# "profile" or "profile_and_organization".
|
|
37
|
+
#
|
|
38
|
+
# @param email [String] Email address where invoices will be sent (required)
|
|
39
|
+
#
|
|
40
|
+
# @param name [String] Full name of the billing contact or company (required)
|
|
41
|
+
#
|
|
42
|
+
# @param address [String, nil] Billing address (optional). Free-form text including street, city, state, postal
|
|
43
|
+
#
|
|
44
|
+
# @param phone [String, nil] Phone number for the billing contact (optional)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class BrandBusinessInfo < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute city
|
|
7
|
+
# City
|
|
8
|
+
#
|
|
9
|
+
# @return [String, nil]
|
|
10
|
+
optional :city, String, nil?: true
|
|
11
|
+
|
|
12
|
+
# @!attribute country
|
|
13
|
+
# Country code (e.g., US, CA)
|
|
14
|
+
#
|
|
15
|
+
# @return [String, nil]
|
|
16
|
+
optional :country, String, nil?: true
|
|
17
|
+
|
|
18
|
+
# @!attribute country_of_registration
|
|
19
|
+
# Country where the business is registered
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :country_of_registration, String, api_name: :countryOfRegistration, nil?: true
|
|
23
|
+
|
|
24
|
+
# @!attribute entity_type
|
|
25
|
+
#
|
|
26
|
+
# @return [Symbol, Sentdm::Models::BrandBusinessInfo::EntityType, nil]
|
|
27
|
+
optional :entity_type,
|
|
28
|
+
enum: -> { Sentdm::BrandBusinessInfo::EntityType },
|
|
29
|
+
api_name: :entityType,
|
|
30
|
+
nil?: true
|
|
31
|
+
|
|
32
|
+
# @!attribute legal_name
|
|
33
|
+
# Legal business name
|
|
34
|
+
#
|
|
35
|
+
# @return [String, nil]
|
|
36
|
+
optional :legal_name, String, api_name: :legalName, nil?: true
|
|
37
|
+
|
|
38
|
+
# @!attribute postal_code
|
|
39
|
+
# Postal/ZIP code
|
|
40
|
+
#
|
|
41
|
+
# @return [String, nil]
|
|
42
|
+
optional :postal_code, String, api_name: :postalCode, nil?: true
|
|
43
|
+
|
|
44
|
+
# @!attribute state
|
|
45
|
+
# State/province code
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :state, String, nil?: true
|
|
49
|
+
|
|
50
|
+
# @!attribute street
|
|
51
|
+
# Street address
|
|
52
|
+
#
|
|
53
|
+
# @return [String, nil]
|
|
54
|
+
optional :street, String, nil?: true
|
|
55
|
+
|
|
56
|
+
# @!attribute tax_id
|
|
57
|
+
# Tax ID/EIN number
|
|
58
|
+
#
|
|
59
|
+
# @return [String, nil]
|
|
60
|
+
optional :tax_id, String, api_name: :taxId, nil?: true
|
|
61
|
+
|
|
62
|
+
# @!attribute tax_id_type
|
|
63
|
+
# Type of tax ID (e.g., us_ein, ca_bn)
|
|
64
|
+
#
|
|
65
|
+
# @return [String, nil]
|
|
66
|
+
optional :tax_id_type, String, api_name: :taxIdType, nil?: true
|
|
67
|
+
|
|
68
|
+
# @!attribute url
|
|
69
|
+
# Business website URL
|
|
70
|
+
#
|
|
71
|
+
# @return [String, nil]
|
|
72
|
+
optional :url, String, nil?: true
|
|
73
|
+
|
|
74
|
+
# @!method initialize(city: nil, country: nil, country_of_registration: nil, entity_type: nil, legal_name: nil, postal_code: nil, state: nil, street: nil, tax_id: nil, tax_id_type: nil, url: nil)
|
|
75
|
+
# Business details and address for brand KYC
|
|
76
|
+
#
|
|
77
|
+
# @param city [String, nil] City
|
|
78
|
+
#
|
|
79
|
+
# @param country [String, nil] Country code (e.g., US, CA)
|
|
80
|
+
#
|
|
81
|
+
# @param country_of_registration [String, nil] Country where the business is registered
|
|
82
|
+
#
|
|
83
|
+
# @param entity_type [Symbol, Sentdm::Models::BrandBusinessInfo::EntityType, nil]
|
|
84
|
+
#
|
|
85
|
+
# @param legal_name [String, nil] Legal business name
|
|
86
|
+
#
|
|
87
|
+
# @param postal_code [String, nil] Postal/ZIP code
|
|
88
|
+
#
|
|
89
|
+
# @param state [String, nil] State/province code
|
|
90
|
+
#
|
|
91
|
+
# @param street [String, nil] Street address
|
|
92
|
+
#
|
|
93
|
+
# @param tax_id [String, nil] Tax ID/EIN number
|
|
94
|
+
#
|
|
95
|
+
# @param tax_id_type [String, nil] Type of tax ID (e.g., us_ein, ca_bn)
|
|
96
|
+
#
|
|
97
|
+
# @param url [String, nil] Business website URL
|
|
98
|
+
|
|
99
|
+
# @see Sentdm::Models::BrandBusinessInfo#entity_type
|
|
100
|
+
module EntityType
|
|
101
|
+
extend Sentdm::Internal::Type::Enum
|
|
102
|
+
|
|
103
|
+
PRIVATE_PROFIT = :PRIVATE_PROFIT
|
|
104
|
+
PUBLIC_PROFIT = :PUBLIC_PROFIT
|
|
105
|
+
NON_PROFIT = :NON_PROFIT
|
|
106
|
+
SOLE_PROPRIETOR = :SOLE_PROPRIETOR
|
|
107
|
+
GOVERNMENT = :GOVERNMENT
|
|
108
|
+
|
|
109
|
+
# @!method self.values
|
|
110
|
+
# @return [Array<Symbol>]
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class BrandComplianceInfo < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute brand_relationship
|
|
7
|
+
#
|
|
8
|
+
# @return [Symbol, Sentdm::Models::TcrBrandRelationship]
|
|
9
|
+
required :brand_relationship, enum: -> { Sentdm::TcrBrandRelationship }, api_name: :brandRelationship
|
|
10
|
+
|
|
11
|
+
# @!attribute vertical
|
|
12
|
+
#
|
|
13
|
+
# @return [Symbol, Sentdm::Models::TcrVertical]
|
|
14
|
+
required :vertical, enum: -> { Sentdm::TcrVertical }
|
|
15
|
+
|
|
16
|
+
# @!attribute destination_countries
|
|
17
|
+
# List of destination countries for messaging
|
|
18
|
+
#
|
|
19
|
+
# @return [Array<Sentdm::Models::DestinationCountry>, nil]
|
|
20
|
+
optional :destination_countries,
|
|
21
|
+
-> { Sentdm::Internal::Type::ArrayOf[Sentdm::DestinationCountry] },
|
|
22
|
+
api_name: :destinationCountries,
|
|
23
|
+
nil?: true
|
|
24
|
+
|
|
25
|
+
# @!attribute is_tcr_application
|
|
26
|
+
# Whether this is a TCR (Campaign Registry) application
|
|
27
|
+
#
|
|
28
|
+
# @return [Boolean, nil]
|
|
29
|
+
optional :is_tcr_application, Sentdm::Internal::Type::Boolean, api_name: :isTcrApplication, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!attribute notes
|
|
32
|
+
# Additional notes about the business or use case
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
optional :notes, String, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute phone_number_prefix
|
|
38
|
+
# Phone number prefix for messaging (e.g., "+1")
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
optional :phone_number_prefix, String, api_name: :phoneNumberPrefix, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!method initialize(brand_relationship:, vertical:, destination_countries: nil, is_tcr_application: nil, notes: nil, phone_number_prefix: nil)
|
|
44
|
+
# Compliance and TCR information for brand registration
|
|
45
|
+
#
|
|
46
|
+
# @param brand_relationship [Symbol, Sentdm::Models::TcrBrandRelationship]
|
|
47
|
+
#
|
|
48
|
+
# @param vertical [Symbol, Sentdm::Models::TcrVertical]
|
|
49
|
+
#
|
|
50
|
+
# @param destination_countries [Array<Sentdm::Models::DestinationCountry>, nil] List of destination countries for messaging
|
|
51
|
+
#
|
|
52
|
+
# @param is_tcr_application [Boolean, nil] Whether this is a TCR (Campaign Registry) application
|
|
53
|
+
#
|
|
54
|
+
# @param notes [String, nil] Additional notes about the business or use case
|
|
55
|
+
#
|
|
56
|
+
# @param phone_number_prefix [String, nil] Phone number prefix for messaging (e.g., "+1")
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|