Class: Twilio::REST::Numbers::V1::PortingPortInPhoneNumberInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Numbers::V1::PortingPortInPhoneNumberInstance
- Defined in:
- lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the account that the phone number belongs to.
-
#context ⇒ PortingPortInPhoneNumberContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#country ⇒ String
The country of the phone number.
-
#date_created ⇒ Time
The date when the phone number was created.
-
#delete ⇒ Boolean
Delete the PortingPortInPhoneNumberInstance.
-
#fetch ⇒ PortingPortInPhoneNumberInstance
Fetch the PortingPortInPhoneNumberInstance.
-
#initialize(version, payload, port_in_request_sid: nil, phone_number_sid: nil) ⇒ PortingPortInPhoneNumberInstance
constructor
Initialize the PortingPortInPhoneNumberInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#last_updated ⇒ Time
The timestamp when the status was last updated.
-
#missing_required_fields ⇒ Boolean
The phone number is missing required fields.
-
#not_portability_reason ⇒ String
The reason why the phone number is not portable.
-
#not_portability_reason_code ⇒ String
The code of the reason why the phone number is not portable.
-
#phone_number ⇒ String
The phone number.
-
#phone_number_sid ⇒ String
The SID of the Port In request phone number.
-
#phone_number_type ⇒ String
The type of the phone number.
-
#port_in_phone_number_status ⇒ String
The status of the phone number in the port in request.
-
#port_in_request_sid ⇒ String
The SID of the Port In request.
-
#port_out_pin ⇒ String
The pin required for the losing carrier to port out the phone number.
-
#portable ⇒ Boolean
The phone number is portable.
-
#rejection_reason ⇒ String
The rejection reason returned by the vendor.
-
#rejection_reason_code ⇒ String
The rejection reason code returned by the vendor.
-
#to_s ⇒ Object
Provide a user friendly representation.
- #url ⇒ String
Constructor Details
#initialize(version, payload, port_in_request_sid: nil, phone_number_sid: nil) ⇒ PortingPortInPhoneNumberInstance
Initialize the PortingPortInPhoneNumberInstance
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 139 def initialize(version, payload , port_in_request_sid: nil, phone_number_sid: nil) super(version) # Marshaled Properties @properties = { 'port_in_request_sid' => payload['port_in_request_sid'], 'phone_number_sid' => payload['phone_number_sid'], 'url' => payload['url'], 'account_sid' => payload['account_sid'], 'phone_number_type' => payload['phone_number_type'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'country' => payload['country'], 'missing_required_fields' => payload['missing_required_fields'], 'last_updated' => Twilio.deserialize_iso8601_datetime(payload['last_updated']), 'phone_number' => payload['phone_number'], 'portable' => payload['portable'], 'not_portability_reason' => payload['not_portability_reason'], 'not_portability_reason_code' => payload['not_portability_reason_code'] == nil ? payload['not_portability_reason_code'] : payload['not_portability_reason_code'].to_i, 'port_in_phone_number_status' => payload['port_in_phone_number_status'], 'port_out_pin' => payload['port_out_pin'] == nil ? payload['port_out_pin'] : payload['port_out_pin'].to_i, 'rejection_reason' => payload['rejection_reason'], 'rejection_reason_code' => payload['rejection_reason_code'] == nil ? payload['rejection_reason_code'] : payload['rejection_reason_code'].to_i, } # 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 |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the account that the phone number belongs to.
199 200 201 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 199 def account_sid @properties['account_sid'] end |
#context ⇒ PortingPortInPhoneNumberContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
172 173 174 175 176 177 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 172 def context unless @instance_context @instance_context = PortingPortInPhoneNumberContext.new(@version , @params['port_in_request_sid'], @params['phone_number_sid']) end @instance_context end |
#country ⇒ String
Returns The country of the phone number.
217 218 219 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 217 def country @properties['country'] end |
#date_created ⇒ Time
Returns The date when the phone number was created.
211 212 213 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 211 def date_created @properties['date_created'] end |
#delete ⇒ Boolean
Delete the PortingPortInPhoneNumberInstance
284 285 286 287 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 284 def delete context.delete end |
#fetch ⇒ PortingPortInPhoneNumberInstance
Fetch the PortingPortInPhoneNumberInstance
292 293 294 295 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 292 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
306 307 308 309 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 306 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V1.PortingPortInPhoneNumberInstance #{values}>" end |
#last_updated ⇒ Time
Returns The timestamp when the status was last updated.
229 230 231 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 229 def last_updated @properties['last_updated'] end |
#missing_required_fields ⇒ Boolean
Returns The phone number is missing required fields.
223 224 225 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 223 def missing_required_fields @properties['missing_required_fields'] end |
#not_portability_reason ⇒ String
Returns The reason why the phone number is not portable.
247 248 249 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 247 def not_portability_reason @properties['not_portability_reason'] end |
#not_portability_reason_code ⇒ String
Returns The code of the reason why the phone number is not portable.
253 254 255 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 253 def not_portability_reason_code @properties['not_portability_reason_code'] end |
#phone_number ⇒ String
Returns The phone number.
235 236 237 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 235 def phone_number @properties['phone_number'] end |
#phone_number_sid ⇒ String
Returns The SID of the Port In request phone number. This is a unique identifier of the phone number.
187 188 189 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 187 def phone_number_sid @properties['phone_number_sid'] end |
#phone_number_type ⇒ String
Returns The type of the phone number.
205 206 207 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 205 def phone_number_type @properties['phone_number_type'] end |
#port_in_phone_number_status ⇒ String
Returns The status of the phone number in the port in request.
259 260 261 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 259 def port_in_phone_number_status @properties['port_in_phone_number_status'] end |
#port_in_request_sid ⇒ String
Returns The SID of the Port In request. This is a unique identifier of the port in request.
181 182 183 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 181 def port_in_request_sid @properties['port_in_request_sid'] end |
#port_out_pin ⇒ String
Returns The pin required for the losing carrier to port out the phone number.
265 266 267 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 265 def port_out_pin @properties['port_out_pin'] end |
#portable ⇒ Boolean
Returns The phone number is portable.
241 242 243 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 241 def portable @properties['portable'] end |
#rejection_reason ⇒ String
Returns The rejection reason returned by the vendor.
271 272 273 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 271 def rejection_reason @properties['rejection_reason'] end |
#rejection_reason_code ⇒ String
Returns The rejection reason code returned by the vendor.
277 278 279 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 277 def rejection_reason_code @properties['rejection_reason_code'] end |
#to_s ⇒ Object
Provide a user friendly representation
299 300 301 302 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 299 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V1.PortingPortInPhoneNumberInstance #{values}>" end |
#url ⇒ String
193 194 195 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 193 def url @properties['url'] end |