Class: Telnyx::Resources::Messaging10dlc::CampaignBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/messaging_10dlc/campaign_builder.rb,
lib/telnyx/resources/messaging_10dlc/campaign_builder/brand.rb

Overview

Campaign operations

Defined Under Namespace

Classes: Brand

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CampaignBuilder

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 CampaignBuilder.

Parameters:



115
116
117
118
# File 'lib/telnyx/resources/messaging_10dlc/campaign_builder.rb', line 115

def initialize(client:)
  @client = client
  @brand = Telnyx::Resources::Messaging10dlc::CampaignBuilder::Brand.new(client: client)
end

Instance Attribute Details

#brandTelnyx::Resources::Messaging10dlc::CampaignBuilder::Brand (readonly)

Campaign operations



10
11
12
# File 'lib/telnyx/resources/messaging_10dlc/campaign_builder.rb', line 10

def brand
  @brand
end

Instance Method Details

#submit(brand_id:, description:, usecase:, age_gated: nil, auto_renewal: nil, direct_lending: nil, embedded_link: nil, embedded_link_sample: nil, embedded_phone: nil, help_keywords: nil, help_message: nil, message_flow: nil, mno_ids: nil, number_pool: nil, optin_keywords: nil, optin_message: nil, optout_keywords: nil, optout_message: nil, privacy_policy_link: nil, reference_id: nil, reseller_id: nil, sample1: nil, sample2: nil, sample3: nil, sample4: nil, sample5: nil, subscriber_help: nil, subscriber_optin: nil, subscriber_optout: nil, sub_usecases: nil, tag: nil, terms_and_conditions: nil, terms_and_conditions_link: nil, webhook_failover_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::TelnyxCampaignCsp

Some parameter documentations has been truncated, see Models::Messaging10dlc::CampaignBuilderSubmitParams for more details.

Before creating a campaign, use the [Qualify By Usecase endpoint](developers.telnyx.com/api-reference/campaign/qualify-by-usecase) to ensure that the brand you want to assign a new campaign to is qualified for the desired use case of that campaign. **Please note:** After campaign creation, you’ll only be able to edit the campaign’s sample messages. Creating a campaign will entail an upfront, non-refundable three month’s cost that will depend on the campaign’s use case ([see 10DLC Costs section for details](developers.telnyx.com/api-reference/campaign/get-campaign-cost)).

Parameters:

  • brand_id (String)

    Alphanumeric identifier of the brand associated with this campaign.

  • description (String)

    Summary description of this campaign.

  • usecase (String)

    Campaign usecase. Must be of defined valid types. Use ‘/10dlc/enum/usecase` oper

  • age_gated (Boolean)

    Age gated message content in campaign.

  • auto_renewal (Boolean)

    Campaign subscription auto-renewal option. If set to true, then campaign will au

  • direct_lending (Boolean)

    Direct lending or loan arrangement

  • embedded_link (Boolean)

    Does message generated by the campaign include URL link in SMS?

  • embedded_link_sample (String)

    Sample of an embedded link that will be sent to subscribers.

  • embedded_phone (Boolean)

    Does message generated by the campaign include phone number in SMS?

  • help_keywords (String)

    Subscriber help keywords. Multiple keywords are comma separated without space.

  • help_message (String)

    Help message of the campaign.

  • message_flow (String)

    Message flow description.

  • mno_ids (Array<Integer>)

    Submit campaign to given list of MNOs by MNO’s network ID. Default is all MNOs i

  • number_pool (Boolean)

    Does campaign utilize pool of phone numbers?

  • optin_keywords (String)

    Subscriber opt-in keywords. Multiple keywords are comma separated without space.

  • optin_message (String)

    Subscriber opt-in message.

  • optout_keywords (String)

    Subscriber opt-out keywords. Multiple keywords are comma separated without space

  • optout_message (String)

    Subscriber opt-out message.

  • privacy_policy_link (String)

    Link to the campaign’s privacy policy.

  • reference_id (String)

    Caller supplied campaign reference ID. If supplied, the value must be unique acr

  • reseller_id (String)

    Alphanumeric identifier of the reseller that you want to associate with this cam

  • sample1 (String)

    Message sample. Some campaign tiers require 1 or more message samples.

  • sample2 (String)

    Message sample. Some campaign tiers require 2 or more message samples.

  • sample3 (String)

    Message sample. Some campaign tiers require 3 or more message samples.

  • sample4 (String)

    Message sample. Some campaign tiers require 4 or more message samples.

  • sample5 (String)

    Message sample. Some campaign tiers require 5 or more message samples.

  • subscriber_help (Boolean)

    Does campaign responds to help keyword(s)?

  • subscriber_optin (Boolean)

    Does campaign require subscriber to opt-in before SMS is sent to subscriber?

  • subscriber_optout (Boolean)

    Does campaign support subscriber opt-out keyword(s)?

  • sub_usecases (Array<String>)

    Campaign sub-usecases. Must be of defined valid sub-usecase types. Use ‘/10dlc/e

  • tag (Array<String>)

    Tags to be set on the Campaign.

  • terms_and_conditions (Boolean)

    Is terms and conditions accepted?

  • terms_and_conditions_link (String)

    Link to the campaign’s terms and conditions.

  • webhook_failover_url (String)

    Failover webhook to which campaign status updates are sent.

  • webhook_url (String)

    Webhook to which campaign status updates are sent.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



101
102
103
104
105
106
107
108
109
110
# File 'lib/telnyx/resources/messaging_10dlc/campaign_builder.rb', line 101

def submit(params)
  parsed, options = Telnyx::Messaging10dlc::CampaignBuilderSubmitParams.dump_request(params)
  @client.request(
    method: :post,
    path: "10dlc/campaignBuilder",
    body: parsed,
    model: Telnyx::Messaging10dlc::TelnyxCampaignCsp,
    options: options
  )
end