Class: Twilio::REST::Numbers::V1::PortingPortInInstance

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

Instance Method Summary collapse

Constructor Details

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

Initialize the PortingPortInInstance

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 PortingPortIn resource.

  • sid (String)

    The SID of the Call resource to fetch.



163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 163

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'],
        'port_in_request_status' => payload['port_in_request_status'],
        'losing_carrier_information' => payload['losing_carrier_information'],
        'phone_numbers' => payload['phone_numbers'],
        'documents' => payload['documents'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
    }

    # 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 Account Sid or subaccount where the phone number(s) will be Ported.

Returns:

  • (String)

    Account Sid or subaccount where the phone number(s) will be Ported



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

def 
    @properties['account_sid']
end

#contextPortingPortInContext

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

Returns:



191
192
193
194
195
196
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 191

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

#date_createdTime

Returns:

  • (Time)


266
267
268
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 266

def date_created
    @properties['date_created']
end

#deleteBoolean

Delete the PortingPortInInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



273
274
275
276
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 273

def delete

    context.delete
end

#documentsArray<String>

Returns List of document SIDs for all phone numbers included in the port in request. At least one document SID referring to a document of the type Utility Bill is required.

Returns:

  • (Array<String>)

    List of document SIDs for all phone numbers included in the port in request. At least one document SID referring to a document of the type Utility Bill is required.



260
261
262
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 260

def documents
    @properties['documents']
end

#fetchPortingPortInInstance

Fetch the PortingPortInInstance

Returns:



281
282
283
284
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 281

def fetch

    context.fetch
end

#inspectObject

Provide a detailed, user friendly representation



295
296
297
298
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 295

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

#losing_carrier_informationHash

Returns Details regarding the customer’s information with the losing carrier. These values will be used to generate the letter of authorization and should match the losing carrier’s data as closely as possible to ensure the port is accepted.

Returns:

  • (Hash)

    Details regarding the customer’s information with the losing carrier. These values will be used to generate the letter of authorization and should match the losing carrier’s data as closely as possible to ensure the port is accepted.



248
249
250
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 248

def losing_carrier_information
    @properties['losing_carrier_information']
end

#notification_emailsArray<String>

Returns Additional emails to send a copy of the signed LOA to.

Returns:

  • (Array<String>)

    Additional emails to send a copy of the signed LOA to.



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

def notification_emails
    @properties['notification_emails']
end

#phone_numbersArray<Hash>

Returns:

  • (Array<Hash>)


254
255
256
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 254

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.



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

def port_in_request_sid
    @properties['port_in_request_sid']
end

#port_in_request_statusString

Returns The status of the port in request. The possible values are: In progress, Completed, Expired, In review, Waiting for Signature, Action Required, and Canceled.

Returns:

  • (String)

    The status of the port in request. The possible values are: In progress, Completed, Expired, In review, Waiting for Signature, Action Required, and Canceled.



242
243
244
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 242

def port_in_request_status
    @properties['port_in_request_status']
end

#target_port_in_dateDate

Returns Target date to port the number. We cannot guarantee that this date will be honored by the other carriers, please work with Ops to get a confirmation of the firm order commitment (FOC) date. Expected format is ISO Local Date, example: ‘2011-12-03`. This date must be at least 7 days in the future for US ports and 10 days in the future for Japanese ports. (This value is only available for custom porting customers.).

Returns:

  • (Date)

    Target date to port the number. We cannot guarantee that this date will be honored by the other carriers, please work with Ops to get a confirmation of the firm order commitment (FOC) date. Expected format is ISO Local Date, example: ‘2011-12-03`. This date must be at least 7 days in the future for US ports and 10 days in the future for Japanese ports. (This value is only available for custom porting customers.)



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

def target_port_in_date
    @properties['target_port_in_date']
end

#target_port_in_time_range_endString

Returns The latest time that the port should occur on the target port in date. Expected format is ISO Offset Time, example: ‘10:15:00-08:00’. (This value is only available for custom porting customers.).

Returns:

  • (String)

    The latest time that the port should occur on the target port in date. Expected format is ISO Offset Time, example: ‘10:15:00-08:00’. (This value is only available for custom porting customers.)



236
237
238
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 236

def target_port_in_time_range_end
    @properties['target_port_in_time_range_end']
end

#target_port_in_time_range_startString

Returns The earliest time that the port should occur on the target port in date. Expected format is ISO Offset Time, example: ‘10:15:00-08:00’. (This value is only available for custom porting customers.).

Returns:

  • (String)

    The earliest time that the port should occur on the target port in date. Expected format is ISO Offset Time, example: ‘10:15:00-08:00’. (This value is only available for custom porting customers.)



230
231
232
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 230

def target_port_in_time_range_start
    @properties['target_port_in_time_range_start']
end

#to_sObject

Provide a user friendly representation



288
289
290
291
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 288

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

#urlString

Returns The URL of this Port In request.

Returns:

  • (String)

    The URL of this Port In request



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

def url
    @properties['url']
end