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: BulkContext, BulkInstance, BulkInstanceMetadata, 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, IdentityResolutionSettingContext, IdentityResolutionSettingInstance, IdentityResolutionSettingInstanceMetadata, 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
40
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 21

def initialize(domain)
    super
    @version = 'v1'
    @bulk = nil
    @conversation_summaries = nil
    @data_mappings = nil
    @events = 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::BulkContext, Twilio::REST::Memory::V1::BulkList

Parameters:

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

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

Returns:



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

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
        BulkContext.new(self, 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:



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

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:



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

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

#events(store_id = :unset, profile_id = :unset) ⇒ Twilio::REST::Memory::V1::EventList

Parameters:

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

    The storeId identifier

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

    The profileId identifier

Returns:



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

def events(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
        @events ||= EventList.new self
    elsif store_id != :unset && profile_id == :unset
        EventList.new(self, store_id: store_id)
    else
        EventList.new(self, store_id: store_id, profile_id: profile_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:



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 149

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::IdentityResolutionSettingContext, Twilio::REST::Memory::V1::IdentityResolutionSettingList

Parameters:

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

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

Returns:



172
173
174
175
176
177
178
179
180
181
182
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 172

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
        IdentityResolutionSettingContext.new(self, 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:



188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 188

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:



207
208
209
210
211
212
213
214
215
216
217
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 207

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:



224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 224

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:



247
248
249
250
251
252
253
254
255
256
257
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 247

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:



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 263

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:



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

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:



324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 324

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:



395
396
397
398
399
400
401
402
403
404
405
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 395

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



469
470
471
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 469

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:



451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
# File 'lib/twilio-ruby/rest/memory/v1.rb', line 451

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:



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

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