Class: Twilio::REST::Memory::V1::StoreInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Memory::V1::StoreInstance
- Defined in:
- lib/twilio-ruby/rest/memory/v1/store.rb
Instance Method Summary collapse
-
#context ⇒ StoreContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete ⇒ Boolean
Delete the StoreInstance.
-
#description ⇒ String
A human readable description of this resource, up to 128 characters.
-
#display_name ⇒ String
Provides a unique and addressable name to be assigned to this Store.
-
#fetch ⇒ StoreInstance
Fetch the StoreInstance.
-
#id ⇒ String
The unique identifier for the Memory Store.
-
#initialize(version, payload, store_id: nil) ⇒ StoreInstance
constructor
Initialize the StoreInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#intelligence_service_id ⇒ String
The ID of the associated intelligence service that was provisioned for memory extraction.
- #message ⇒ String
- #meta ⇒ Meta
-
#patch(if_match: :unset, patch_store_request: :unset) ⇒ StoreInstance
Patch the StoreInstance.
-
#status ⇒ String
The current status of the Memory Store.
-
#status_url ⇒ String
URI to check operation status.
-
#stores ⇒ Array<String>
List of Memory Store IDs associated with the Twilio account.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#version ⇒ String
The current version number of the Memory Store.
Constructor Details
#initialize(version, payload, store_id: nil) ⇒ StoreInstance
Initialize the StoreInstance
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 601 def initialize(version, payload , store_id: nil) apiV1Version = ApiV1Version.new version.domain, version super(apiV1Version) # Marshaled Properties @properties = { 'message' => payload['message'], 'status_url' => payload['status_url'], 'display_name' => payload['display_name'], 'description' => payload['description'], 'id' => payload['id'], 'status' => payload['status'], 'intelligence_service_id' => payload['intelligence_service_id'], 'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i, 'stores' => payload['stores'], 'meta' => payload['meta'], } # Context @instance_context = nil @params = { 'store_id' => store_id || @properties['store_id'] , } end |
Instance Method Details
#context ⇒ StoreContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
629 630 631 632 633 634 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 629 def context unless @instance_context @instance_context = StoreContext.new(@version , @params['store_id']) end @instance_context end |
#delete ⇒ Boolean
Delete the StoreInstance
699 700 701 702 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 699 def delete context.delete end |
#description ⇒ String
Returns A human readable description of this resource, up to 128 characters.
656 657 658 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 656 def description @properties['description'] end |
#display_name ⇒ String
Returns Provides a unique and addressable name to be assigned to this Store. This name is assigned by the developer and can be used in addition to the ID. It is intended to be human-readable and unique within the account.
650 651 652 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 650 def display_name @properties['display_name'] end |
#fetch ⇒ StoreInstance
Fetch the StoreInstance
707 708 709 710 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 707 def fetch context.fetch end |
#id ⇒ String
Returns The unique identifier for the Memory Store.
662 663 664 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 662 def id @properties['id'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
737 738 739 740 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 737 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Memory.V1.StoreInstance #{values}>" end |
#intelligence_service_id ⇒ String
Returns The ID of the associated intelligence service that was provisioned for memory extraction.
674 675 676 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 674 def intelligence_service_id @properties['intelligence_service_id'] end |
#message ⇒ String
638 639 640 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 638 def @properties['message'] end |
#meta ⇒ Meta
692 693 694 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 692 def @properties['meta'] end |
#patch(if_match: :unset, patch_store_request: :unset) ⇒ StoreInstance
Patch the StoreInstance
717 718 719 720 721 722 723 724 725 726 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 717 def patch( if_match: :unset, patch_store_request: :unset ) context.patch( if_match: if_match, patch_store_request: patch_store_request, ) end |
#status ⇒ String
Returns The current status of the Memory Store. A store begins in the QUEUED state as it is scheduled for processing. It then moves to PROVISIONING at the beginning of processing. It transitions to ACTIVE once all dependent resources are provisioned, including Conversational Intelligence capabilities. If there is an issue provisioning resources, the store will move to the FAILED state.
668 669 670 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 668 def status @properties['status'] end |
#status_url ⇒ String
Returns URI to check operation status.
644 645 646 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 644 def status_url @properties['status_url'] end |
#stores ⇒ Array<String>
Returns List of Memory Store IDs associated with the Twilio account.
686 687 688 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 686 def stores @properties['stores'] end |
#to_s ⇒ Object
Provide a user friendly representation
730 731 732 733 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 730 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Memory.V1.StoreInstance #{values}>" end |
#version ⇒ String
Returns The current version number of the Memory Store. Incremented on each successful update.
680 681 682 |
# File 'lib/twilio-ruby/rest/memory/v1/store.rb', line 680 def version @properties['version'] end |