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
613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 613 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
634 635 636 637 638 639 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 634 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
663 664 665 666 667 668 669 670 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 663 def delete( remove_all: :unset ) context.delete( remove_all: remove_all, ) end |
#fetch ⇒ IdentifierInstance
Fetch the IdentifierInstance
675 676 677 678 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 675 def fetch context.fetch end |
#id_type ⇒ String
Returns Identifier type defined in Identity Resolution Settings.
649 650 651 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 649 def id_type @properties['id_type'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
701 702 703 704 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 701 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Memory.V1.IdentifierInstance #{values}>" end |
#message ⇒ String
643 644 645 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 643 def @properties['message'] end |
#patch(identifier_update: nil) ⇒ IdentifierInstance
Patch the IdentifierInstance
684 685 686 687 688 689 690 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 684 def patch(identifier_update: nil ) context.patch( identifier_update: identifier_update, ) end |
#to_s ⇒ Object
Provide a user friendly representation
694 695 696 697 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 694 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.
655 656 657 |
# File 'lib/twilio-ruby/rest/memory/v1/identifier.rb', line 655 def values @properties['values'] end |