class MailchimpTransactional::MetadataApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/MailchimpTransactional/api/metadata_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

add(body = {}) click to toggle source

Add metadata field Add a new custom metadata field to be indexed for the account. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20034, Fixnum, Hash)>] InlineResponse20034 data, response status code and response headers

# File lib/MailchimpTransactional/api/metadata_api.rb, line 28
def add(body = {})
  data = @api_client.call_api(:POST, '/metadata/add', body)
  data
end
delete(body = {}) click to toggle source

Delete metadata field Delete an existing custom metadata field. Deletion isn&#39;t instataneous, and /metadata/list will continue to return the field until the asynchronous deletion process is complete. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20036, Fixnum, Hash)>] InlineResponse20036 data, response status code and response headers

# File lib/MailchimpTransactional/api/metadata_api.rb, line 38
def delete(body = {})
  data = @api_client.call_api(:POST, '/metadata/delete', body)
  data
end
list(body = {}) click to toggle source

List metadata fields Get the list of custom metadata fields indexed for the account. @param body @param [Hash] opts the optional parameters @return [Array<(Array<InlineResponse20033>, Fixnum, Hash)>] Array<InlineResponse20033> data, response status code and response headers

# File lib/MailchimpTransactional/api/metadata_api.rb, line 48
def list(body = {})
  data = @api_client.call_api(:POST, '/metadata/list', body)
  data
end
update(body = {}) click to toggle source

Update metadata field Update an existing custom metadata field. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20035, Fixnum, Hash)>] InlineResponse20035 data, response status code and response headers

# File lib/MailchimpTransactional/api/metadata_api.rb, line 58
def update(body = {})
  data = @api_client.call_api(:POST, '/metadata/update', body)
  data
end