sentdm 0.25.0 → 0.27.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 (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/README.md +7 -11
  4. data/lib/sentdm/client.rb +4 -0
  5. data/lib/sentdm/models/api_response_of_contact_message_summary.rb +43 -0
  6. data/lib/sentdm/models/api_response_of_conversation_messages_list.rb +43 -0
  7. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_authentication_config.rb → authentication_config.rb} +2 -3
  8. data/lib/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rb → brand_business_info.rb} +5 -7
  9. data/lib/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rb → brand_compliance_info.rb} +2 -10
  10. data/lib/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rb → brand_contact_info.rb} +1 -1
  11. data/lib/sentdm/models/brands_brand_data.rb +9 -13
  12. data/lib/sentdm/models/contact_message_summary.rb +76 -0
  13. data/lib/sentdm/models/contact_retrieve_message_summary_params.rb +26 -0
  14. data/lib/sentdm/models/conversation_list_messages_params.rb +38 -0
  15. data/lib/sentdm/models/conversation_list_params.rb +32 -0
  16. data/lib/sentdm/models/conversation_messages_list.rb +245 -0
  17. data/lib/sentdm/models/inbound_message_event.rb +52 -0
  18. data/lib/sentdm/models/inbound_message_event_payload.rb +81 -0
  19. data/lib/sentdm/models/message_event.rb +53 -0
  20. data/lib/sentdm/models/message_event_payload.rb +92 -0
  21. data/lib/sentdm/models/message_send_response.rb +2 -6
  22. data/lib/sentdm/models/profile_detail.rb +13 -13
  23. data/lib/sentdm/models/profile_update_params.rb +2 -2
  24. data/lib/sentdm/models/profiles/{api_response_of_tcr_campaign_with_use_cases.rb → api_response_of_brand_campaign.rb} +5 -5
  25. data/lib/sentdm/models/profiles/{campaign_list_response.rb → api_response_of_list_of_brand_campaign.rb} +4 -6
  26. data/lib/sentdm/models/profiles/{tcr_campaign_with_use_cases.rb → brand_campaign.rb} +63 -111
  27. data/lib/sentdm/models/profiles/campaign_data.rb +13 -6
  28. data/lib/sentdm/models/profiles/campaign_use_case.rb +71 -0
  29. data/lib/sentdm/models/profiles/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rb → campaign_use_case_data.rb} +1 -1
  30. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_body.rb → template_body.rb} +2 -3
  31. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button.rb → template_button.rb} +5 -6
  32. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button_props.rb → template_button_props.rb} +2 -3
  33. data/lib/sentdm/models/template_definition.rb +15 -19
  34. data/lib/sentdm/models/template_event.rb +52 -0
  35. data/lib/sentdm/models/template_event_payload.rb +88 -0
  36. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_footer.rb → template_footer.rb} +1 -1
  37. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_header.rb → template_header.rb} +2 -3
  38. data/lib/sentdm/models/webhook_list_events_response.rb +45 -3
  39. data/lib/sentdm/models.rb +44 -27
  40. data/lib/sentdm/resources/contacts.rb +30 -0
  41. data/lib/sentdm/resources/conversations.rb +82 -0
  42. data/lib/sentdm/resources/messages.rb +6 -1
  43. data/lib/sentdm/resources/profiles/campaigns.rb +6 -6
  44. data/lib/sentdm/resources/profiles.rb +34 -22
  45. data/lib/sentdm/resources/users.rb +3 -3
  46. data/lib/sentdm/version.rb +1 -1
  47. data/lib/sentdm.rb +28 -14
  48. data/rbi/sentdm/client.rbi +3 -0
  49. data/rbi/sentdm/models/api_response_of_contact_message_summary.rbi +79 -0
  50. data/rbi/sentdm/models/api_response_of_conversation_messages_list.rbi +79 -0
  51. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_authentication_config.rbi → authentication_config.rbi} +2 -5
  52. data/rbi/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rbi → brand_business_info.rbi} +12 -30
  53. data/rbi/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rbi → brand_compliance_info.rbi} +2 -13
  54. data/rbi/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rbi → brand_contact_info.rbi} +2 -5
  55. data/rbi/sentdm/models/brands_brand_data.rbi +12 -51
  56. data/rbi/sentdm/models/contact_message_summary.rbi +144 -0
  57. data/rbi/sentdm/models/contact_retrieve_message_summary_params.rbi +49 -0
  58. data/rbi/sentdm/models/conversation_list_messages_params.rbi +65 -0
  59. data/rbi/sentdm/models/conversation_list_params.rbi +51 -0
  60. data/rbi/sentdm/models/conversation_messages_list.rbi +419 -0
  61. data/rbi/sentdm/models/inbound_message_event.rbi +88 -0
  62. data/rbi/sentdm/models/inbound_message_event_payload.rbi +122 -0
  63. data/rbi/sentdm/models/message_event.rbi +86 -0
  64. data/rbi/sentdm/models/message_event_payload.rbi +132 -0
  65. data/rbi/sentdm/models/message_send_response.rbi +2 -4
  66. data/rbi/sentdm/models/profile_detail.rbi +10 -12
  67. data/rbi/sentdm/models/profile_update_params.rbi +2 -2
  68. data/rbi/sentdm/models/profiles/{api_response_of_tcr_campaign_with_use_cases.rbi → api_response_of_brand_campaign.rbi} +8 -10
  69. data/rbi/sentdm/models/profiles/{campaign_list_response.rbi → api_response_of_list_of_brand_campaign.rbi} +5 -13
  70. data/rbi/sentdm/models/profiles/brand_campaign.rbi +299 -0
  71. data/rbi/sentdm/models/profiles/campaign_data.rbi +16 -18
  72. data/rbi/sentdm/models/profiles/campaign_use_case.rbi +110 -0
  73. data/rbi/sentdm/models/profiles/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbi → campaign_use_case_data.rbi} +2 -2
  74. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_body.rbi → template_body.rbi} +2 -7
  75. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button.rbi → template_button.rbi} +6 -22
  76. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button_props.rbi → template_button_props.rbi} +2 -5
  77. data/rbi/sentdm/models/template_definition.rbi +19 -87
  78. data/rbi/sentdm/models/template_event.rbi +84 -0
  79. data/rbi/sentdm/models/template_event_payload.rbi +131 -0
  80. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_footer.rbi → template_footer.rbi} +2 -5
  81. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_header.rbi → template_header.rbi} +2 -5
  82. data/rbi/sentdm/models/webhook_list_events_response.rbi +60 -4
  83. data/rbi/sentdm/models.rbi +48 -27
  84. data/rbi/sentdm/resources/contacts.rbi +20 -0
  85. data/rbi/sentdm/resources/conversations.rbi +61 -0
  86. data/rbi/sentdm/resources/messages.rbi +6 -1
  87. data/rbi/sentdm/resources/profiles/campaigns.rbi +3 -3
  88. data/rbi/sentdm/resources/profiles.rbi +32 -20
  89. data/rbi/sentdm/resources/users.rbi +3 -2
  90. data/sig/sentdm/client.rbs +2 -0
  91. data/sig/sentdm/models/api_response_of_contact_message_summary.rbs +39 -0
  92. data/sig/sentdm/models/api_response_of_conversation_messages_list.rbs +39 -0
  93. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_authentication_config.rbs → authentication_config.rbs} +2 -2
  94. data/sig/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rbs → brand_business_info.rbs} +7 -7
  95. data/sig/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rbs → brand_compliance_info.rbs} +2 -7
  96. data/sig/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rbs → brand_contact_info.rbs} +2 -2
  97. data/sig/sentdm/models/brands_brand_data.rbs +12 -12
  98. data/sig/sentdm/models/contact_message_summary.rbs +84 -0
  99. data/sig/sentdm/models/contact_retrieve_message_summary_params.rbs +30 -0
  100. data/sig/sentdm/models/conversation_list_messages_params.rbs +38 -0
  101. data/sig/sentdm/models/conversation_list_params.rbs +34 -0
  102. data/sig/sentdm/models/conversation_messages_list.rbs +240 -0
  103. data/sig/sentdm/models/inbound_message_event.rbs +39 -0
  104. data/sig/sentdm/models/inbound_message_event_payload.rbs +69 -0
  105. data/sig/sentdm/models/message_event.rbs +39 -0
  106. data/sig/sentdm/models/message_event_payload.rbs +72 -0
  107. data/sig/sentdm/models/profile_detail.rbs +0 -5
  108. data/sig/sentdm/models/profiles/{campaign_list_response.rbs → api_response_of_brand_campaign.rbs} +6 -6
  109. data/sig/sentdm/models/profiles/{api_response_of_tcr_campaign_with_use_cases.rbs → api_response_of_list_of_brand_campaign.rbs} +6 -6
  110. data/sig/sentdm/models/profiles/brand_campaign.rbs +194 -0
  111. data/sig/sentdm/models/profiles/campaign_data.rbs +12 -7
  112. data/sig/sentdm/models/profiles/campaign_use_case.rbs +66 -0
  113. data/sig/sentdm/models/profiles/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbs → campaign_use_case_data.rbs} +2 -2
  114. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_body.rbs → template_body.rbs} +2 -2
  115. data/sig/sentdm/models/template_button.rbs +28 -0
  116. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button_props.rbs → template_button_props.rbs} +2 -2
  117. data/sig/sentdm/models/template_definition.rbs +20 -20
  118. data/sig/sentdm/models/template_event.rbs +39 -0
  119. data/sig/sentdm/models/template_event_payload.rbs +76 -0
  120. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_footer.rbs → template_footer.rbs} +2 -2
  121. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_header.rbs → template_header.rbs} +2 -2
  122. data/sig/sentdm/models/webhook_list_events_response.rbs +18 -5
  123. data/sig/sentdm/models.rbs +44 -18
  124. data/sig/sentdm/resources/contacts.rbs +6 -0
  125. data/sig/sentdm/resources/conversations.rbs +22 -0
  126. data/sig/sentdm/resources/profiles/campaigns.rbs +3 -3
  127. metadata +86 -44
  128. data/lib/sentdm/models/profiles/base_dto.rb +0 -32
  129. data/rbi/sentdm/models/profiles/base_dto.rbi +0 -53
  130. data/rbi/sentdm/models/profiles/tcr_campaign_with_use_cases.rbi +0 -425
  131. data/sig/sentdm/models/profiles/base_dto.rbs +0 -27
  132. data/sig/sentdm/models/profiles/tcr_campaign_with_use_cases.rbs +0 -306
  133. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbs +0 -32
@@ -0,0 +1,132 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ class MessageEventPayload < Sentdm::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Sentdm::MessageEventPayload, Sentdm::Internal::AnyHash)
9
+ end
10
+
11
+ # The account the message belongs to.
12
+ sig { returns(T.nilable(String)) }
13
+ attr_reader :account_id
14
+
15
+ sig { params(account_id: String).void }
16
+ attr_writer :account_id
17
+
18
+ # The agent attributed to the send, when the send was attributed to one.
19
+ sig { returns(T.nilable(String)) }
20
+ attr_accessor :agent_id
21
+
22
+ # The channel the message went out on, for example sms or whatsapp. A message that
23
+ # falls back to another channel reports the channel actually used.
24
+ sig { returns(T.nilable(String)) }
25
+ attr_reader :channel
26
+
27
+ sig { params(channel: String).void }
28
+ attr_writer :channel
29
+
30
+ # The message this event describes. Stable across every event in the message's
31
+ # lifecycle, so use it to correlate them.
32
+ sig { returns(T.nilable(String)) }
33
+ attr_reader :message_id
34
+
35
+ sig { params(message_id: String).void }
36
+ attr_writer :message_id
37
+
38
+ # The status the message just reached, for example SENT, DELIVERED, or FAILED.
39
+ # Sent means dispatched and delivered means confirmed, so treat them as distinct
40
+ # outcomes.
41
+ sig { returns(T.nilable(String)) }
42
+ attr_reader :message_status
43
+
44
+ sig { params(message_status: String).void }
45
+ attr_writer :message_status
46
+
47
+ # The recipient's number in E.164 format.
48
+ sig { returns(T.nilable(String)) }
49
+ attr_reader :outbound_number
50
+
51
+ sig { params(outbound_number: String).void }
52
+ attr_writer :outbound_number
53
+
54
+ # The template the message was sent from, when it was sent from one.
55
+ sig { returns(T.nilable(String)) }
56
+ attr_accessor :template_id
57
+
58
+ # Name of the template the message was sent from. Omitted when the message wasn't
59
+ # template-based.
60
+ sig { returns(T.nilable(String)) }
61
+ attr_accessor :template_name
62
+
63
+ # When the message reached MessageStatus, in UTC (yyyy-MM-ddTHH:mm:ssZ).
64
+ sig { returns(T.nilable(String)) }
65
+ attr_reader :updated_at
66
+
67
+ sig { params(updated_at: String).void }
68
+ attr_writer :updated_at
69
+
70
+ # Body of an outbound message lifecycle event. Delivered once per status change,
71
+ # so a single message produces several of these as it moves toward a terminal
72
+ # status.
73
+ sig do
74
+ params(
75
+ account_id: String,
76
+ agent_id: T.nilable(String),
77
+ channel: String,
78
+ message_id: String,
79
+ message_status: String,
80
+ outbound_number: String,
81
+ template_id: T.nilable(String),
82
+ template_name: T.nilable(String),
83
+ updated_at: String
84
+ ).returns(T.attached_class)
85
+ end
86
+ def self.new(
87
+ # The account the message belongs to.
88
+ account_id: nil,
89
+ # The agent attributed to the send, when the send was attributed to one.
90
+ agent_id: nil,
91
+ # The channel the message went out on, for example sms or whatsapp. A message that
92
+ # falls back to another channel reports the channel actually used.
93
+ channel: nil,
94
+ # The message this event describes. Stable across every event in the message's
95
+ # lifecycle, so use it to correlate them.
96
+ message_id: nil,
97
+ # The status the message just reached, for example SENT, DELIVERED, or FAILED.
98
+ # Sent means dispatched and delivered means confirmed, so treat them as distinct
99
+ # outcomes.
100
+ message_status: nil,
101
+ # The recipient's number in E.164 format.
102
+ outbound_number: nil,
103
+ # The template the message was sent from, when it was sent from one.
104
+ template_id: nil,
105
+ # Name of the template the message was sent from. Omitted when the message wasn't
106
+ # template-based.
107
+ template_name: nil,
108
+ # When the message reached MessageStatus, in UTC (yyyy-MM-ddTHH:mm:ssZ).
109
+ updated_at: nil
110
+ )
111
+ end
112
+
113
+ sig do
114
+ override.returns(
115
+ {
116
+ account_id: String,
117
+ agent_id: T.nilable(String),
118
+ channel: String,
119
+ message_id: String,
120
+ message_status: String,
121
+ outbound_number: String,
122
+ template_id: T.nilable(String),
123
+ template_name: T.nilable(String),
124
+ updated_at: String
125
+ }
126
+ )
127
+ end
128
+ def to_hash
129
+ end
130
+ end
131
+ end
132
+ end
@@ -103,8 +103,7 @@ module Sentdm
103
103
  end
104
104
  attr_writer :recipients
105
105
 
106
- # Overall request status: "QUEUED" when the batch has been accepted and published
107
- # to Kafka.
106
+ # Overall request status: "QUEUED" when the batch has been accepted for delivery.
108
107
  sig { returns(T.nilable(String)) }
109
108
  attr_reader :status
110
109
 
@@ -140,8 +139,7 @@ module Sentdm
140
139
  def self.new(
141
140
  # Per-recipient message results
142
141
  recipients: nil,
143
- # Overall request status: "QUEUED" when the batch has been accepted and published
144
- # to Kafka.
142
+ # Overall request status: "QUEUED" when the batch has been accepted for delivery.
145
143
  status: nil,
146
144
  # Template ID that was used
147
145
  template_id: nil,
@@ -122,7 +122,7 @@ module Sentdm
122
122
  sig { returns(T.nilable(String)) }
123
123
  attr_accessor :sending_phone_number
124
124
 
125
- # Reference to another profile for SMS/Telnyx configuration
125
+ # Reference to another profile whose SMS configuration this profile uses
126
126
  sig { returns(T.nilable(String)) }
127
127
  attr_accessor :sending_phone_number_profile_id
128
128
 
@@ -224,7 +224,7 @@ module Sentdm
224
224
  organization_id: nil,
225
225
  # Direct SMS phone number
226
226
  sending_phone_number: nil,
227
- # Reference to another profile for SMS/Telnyx configuration
227
+ # Reference to another profile whose SMS configuration this profile uses
228
228
  sending_phone_number_profile_id: nil,
229
229
  # Reference to another profile for WhatsApp configuration
230
230
  sending_whatsapp_number_profile_id: nil,
@@ -378,7 +378,10 @@ module Sentdm
378
378
  sig { params(created_at: Time).void }
379
379
  attr_writer :created_at
380
380
 
381
- # CSP (Campaign Service Provider) ID
381
+ # Deprecated and scheduled for removal. Identifies the Campaign Service Provider
382
+ # that registered the brand, which is Sent, so the value is the same for every
383
+ # brand and every account. Nothing on your side can act on it and there is no
384
+ # replacement. Stop reading it.
382
385
  sig { returns(T.nilable(String)) }
383
386
  attr_accessor :csp_id
384
387
 
@@ -459,7 +462,10 @@ module Sentdm
459
462
  contact: nil,
460
463
  # When the brand was created
461
464
  created_at: nil,
462
- # CSP (Campaign Service Provider) ID
465
+ # Deprecated and scheduled for removal. Identifies the Campaign Service Provider
466
+ # that registered the brand, which is Sent, so the value is the same for every
467
+ # brand and every account. Nothing on your side can act on it and there is no
468
+ # replacement. Stop reading it.
463
469
  csp_id: nil,
464
470
  identity_status: nil,
465
471
  # Whether this brand is inherited from the parent organization
@@ -645,10 +651,6 @@ module Sentdm
645
651
  end
646
652
  attr_writer :destination_countries
647
653
 
648
- # Expected daily messaging volume
649
- sig { returns(T.nilable(String)) }
650
- attr_accessor :expected_messaging_volume
651
-
652
654
  # Whether this is a TCR (Campaign Registry) application
653
655
  sig { returns(T.nilable(T::Boolean)) }
654
656
  attr_reader :is_tcr_application
@@ -678,7 +680,6 @@ module Sentdm
678
680
  T.nilable(Sentdm::TcrBrandRelationship::OrSymbol),
679
681
  destination_countries:
680
682
  T::Array[Sentdm::DestinationCountry::OrHash],
681
- expected_messaging_volume: T.nilable(String),
682
683
  is_tcr_application: T::Boolean,
683
684
  notes: T.nilable(String),
684
685
  phone_number_prefix: T.nilable(String),
@@ -690,8 +691,6 @@ module Sentdm
690
691
  brand_relationship: nil,
691
692
  # List of destination countries for messaging
692
693
  destination_countries: nil,
693
- # Expected daily messaging volume
694
- expected_messaging_volume: nil,
695
694
  # Whether this is a TCR (Campaign Registry) application
696
695
  is_tcr_application: nil,
697
696
  # Additional notes about the business or use case
@@ -710,7 +709,6 @@ module Sentdm
710
709
  brand_relationship:
711
710
  T.nilable(Sentdm::TcrBrandRelationship::TaggedSymbol),
712
711
  destination_countries: T::Array[Sentdm::DestinationCountry],
713
- expected_messaging_volume: T.nilable(String),
714
712
  is_tcr_application: T::Boolean,
715
713
  notes: T.nilable(String),
716
714
  phone_number_prefix: T.nilable(String),
@@ -106,7 +106,7 @@ module Sentdm
106
106
  sig { returns(T.nilable(String)) }
107
107
  attr_accessor :sending_phone_number
108
108
 
109
- # Reference to another profile to use for SMS/Telnyx configuration (optional)
109
+ # Reference to another profile to use for SMS configuration (optional)
110
110
  sig { returns(T.nilable(String)) }
111
111
  attr_accessor :sending_phone_number_profile_id
112
112
 
@@ -208,7 +208,7 @@ module Sentdm
208
208
  sandbox: nil,
209
209
  # Direct phone number for SMS sending (optional)
210
210
  sending_phone_number: nil,
211
- # Reference to another profile to use for SMS/Telnyx configuration (optional)
211
+ # Reference to another profile to use for SMS configuration (optional)
212
212
  sending_phone_number_profile_id: nil,
213
213
  # Reference to another profile to use for WhatsApp configuration (optional)
214
214
  sending_whatsapp_number_profile_id: nil,
@@ -3,23 +3,21 @@
3
3
  module Sentdm
4
4
  module Models
5
5
  module Profiles
6
- class APIResponseOfTcrCampaignWithUseCases < Sentdm::Internal::Type::BaseModel
6
+ class APIResponseOfBrandCampaign < Sentdm::Internal::Type::BaseModel
7
7
  OrHash =
8
8
  T.type_alias do
9
9
  T.any(
10
- Sentdm::Profiles::APIResponseOfTcrCampaignWithUseCases,
10
+ Sentdm::Profiles::APIResponseOfBrandCampaign,
11
11
  Sentdm::Internal::AnyHash
12
12
  )
13
13
  end
14
14
 
15
- # The response data (null if error)
16
- sig { returns(T.nilable(Sentdm::Profiles::TcrCampaignWithUseCases)) }
15
+ # A 10DLC campaign registered for a brand.
16
+ sig { returns(T.nilable(Sentdm::Profiles::BrandCampaign)) }
17
17
  attr_reader :data
18
18
 
19
19
  sig do
20
- params(
21
- data: T.nilable(Sentdm::Profiles::TcrCampaignWithUseCases::OrHash)
22
- ).void
20
+ params(data: T.nilable(Sentdm::Profiles::BrandCampaign::OrHash)).void
23
21
  end
24
22
  attr_writer :data
25
23
 
@@ -47,14 +45,14 @@ module Sentdm
47
45
  # Standard API response envelope for all v3 endpoints
48
46
  sig do
49
47
  params(
50
- data: T.nilable(Sentdm::Profiles::TcrCampaignWithUseCases::OrHash),
48
+ data: T.nilable(Sentdm::Profiles::BrandCampaign::OrHash),
51
49
  error: T.nilable(Sentdm::ErrorDetail::OrHash),
52
50
  meta: Sentdm::APIMeta::OrHash,
53
51
  success: T::Boolean
54
52
  ).returns(T.attached_class)
55
53
  end
56
54
  def self.new(
57
- # The response data (null if error)
55
+ # A 10DLC campaign registered for a brand.
58
56
  data: nil,
59
57
  # Error information
60
58
  error: nil,
@@ -68,7 +66,7 @@ module Sentdm
68
66
  sig do
69
67
  override.returns(
70
68
  {
71
- data: T.nilable(Sentdm::Profiles::TcrCampaignWithUseCases),
69
+ data: T.nilable(Sentdm::Profiles::BrandCampaign),
72
70
  error: T.nilable(Sentdm::ErrorDetail),
73
71
  meta: Sentdm::APIMeta,
74
72
  success: T::Boolean
@@ -3,21 +3,17 @@
3
3
  module Sentdm
4
4
  module Models
5
5
  module Profiles
6
- class CampaignListResponse < Sentdm::Internal::Type::BaseModel
6
+ class APIResponseOfListOfBrandCampaign < Sentdm::Internal::Type::BaseModel
7
7
  OrHash =
8
8
  T.type_alias do
9
9
  T.any(
10
- Sentdm::Models::Profiles::CampaignListResponse,
10
+ Sentdm::Profiles::APIResponseOfListOfBrandCampaign,
11
11
  Sentdm::Internal::AnyHash
12
12
  )
13
13
  end
14
14
 
15
15
  # The response data (null if error)
16
- sig do
17
- returns(
18
- T.nilable(T::Array[Sentdm::Profiles::TcrCampaignWithUseCases])
19
- )
20
- end
16
+ sig { returns(T.nilable(T::Array[Sentdm::Profiles::BrandCampaign])) }
21
17
  attr_accessor :data
22
18
 
23
19
  # Error information
@@ -44,10 +40,7 @@ module Sentdm
44
40
  # Standard API response envelope for all v3 endpoints
45
41
  sig do
46
42
  params(
47
- data:
48
- T.nilable(
49
- T::Array[Sentdm::Profiles::TcrCampaignWithUseCases::OrHash]
50
- ),
43
+ data: T.nilable(T::Array[Sentdm::Profiles::BrandCampaign::OrHash]),
51
44
  error: T.nilable(Sentdm::ErrorDetail::OrHash),
52
45
  meta: Sentdm::APIMeta::OrHash,
53
46
  success: T::Boolean
@@ -68,8 +61,7 @@ module Sentdm
68
61
  sig do
69
62
  override.returns(
70
63
  {
71
- data:
72
- T.nilable(T::Array[Sentdm::Profiles::TcrCampaignWithUseCases]),
64
+ data: T.nilable(T::Array[Sentdm::Profiles::BrandCampaign]),
73
65
  error: T.nilable(Sentdm::ErrorDetail),
74
66
  meta: Sentdm::APIMeta,
75
67
  success: T::Boolean
@@ -0,0 +1,299 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Profiles
6
+ class BrandCampaign < Sentdm::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(Sentdm::Profiles::BrandCampaign, Sentdm::Internal::AnyHash)
10
+ end
11
+
12
+ sig { returns(T.nilable(String)) }
13
+ attr_reader :id
14
+
15
+ sig { params(id: String).void }
16
+ attr_writer :id
17
+
18
+ sig { returns(T.nilable(Time)) }
19
+ attr_accessor :billed_date
20
+
21
+ sig { returns(T.nilable(String)) }
22
+ attr_accessor :brand_id
23
+
24
+ sig { returns(T.nilable(Float)) }
25
+ attr_accessor :cost
26
+
27
+ sig { returns(T.nilable(Time)) }
28
+ attr_reader :created_at
29
+
30
+ sig { params(created_at: Time).void }
31
+ attr_writer :created_at
32
+
33
+ sig { returns(T.nilable(String)) }
34
+ attr_reader :customer_id
35
+
36
+ sig { params(customer_id: String).void }
37
+ attr_writer :customer_id
38
+
39
+ # True once every carrier has completed its DCA election and the campaign is
40
+ # operationally ready for traffic.
41
+ sig { returns(T.nilable(T::Boolean)) }
42
+ attr_accessor :dca_elections_complete
43
+
44
+ sig { returns(T.nilable(Time)) }
45
+ attr_accessor :dca_elections_completed_at
46
+
47
+ sig { returns(T.nilable(String)) }
48
+ attr_reader :description
49
+
50
+ sig { params(description: String).void }
51
+ attr_writer :description
52
+
53
+ # True when the one-time campaign submission fee has already been charged.
54
+ sig { returns(T.nilable(T::Boolean)) }
55
+ attr_reader :has_submission_transaction
56
+
57
+ sig { params(has_submission_transaction: T::Boolean).void }
58
+ attr_writer :has_submission_transaction
59
+
60
+ sig { returns(T.nilable(String)) }
61
+ attr_accessor :help_keywords
62
+
63
+ sig { returns(T.nilable(String)) }
64
+ attr_accessor :help_message
65
+
66
+ sig { returns(T.nilable(String)) }
67
+ attr_accessor :message_flow
68
+
69
+ sig { returns(T.nilable(String)) }
70
+ attr_reader :name
71
+
72
+ sig { params(name: String).void }
73
+ attr_writer :name
74
+
75
+ sig { returns(T.nilable(String)) }
76
+ attr_accessor :optin_keywords
77
+
78
+ sig { returns(T.nilable(String)) }
79
+ attr_accessor :optin_message
80
+
81
+ sig { returns(T.nilable(String)) }
82
+ attr_accessor :optout_keywords
83
+
84
+ sig { returns(T.nilable(String)) }
85
+ attr_accessor :optout_message
86
+
87
+ sig { returns(T.nilable(String)) }
88
+ attr_accessor :privacy_policy_link
89
+
90
+ sig do
91
+ returns(
92
+ T.nilable(Sentdm::Profiles::BrandCampaign::Status::TaggedSymbol)
93
+ )
94
+ end
95
+ attr_accessor :status
96
+
97
+ sig { returns(T.nilable(Time)) }
98
+ attr_accessor :submitted_at
99
+
100
+ sig { returns(T.nilable(T::Boolean)) }
101
+ attr_reader :submitted_to_tcr
102
+
103
+ sig { params(submitted_to_tcr: T::Boolean).void }
104
+ attr_writer :submitted_to_tcr
105
+
106
+ # The Campaign Registry identifier, once the campaign has been accepted.
107
+ sig { returns(T.nilable(String)) }
108
+ attr_accessor :tcr_campaign_id
109
+
110
+ # Surfaced so customers can see why a submission did not reach the registry.
111
+ sig { returns(T.nilable(String)) }
112
+ attr_accessor :tcr_sync_error
113
+
114
+ sig { returns(T.nilable(String)) }
115
+ attr_accessor :terms_and_conditions_link
116
+
117
+ # Campaign type (for example KYC or App).
118
+ sig { returns(T.nilable(String)) }
119
+ attr_reader :type
120
+
121
+ sig { params(type: String).void }
122
+ attr_writer :type
123
+
124
+ sig { returns(T.nilable(Time)) }
125
+ attr_accessor :updated_at
126
+
127
+ sig { returns(T.nilable(T::Array[Sentdm::Profiles::CampaignUseCase])) }
128
+ attr_reader :use_cases
129
+
130
+ sig do
131
+ params(
132
+ use_cases: T::Array[Sentdm::Profiles::CampaignUseCase::OrHash]
133
+ ).void
134
+ end
135
+ attr_writer :use_cases
136
+
137
+ # Expected messaging volume for this campaign — customer-supplied on
138
+ # create/update, and the input to both the TCR usecase classification (LOW_VOLUME
139
+ # vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
140
+ # back the value they set.
141
+ sig { returns(T.nilable(String)) }
142
+ attr_accessor :volume
143
+
144
+ # A 10DLC campaign registered for a brand.
145
+ sig do
146
+ params(
147
+ id: String,
148
+ billed_date: T.nilable(Time),
149
+ brand_id: T.nilable(String),
150
+ cost: T.nilable(Float),
151
+ created_at: Time,
152
+ customer_id: String,
153
+ dca_elections_complete: T.nilable(T::Boolean),
154
+ dca_elections_completed_at: T.nilable(Time),
155
+ description: String,
156
+ has_submission_transaction: T::Boolean,
157
+ help_keywords: T.nilable(String),
158
+ help_message: T.nilable(String),
159
+ message_flow: T.nilable(String),
160
+ name: String,
161
+ optin_keywords: T.nilable(String),
162
+ optin_message: T.nilable(String),
163
+ optout_keywords: T.nilable(String),
164
+ optout_message: T.nilable(String),
165
+ privacy_policy_link: T.nilable(String),
166
+ status:
167
+ T.nilable(Sentdm::Profiles::BrandCampaign::Status::OrSymbol),
168
+ submitted_at: T.nilable(Time),
169
+ submitted_to_tcr: T::Boolean,
170
+ tcr_campaign_id: T.nilable(String),
171
+ tcr_sync_error: T.nilable(String),
172
+ terms_and_conditions_link: T.nilable(String),
173
+ type: String,
174
+ updated_at: T.nilable(Time),
175
+ use_cases: T::Array[Sentdm::Profiles::CampaignUseCase::OrHash],
176
+ volume: T.nilable(String)
177
+ ).returns(T.attached_class)
178
+ end
179
+ def self.new(
180
+ id: nil,
181
+ billed_date: nil,
182
+ brand_id: nil,
183
+ cost: nil,
184
+ created_at: nil,
185
+ customer_id: nil,
186
+ # True once every carrier has completed its DCA election and the campaign is
187
+ # operationally ready for traffic.
188
+ dca_elections_complete: nil,
189
+ dca_elections_completed_at: nil,
190
+ description: nil,
191
+ # True when the one-time campaign submission fee has already been charged.
192
+ has_submission_transaction: nil,
193
+ help_keywords: nil,
194
+ help_message: nil,
195
+ message_flow: nil,
196
+ name: nil,
197
+ optin_keywords: nil,
198
+ optin_message: nil,
199
+ optout_keywords: nil,
200
+ optout_message: nil,
201
+ privacy_policy_link: nil,
202
+ status: nil,
203
+ submitted_at: nil,
204
+ submitted_to_tcr: nil,
205
+ # The Campaign Registry identifier, once the campaign has been accepted.
206
+ tcr_campaign_id: nil,
207
+ # Surfaced so customers can see why a submission did not reach the registry.
208
+ tcr_sync_error: nil,
209
+ terms_and_conditions_link: nil,
210
+ # Campaign type (for example KYC or App).
211
+ type: nil,
212
+ updated_at: nil,
213
+ use_cases: nil,
214
+ # Expected messaging volume for this campaign — customer-supplied on
215
+ # create/update, and the input to both the TCR usecase classification (LOW_VOLUME
216
+ # vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
217
+ # back the value they set.
218
+ volume: nil
219
+ )
220
+ end
221
+
222
+ sig do
223
+ override.returns(
224
+ {
225
+ id: String,
226
+ billed_date: T.nilable(Time),
227
+ brand_id: T.nilable(String),
228
+ cost: T.nilable(Float),
229
+ created_at: Time,
230
+ customer_id: String,
231
+ dca_elections_complete: T.nilable(T::Boolean),
232
+ dca_elections_completed_at: T.nilable(Time),
233
+ description: String,
234
+ has_submission_transaction: T::Boolean,
235
+ help_keywords: T.nilable(String),
236
+ help_message: T.nilable(String),
237
+ message_flow: T.nilable(String),
238
+ name: String,
239
+ optin_keywords: T.nilable(String),
240
+ optin_message: T.nilable(String),
241
+ optout_keywords: T.nilable(String),
242
+ optout_message: T.nilable(String),
243
+ privacy_policy_link: T.nilable(String),
244
+ status:
245
+ T.nilable(
246
+ Sentdm::Profiles::BrandCampaign::Status::TaggedSymbol
247
+ ),
248
+ submitted_at: T.nilable(Time),
249
+ submitted_to_tcr: T::Boolean,
250
+ tcr_campaign_id: T.nilable(String),
251
+ tcr_sync_error: T.nilable(String),
252
+ terms_and_conditions_link: T.nilable(String),
253
+ type: String,
254
+ updated_at: T.nilable(Time),
255
+ use_cases: T::Array[Sentdm::Profiles::CampaignUseCase],
256
+ volume: T.nilable(String)
257
+ }
258
+ )
259
+ end
260
+ def to_hash
261
+ end
262
+
263
+ module Status
264
+ extend Sentdm::Internal::Type::Enum
265
+
266
+ TaggedSymbol =
267
+ T.type_alias do
268
+ T.all(Symbol, Sentdm::Profiles::BrandCampaign::Status)
269
+ end
270
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
271
+
272
+ SENT_CREATED =
273
+ T.let(
274
+ :SENT_CREATED,
275
+ Sentdm::Profiles::BrandCampaign::Status::TaggedSymbol
276
+ )
277
+ ACTIVE =
278
+ T.let(
279
+ :ACTIVE,
280
+ Sentdm::Profiles::BrandCampaign::Status::TaggedSymbol
281
+ )
282
+ EXPIRED =
283
+ T.let(
284
+ :EXPIRED,
285
+ Sentdm::Profiles::BrandCampaign::Status::TaggedSymbol
286
+ )
287
+
288
+ sig do
289
+ override.returns(
290
+ T::Array[Sentdm::Profiles::BrandCampaign::Status::TaggedSymbol]
291
+ )
292
+ end
293
+ def self.values
294
+ end
295
+ end
296
+ end
297
+ end
298
+ end
299
+ end