Class: Telnyx::Resources::Messaging10dlc::Brand
- Inherits:
-
Object
- Object
- Telnyx::Resources::Messaging10dlc::Brand
- Defined in:
- lib/telnyx/resources/messaging_10dlc/brand.rb,
lib/telnyx/resources/messaging_10dlc/brand/external_vetting.rb
Overview
Brand operations
Defined Under Namespace
Classes: ExternalVetting
Instance Attribute Summary collapse
-
#external_vetting ⇒ Telnyx::Resources::Messaging10dlc::Brand::ExternalVetting
readonly
Brand operations.
Instance Method Summary collapse
-
#create(country:, display_name:, email:, entity_type:, vertical:, business_contact_email: nil, city: nil, company_name: nil, ein: nil, first_name: nil, ip_address: nil, is_reseller: nil, last_name: nil, mobile_phone: nil, mock: nil, phone: nil, postal_code: nil, state: nil, stock_exchange: nil, stock_symbol: nil, street: nil, webhook_failover_url: nil, webhook_url: nil, website: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::TelnyxBrand
Some parameter documentations has been truncated, see Models::Messaging10dlc::BrandCreateParams for more details.
-
#delete(brand_id, request_options: {}) ⇒ nil
Delete Brand.
-
#get_feedback(brand_id, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::BrandGetFeedbackResponse
Get feedback about a brand by ID.
-
#get_sms_otp_by_reference(reference_id, brand_id: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::BrandGetSMSOtpByReferenceResponse
Query the status of an SMS OTP (One-Time Password) for Sole Proprietor brand verification.
-
#initialize(client:) ⇒ Brand
constructor
private
A new instance of Brand.
-
#list(brand_id: nil, country: nil, display_name: nil, entity_type: nil, page: nil, records_per_page: nil, sort: nil, state: nil, tcr_brand_id: nil, request_options: {}) ⇒ Telnyx::Internal::PerPagePaginationV2<Telnyx::Models::Messaging10dlc::BrandListResponse>
Some parameter documentations has been truncated, see Models::Messaging10dlc::BrandListParams for more details.
-
#resend_2fa_email(brand_id, request_options: {}) ⇒ nil
Resend brand 2FA email.
-
#retrieve(brand_id, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::BrandRetrieveResponse
Retrieve a brand by ‘brandId`.
-
#retrieve_sms_otp_status(brand_id, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::BrandRetrieveSMSOtpStatusResponse
Query the status of an SMS OTP (One-Time Password) for Sole Proprietor brand verification using the Brand ID.
-
#revet(brand_id, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::TelnyxBrand
This operation allows you to revet the brand.
-
#trigger_sms_otp(brand_id, pin_sms:, success_sms:, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::BrandTriggerSMSOtpResponse
Some parameter documentations has been truncated, see Models::Messaging10dlc::BrandTriggerSMSOtpParams for more details.
-
#update(brand_id, country:, display_name:, email:, entity_type:, vertical:, alt_business_id: nil, alt_business_id_type: nil, business_contact_email: nil, city: nil, company_name: nil, ein: nil, first_name: nil, identity_status: nil, ip_address: nil, is_reseller: nil, last_name: nil, phone: nil, postal_code: nil, state: nil, stock_exchange: nil, stock_symbol: nil, street: nil, webhook_failover_url: nil, webhook_url: nil, website: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::TelnyxBrand
Some parameter documentations has been truncated, see Models::Messaging10dlc::BrandUpdateParams for more details.
-
#verify_sms_otp(brand_id, otp_pin:, request_options: {}) ⇒ nil
Verify the SMS OTP (One-Time Password) for Sole Proprietor brand verification.
Constructor Details
#initialize(client:) ⇒ Brand
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Brand.
483 484 485 486 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 483 def initialize(client:) @client = client @external_vetting = Telnyx::Resources::Messaging10dlc::Brand::ExternalVetting.new(client: client) end |
Instance Attribute Details
#external_vetting ⇒ Telnyx::Resources::Messaging10dlc::Brand::ExternalVetting (readonly)
Brand operations
10 11 12 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 10 def external_vetting @external_vetting end |
Instance Method Details
#create(country:, display_name:, email:, entity_type:, vertical:, business_contact_email: nil, city: nil, company_name: nil, ein: nil, first_name: nil, ip_address: nil, is_reseller: nil, last_name: nil, mobile_phone: nil, mock: nil, phone: nil, postal_code: nil, state: nil, stock_exchange: nil, stock_symbol: nil, street: nil, webhook_failover_url: nil, webhook_url: nil, website: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::TelnyxBrand
Some parameter documentations has been truncated, see Models::Messaging10dlc::BrandCreateParams for more details.
This endpoint is used to create a new brand. A brand is an entity created by The Campaign Registry (TCR) that represents an organization or a company. It is this entity that TCR created campaigns will be associated with. Each brand creation will entail an upfront, non-refundable $4 expense.
75 76 77 78 79 80 81 82 83 84 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 75 def create(params) parsed, = Telnyx::Messaging10dlc::BrandCreateParams.dump_request(params) @client.request( method: :post, path: "10dlc/brand", body: parsed, model: Telnyx::Messaging10dlc::TelnyxBrand, options: ) end |
#delete(brand_id, request_options: {}) ⇒ nil
Delete Brand. This endpoint is used to delete a brand. Note the brand cannot be deleted if it contains one or more active campaigns, the campaigns need to be inactive and at least 3 months old due to billing purposes.
243 244 245 246 247 248 249 250 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 243 def delete(brand_id, params = {}) @client.request( method: :delete, path: ["10dlc/brand/%1$s", brand_id], model: NilClass, options: params[:request_options] ) end |
#get_feedback(brand_id, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::BrandGetFeedbackResponse
Get feedback about a brand by ID. This endpoint can be used after creating or revetting a brand.
Possible values for ‘.category[].id`:
-
‘TAX_ID` - Data mismatch related to tax id and its associated properties.
-
‘STOCK_SYMBOL` - Non public entity registered as a public for profit entity or the stock information mismatch.
-
‘GOVERNMENT_ENTITY` - Non government entity registered as a government entity. Must be a U.S. government entity.
-
‘NONPROFIT` - Not a recognized non-profit entity. No IRS tax-exempt status found.
-
‘OTHERS` - Details of the data misrepresentation if any.
275 276 277 278 279 280 281 282 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 275 def get_feedback(brand_id, params = {}) @client.request( method: :get, path: ["10dlc/brand/feedback/%1$s", brand_id], model: Telnyx::Models::Messaging10dlc::BrandGetFeedbackResponse, options: params[:request_options] ) end |
#get_sms_otp_by_reference(reference_id, brand_id: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::BrandGetSMSOtpByReferenceResponse
Query the status of an SMS OTP (One-Time Password) for Sole Proprietor brand verification.
This endpoint allows you to check the delivery and verification status of an OTP sent during the Sole Proprietor brand verification process. You can query by either:
-
‘referenceId` - The reference ID returned when the OTP was initially triggered
-
‘brandId` - Query parameter for portal users to look up OTP status by Brand ID
The response includes delivery status, verification dates, and detailed delivery information.
308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 308 def get_sms_otp_by_reference(reference_id, params = {}) parsed, = Telnyx::Messaging10dlc::BrandGetSMSOtpByReferenceParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["10dlc/brand/smsOtp/%1$s", reference_id], query: query.transform_keys(brand_id: "brandId"), model: Telnyx::Models::Messaging10dlc::BrandGetSMSOtpByReferenceResponse, options: ) end |
#list(brand_id: nil, country: nil, display_name: nil, entity_type: nil, page: nil, records_per_page: nil, sort: nil, state: nil, tcr_brand_id: nil, request_options: {}) ⇒ Telnyx::Internal::PerPagePaginationV2<Telnyx::Models::Messaging10dlc::BrandListResponse>
Some parameter documentations has been truncated, see Models::Messaging10dlc::BrandListParams for more details.
This endpoint is used to list all brands associated with your organization.
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 211 def list(params = {}) parsed, = Telnyx::Messaging10dlc::BrandListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "10dlc/brand", query: query.transform_keys( brand_id: "brandId", display_name: "displayName", entity_type: "entityType", records_per_page: "recordsPerPage", tcr_brand_id: "tcrBrandId" ), page: Telnyx::Internal::PerPagePaginationV2, model: Telnyx::Models::Messaging10dlc::BrandListResponse, options: ) end |
#resend_2fa_email(brand_id, request_options: {}) ⇒ nil
Resend brand 2FA email
331 332 333 334 335 336 337 338 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 331 def resend_2fa_email(brand_id, params = {}) @client.request( method: :post, path: ["10dlc/brand/%1$s/2faEmail", brand_id], model: NilClass, options: params[:request_options] ) end |
#retrieve(brand_id, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::BrandRetrieveResponse
Retrieve a brand by ‘brandId`.
97 98 99 100 101 102 103 104 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 97 def retrieve(brand_id, params = {}) @client.request( method: :get, path: ["10dlc/brand/%1$s", brand_id], model: Telnyx::Models::Messaging10dlc::BrandRetrieveResponse, options: params[:request_options] ) end |
#retrieve_sms_otp_status(brand_id, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::BrandRetrieveSMSOtpStatusResponse
Query the status of an SMS OTP (One-Time Password) for Sole Proprietor brand verification using the Brand ID.
This endpoint allows you to check the delivery and verification status of an OTP sent during the Sole Proprietor brand verification process by looking it up with the brand ID.
The response includes delivery status, verification dates, and detailed delivery information.
Note: This is an alternative to the ‘/10dlc/brand/smsOtp/referenceId` endpoint when you have the Brand ID but not the reference ID.
362 363 364 365 366 367 368 369 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 362 def retrieve_sms_otp_status(brand_id, params = {}) @client.request( method: :get, path: ["10dlc/brand/%1$s/smsOtp", brand_id], model: Telnyx::Models::Messaging10dlc::BrandRetrieveSMSOtpStatusResponse, options: params[:request_options] ) end |
#revet(brand_id, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::TelnyxBrand
This operation allows you to revet the brand. However, revetting is allowed once after the successful brand registration and thereafter limited to once every 3 months.
384 385 386 387 388 389 390 391 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 384 def revet(brand_id, params = {}) @client.request( method: :put, path: ["10dlc/brand/%1$s/revet", brand_id], model: Telnyx::Messaging10dlc::TelnyxBrand, options: params[:request_options] ) end |
#trigger_sms_otp(brand_id, pin_sms:, success_sms:, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::BrandTriggerSMSOtpResponse
Some parameter documentations has been truncated, see Models::Messaging10dlc::BrandTriggerSMSOtpParams for more details.
Trigger or re-trigger an SMS OTP (One-Time Password) for Sole Proprietor brand verification.
**Important Notes:**
-
Only allowed for Sole Proprietor (‘SOLE_PROPRIETOR`) brands
-
Triggers generation of a one-time password sent to the ‘mobilePhone` number in the brand’s profile
-
Campaigns cannot be created until OTP verification is complete
-
US/CA numbers only for real OTPs; mock brands can use non-US/CA numbers for testing
-
Returns a ‘referenceId` that can be used to check OTP status via the GET `/10dlc/brand/smsOtp/referenceId` endpoint
**Use Cases:**
-
Initial OTP trigger after Sole Proprietor brand creation
-
Re-triggering OTP if the user didn’t receive or needs a new code
428 429 430 431 432 433 434 435 436 437 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 428 def trigger_sms_otp(brand_id, params) parsed, = Telnyx::Messaging10dlc::BrandTriggerSMSOtpParams.dump_request(params) @client.request( method: :post, path: ["10dlc/brand/%1$s/smsOtp", brand_id], body: parsed, model: Telnyx::Models::Messaging10dlc::BrandTriggerSMSOtpResponse, options: ) end |
#update(brand_id, country:, display_name:, email:, entity_type:, vertical:, alt_business_id: nil, alt_business_id_type: nil, business_contact_email: nil, city: nil, company_name: nil, ein: nil, first_name: nil, identity_status: nil, ip_address: nil, is_reseller: nil, last_name: nil, phone: nil, postal_code: nil, state: nil, stock_exchange: nil, stock_symbol: nil, street: nil, webhook_failover_url: nil, webhook_url: nil, website: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::TelnyxBrand
Some parameter documentations has been truncated, see Models::Messaging10dlc::BrandUpdateParams for more details.
Update a brand’s attributes by ‘brandId`.
170 171 172 173 174 175 176 177 178 179 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 170 def update(brand_id, params) parsed, = Telnyx::Messaging10dlc::BrandUpdateParams.dump_request(params) @client.request( method: :put, path: ["10dlc/brand/%1$s", brand_id], body: parsed, model: Telnyx::Messaging10dlc::TelnyxBrand, options: ) end |
#verify_sms_otp(brand_id, otp_pin:, request_options: {}) ⇒ nil
Verify the SMS OTP (One-Time Password) for Sole Proprietor brand verification.
**Verification Flow:**
-
User receives OTP via SMS after triggering
-
User submits the OTP pin through this endpoint
-
Upon successful verification:
-
A ‘BRAND_OTP_VERIFIED` webhook event is sent to the CSP
-
The brand’s ‘identityStatus` changes to `VERIFIED`
-
Campaigns can now be created for this brand
-
**Error Handling:**
Provides proper error responses for:
-
Invalid OTP pins
-
Expired OTPs
-
OTP verification failures
469 470 471 472 473 474 475 476 477 478 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 469 def verify_sms_otp(brand_id, params) parsed, = Telnyx::Messaging10dlc::BrandVerifySMSOtpParams.dump_request(params) @client.request( method: :put, path: ["10dlc/brand/%1$s/smsOtp", brand_id], body: parsed, model: NilClass, options: ) end |