Class: Twilio::REST::Memory::V1

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/memory/v1.rb,
lib/twilio-ruby/rest/memory/v1/bulk.rb,
lib/twilio-ruby/rest/memory/v1/event.rb,
lib/twilio-ruby/rest/memory/v1/store.rb,
lib/twilio-ruby/rest/memory/v1/trait.rb,
lib/twilio-ruby/rest/memory/v1/import.rb,
lib/twilio-ruby/rest/memory/v1/lookup.rb,
lib/twilio-ruby/rest/memory/v1/recall.rb,
lib/twilio-ruby/rest/memory/v1/profile.rb,
lib/twilio-ruby/rest/memory/v1/revision.rb,
lib/twilio-ruby/rest/memory/v1/operation.rb,
lib/twilio-ruby/rest/memory/v1/identifier.rb,
lib/twilio-ruby/rest/memory/v1/observation.rb,
lib/twilio-ruby/rest/memory/v1/trait_group.rb,
lib/twilio-ruby/rest/memory/v1/data_mapping.rb,
lib/twilio-ruby/rest/memory/v1/conversation_summary.rb,
lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb

Defined Under Namespace

Classes: BulkInstance, BulkList, BulkListResponse, BulkPage, BulkPageMetadata, ConversationSummaryContext, ConversationSummaryInstance, ConversationSummaryInstanceMetadata, ConversationSummaryList, ConversationSummaryListResponse, ConversationSummaryPage, ConversationSummaryPageMetadata, DataMappingContext, DataMappingInstance, DataMappingInstanceMetadata, DataMappingList, DataMappingListResponse, DataMappingPage, DataMappingPageMetadata, EventInstance, EventList, EventListResponse, EventPage, EventPageMetadata, IdentifierContext, IdentifierInstance, IdentifierInstanceMetadata, IdentifierList, IdentifierListResponse, IdentifierPage, IdentifierPageMetadata, IdentityResolutionSettingInstance, IdentityResolutionSettingList, IdentityResolutionSettingListResponse, IdentityResolutionSettingPage, IdentityResolutionSettingPageMetadata, ImportContext, ImportInstance, ImportInstanceMetadata, ImportList, ImportListResponse, ImportPage, ImportPageMetadata, LookupInstance, LookupList, LookupListResponse, LookupPage, LookupPageMetadata, ObservationContext, ObservationInstance, ObservationInstanceMetadata, ObservationList, ObservationListResponse, ObservationPage, ObservationPageMetadata, OperationContext, OperationInstance, OperationInstanceMetadata, OperationList, OperationListResponse, OperationPage, OperationPageMetadata, ProfileContext, ProfileInstance, ProfileInstanceMetadata, ProfileList, ProfileListResponse, ProfilePage, ProfilePageMetadata, RecallInstance, RecallList, RecallListResponse, RecallPage, RecallPageMetadata, RevisionInstance, RevisionList, RevisionListResponse, RevisionPage, RevisionPageMetadata, StoreContext, StoreInstance, StoreInstanceMetadata, StoreList, StoreListResponse, StorePage, StorePageMetadata, TraitGroupContext, TraitGroupInstance, TraitGroupInstanceMetadata, TraitGroupList, TraitGroupListResponse, TraitGroupPage, TraitGroupPageMetadata, TraitInstance, TraitList, TraitListResponse, TraitPage, TraitPageMetadata

Instance Attribute Summary

Attributes inherited from Version

#domain, #version

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #create_with_metadata, #delete, #delete_with_metadata, #exception, #fetch, #fetch_with_metadata, #page, #patch, #read_limits, #relative_uri, #request, #stream, #stream_with_metadata, #update, #update_with_metadata

Constructor Details

#initialize(domain) ⇒ V1

Initialize the V1 version of Memory



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 21

def initialize(domain)
    super
    @version = 'v1'
    @bulk = nil
    @conversation_summaries = nil
    @data_mappings = nil
    @identifiers = nil
    @identity_resolution_settings = nil
    @imports = nil
    @lookup = nil
    @observations = nil
    @operations = nil
    @profiles = nil
    @recall = nil
    @revisions = nil
    @stores = nil
    @traits = nil
    @trait_groups = nil
end

Instance Method Details

#bulk(store_id = :unset) ⇒ Twilio::REST::Memory::V1::BulkList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

Returns:



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 44

def bulk(store_id=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end

    if store_id == :unset
        @bulk ||= BulkList.new self
    else
        BulkList.new(self, store_id: store_id)
    end
end

#conversation_summaries(store_id = :unset, profile_id = :unset, summary_id = :unset) ⇒ Twilio::REST::Memory::V1::ConversationSummaryContext, Twilio::REST::Memory::V1::ConversationSummaryList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

  • profile_id (String) (defaults to: :unset)

    The unique identifier for the profile using Twilio Type ID (TTID) format.

  • summary_id (String) (defaults to: :unset)

Returns:



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 61

def conversation_summaries(store_id=:unset, profile_id=:unset, summary_id=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end
    if profile_id.nil?
        raise ArgumentError, 'profile_id cannot be nil'
    end
    if summary_id.nil?
        raise ArgumentError, 'summary_id cannot be nil'
    end

    if store_id == :unset && profile_id == :unset && summary_id == :unset
        @conversation_summaries ||= ConversationSummaryList.new self
    elsif store_id != :unset && profile_id != :unset && summary_id == :unset
        ConversationSummaryList.new(self, store_id: store_id, profile_id: profile_id)
    else
        ConversationSummaryContext.new(self, store_id, profile_id, summary_id)
    end
end

#data_mappings(store_id = :unset, data_mapping_id = :unset) ⇒ Twilio::REST::Memory::V1::DataMappingContext, Twilio::REST::Memory::V1::DataMappingList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

  • data_mapping_id (String) (defaults to: :unset)

Returns:



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 85

def data_mappings(store_id=:unset, data_mapping_id=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end
    if data_mapping_id.nil?
        raise ArgumentError, 'data_mapping_id cannot be nil'
    end

    if store_id == :unset && data_mapping_id == :unset
        @data_mappings ||= DataMappingList.new self
    elsif store_id != :unset && data_mapping_id == :unset
        DataMappingList.new(self, store_id: store_id)
    else
        DataMappingContext.new(self, store_id, data_mapping_id)
    end
end

#identifiers(store_id = :unset, profile_id = :unset, id_type = :unset) ⇒ Twilio::REST::Memory::V1::IdentifierContext, Twilio::REST::Memory::V1::IdentifierList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

  • profile_id (String) (defaults to: :unset)

    The unique identifier for the profile using Twilio Type ID (TTID) format.

  • id_type (String) (defaults to: :unset)

Returns:



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 107

def identifiers(store_id=:unset, profile_id=:unset, id_type=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end
    if profile_id.nil?
        raise ArgumentError, 'profile_id cannot be nil'
    end
    if id_type.nil?
        raise ArgumentError, 'id_type cannot be nil'
    end

    if store_id == :unset && profile_id == :unset && id_type == :unset
        @identifiers ||= IdentifierList.new self
    elsif store_id != :unset && profile_id != :unset && id_type == :unset
        IdentifierList.new(self, store_id: store_id, profile_id: profile_id)
    else
        IdentifierContext.new(self, store_id, profile_id, id_type)
    end
end

#identity_resolution_settings(store_id = :unset) ⇒ Twilio::REST::Memory::V1::IdentityResolutionSettingList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

Returns:



129
130
131
132
133
134
135
136
137
138
139
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 129

def identity_resolution_settings(store_id=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end

    if store_id == :unset
        @identity_resolution_settings ||= IdentityResolutionSettingList.new self
    else
        IdentityResolutionSettingList.new(self, store_id: store_id)
    end
end

#imports(store_id = :unset, import_id = :unset) ⇒ Twilio::REST::Memory::V1::ImportContext, Twilio::REST::Memory::V1::ImportList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

  • import_id (String) (defaults to: :unset)

Returns:



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 145

def imports(store_id=:unset, import_id=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end
    if import_id.nil?
        raise ArgumentError, 'import_id cannot be nil'
    end

    if store_id == :unset && import_id == :unset
        @imports ||= ImportList.new self
    elsif store_id != :unset && import_id == :unset
        ImportList.new(self, store_id: store_id)
    else
        ImportContext.new(self, store_id, import_id)
    end
end

#lookup(store_id = :unset) ⇒ Twilio::REST::Memory::V1::LookupList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

Returns:



164
165
166
167
168
169
170
171
172
173
174
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 164

def lookup(store_id=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end

    if store_id == :unset
        @lookup ||= LookupList.new self
    else
        LookupList.new(self, store_id: store_id)
    end
end

#observations(store_id = :unset, profile_id = :unset, observation_id = :unset) ⇒ Twilio::REST::Memory::V1::ObservationContext, Twilio::REST::Memory::V1::ObservationList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

  • profile_id (String) (defaults to: :unset)

    The unique identifier for the profile using Twilio Type ID (TTID) format.

  • observation_id (String) (defaults to: :unset)

Returns:



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 181

def observations(store_id=:unset, profile_id=:unset, observation_id=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end
    if profile_id.nil?
        raise ArgumentError, 'profile_id cannot be nil'
    end
    if observation_id.nil?
        raise ArgumentError, 'observation_id cannot be nil'
    end

    if store_id == :unset && profile_id == :unset && observation_id == :unset
        @observations ||= ObservationList.new self
    elsif store_id != :unset && profile_id != :unset && observation_id == :unset
        ObservationList.new(self, store_id: store_id, profile_id: profile_id)
    else
        ObservationContext.new(self, store_id, profile_id, observation_id)
    end
end

#operations(operation_id = :unset) ⇒ Twilio::REST::Memory::V1::OperationContext, Twilio::REST::Memory::V1::OperationList

Parameters:

  • operation_id (String) (defaults to: :unset)

    The operation ID returned from a write endpoint.

Returns:



204
205
206
207
208
209
210
211
212
213
214
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 204

def operations(operation_id=:unset)
    if operation_id.nil?
        raise ArgumentError, 'operation_id cannot be nil'
    end

    if operation_id == :unset
        @operations ||= OperationList.new self
    else
        OperationContext.new(self, operation_id)
    end
end

#profiles(store_id = :unset, profile_id = :unset) ⇒ Twilio::REST::Memory::V1::ProfileContext, Twilio::REST::Memory::V1::ProfileList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

  • profile_id (String) (defaults to: :unset)

Returns:



220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 220

def profiles(store_id=:unset, profile_id=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end
    if profile_id.nil?
        raise ArgumentError, 'profile_id cannot be nil'
    end

    if store_id == :unset && profile_id == :unset
        @profiles ||= ProfileList.new self
    elsif store_id != :unset && profile_id == :unset
        ProfileList.new(self, store_id: store_id)
    else
        ProfileContext.new(self, store_id, profile_id)
    end
end

#recall(store_id = :unset, profile_id = :unset) ⇒ Twilio::REST::Memory::V1::RecallList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

  • profile_id (String) (defaults to: :unset)

    The unique identifier for the profile using Twilio Type ID (TTID) format.

Returns:



240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 240

def recall(store_id=:unset, profile_id=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end
    if profile_id.nil?
        raise ArgumentError, 'profile_id cannot be nil'
    end

    if store_id == :unset && profile_id == :unset
        @recall ||= RecallList.new self
    elsif store_id != :unset && profile_id == :unset
        RecallList.new(self, store_id: store_id)
    else
        RecallList.new(self, store_id: store_id, profile_id: profile_id)
    end
end

#revisions(store_id = :unset, profile_id = :unset, observation_id = :unset) ⇒ Twilio::REST::Memory::V1::RevisionList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

  • profile_id (String) (defaults to: :unset)

    The unique identifier for the profile using Twilio Type ID (TTID) format.

  • observation_id (String) (defaults to: :unset)

    The observation ID.

Returns:



281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 281

def revisions(store_id=:unset, profile_id=:unset, observation_id=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end
    if profile_id.nil?
        raise ArgumentError, 'profile_id cannot be nil'
    end
    if observation_id.nil?
        raise ArgumentError, 'observation_id cannot be nil'
    end

    if store_id == :unset && profile_id == :unset && observation_id == :unset
        @revisions ||= RevisionList.new self
    elsif store_id != :unset && profile_id != :unset && observation_id == :unset
        RevisionList.new(self, store_id: store_id, profile_id: profile_id)
    else
        RevisionList.new(self, store_id: store_id, profile_id: profile_id, observation_id: observation_id)
    end
end

#stores(store_id = :unset) ⇒ Twilio::REST::Memory::V1::StoreContext, Twilio::REST::Memory::V1::StoreList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

Returns:



352
353
354
355
356
357
358
359
360
361
362
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 352

def stores(store_id=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end

    if store_id == :unset
        @stores ||= StoreList.new self
    else
        StoreContext.new(self, store_id)
    end
end

#to_sObject

Provide a user friendly representation



426
427
428
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 426

def to_s
    '<Twilio::REST::Memory::V1>';
end

#trait_groups(store_id = :unset, trait_group_name = :unset) ⇒ Twilio::REST::Memory::V1::TraitGroupContext, Twilio::REST::Memory::V1::TraitGroupList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

  • trait_group_name (String) (defaults to: :unset)

Returns:



408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 408

def trait_groups(store_id=:unset, trait_group_name=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end
    if trait_group_name.nil?
        raise ArgumentError, 'trait_group_name cannot be nil'
    end

    if store_id == :unset && trait_group_name == :unset
        @trait_groups ||= TraitGroupList.new self
    elsif store_id != :unset && trait_group_name == :unset
        TraitGroupList.new(self, store_id: store_id)
    else
        TraitGroupContext.new(self, store_id, trait_group_name)
    end
end

#traits(store_id = :unset, profile_id = :unset) ⇒ Twilio::REST::Memory::V1::TraitList

Parameters:

  • store_id (String) (defaults to: :unset)

    A unique Memory Store ID using Twilio Type ID (TTID) format

  • profile_id (String) (defaults to: :unset)

    The unique identifier for the profile using Twilio Type ID (TTID) format.

Returns:



367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 367

def traits(store_id=:unset, profile_id=:unset)
    if store_id.nil?
        raise ArgumentError, 'store_id cannot be nil'
    end
    if profile_id.nil?
        raise ArgumentError, 'profile_id cannot be nil'
    end

    if store_id == :unset && profile_id == :unset
        @traits ||= TraitList.new self
    elsif store_id != :unset && profile_id == :unset
        TraitList.new(self, store_id: store_id)
    else
        TraitList.new(self, store_id: store_id, profile_id: profile_id)
    end
end