Class: Telnyx::Resources::Messaging10dlc::PhoneNumberAssignmentByProfile
- Inherits:
-
Object
- Object
- Telnyx::Resources::Messaging10dlc::PhoneNumberAssignmentByProfile
- Defined in:
- lib/telnyx/resources/messaging_10dlc/phone_number_assignment_by_profile.rb,
sig/telnyx/resources/messaging_10dlc/phone_number_assignment_by_profile.rbs
Overview
Phone number campaign bulk assignment
Instance Method Summary collapse
-
#assign(messaging_profile_id:, campaign_id: nil, tcr_campaign_id: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::PhoneNumberAssignmentByProfileAssignResponse
Some parameter documentations has been truncated, see Models::Messaging10dlc::PhoneNumberAssignmentByProfileAssignParams for more details.
-
#initialize(client:) ⇒ PhoneNumberAssignmentByProfile
constructor
private
A new instance of PhoneNumberAssignmentByProfile.
-
#list_phone_number_status(task_id, page: nil, records_per_page: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::PhoneNumberAssignmentByProfileListPhoneNumberStatusResponse
Check the status of the individual phone number/campaign assignments associated with the supplied
taskId. -
#retrieve_phone_number_status(task_id, page: nil, records_per_page: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::PhoneNumberAssignmentByProfileRetrievePhoneNumberStatusResponse
Check the status of the individual phone number/campaign assignments associated with the supplied
taskId. -
#retrieve_status(task_id, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::PhoneNumberAssignmentByProfileRetrieveStatusResponse
Check the status of the task associated with assigning all phone numbers on a messaging profile to a campaign by
taskId.
Constructor Details
#initialize(client:) ⇒ PhoneNumberAssignmentByProfile
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 PhoneNumberAssignmentByProfile.
126 127 128 |
# File 'lib/telnyx/resources/messaging_10dlc/phone_number_assignment_by_profile.rb', line 126 def initialize(client:) @client = client end |
Instance Method Details
#assign(messaging_profile_id:, campaign_id: nil, tcr_campaign_id: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::PhoneNumberAssignmentByProfileAssignResponse
Some parameter documentations has been truncated, see Models::Messaging10dlc::PhoneNumberAssignmentByProfileAssignParams for more details.
This endpoint allows you to link all phone numbers associated with a Messaging
Profile to a campaign. Please note: if you want to assign phone numbers to a
campaign that you did not create with Telnyx 10DLC services, this endpoint
allows that provided that you've shared the campaign with Telnyx. In this case,
only provide the parameter, tcrCampaignId, and not campaignId. In all other
cases (where the campaign you're assigning was created with Telnyx 10DLC
services), only provide campaignId, not tcrCampaignId.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/telnyx/resources/messaging_10dlc/phone_number_assignment_by_profile.rb', line 33 def assign(params) parsed, = Telnyx::Messaging10dlc::PhoneNumberAssignmentByProfileAssignParams.dump_request(params) @client.request( method: :post, path: "10dlc/phoneNumberAssignmentByProfile", body: parsed, model: Telnyx::Models::Messaging10dlc::PhoneNumberAssignmentByProfileAssignResponse, options: ) end |
#list_phone_number_status(task_id, page: nil, records_per_page: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::PhoneNumberAssignmentByProfileListPhoneNumberStatusResponse
Check the status of the individual phone number/campaign assignments associated
with the supplied taskId.
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/telnyx/resources/messaging_10dlc/phone_number_assignment_by_profile.rb', line 60 def list_phone_number_status(task_id, params = {}) parsed, = Telnyx::Messaging10dlc::PhoneNumberAssignmentByProfileListPhoneNumberStatusParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["10dlc/phoneNumberAssignmentByProfile/%1$s/phoneNumbers", task_id], query: query.transform_keys(records_per_page: "recordsPerPage"), model: Telnyx::Models::Messaging10dlc::PhoneNumberAssignmentByProfileListPhoneNumberStatusResponse, options: ) end |
#retrieve_phone_number_status(task_id, page: nil, records_per_page: nil, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::PhoneNumberAssignmentByProfileRetrievePhoneNumberStatusResponse
Check the status of the individual phone number/campaign assignments associated
with the supplied taskId.
89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/telnyx/resources/messaging_10dlc/phone_number_assignment_by_profile.rb', line 89 def retrieve_phone_number_status(task_id, params = {}) parsed, = Telnyx::Messaging10dlc::PhoneNumberAssignmentByProfileRetrievePhoneNumberStatusParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["10dlc/phoneNumberAssignmentByProfile/%1$s/phoneNumbers", task_id], query: query.transform_keys(records_per_page: "recordsPerPage"), model: Telnyx::Models::Messaging10dlc::PhoneNumberAssignmentByProfileRetrievePhoneNumberStatusResponse, options: ) end |
#retrieve_status(task_id, request_options: {}) ⇒ Telnyx::Models::Messaging10dlc::PhoneNumberAssignmentByProfileRetrieveStatusResponse
Check the status of the task associated with assigning all phone numbers on a
messaging profile to a campaign by taskId.
114 115 116 117 118 119 120 121 |
# File 'lib/telnyx/resources/messaging_10dlc/phone_number_assignment_by_profile.rb', line 114 def retrieve_status(task_id, params = {}) @client.request( method: :get, path: ["10dlc/phoneNumberAssignmentByProfile/%1$s", task_id], model: Telnyx::Models::Messaging10dlc::PhoneNumberAssignmentByProfileRetrieveStatusResponse, options: params[:request_options] ) end |