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
Defined Under Namespace
Classes: ExternalVetting
Instance Attribute Summary collapse
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.
-
#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.
439 440 441 442 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 439 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)
8 9 10 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 8 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.
73 74 75 76 77 78 79 80 81 82 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 73 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.
238 239 240 241 242 243 244 245 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 238 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.
269 270 271 272 273 274 275 276 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 269 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 |
#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.
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 208 def list(params = {}) parsed, = Telnyx::Messaging10dlc::BrandListParams.dump_request(params) @client.request( method: :get, path: "10dlc/brand", query: parsed.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
288 289 290 291 292 293 294 295 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 288 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`.
94 95 96 97 98 99 100 101 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 94 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.
319 320 321 322 323 324 325 326 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 319 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.
340 341 342 343 344 345 346 347 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 340 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
384 385 386 387 388 389 390 391 392 393 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 384 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`.
167 168 169 170 171 172 173 174 175 176 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 167 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
425 426 427 428 429 430 431 432 433 434 |
# File 'lib/telnyx/resources/messaging_10dlc/brand.rb', line 425 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 |