Class: MemoriClient::Engine::V2::Intent

Inherits:
Resource show all
Defined in:
lib/memori_client/engine/v2/intent.rb

Overview

Generated on 2025-01-27 16:56:16 +0000

Class Method Summary collapse

Methods inherited from Resource

build_url

Methods inherited from Resource

build_arguments, build_url, exec_http_request, validate_payload!

Class Method Details

.add_intent(strSessionID:, payload: {}) ⇒ Object

‘POST /memori/v2/Intent/strSessionID`

Adds a new Intent object.

‘add_intent(strSessionID:, payload: {})`

Parameters:

  • strSessionID (string)

    The session ID. required

  • payload (Hash) (defaults to: {})

    request payload. optional

  • payload.intentID (String)

    . optional

  • payload.intentType (String)

    . optional

  • payload.name (String)

    . optional

  • payload.utterances (Array)

    . optional

  • payload.timeoutIntent (Boolean)

    . optional

  • payload.webHook (String)

    . optional

  • payload.validityMinutes (Number)

    . optional

  • payload.creationTimestamp (String)

    . optional

  • payload.creationSessionID (String)

    . optional

  • payload.lastChangeTimestamp (String)

    . optional

  • payload.lastChangeSessionID (String)

    . optional



154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/memori_client/engine/v2/intent.rb', line 154

def self.add_intent(strSessionID:, payload: {})
  args = build_arguments(binding)
  payload_keys = [
    'creationSessionID',
    'creationTimestamp',
    'intentID',
    'intentType',
    'lastChangeSessionID',
    'lastChangeTimestamp',
    'name',
    'timeoutIntent',
    'utterances',
    'validityMinutes',
    'webHook',
  ]
  payload_required_keys = %w[]
  validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)

  exec_http_request('post', '/memori/v2/Intent/{strSessionID}', **args)
end

.add_intent_slot(strSessionID:, payload: {}) ⇒ Object

‘POST /memori/v2/IntentSlot/strSessionID`

Adds a new Intent Slot object.

‘add_intent_slot(strSessionID:, payload: {})`

Parameters:

  • strSessionID (string)

    The session ID. required

  • payload (Hash) (defaults to: {})

    request payload. optional

  • payload.intentSlotID (String)

    . optional

  • payload.name (String)

    . optional

  • payload.values (Array)

    . optional

  • payload.webHook (String)

    . optional

  • payload.validityMinutes (Number)

    . optional

  • payload.creationTimestamp (String)

    . optional

  • payload.creationSessionID (String)

    . optional

  • payload.lastChangeTimestamp (String)

    . optional

  • payload.lastChangeSessionID (String)

    . optional



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/memori_client/engine/v2/intent.rb', line 316

def self.add_intent_slot(strSessionID:, payload: {})
  args = build_arguments(binding)
  payload_keys = [
    'creationSessionID',
    'creationTimestamp',
    'intentSlotID',
    'lastChangeSessionID',
    'lastChangeTimestamp',
    'name',
    'validityMinutes',
    'values',
    'webHook',
  ]
  payload_required_keys = %w[]
  validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)

  exec_http_request('post', '/memori/v2/IntentSlot/{strSessionID}', **args)
end

.get_intent(strSessionID:, strIntentID:) ⇒ Object

‘GET /memori/v2/Intent/strSessionID/strIntentID`

Gets the details of an Intent object.

‘get_intent(strSessionID:, strIntentID:)`

Parameters:

  • strSessionID (string)

    The session ID. required

  • strIntentID (string)

    The Intent object ID. required



45
46
47
48
49
# File 'lib/memori_client/engine/v2/intent.rb', line 45

def self.get_intent(strSessionID:, strIntentID:)
  args = build_arguments(binding)

  exec_http_request('get', '/memori/v2/Intent/{strSessionID}/{strIntentID}', **args)
end

.get_intent_slot(strSessionID:, strSlotID:) ⇒ Object

‘GET /memori/v2/IntentSlot/strSessionID/strSlotID`

Gets the details of an Intent Slot object.

‘get_intent_slot(strSessionID:, strSlotID:)`

Parameters:

  • strSessionID (string)

    The session ID. required

  • strSlotID (string)

    The Intent Slot object ID. required



217
218
219
220
221
# File 'lib/memori_client/engine/v2/intent.rb', line 217

def self.get_intent_slot(strSessionID:, strSlotID:)
  args = build_arguments(binding)

  exec_http_request('get', '/memori/v2/IntentSlot/{strSessionID}/{strSlotID}', **args)
end

.list_intent_slots(strSessionID:) ⇒ Object

‘GET /memori/v2/IntentSlots/strSessionID`

Lists all Intent Slot objects.

‘list_intent_slots(strSessionID:)`

Parameters:

  • strSessionID (string)

    The session ID. required



183
184
185
186
187
# File 'lib/memori_client/engine/v2/intent.rb', line 183

def self.list_intent_slots(strSessionID:)
  args = build_arguments(binding)

  exec_http_request('get', '/memori/v2/IntentSlots/{strSessionID}', **args)
end

.list_intent_slots_paginated(strSessionID:, from:, howMany:) ⇒ Object

‘GET /memori/v2/IntentSlots/strSessionID/from/howMany`

Lists Intent Slot objects with pagination.

‘list_intent_slots_paginated(strSessionID:, from:, howMany:)`

Parameters:

  • strSessionID (string)

    The session ID. required

  • from (integer)

    The 0-based index of the first Intent Slot object to list. required

  • howMany (integer)

    The number of the Intent Slot objects to list. required



201
202
203
204
205
# File 'lib/memori_client/engine/v2/intent.rb', line 201

def self.list_intent_slots_paginated(strSessionID:, from:, howMany:)
  args = build_arguments(binding)

  exec_http_request('get', '/memori/v2/IntentSlots/{strSessionID}/{from}/{howMany}', **args)
end

.list_intents(strSessionID:) ⇒ Object

‘GET /memori/v2/Intents/strSessionID`

Lists all Intent objects.

‘list_intents(strSessionID:)`

Parameters:

  • strSessionID (string)

    The session ID. required



11
12
13
14
15
# File 'lib/memori_client/engine/v2/intent.rb', line 11

def self.list_intents(strSessionID:)
  args = build_arguments(binding)

  exec_http_request('get', '/memori/v2/Intents/{strSessionID}', **args)
end

.list_intents_paginated(strSessionID:, from:, howMany:) ⇒ Object

‘GET /memori/v2/Intents/strSessionID/from/howMany`

Lists Intent objects with pagination.

‘list_intents_paginated(strSessionID:, from:, howMany:)`

Parameters:

  • strSessionID (string)

    The session ID. required

  • from (integer)

    The 0-based index of the first Intent object to list. required

  • howMany (integer)

    The number of the Intent objects to list. required



29
30
31
32
33
# File 'lib/memori_client/engine/v2/intent.rb', line 29

def self.list_intents_paginated(strSessionID:, from:, howMany:)
  args = build_arguments(binding)

  exec_http_request('get', '/memori/v2/Intents/{strSessionID}/{from}/{howMany}', **args)
end

.remove_intent(strSessionID:, strIntentID:) ⇒ Object

‘DELETE /memori/v2/Intent/strSessionID/strIntentID`

Removes an existing Intent object.

‘remove_intent(strSessionID:, strIntentID:)`

Parameters:

  • strSessionID (string)

    The session ID. required

  • strIntentID (string)

    The Intent object ID. required



116
117
118
119
120
# File 'lib/memori_client/engine/v2/intent.rb', line 116

def self.remove_intent(strSessionID:, strIntentID:)
  args = build_arguments(binding)

  exec_http_request('delete', '/memori/v2/Intent/{strSessionID}/{strIntentID}', **args)
end

.remove_intent_slot(strSessionID:, strSlotID:) ⇒ Object

‘DELETE /memori/v2/IntentSlot/strSessionID/strSlotID`

Removes an existing Intent Slot object.

‘remove_intent_slot(strSessionID:, strSlotID:)`

Parameters:

  • strSessionID (string)

    The session ID. required

  • strSlotID (string)

    The Intent Slot object ID. required



282
283
284
285
286
# File 'lib/memori_client/engine/v2/intent.rb', line 282

def self.remove_intent_slot(strSessionID:, strSlotID:)
  args = build_arguments(binding)

  exec_http_request('delete', '/memori/v2/IntentSlot/{strSessionID}/{strSlotID}', **args)
end

.update_intent(strSessionID:, strIntentID:, payload: {}) ⇒ Object

‘PATCH /memori/v2/Intent/strSessionID/strIntentID`

Updates an existing Intent object.

‘update_intent(strSessionID:, strIntentID:, payload: {})`

Parameters:

  • strSessionID (string)

    The session ID. required

  • strIntentID (string)

    The Intent object ID. required

  • payload (Hash) (defaults to: {})

    request payload. optional

  • payload.intentID (String)

    . optional

  • payload.intentType (String)

    . optional

  • payload.name (String)

    . optional

  • payload.utterances (Array)

    . optional

  • payload.timeoutIntent (Boolean)

    . optional

  • payload.webHook (String)

    . optional

  • payload.validityMinutes (Number)

    . optional

  • payload.creationTimestamp (String)

    . optional

  • payload.creationSessionID (String)

    . optional

  • payload.lastChangeTimestamp (String)

    . optional

  • payload.lastChangeSessionID (String)

    . optional



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/memori_client/engine/v2/intent.rb', line 85

def self.update_intent(strSessionID:, strIntentID:, payload: {})
  args = build_arguments(binding)
  payload_keys = [
    'creationSessionID',
    'creationTimestamp',
    'intentID',
    'intentType',
    'lastChangeSessionID',
    'lastChangeTimestamp',
    'name',
    'timeoutIntent',
    'utterances',
    'validityMinutes',
    'webHook',
  ]
  payload_required_keys = %w[]
  validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)

  exec_http_request('patch', '/memori/v2/Intent/{strSessionID}/{strIntentID}', **args)
end

.update_intent_slot(strSessionID:, strSlotID:, payload: {}) ⇒ Object

‘PATCH /memori/v2/IntentSlot/strSessionID/strSlotID`

Updates an existing Intent Slot object.

‘update_intent_slot(strSessionID:, strSlotID:, payload: {})`

Parameters:

  • strSessionID (string)

    The session ID. required

  • strSlotID (string)

    The Intent Slot object ID. required

  • payload (Hash) (defaults to: {})

    request payload. optional

  • payload.intentSlotID (String)

    . optional

  • payload.name (String)

    . optional

  • payload.values (Array)

    . optional

  • payload.webHook (String)

    . optional

  • payload.validityMinutes (Number)

    . optional

  • payload.creationTimestamp (String)

    . optional

  • payload.creationSessionID (String)

    . optional

  • payload.lastChangeTimestamp (String)

    . optional

  • payload.lastChangeSessionID (String)

    . optional



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/memori_client/engine/v2/intent.rb', line 253

def self.update_intent_slot(strSessionID:, strSlotID:, payload: {})
  args = build_arguments(binding)
  payload_keys = [
    'creationSessionID',
    'creationTimestamp',
    'intentSlotID',
    'lastChangeSessionID',
    'lastChangeTimestamp',
    'name',
    'validityMinutes',
    'values',
    'webHook',
  ]
  payload_required_keys = %w[]
  validate_payload!(args[:payload], keys: payload_keys, required: payload_required_keys)

  exec_http_request('patch', '/memori/v2/IntentSlot/{strSessionID}/{strSlotID}', **args)
end