Class: Vonage::ProactiveConnect::List

Inherits:
Namespace
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/vonage/proactive_connect/list.rb

Instance Method Summary collapse

Instance Method Details

#clear_items(id:) ⇒ Object

Deprecated.

Clear list by deleting all items

Examples:

response = proactive_connect.list.clear_items(id: 'e546eebe-8e23-4e4d-bb7c-29d4700c9865')

Parameters:

  • :id (required, String)

    Unique identifier for the list

See Also:



158
159
160
161
162
163
164
# File 'lib/vonage/proactive_connect/list.rb', line 158

def clear_items(id:)
  logger.info('This method is deprecated and will be removed in a future release.')
  request(
    "/v0.1/bulk/lists/#{id}/clear",
    type: Post
  )
end

#create(name:, **params) ⇒ Object

Deprecated.

Create list

Examples:

response = proactive_connect.list.create(name: 'List Number 1')

Parameters:

  • :name (required, String)

    A name for the list

  • :description (optional, String)

    A description of the list

  • :tags (optional, Array)

    An Array of up to 10 Strings assigining tags to the list. Each String must be between 1 and 15 characters

  • :attributes (optional, Array)

    Array of Hash objects. Each Hash represents an attribute for the list.

  • :datasource (optional, Hash)

    Datasource for the list

  • attributes (Hash)

    a customizable set of options

  • datasource (Hash)

    a customizable set of options

See Also:



51
52
53
54
55
56
57
58
# File 'lib/vonage/proactive_connect/list.rb', line 51

def create(name:, **params)
  logger.info('This method is deprecated and will be removed in a future release.')
  request(
    "/v0.1/bulk/lists",
    params: params.merge({ name: name }),
    type: Post
  )
end

#delete(id:) ⇒ Object

Deprecated.

Delete a list by id

Examples:

response = proactive_connect.list.delete(id: '74ea1ecf-06c9-4072-a285-61677bd353e8')

Parameters:

  • :id (required, String)

    Unique identifier for the list

See Also:



138
139
140
141
142
143
144
# File 'lib/vonage/proactive_connect/list.rb', line 138

def delete(id:)
  logger.info('This method is deprecated and will be removed in a future release.')
  request(
    "/v0.1/bulk/lists/#{id}",
    type: Delete
  )
end

#fetch_and_replace_items(id:) ⇒ Object

Deprecated.

Fetch and replace all items from datasource

Examples:

response = proactive_connect.list.fetch_and_replace_items(id: 'e546eebe-8e23-4e4d-bb7c-29d4700c9865')

Parameters:

  • :id (required, String)

    Unique identifier for the list

See Also:



178
179
180
181
182
183
184
# File 'lib/vonage/proactive_connect/list.rb', line 178

def fetch_and_replace_items(id:)
  logger.info('This method is deprecated and will be removed in a future release.')
  request(
    "/v0.1/bulk/lists/#{id}/fetch",
    type: Post
  )
end

#find(id:) ⇒ Object

Deprecated.

Get list by id

Examples:

response = proactive_connect.list.find(id: 'e546eebe-8e23-4e4d-bb7c-29d4700c9865')

Parameters:

  • :id (required, String)

    Unique identifier for the list

See Also:



72
73
74
75
# File 'lib/vonage/proactive_connect/list.rb', line 72

def find(id:)
  logger.info('This method is deprecated and will be removed in a future release.')
  request("/v0.1/bulk/lists/#{id}")
end

#update(id:, name:, **params) ⇒ Object

Deprecated.

Update list

Examples:

response = proactive_connect.list.update(name: 'List Number 1')

Parameters:

  • :id (required, String)

    The id of the list to update

  • :name (required, String)

    The name of the list

  • :description (optional, String)

    A description of the list

  • :tags (optional, Array)

    An Array of up to 10 Strings assigining tags to the list. Each String must be between 1 and 15 characters

  • :attributes (optional, Array)

    Array of Hash objects. Each Hash represents an attribute for the list.

  • :datasource (optional, Hash)

    Datasource for the list

  • attributes (Hash)

    a customizable set of options

  • datasource (Hash)

    a customizable set of options

See Also:



117
118
119
120
121
122
123
124
# File 'lib/vonage/proactive_connect/list.rb', line 117

def update(id:, name:, **params)
  logger.info('This method is deprecated and will be removed in a future release.')
  request(
    "/v0.1/bulk/lists/#{id}",
    params: params.merge({ name: name }),
    type: Put
  )
end