Class: Twilio::REST::Memory::V1::IdentifierInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Memory::V1::IdentifierInstance
- Defined in:
- lib/twilio-ruby/rest/memory/v1/identifier.rb
Instance Method Summary collapse
-
#context ⇒ IdentifierContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete(remove_all: :unset) ⇒ Boolean
Delete the IdentifierInstance.
-
#fetch ⇒ IdentifierInstance
Fetch the IdentifierInstance.
-
#id_type ⇒ String
Identifier type defined in Identity Resolution Settings.
-
#initialize(version, payload, store_id: nil, profile_id: nil, id_type: nil) ⇒ IdentifierInstance
constructor
Initialize the IdentifierInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #message ⇒ String
-
#patch(identifier_update: nil) ⇒ IdentifierInstance
Patch the IdentifierInstance.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#values ⇒ Array<String>
Server managed collection of stored values for the identifier type.
Constructor Details
#initialize(version, payload, store_id: nil, profile_id: nil, id_type: nil) ⇒ IdentifierInstance
Initialize the IdentifierInstance
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 533 def initialize(version, payload , store_id: nil, profile_id: nil, id_type: nil) apiV1Version = ApiV1Version.new version.domain, version super(apiV1Version) # Marshaled Properties @properties = { 'message' => payload['message'], 'id_type' => payload['id_type'], 'values' => payload['values'], } # Context @instance_context = nil @params = { 'store_id' => store_id || @properties['store_id'] ,'profile_id' => profile_id || @properties['profile_id'] ,'id_type' => id_type || @properties['id_type'] , } end |
Instance Method Details
#context ⇒ IdentifierContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
554 555 556 557 558 559 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 554 def context unless @instance_context @instance_context = IdentifierContext.new(@version , @params['store_id'], @params['profile_id'], @params['id_type']) end @instance_context end |
#delete(remove_all: :unset) ⇒ Boolean
Delete the IdentifierInstance
583 584 585 586 587 588 589 590 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 583 def delete( remove_all: :unset ) context.delete( remove_all: remove_all, ) end |
#fetch ⇒ IdentifierInstance
Fetch the IdentifierInstance
595 596 597 598 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 595 def fetch context.fetch end |
#id_type ⇒ String
Returns Identifier type defined in Identity Resolution Settings.
569 570 571 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 569 def id_type @properties['id_type'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
621 622 623 624 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 621 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Memory.V1.IdentifierInstance #{values}>" end |
#message ⇒ String
563 564 565 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 563 def @properties['message'] end |
#patch(identifier_update: nil) ⇒ IdentifierInstance
Patch the IdentifierInstance
604 605 606 607 608 609 610 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 604 def patch(identifier_update: nil ) context.patch( identifier_update: identifier_update, ) end |
#to_s ⇒ Object
Provide a user friendly representation
614 615 616 617 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 614 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Memory.V1.IdentifierInstance #{values}>" end |
#values ⇒ Array<String>
Returns Server managed collection of stored values for the identifier type. Identifier values are normalized according to the corresponding identifier settings and ordered chronologically.
575 576 577 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 575 def values @properties['values'] end |