## # This code was generated by # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ # # Twilio - Numbers # This is the public Twilio REST API. # # NOTE: This class is auto generated by OpenAPI Generator. # https://openapi-generator.tech # Do not edit the class manually. # module Twilio module REST class Numbers < NumbersBase class V1 < Version class PortingPortInFetchList < ListResource ## # Initialize the PortingPortInFetchList # @param [Version] version Version that contains the resource # @return [PortingPortInFetchList] PortingPortInFetchList def initialize(version) super(version) # Path Solution @solution = { } 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 PortingPortInFetchContext < InstanceContext ## # Initialize the PortingPortInFetchContext # @param [Version] version Version that contains the resource # @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request. # @return [PortingPortInFetchContext] PortingPortInFetchContext def initialize(version, port_in_request_sid) super(version) # Path Solution @solution = { port_in_request_sid: port_in_request_sid, } @uri = "/Porting/PortIn/#{@solution[:port_in_request_sid]}" end ## # Fetch the PortingPortInFetchInstance # @return [PortingPortInFetchInstance] Fetched PortingPortInFetchInstance def fetch payload = @version.fetch('GET', @uri) PortingPortInFetchInstance.new( @version, payload, port_in_request_sid: @solution[:port_in_request_sid], ) end ## # Provide a user friendly representation def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#" end ## # Provide a detailed, user friendly representation def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#" end end class PortingPortInFetchPage < Page ## # Initialize the PortingPortInFetchPage # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @return [PortingPortInFetchPage] PortingPortInFetchPage def initialize(version, response, solution) super(version, response) # Path Solution @solution = solution end ## # Build an instance of PortingPortInFetchInstance # @param [Hash] payload Payload response from the API # @return [PortingPortInFetchInstance] PortingPortInFetchInstance def get_instance(payload) PortingPortInFetchInstance.new(@version, payload) end ## # Provide a user friendly representation def to_s '' end end class PortingPortInFetchInstance < InstanceResource ## # Initialize the PortingPortInFetchInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @param [String] account_sid The SID of the # {Account}[https://www.twilio.com/docs/iam/api/account] that created this PortingPortInFetch # resource. # @param [String] sid The SID of the Call resource to fetch. # @return [PortingPortInFetchInstance] PortingPortInFetchInstance def initialize(version, payload , port_in_request_sid: nil) super(version) # Marshaled Properties @properties = { 'port_in_request_sid' => payload['port_in_request_sid'], 'url' => payload['url'], 'account_sid' => payload['account_sid'], 'notification_emails' => payload['notification_emails'], 'target_port_in_date' => Twilio.deserialize_iso8601_date(payload['target_port_in_date']), 'target_port_in_time_range_start' => payload['target_port_in_time_range_start'], 'target_port_in_time_range_end' => payload['target_port_in_time_range_end'], 'losing_carrier_information' => payload['losing_carrier_information'], 'phone_numbers' => payload['phone_numbers'], 'documents' => payload['documents'], } # Context @instance_context = nil @params = { 'port_in_request_sid' => port_in_request_sid || @properties['port_in_request_sid'] , } end ## # Generate an instance context for the instance, the context is capable of # performing various actions. All instance actions are proxied to the context # @return [PortingPortInFetchContext] CallContext for this CallInstance def context unless @instance_context @instance_context = PortingPortInFetchContext.new(@version , @params['port_in_request_sid']) end @instance_context end ## # @return [String] The SID of the Port In request. This is a unique identifier of the port in request. def port_in_request_sid @properties['port_in_request_sid'] end ## # @return [String] The URL of this Port In request def url @properties['url'] end ## # @return [String] The Account SID that the numbers will be added to after they are ported into Twilio. def account_sid @properties['account_sid'] end ## # @return [Array] List of emails for getting notifications about the LOA signing process. Allowed Max 10 emails. def notification_emails @properties['notification_emails'] end ## # @return [Date] Minimum number of days in the future (at least 2 days) needs to be established with the Ops team for validation. def target_port_in_date @properties['target_port_in_date'] end ## # @return [String] Minimum hour in the future needs to be established with the Ops team for validation. def target_port_in_time_range_start @properties['target_port_in_time_range_start'] end ## # @return [String] Maximum hour in the future needs to be established with the Ops team for validation. def target_port_in_time_range_end @properties['target_port_in_time_range_end'] end ## # @return [Hash] The information for the losing carrier. def losing_carrier_information @properties['losing_carrier_information'] end ## # @return [Array] The list of phone numbers to Port in. Phone numbers are in E.164 format (e.g. +16175551212). def phone_numbers @properties['phone_numbers'] end ## # @return [Array] The list of documents SID referencing a utility bills def documents @properties['documents'] end ## # Fetch the PortingPortInFetchInstance # @return [PortingPortInFetchInstance] Fetched PortingPortInFetchInstance def fetch context.fetch end ## # Provide a user friendly representation def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "" end ## # Provide a detailed, user friendly representation def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "" end end end end end end