Class: Twilio::REST::Numbers::V1::PortingPortInFetchInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, port_in_request_sid: nil) ⇒ PortingPortInFetchInstance

Initialize the PortingPortInFetchInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this PortingPortInFetch resource.

  • sid (String)

    The SID of the Call resource to fetch.



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 128

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

Instance Method Details

#account_sidString

Returns The Account SID that the numbers will be added to after they are ported into Twilio.

Returns:

  • (String)

    The Account SID that the numbers will be added to after they are ported into Twilio.



175
176
177
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 175

def 
    @properties['account_sid']
end

#contextPortingPortInFetchContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



154
155
156
157
158
159
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 154

def context
    unless @instance_context
        @instance_context = PortingPortInFetchContext.new(@version , @params['port_in_request_sid'])
    end
    @instance_context
end

#documentsArray<String>

Returns The list of documents SID referencing a utility bills.

Returns:

  • (Array<String>)

    The list of documents SID referencing a utility bills



217
218
219
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 217

def documents
    @properties['documents']
end

#fetchPortingPortInFetchInstance

Fetch the PortingPortInFetchInstance

Returns:



224
225
226
227
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 224

def fetch

    context.fetch
end

#inspectObject

Provide a detailed, user friendly representation



238
239
240
241
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 238

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Numbers.V1.PortingPortInFetchInstance #{values}>"
end

#losing_carrier_informationHash

Returns The information for the losing carrier.

Returns:

  • (Hash)

    The information for the losing carrier.



205
206
207
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 205

def losing_carrier_information
    @properties['losing_carrier_information']
end

#notification_emailsArray<String>

Returns List of emails for getting notifications about the LOA signing process. Allowed Max 10 emails.

Returns:

  • (Array<String>)

    List of emails for getting notifications about the LOA signing process. Allowed Max 10 emails.



181
182
183
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 181

def notification_emails
    @properties['notification_emails']
end

#phone_numbersArray<Hash>

Returns The list of phone numbers to Port in. Phone numbers are in E.164 format (e.g. +16175551212).

Returns:

  • (Array<Hash>)

    The list of phone numbers to Port in. Phone numbers are in E.164 format (e.g. +16175551212).



211
212
213
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 211

def phone_numbers
    @properties['phone_numbers']
end

#port_in_request_sidString

Returns The SID of the Port In request. This is a unique identifier of the port in request.

Returns:

  • (String)

    The SID of the Port In request. This is a unique identifier of the port in request.



163
164
165
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 163

def port_in_request_sid
    @properties['port_in_request_sid']
end

#target_port_in_dateDate

Returns Minimum number of days in the future (at least 2 days) needs to be established with the Ops team for validation.

Returns:

  • (Date)

    Minimum number of days in the future (at least 2 days) needs to be established with the Ops team for validation.



187
188
189
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 187

def target_port_in_date
    @properties['target_port_in_date']
end

#target_port_in_time_range_endString

Returns Maximum hour in the future needs to be established with the Ops team for validation.

Returns:

  • (String)

    Maximum hour in the future needs to be established with the Ops team for validation.



199
200
201
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 199

def target_port_in_time_range_end
    @properties['target_port_in_time_range_end']
end

#target_port_in_time_range_startString

Returns Minimum hour in the future needs to be established with the Ops team for validation.

Returns:

  • (String)

    Minimum hour in the future needs to be established with the Ops team for validation.



193
194
195
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 193

def target_port_in_time_range_start
    @properties['target_port_in_time_range_start']
end

#to_sObject

Provide a user friendly representation



231
232
233
234
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 231

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Numbers.V1.PortingPortInFetchInstance #{values}>"
end

#urlString

Returns The URL of this Port In request.

Returns:

  • (String)

    The URL of this Port In request



169
170
171
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb', line 169

def url
    @properties['url']
end