sentdm 0.4.0 → 0.5.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 (149) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -27
  4. data/lib/sentdm/client.rb +5 -8
  5. data/lib/sentdm/internal/type/base_model.rb +5 -5
  6. data/lib/sentdm/models/{api_response_contact.rb → api_response_of_contact.rb} +4 -4
  7. data/lib/sentdm/models/base_dto.rb +30 -0
  8. data/lib/sentdm/models/billing_contact_info.rb +47 -0
  9. data/lib/sentdm/models/{brand_data.rb → brands_brand_data.rb} +17 -17
  10. data/lib/sentdm/models/contact_delete_params.rb +1 -1
  11. data/lib/sentdm/models/contact_list_response.rb +3 -3
  12. data/lib/sentdm/models/{contact.rb → contact_response.rb} +1 -1
  13. data/lib/sentdm/models/{mutation_request.rb → mutation_request_base.rb} +2 -2
  14. data/lib/sentdm/models/number_lookup_params.rb +26 -0
  15. data/lib/sentdm/models/number_lookup_response.rb +104 -0
  16. data/lib/sentdm/models/payment_details.rb +44 -0
  17. data/lib/sentdm/models/{profile_complete_params.rb → profile_complete_setup_params.rb} +3 -3
  18. data/lib/sentdm/models/{profile_complete_response.rb → profile_complete_setup_response.rb} +1 -1
  19. data/lib/sentdm/models/profile_create_params.rb +9 -91
  20. data/lib/sentdm/models/profile_delete_params.rb +1 -1
  21. data/lib/sentdm/models/profile_detail.rb +369 -3
  22. data/lib/sentdm/models/profile_update_params.rb +9 -91
  23. data/lib/sentdm/models/{brands/api_response_tcr_campaign_with_use_cases.rb → profiles/api_response_of_tcr_campaign_with_use_cases.rb} +6 -5
  24. data/lib/sentdm/models/profiles/campaign_create_params.rb +57 -0
  25. data/lib/sentdm/models/{brands → profiles}/campaign_data.rb +28 -7
  26. data/lib/sentdm/models/profiles/campaign_delete_params.rb +50 -0
  27. data/lib/sentdm/models/profiles/campaign_list_params.rb +28 -0
  28. data/lib/sentdm/models/profiles/campaign_list_response.rb +47 -0
  29. data/lib/sentdm/models/profiles/campaign_update_params.rb +64 -0
  30. data/lib/sentdm/models/{brands → profiles}/messaging_use_case_us.rb +1 -1
  31. data/lib/sentdm/models/{brands → profiles}/tcr_campaign_with_use_cases.rb +15 -15
  32. data/lib/sentdm/models/template_definition.rb +255 -15
  33. data/lib/sentdm/models/user_remove_params.rb +1 -1
  34. data/lib/sentdm/models/webhook_rotate_secret_params.rb +1 -1
  35. data/lib/sentdm/models.rb +14 -26
  36. data/lib/sentdm/resources/contacts.rb +6 -6
  37. data/lib/sentdm/resources/numbers.rb +44 -0
  38. data/lib/sentdm/resources/profiles/campaigns.rb +160 -0
  39. data/lib/sentdm/resources/profiles.rb +16 -11
  40. data/lib/sentdm/version.rb +1 -1
  41. data/lib/sentdm.rb +22 -22
  42. data/rbi/sentdm/client.rbi +4 -6
  43. data/rbi/sentdm/models/{api_response_contact.rbi → api_response_of_contact.rbi} +6 -6
  44. data/rbi/sentdm/models/base_dto.rbi +49 -0
  45. data/rbi/sentdm/models/billing_contact_info.rbi +65 -0
  46. data/rbi/sentdm/models/{brand_data.rbi → brands_brand_data.rbi} +44 -27
  47. data/rbi/sentdm/models/contact_delete_params.rbi +1 -1
  48. data/rbi/sentdm/models/contact_list_response.rbi +4 -4
  49. data/rbi/sentdm/models/{contact.rbi → contact_response.rbi} +4 -2
  50. data/rbi/sentdm/models/{mutation_request.rbi → mutation_request_base.rbi} +2 -2
  51. data/rbi/sentdm/models/number_lookup_params.rbi +46 -0
  52. data/rbi/sentdm/models/number_lookup_response.rbi +166 -0
  53. data/rbi/sentdm/models/payment_details.rbi +59 -0
  54. data/rbi/sentdm/models/{profile_complete_params.rbi → profile_complete_setup_params.rbi} +2 -2
  55. data/rbi/sentdm/models/{profile_complete_response.rbi → profile_complete_setup_response.rbi} +1 -1
  56. data/rbi/sentdm/models/profile_create_params.rbi +12 -146
  57. data/rbi/sentdm/models/profile_delete_params.rbi +1 -1
  58. data/rbi/sentdm/models/profile_detail.rbi +562 -4
  59. data/rbi/sentdm/models/profile_update_params.rbi +12 -146
  60. data/rbi/sentdm/models/{brands/api_response_tcr_campaign_with_use_cases.rbi → profiles/api_response_of_tcr_campaign_with_use_cases.rbi} +7 -7
  61. data/rbi/sentdm/models/profiles/campaign_create_params.rbi +88 -0
  62. data/rbi/sentdm/models/{brands → profiles}/campaign_data.rbi +51 -16
  63. data/rbi/sentdm/models/profiles/campaign_delete_params.rbi +95 -0
  64. data/rbi/sentdm/models/profiles/campaign_list_params.rbi +51 -0
  65. data/rbi/sentdm/models/profiles/campaign_list_response.rbi +84 -0
  66. data/rbi/sentdm/models/profiles/campaign_update_params.rbi +94 -0
  67. data/rbi/sentdm/models/{brands → profiles}/messaging_use_case_us.rbi +20 -16
  68. data/rbi/sentdm/models/{brands → profiles}/tcr_campaign_with_use_cases.rbi +37 -29
  69. data/rbi/sentdm/models/template_definition.rbi +405 -74
  70. data/rbi/sentdm/models/user_remove_params.rbi +1 -1
  71. data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +1 -1
  72. data/rbi/sentdm/models.rbi +14 -26
  73. data/rbi/sentdm/resources/contacts.rbi +3 -3
  74. data/rbi/sentdm/resources/numbers.rbi +32 -0
  75. data/rbi/sentdm/resources/profiles/campaigns.rbi +127 -0
  76. data/rbi/sentdm/resources/profiles.rbi +11 -11
  77. data/sig/sentdm/client.rbs +2 -4
  78. data/sig/sentdm/models/{api_response_contact.rbs → api_response_of_contact.rbs} +6 -6
  79. data/sig/sentdm/models/base_dto.rbs +25 -0
  80. data/sig/sentdm/models/billing_contact_info.rbs +30 -0
  81. data/sig/sentdm/models/{brand_data.rbs → brands_brand_data.rbs} +19 -19
  82. data/sig/sentdm/models/contact_delete_params.rbs +1 -1
  83. data/sig/sentdm/models/contact_list_response.rbs +7 -5
  84. data/sig/sentdm/models/{contact.rbs → contact_response.rbs} +2 -2
  85. data/sig/sentdm/models/{mutation_request.rbs → mutation_request_base.rbs} +2 -2
  86. data/sig/sentdm/models/number_lookup_params.rbs +30 -0
  87. data/sig/sentdm/models/number_lookup_response.rbs +100 -0
  88. data/sig/sentdm/models/payment_details.rbs +30 -0
  89. data/sig/sentdm/models/{profile_complete_params.rbs → profile_complete_setup_params.rbs} +2 -2
  90. data/sig/sentdm/models/profile_complete_setup_response.rbs +5 -0
  91. data/sig/sentdm/models/profile_create_params.rbs +12 -66
  92. data/sig/sentdm/models/profile_delete_params.rbs +1 -1
  93. data/sig/sentdm/models/profile_detail.rbs +289 -4
  94. data/sig/sentdm/models/profile_update_params.rbs +12 -66
  95. data/sig/sentdm/models/profiles/api_response_of_tcr_campaign_with_use_cases.rbs +41 -0
  96. data/sig/sentdm/models/profiles/campaign_create_params.rbs +54 -0
  97. data/sig/sentdm/models/{brands → profiles}/campaign_data.rbs +27 -5
  98. data/sig/sentdm/models/profiles/campaign_delete_params.rbs +53 -0
  99. data/sig/sentdm/models/profiles/campaign_list_params.rbs +32 -0
  100. data/sig/sentdm/models/{brands/api_response_tcr_campaign_with_use_cases.rbs → profiles/campaign_list_response.rbs} +7 -7
  101. data/sig/sentdm/models/profiles/campaign_update_params.rbs +59 -0
  102. data/sig/sentdm/models/{brands → profiles}/messaging_use_case_us.rbs +2 -2
  103. data/sig/sentdm/models/{brands → profiles}/tcr_campaign_with_use_cases.rbs +29 -29
  104. data/sig/sentdm/models/template_definition.rbs +233 -20
  105. data/sig/sentdm/models/user_remove_params.rbs +1 -1
  106. data/sig/sentdm/models/webhook_rotate_secret_params.rbs +1 -1
  107. data/sig/sentdm/models.rbs +14 -20
  108. data/sig/sentdm/resources/contacts.rbs +3 -3
  109. data/sig/sentdm/resources/numbers.rbs +13 -0
  110. data/sig/sentdm/resources/profiles/campaigns.rbs +42 -0
  111. data/sig/sentdm/resources/profiles.rbs +9 -7
  112. metadata +67 -67
  113. data/lib/sentdm/models/brand_with_kyc.rb +0 -370
  114. data/lib/sentdm/models/brands/base_dto.rb +0 -32
  115. data/lib/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rb +0 -30
  116. data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rb +0 -34
  117. data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rb +0 -40
  118. data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rb +0 -38
  119. data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rb +0 -81
  120. data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rb +0 -34
  121. data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rb +0 -39
  122. data/lib/sentdm/resources/brands/campaigns.rb +0 -16
  123. data/lib/sentdm/resources/brands.rb +0 -18
  124. data/lib/sentdm/resources/lookup.rb +0 -14
  125. data/rbi/sentdm/models/brand_with_kyc.rbi +0 -516
  126. data/rbi/sentdm/models/brands/base_dto.rbi +0 -53
  127. data/rbi/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbi +0 -52
  128. data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rbi +0 -56
  129. data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rbi +0 -76
  130. data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbi +0 -79
  131. data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rbi +0 -104
  132. data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rbi +0 -60
  133. data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rbi +0 -62
  134. data/rbi/sentdm/resources/brands/campaigns.rbi +0 -14
  135. data/rbi/sentdm/resources/brands.rbi +0 -15
  136. data/rbi/sentdm/resources/lookup.rbi +0 -12
  137. data/sig/sentdm/models/brand_with_kyc.rbs +0 -288
  138. data/sig/sentdm/models/brands/base_dto.rbs +0 -27
  139. data/sig/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbs +0 -27
  140. data/sig/sentdm/models/profile_complete_response.rbs +0 -5
  141. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rbs +0 -24
  142. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rbs +0 -30
  143. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbs +0 -38
  144. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rbs +0 -75
  145. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rbs +0 -32
  146. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rbs +0 -32
  147. data/sig/sentdm/resources/brands/campaigns.rbs +0 -9
  148. data/sig/sentdm/resources/brands.rbs +0 -9
  149. data/sig/sentdm/resources/lookup.rbs +0 -7
@@ -0,0 +1,127 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Resources
5
+ class Profiles
6
+ # Manage organization profiles
7
+ class Campaigns
8
+ # Creates a new campaign scoped under the brand of the specified profile. Each
9
+ # campaign must include at least one use case with sample messages.
10
+ sig do
11
+ params(
12
+ profile_id: String,
13
+ campaign: Sentdm::Profiles::CampaignData::OrHash,
14
+ sandbox: T::Boolean,
15
+ idempotency_key: String,
16
+ x_profile_id: String,
17
+ request_options: Sentdm::RequestOptions::OrHash
18
+ ).returns(Sentdm::Profiles::APIResponseOfTcrCampaignWithUseCases)
19
+ end
20
+ def create(
21
+ # Path param: Profile ID from route
22
+ profile_id,
23
+ # Body param: Campaign data
24
+ campaign:,
25
+ # Body param: Sandbox flag - when true, the operation is simulated without side
26
+ # effects Useful for testing integrations without actual execution
27
+ sandbox: nil,
28
+ # Header param: Unique key to ensure idempotent request processing. Must be 1-255
29
+ # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
30
+ # hours per key per customer.
31
+ idempotency_key: nil,
32
+ # Header param: Profile UUID to scope the request to a child profile. Only
33
+ # organization API keys can use this header. The profile must belong to the
34
+ # calling organization.
35
+ x_profile_id: nil,
36
+ request_options: {}
37
+ )
38
+ end
39
+
40
+ # Updates an existing campaign under the brand of the specified profile. Cannot
41
+ # update campaigns that have already been submitted to TCR.
42
+ sig do
43
+ params(
44
+ campaign_id: String,
45
+ profile_id: String,
46
+ campaign: Sentdm::Profiles::CampaignData::OrHash,
47
+ sandbox: T::Boolean,
48
+ idempotency_key: String,
49
+ x_profile_id: String,
50
+ request_options: Sentdm::RequestOptions::OrHash
51
+ ).returns(Sentdm::Profiles::APIResponseOfTcrCampaignWithUseCases)
52
+ end
53
+ def update(
54
+ # Path param: Campaign ID from route
55
+ campaign_id,
56
+ # Path param: Profile ID from route
57
+ profile_id:,
58
+ # Body param: Campaign data
59
+ campaign:,
60
+ # Body param: Sandbox flag - when true, the operation is simulated without side
61
+ # effects Useful for testing integrations without actual execution
62
+ sandbox: nil,
63
+ # Header param: Unique key to ensure idempotent request processing. Must be 1-255
64
+ # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
65
+ # hours per key per customer.
66
+ idempotency_key: nil,
67
+ # Header param: Profile UUID to scope the request to a child profile. Only
68
+ # organization API keys can use this header. The profile must belong to the
69
+ # calling organization.
70
+ x_profile_id: nil,
71
+ request_options: {}
72
+ )
73
+ end
74
+
75
+ # Retrieves all campaigns linked to the profile's brand, including use cases and
76
+ # sample messages. Returns inherited campaigns if inherit_tcr_campaign=true.
77
+ sig do
78
+ params(
79
+ profile_id: String,
80
+ x_profile_id: String,
81
+ request_options: Sentdm::RequestOptions::OrHash
82
+ ).returns(Sentdm::Models::Profiles::CampaignListResponse)
83
+ end
84
+ def list(
85
+ # Profile ID from route
86
+ profile_id,
87
+ # Profile UUID to scope the request to a child profile. Only organization API keys
88
+ # can use this header. The profile must belong to the calling organization.
89
+ x_profile_id: nil,
90
+ request_options: {}
91
+ )
92
+ end
93
+
94
+ # Deletes a campaign by ID from the brand of the specified profile. The profile
95
+ # must belong to the authenticated organization.
96
+ sig do
97
+ params(
98
+ campaign_id: String,
99
+ profile_id: String,
100
+ body: Sentdm::Profiles::CampaignDeleteParams::Body::OrHash,
101
+ x_profile_id: String,
102
+ request_options: Sentdm::RequestOptions::OrHash
103
+ ).void
104
+ end
105
+ def delete(
106
+ # Path param: Campaign ID from route parameter
107
+ campaign_id,
108
+ # Path param: Profile ID from route parameter
109
+ profile_id:,
110
+ # Body param: Request to delete a campaign from a brand
111
+ body:,
112
+ # Header param: Profile UUID to scope the request to a child profile. Only
113
+ # organization API keys can use this header. The profile must belong to the
114
+ # calling organization.
115
+ x_profile_id: nil,
116
+ request_options: {}
117
+ )
118
+ end
119
+
120
+ # @api private
121
+ sig { params(client: Sentdm::Client).returns(T.attached_class) }
122
+ def self.new(client:)
123
+ end
124
+ end
125
+ end
126
+ end
127
+ end
@@ -4,6 +4,10 @@ module Sentdm
4
4
  module Resources
5
5
  # Manage organization profiles
6
6
  class Profiles
7
+ # Manage organization profiles
8
+ sig { returns(Sentdm::Resources::Profiles::Campaigns) }
9
+ attr_reader :campaigns
10
+
7
11
  # Creates a new sender profile within an organization. Profiles represent
8
12
  # different brands, departments, or use cases, each with their own messaging
9
13
  # configuration and settings. Requires admin role in the organization.
@@ -44,10 +48,9 @@ module Sentdm
44
48
  params(
45
49
  allow_contact_sharing: T::Boolean,
46
50
  allow_template_sharing: T::Boolean,
47
- billing_contact:
48
- T.nilable(Sentdm::ProfileCreateParams::BillingContact::OrHash),
51
+ billing_contact: T.nilable(Sentdm::BillingContactInfo::OrHash),
49
52
  billing_model: T.nilable(String),
50
- brand: T.nilable(Sentdm::BrandData::OrHash),
53
+ brand: T.nilable(Sentdm::BrandsBrandData::OrHash),
51
54
  description: T.nilable(String),
52
55
  icon: T.nilable(String),
53
56
  inherit_contacts: T.nilable(T::Boolean),
@@ -55,8 +58,7 @@ module Sentdm
55
58
  inherit_tcr_campaign: T.nilable(T::Boolean),
56
59
  inherit_templates: T.nilable(T::Boolean),
57
60
  name: String,
58
- payment_details:
59
- T.nilable(Sentdm::ProfileCreateParams::PaymentDetails::OrHash),
61
+ payment_details: T.nilable(Sentdm::PaymentDetails::OrHash),
60
62
  sandbox: T::Boolean,
61
63
  short_name: T.nilable(String),
62
64
  whatsapp_business_account:
@@ -180,10 +182,9 @@ module Sentdm
180
182
  allow_contact_sharing: T.nilable(T::Boolean),
181
183
  allow_number_change_during_onboarding: T.nilable(T::Boolean),
182
184
  allow_template_sharing: T.nilable(T::Boolean),
183
- billing_contact:
184
- T.nilable(Sentdm::ProfileUpdateParams::BillingContact::OrHash),
185
+ billing_contact: T.nilable(Sentdm::BillingContactInfo::OrHash),
185
186
  billing_model: T.nilable(String),
186
- brand: T.nilable(Sentdm::BrandData::OrHash),
187
+ brand: T.nilable(Sentdm::BrandsBrandData::OrHash),
187
188
  description: T.nilable(String),
188
189
  icon: T.nilable(String),
189
190
  inherit_contacts: T.nilable(T::Boolean),
@@ -191,8 +192,7 @@ module Sentdm
191
192
  inherit_tcr_campaign: T.nilable(T::Boolean),
192
193
  inherit_templates: T.nilable(T::Boolean),
193
194
  name: T.nilable(String),
194
- payment_details:
195
- T.nilable(Sentdm::ProfileUpdateParams::PaymentDetails::OrHash),
195
+ payment_details: T.nilable(Sentdm::PaymentDetails::OrHash),
196
196
  sandbox: T::Boolean,
197
197
  sending_phone_number: T.nilable(String),
198
198
  sending_phone_number_profile_id: T.nilable(String),
@@ -349,7 +349,7 @@ module Sentdm
349
349
  request_options: Sentdm::RequestOptions::OrHash
350
350
  ).returns(T.anything)
351
351
  end
352
- def complete(
352
+ def complete_setup(
353
353
  # Path param: Profile ID from route
354
354
  profile_id,
355
355
  # Body param: Webhook URL to call when profile completion finishes (success or
@@ -18,14 +18,12 @@ module Sentdm
18
18
 
19
19
  attr_reader profiles: Sentdm::Resources::Profiles
20
20
 
21
- attr_reader messages: Sentdm::Resources::Messages
21
+ attr_reader numbers: Sentdm::Resources::Numbers
22
22
 
23
- attr_reader lookup: Sentdm::Resources::Lookup
23
+ attr_reader messages: Sentdm::Resources::Messages
24
24
 
25
25
  attr_reader contacts: Sentdm::Resources::Contacts
26
26
 
27
- attr_reader brands: Sentdm::Resources::Brands
28
-
29
27
  attr_reader me: Sentdm::Resources::Me
30
28
 
31
29
  private def auth_headers: -> ::Hash[String, String]
@@ -1,15 +1,15 @@
1
1
  module Sentdm
2
2
  module Models
3
- type api_response_contact =
3
+ type api_response_of_contact =
4
4
  {
5
- data: Sentdm::Contact?,
5
+ data: Sentdm::ContactResponse?,
6
6
  error: Sentdm::APIError?,
7
7
  meta: Sentdm::APIMeta,
8
8
  success: bool
9
9
  }
10
10
 
11
- class APIResponseContact < Sentdm::Internal::Type::BaseModel
12
- attr_accessor data: Sentdm::Contact?
11
+ class APIResponseOfContact < Sentdm::Internal::Type::BaseModel
12
+ attr_accessor data: Sentdm::ContactResponse?
13
13
 
14
14
  attr_accessor error: Sentdm::APIError?
15
15
 
@@ -22,14 +22,14 @@ module Sentdm
22
22
  def success=: (bool) -> bool
23
23
 
24
24
  def initialize: (
25
- ?data: Sentdm::Contact?,
25
+ ?data: Sentdm::ContactResponse?,
26
26
  ?error: Sentdm::APIError?,
27
27
  ?meta: Sentdm::APIMeta,
28
28
  ?success: bool
29
29
  ) -> void
30
30
 
31
31
  def to_hash: -> {
32
- data: Sentdm::Contact?,
32
+ data: Sentdm::ContactResponse?,
33
33
  error: Sentdm::APIError?,
34
34
  meta: Sentdm::APIMeta,
35
35
  success: bool
@@ -0,0 +1,25 @@
1
+ module Sentdm
2
+ module Models
3
+ type base_dto = { id: String, created_at: Time, updated_at: Time? }
4
+
5
+ class BaseDto < Sentdm::Internal::Type::BaseModel
6
+ attr_reader id: String?
7
+
8
+ def id=: (String) -> String
9
+
10
+ attr_reader created_at: Time?
11
+
12
+ def created_at=: (Time) -> Time
13
+
14
+ attr_accessor updated_at: Time?
15
+
16
+ def initialize: (
17
+ ?id: String,
18
+ ?created_at: Time,
19
+ ?updated_at: Time?
20
+ ) -> void
21
+
22
+ def to_hash: -> { id: String, created_at: Time, updated_at: Time? }
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,30 @@
1
+ module Sentdm
2
+ module Models
3
+ type billing_contact_info =
4
+ { email: String, name: String, address: String?, phone: String? }
5
+
6
+ class BillingContactInfo < Sentdm::Internal::Type::BaseModel
7
+ attr_accessor email: String
8
+
9
+ attr_accessor name: String
10
+
11
+ attr_accessor address: String?
12
+
13
+ attr_accessor phone: String?
14
+
15
+ def initialize: (
16
+ email: String,
17
+ name: String,
18
+ ?address: String?,
19
+ ?phone: String?
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ email: String,
24
+ name: String,
25
+ address: String?,
26
+ phone: String?
27
+ }
28
+ end
29
+ end
30
+ end
@@ -1,29 +1,29 @@
1
1
  module Sentdm
2
2
  module Models
3
- type brand_data =
3
+ type brands_brand_data =
4
4
  {
5
- compliance: Sentdm::BrandData::Compliance,
6
- contact: Sentdm::BrandData::Contact,
7
- business: Sentdm::BrandData::Business?
5
+ compliance: Sentdm::BrandsBrandData::Compliance,
6
+ contact: Sentdm::BrandsBrandData::Contact,
7
+ business: Sentdm::BrandsBrandData::Business?
8
8
  }
9
9
 
10
- class BrandData < Sentdm::Internal::Type::BaseModel
11
- attr_accessor compliance: Sentdm::BrandData::Compliance
10
+ class BrandsBrandData < Sentdm::Internal::Type::BaseModel
11
+ attr_accessor compliance: Sentdm::BrandsBrandData::Compliance
12
12
 
13
- attr_accessor contact: Sentdm::BrandData::Contact
13
+ attr_accessor contact: Sentdm::BrandsBrandData::Contact
14
14
 
15
- attr_accessor business: Sentdm::BrandData::Business?
15
+ attr_accessor business: Sentdm::BrandsBrandData::Business?
16
16
 
17
17
  def initialize: (
18
- compliance: Sentdm::BrandData::Compliance,
19
- contact: Sentdm::BrandData::Contact,
20
- ?business: Sentdm::BrandData::Business?
18
+ compliance: Sentdm::BrandsBrandData::Compliance,
19
+ contact: Sentdm::BrandsBrandData::Contact,
20
+ ?business: Sentdm::BrandsBrandData::Business?
21
21
  ) -> void
22
22
 
23
23
  def to_hash: -> {
24
- compliance: Sentdm::BrandData::Compliance,
25
- contact: Sentdm::BrandData::Contact,
26
- business: Sentdm::BrandData::Business?
24
+ compliance: Sentdm::BrandsBrandData::Compliance,
25
+ contact: Sentdm::BrandsBrandData::Contact,
26
+ business: Sentdm::BrandsBrandData::Business?
27
27
  }
28
28
 
29
29
  type compliance =
@@ -125,7 +125,7 @@ module Sentdm
125
125
  city: String?,
126
126
  country: String?,
127
127
  country_of_registration: String?,
128
- entity_type: Sentdm::Models::BrandData::Business::entity_type?,
128
+ entity_type: Sentdm::Models::BrandsBrandData::Business::entity_type?,
129
129
  legal_name: String?,
130
130
  postal_code: String?,
131
131
  state: String?,
@@ -142,7 +142,7 @@ module Sentdm
142
142
 
143
143
  attr_accessor country_of_registration: String?
144
144
 
145
- attr_accessor entity_type: Sentdm::Models::BrandData::Business::entity_type?
145
+ attr_accessor entity_type: Sentdm::Models::BrandsBrandData::Business::entity_type?
146
146
 
147
147
  attr_accessor legal_name: String?
148
148
 
@@ -162,7 +162,7 @@ module Sentdm
162
162
  ?city: String?,
163
163
  ?country: String?,
164
164
  ?country_of_registration: String?,
165
- ?entity_type: Sentdm::Models::BrandData::Business::entity_type?,
165
+ ?entity_type: Sentdm::Models::BrandsBrandData::Business::entity_type?,
166
166
  ?legal_name: String?,
167
167
  ?postal_code: String?,
168
168
  ?state: String?,
@@ -176,7 +176,7 @@ module Sentdm
176
176
  city: String?,
177
177
  country: String?,
178
178
  country_of_registration: String?,
179
- entity_type: Sentdm::Models::BrandData::Business::entity_type?,
179
+ entity_type: Sentdm::Models::BrandsBrandData::Business::entity_type?,
180
180
  legal_name: String?,
181
181
  postal_code: String?,
182
182
  state: String?,
@@ -202,7 +202,7 @@ module Sentdm
202
202
  SOLE_PROPRIETOR: :SOLE_PROPRIETOR
203
203
  GOVERNMENT: :GOVERNMENT
204
204
 
205
- def self?.values: -> ::Array[Sentdm::Models::BrandData::Business::entity_type]
205
+ def self?.values: -> ::Array[Sentdm::Models::BrandsBrandData::Business::entity_type]
206
206
  end
207
207
  end
208
208
  end
@@ -36,7 +36,7 @@ module Sentdm
36
36
 
37
37
  type body = { }
38
38
 
39
- class Body < Sentdm::Models::MutationRequest
39
+ class Body < Sentdm::Models::MutationRequestBase
40
40
  def initialize: -> void
41
41
 
42
42
  def to_hash: -> { }
@@ -37,26 +37,28 @@ module Sentdm
37
37
 
38
38
  type data =
39
39
  {
40
- contacts: ::Array[Sentdm::Contact],
40
+ contacts: ::Array[Sentdm::ContactResponse],
41
41
  pagination: Sentdm::PaginationMeta
42
42
  }
43
43
 
44
44
  class Data < Sentdm::Internal::Type::BaseModel
45
- attr_reader contacts: ::Array[Sentdm::Contact]?
45
+ attr_reader contacts: ::Array[Sentdm::ContactResponse]?
46
46
 
47
- def contacts=: (::Array[Sentdm::Contact]) -> ::Array[Sentdm::Contact]
47
+ def contacts=: (
48
+ ::Array[Sentdm::ContactResponse]
49
+ ) -> ::Array[Sentdm::ContactResponse]
48
50
 
49
51
  attr_reader pagination: Sentdm::PaginationMeta?
50
52
 
51
53
  def pagination=: (Sentdm::PaginationMeta) -> Sentdm::PaginationMeta
52
54
 
53
55
  def initialize: (
54
- ?contacts: ::Array[Sentdm::Contact],
56
+ ?contacts: ::Array[Sentdm::ContactResponse],
55
57
  ?pagination: Sentdm::PaginationMeta
56
58
  ) -> void
57
59
 
58
60
  def to_hash: -> {
59
- contacts: ::Array[Sentdm::Contact],
61
+ contacts: ::Array[Sentdm::ContactResponse],
60
62
  pagination: Sentdm::PaginationMeta
61
63
  }
62
64
  end
@@ -1,6 +1,6 @@
1
1
  module Sentdm
2
2
  module Models
3
- type contact =
3
+ type contact_response =
4
4
  {
5
5
  id: String,
6
6
  available_channels: String,
@@ -18,7 +18,7 @@ module Sentdm
18
18
  updated_at: Time?
19
19
  }
20
20
 
21
- class Contact < Sentdm::Internal::Type::BaseModel
21
+ class ContactResponse < Sentdm::Internal::Type::BaseModel
22
22
  attr_reader id: String?
23
23
 
24
24
  def id=: (String) -> String
@@ -1,8 +1,8 @@
1
1
  module Sentdm
2
2
  module Models
3
- type mutation_request = { sandbox: bool }
3
+ type mutation_request_base = { sandbox: bool }
4
4
 
5
- class MutationRequest < Sentdm::Internal::Type::BaseModel
5
+ class MutationRequestBase < Sentdm::Internal::Type::BaseModel
6
6
  attr_reader sandbox: bool?
7
7
 
8
8
  def sandbox=: (bool) -> bool
@@ -0,0 +1,30 @@
1
+ module Sentdm
2
+ module Models
3
+ type number_lookup_params =
4
+ { phone_number: String, x_profile_id: String }
5
+ & Sentdm::Internal::Type::request_parameters
6
+
7
+ class NumberLookupParams < Sentdm::Internal::Type::BaseModel
8
+ extend Sentdm::Internal::Type::RequestParameters::Converter
9
+ include Sentdm::Internal::Type::RequestParameters
10
+
11
+ attr_accessor phone_number: String
12
+
13
+ attr_reader x_profile_id: String?
14
+
15
+ def x_profile_id=: (String) -> String
16
+
17
+ def initialize: (
18
+ phone_number: String,
19
+ ?x_profile_id: String,
20
+ ?request_options: Sentdm::request_opts
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ phone_number: String,
25
+ x_profile_id: String,
26
+ request_options: Sentdm::RequestOptions
27
+ }
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,100 @@
1
+ module Sentdm
2
+ module Models
3
+ type number_lookup_response =
4
+ {
5
+ data: Sentdm::Models::NumberLookupResponse::Data?,
6
+ error: Sentdm::APIError?,
7
+ meta: Sentdm::APIMeta,
8
+ success: bool
9
+ }
10
+
11
+ class NumberLookupResponse < Sentdm::Internal::Type::BaseModel
12
+ attr_accessor data: Sentdm::Models::NumberLookupResponse::Data?
13
+
14
+ attr_accessor error: Sentdm::APIError?
15
+
16
+ attr_reader meta: Sentdm::APIMeta?
17
+
18
+ def meta=: (Sentdm::APIMeta) -> Sentdm::APIMeta
19
+
20
+ attr_reader success: bool?
21
+
22
+ def success=: (bool) -> bool
23
+
24
+ def initialize: (
25
+ ?data: Sentdm::Models::NumberLookupResponse::Data?,
26
+ ?error: Sentdm::APIError?,
27
+ ?meta: Sentdm::APIMeta,
28
+ ?success: bool
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ data: Sentdm::Models::NumberLookupResponse::Data?,
33
+ error: Sentdm::APIError?,
34
+ meta: Sentdm::APIMeta,
35
+ success: bool
36
+ }
37
+
38
+ type data =
39
+ {
40
+ carrier_name: String?,
41
+ country_code: String?,
42
+ is_ported: bool?,
43
+ is_valid: bool,
44
+ is_voip: bool?,
45
+ line_type: String?,
46
+ mobile_country_code: String?,
47
+ mobile_network_code: String?,
48
+ phone_number: String
49
+ }
50
+
51
+ class Data < Sentdm::Internal::Type::BaseModel
52
+ attr_accessor carrier_name: String?
53
+
54
+ attr_accessor country_code: String?
55
+
56
+ attr_accessor is_ported: bool?
57
+
58
+ attr_reader is_valid: bool?
59
+
60
+ def is_valid=: (bool) -> bool
61
+
62
+ attr_accessor is_voip: bool?
63
+
64
+ attr_accessor line_type: String?
65
+
66
+ attr_accessor mobile_country_code: String?
67
+
68
+ attr_accessor mobile_network_code: String?
69
+
70
+ attr_reader phone_number: String?
71
+
72
+ def phone_number=: (String) -> String
73
+
74
+ def initialize: (
75
+ ?carrier_name: String?,
76
+ ?country_code: String?,
77
+ ?is_ported: bool?,
78
+ ?is_valid: bool,
79
+ ?is_voip: bool?,
80
+ ?line_type: String?,
81
+ ?mobile_country_code: String?,
82
+ ?mobile_network_code: String?,
83
+ ?phone_number: String
84
+ ) -> void
85
+
86
+ def to_hash: -> {
87
+ carrier_name: String?,
88
+ country_code: String?,
89
+ is_ported: bool?,
90
+ is_valid: bool,
91
+ is_voip: bool?,
92
+ line_type: String?,
93
+ mobile_country_code: String?,
94
+ mobile_network_code: String?,
95
+ phone_number: String
96
+ }
97
+ end
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,30 @@
1
+ module Sentdm
2
+ module Models
3
+ type payment_details =
4
+ { card_number: String, cvc: String, expiry: String, zip_code: String }
5
+
6
+ class PaymentDetails < Sentdm::Internal::Type::BaseModel
7
+ attr_accessor card_number: String
8
+
9
+ attr_accessor cvc: String
10
+
11
+ attr_accessor expiry: String
12
+
13
+ attr_accessor zip_code: String
14
+
15
+ def initialize: (
16
+ card_number: String,
17
+ cvc: String,
18
+ expiry: String,
19
+ zip_code: String
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ card_number: String,
24
+ cvc: String,
25
+ expiry: String,
26
+ zip_code: String
27
+ }
28
+ end
29
+ end
30
+ end
@@ -1,6 +1,6 @@
1
1
  module Sentdm
2
2
  module Models
3
- type profile_complete_params =
3
+ type profile_complete_setup_params =
4
4
  {
5
5
  profile_id: String,
6
6
  web_hook_url: String,
@@ -10,7 +10,7 @@ module Sentdm
10
10
  }
11
11
  & Sentdm::Internal::Type::request_parameters
12
12
 
13
- class ProfileCompleteParams < Sentdm::Internal::Type::BaseModel
13
+ class ProfileCompleteSetupParams < Sentdm::Internal::Type::BaseModel
14
14
  extend Sentdm::Internal::Type::RequestParameters::Converter
15
15
  include Sentdm::Internal::Type::RequestParameters
16
16
 
@@ -0,0 +1,5 @@
1
+ module Sentdm
2
+ module Models
3
+ ProfileCompleteSetupResponse: Sentdm::Internal::Type::Converter
4
+ end
5
+ end