class MailchimpTransactional::MetadataApi
Attributes
Public Class Methods
# File lib/MailchimpTransactional/api/metadata_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
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 metadata field Delete an existing custom metadata field. Deletion isn'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 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 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