## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / # # frozen_string_literal: true module Twilio module REST class Messaging < Domain class V1 < Version ## # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. class ExternalCampaignList < ListResource ## # Initialize the ExternalCampaignList # @param [Version] version Version that contains the resource # @return [ExternalCampaignList] ExternalCampaignList def initialize(version) super(version) # Path Solution @solution = {} @uri = "/Services/PreregisteredUsa2p" end ## # Create the ExternalCampaignInstance # @param [String] campaign_id ID of the preregistered campaign. # @param [String] messaging_service_sid The SID of the {Messaging # Service}[https://www.twilio.com/docs/messaging/services/api] that the resource # is associated with. # @return [ExternalCampaignInstance] Created ExternalCampaignInstance def create(campaign_id: nil, messaging_service_sid: nil) data = Twilio::Values.of({ 'CampaignId' => campaign_id, 'MessagingServiceSid' => messaging_service_sid, }) payload = @version.create('POST', @uri, data: data) ExternalCampaignInstance.new(@version, payload, ) end ## # Provide a user friendly representation def to_s '#' end end ## # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. class ExternalCampaignPage < Page ## # Initialize the ExternalCampaignPage # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @return [ExternalCampaignPage] ExternalCampaignPage def initialize(version, response, solution) super(version, response) # Path Solution @solution = solution end ## # Build an instance of ExternalCampaignInstance # @param [Hash] payload Payload response from the API # @return [ExternalCampaignInstance] ExternalCampaignInstance def get_instance(payload) ExternalCampaignInstance.new(@version, payload, ) end ## # Provide a user friendly representation def to_s '' end end ## # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. class ExternalCampaignInstance < InstanceResource ## # Initialize the ExternalCampaignInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @return [ExternalCampaignInstance] ExternalCampaignInstance def initialize(version, payload) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'campaign_id' => payload['campaign_id'], 'messaging_service_sid' => payload['messaging_service_sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), } end ## # @return [String] The SID of the Account that created the resource def account_sid @properties['account_sid'] end ## # @return [String] ID of the preregistered campaign. def campaign_id @properties['campaign_id'] end ## # @return [String] The SID of the Messaging Service the resource is associated with def messaging_service_sid @properties['messaging_service_sid'] end ## # @return [Time] The ISO 8601 date and time in GMT when the resource was created def date_created @properties['date_created'] end ## # Provide a user friendly representation def to_s "" end ## # Provide a detailed, user friendly representation def inspect "" end end end end end end