## # 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 PortingPortInPhoneNumberList < ListResource ## # Initialize the PortingPortInPhoneNumberList # @param [Version] version Version that contains the resource # @return [PortingPortInPhoneNumberList] PortingPortInPhoneNumberList def initialize(version) super(version) # Path Solution @solution = { } end # Provide a user friendly representation def to_s '#' end end class PortingPortInPhoneNumberContext < InstanceContext ## # Initialize the PortingPortInPhoneNumberContext # @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. # @param [String] phone_number_sid The SID of the Port In request phone number. This is a unique identifier of the phone number. # @return [PortingPortInPhoneNumberContext] PortingPortInPhoneNumberContext def initialize(version, port_in_request_sid, phone_number_sid) super(version) # Path Solution @solution = { port_in_request_sid: port_in_request_sid, phone_number_sid: phone_number_sid, } @uri = "/Porting/PortIn/#{@solution[:port_in_request_sid]}/PhoneNumber/#{@solution[:phone_number_sid]}" end ## # Delete the PortingPortInPhoneNumberInstance # @return [Boolean] True if delete succeeds, false otherwise def delete @version.delete('DELETE', @uri) 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 PortingPortInPhoneNumberPage < Page ## # Initialize the PortingPortInPhoneNumberPage # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @return [PortingPortInPhoneNumberPage] PortingPortInPhoneNumberPage def initialize(version, response, solution) super(version, response) # Path Solution @solution = solution end ## # Build an instance of PortingPortInPhoneNumberInstance # @param [Hash] payload Payload response from the API # @return [PortingPortInPhoneNumberInstance] PortingPortInPhoneNumberInstance def get_instance(payload) PortingPortInPhoneNumberInstance.new(@version, payload) end ## # Provide a user friendly representation def to_s '' end end class PortingPortInPhoneNumberInstance < InstanceResource ## # Initialize the PortingPortInPhoneNumberInstance # @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 PortingPortInPhoneNumber # resource. # @param [String] sid The SID of the Call resource to fetch. # @return [PortingPortInPhoneNumberInstance] PortingPortInPhoneNumberInstance def initialize(version , port_in_request_sid: nil, phone_number_sid: nil) super(version) # Context @instance_context = nil @params = { 'port_in_request_sid' => port_in_request_sid || @properties['port_in_request_sid'] ,'phone_number_sid' => phone_number_sid || @properties['phone_number_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 [PortingPortInPhoneNumberContext] CallContext for this CallInstance def context unless @instance_context @instance_context = PortingPortInPhoneNumberContext.new(@version , @params['port_in_request_sid'], @params['phone_number_sid']) end @instance_context end ## # Delete the PortingPortInPhoneNumberInstance # @return [Boolean] True if delete succeeds, false otherwise def delete context.delete 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