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
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 418 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.
531 532 533 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 531 def bucket @properties['bucket'] end |
#code ⇒ String
Returns Twilio-specific error code.
495 496 497 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 495 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
450 451 452 453 454 455 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 450 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
551 552 553 554 555 556 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 551 def create(overrides_request: :unset ) context.create( ) end |
#delete ⇒ Boolean
Delete the LookupOverrideInstance
561 562 563 564 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 561 def delete context.delete end |
#fetch ⇒ LookupOverrideInstance
Fetch the LookupOverrideInstance
569 570 571 572 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 569 def fetch context.fetch end |
#field ⇒ String
Returns Limit of requests for the bucket.
519 520 521 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 519 def field @properties['field'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
594 595 596 597 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 594 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.
525 526 527 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 525 def limit @properties['limit'] end |
#message ⇒ String
Returns Error message.
501 502 503 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 501 def @properties['message'] end |
#more_info ⇒ String
Returns Link to Error Code References.
507 508 509 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 507 def more_info @properties['more_info'] end |
#original_line_type ⇒ String
Returns The original line type.
465 466 467 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 465 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.
489 490 491 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 489 def overridden_by_account_sid @properties['overridden_by_account_sid'] end |
#overridden_line_type ⇒ String
Returns The new line type after the override.
471 472 473 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 471 def overridden_line_type @properties['overridden_line_type'] end |
#override_reason ⇒ String
Returns The reason for the override.
477 478 479 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 477 def override_reason @properties['override_reason'] end |
#override_timestamp ⇒ Time
483 484 485 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 483 def @properties['override_timestamp'] end |
#owner ⇒ String
Returns Owner of the rule.
537 538 539 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 537 def owner @properties['owner'] end |
#phone_number ⇒ String
Returns The phone number for which the override was created.
459 460 461 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 459 def phone_number @properties['phone_number'] end |
#status ⇒ String
Returns HTTP response status code.
513 514 515 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 513 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
587 588 589 590 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 587 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.
543 544 545 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 543 def ttl @properties['ttl'] end |
#update(overrides_request: :unset) ⇒ LookupOverrideInstance
Update the LookupOverrideInstance
578 579 580 581 582 583 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 578 def update(overrides_request: :unset ) context.update( ) end |