Class: Twilio::REST::Lookups::V2::LookupOverrideInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Lookups::V2::LookupOverrideInstance
- Defined in:
- lib/twilio-ruby/rest/lookups/v2/lookup_override.rb
Instance Method Summary collapse
-
#bucket ⇒ String
Name of the bucket.
-
#code ⇒ String
Twilio-specific error code.
-
#context ⇒ LookupOverrideContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#create(overrides_request: :unset) ⇒ LookupOverrideInstance
Create the LookupOverrideInstance.
-
#delete ⇒ Boolean
Delete the LookupOverrideInstance.
-
#fetch ⇒ LookupOverrideInstance
Fetch the LookupOverrideInstance.
-
#field ⇒ String
Limit of requests for the bucket.
-
#initialize(version, payload, field: nil, phone_number: nil) ⇒ LookupOverrideInstance
constructor
Initialize the LookupOverrideInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#limit ⇒ String
Limit of requests for the bucket.
-
#message ⇒ String
Error message.
-
#more_info ⇒ String
Link to Error Code References.
-
#original_line_type ⇒ String
The original line type.
-
#overridden_by_account_sid ⇒ String
The Account SID for the user who made the override.
-
#overridden_line_type ⇒ String
The new line type after the override.
-
#override_reason ⇒ String
The reason for the override.
- #override_timestamp ⇒ Time
-
#owner ⇒ String
Owner of the rule.
-
#phone_number ⇒ String
The phone number for which the override was created.
-
#status ⇒ String
HTTP response status code.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#ttl ⇒ String
Time to live of the rule.
-
#update(overrides_request: :unset) ⇒ LookupOverrideInstance
Update the LookupOverrideInstance.
Constructor Details
#initialize(version, payload, field: nil, phone_number: nil) ⇒ LookupOverrideInstance
Initialize the LookupOverrideInstance
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 359 def initialize(version, payload , field: nil, phone_number: nil) super(version) # Marshaled Properties @properties = { 'phone_number' => payload['phone_number'], 'original_line_type' => payload['original_line_type'], 'overridden_line_type' => payload['overridden_line_type'], 'override_reason' => payload['override_reason'], 'override_timestamp' => Twilio.deserialize_iso8601_datetime(payload['override_timestamp']), 'overridden_by_account_sid' => payload['overridden_by_account_sid'], 'code' => payload['code'], 'message' => payload['message'], 'more_info' => payload['more_info'], 'status' => payload['status'], 'field' => payload['field'], 'limit' => payload['limit'], 'bucket' => payload['bucket'], 'owner' => payload['owner'], 'ttl' => payload['ttl'], } # Context @instance_context = nil @params = { 'field' => field || @properties['field'] ,'phone_number' => phone_number || @properties['phone_number'] , } end |
Instance Method Details
#bucket ⇒ String
Returns Name of the bucket.
472 473 474 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 472 def bucket @properties['bucket'] end |
#code ⇒ String
Returns Twilio-specific error code.
436 437 438 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 436 def code @properties['code'] end |
#context ⇒ LookupOverrideContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
391 392 393 394 395 396 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 391 def context unless @instance_context @instance_context = LookupOverrideContext.new(@version , @params['field'], @params['phone_number']) end @instance_context end |
#create(overrides_request: :unset) ⇒ LookupOverrideInstance
Create the LookupOverrideInstance
492 493 494 495 496 497 498 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 492 def create(overrides_request: :unset ) context.create( overrides_request: overrides_request, ) end |
#delete ⇒ Boolean
Delete the LookupOverrideInstance
503 504 505 506 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 503 def delete context.delete end |
#fetch ⇒ LookupOverrideInstance
Fetch the LookupOverrideInstance
511 512 513 514 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 511 def fetch context.fetch end |
#field ⇒ String
Returns Limit of requests for the bucket.
460 461 462 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 460 def field @properties['field'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
537 538 539 540 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 537 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Lookups.V2.LookupOverrideInstance #{values}>" end |
#limit ⇒ String
Returns Limit of requests for the bucket.
466 467 468 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 466 def limit @properties['limit'] end |
#message ⇒ String
Returns Error message.
442 443 444 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 442 def @properties['message'] end |
#more_info ⇒ String
Returns Link to Error Code References.
448 449 450 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 448 def more_info @properties['more_info'] end |
#original_line_type ⇒ String
Returns The original line type.
406 407 408 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 406 def original_line_type @properties['original_line_type'] end |
#overridden_by_account_sid ⇒ String
Returns The Account SID for the user who made the override.
430 431 432 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 430 def overridden_by_account_sid @properties['overridden_by_account_sid'] end |
#overridden_line_type ⇒ String
Returns The new line type after the override.
412 413 414 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 412 def overridden_line_type @properties['overridden_line_type'] end |
#override_reason ⇒ String
Returns The reason for the override.
418 419 420 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 418 def override_reason @properties['override_reason'] end |
#override_timestamp ⇒ Time
424 425 426 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 424 def @properties['override_timestamp'] end |
#owner ⇒ String
Returns Owner of the rule.
478 479 480 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 478 def owner @properties['owner'] end |
#phone_number ⇒ String
Returns The phone number for which the override was created.
400 401 402 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 400 def phone_number @properties['phone_number'] end |
#status ⇒ String
Returns HTTP response status code.
454 455 456 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 454 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
530 531 532 533 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 530 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Lookups.V2.LookupOverrideInstance #{values}>" end |
#ttl ⇒ String
Returns Time to live of the rule.
484 485 486 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 484 def ttl @properties['ttl'] end |
#update(overrides_request: :unset) ⇒ LookupOverrideInstance
Update the LookupOverrideInstance
520 521 522 523 524 525 526 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 520 def update(overrides_request: :unset ) context.update( overrides_request: overrides_request, ) end |