Class: MailchimpTransactional::MetadataApi
- Inherits:
-
Object
- Object
- MailchimpTransactional::MetadataApi
- Defined in:
- lib/MailchimpTransactional/api/metadata_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add(body = {}) ⇒ Array<(InlineResponse20037, Fixnum, Hash)>
Add metadata field Add a new custom metadata field to be indexed for the account.
-
#delete(body = {}) ⇒ Array<(InlineResponse20039, Fixnum, Hash)>
Delete metadata field Delete an existing custom metadata field.
-
#initialize(api_client = ApiClient.default) ⇒ MetadataApi
constructor
A new instance of MetadataApi.
-
#list(body = {}) ⇒ Array<(Array<InlineResponse20036>, Fixnum, Hash)>
List metadata fields Get the list of custom metadata fields indexed for the account.
-
#update(body = {}) ⇒ Array<(InlineResponse20038, Fixnum, Hash)>
Update metadata field Update an existing custom metadata field.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ MetadataApi
Returns a new instance of MetadataApi.
19 20 21 |
# File 'lib/MailchimpTransactional/api/metadata_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/MailchimpTransactional/api/metadata_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add(body = {}) ⇒ Array<(InlineResponse20037, Fixnum, Hash)>
Add metadata field Add a new custom metadata field to be indexed for the account.
28 29 30 31 |
# 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 = {}) ⇒ Array<(InlineResponse20039, Fixnum, Hash)>
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.
38 39 40 41 |
# 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 = {}) ⇒ Array<(Array<InlineResponse20036>, Fixnum, Hash)>
List metadata fields Get the list of custom metadata fields indexed for the account.
48 49 50 51 |
# 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 = {}) ⇒ Array<(InlineResponse20038, Fixnum, Hash)>
Update metadata field Update an existing custom metadata field.
58 59 60 61 |
# File 'lib/MailchimpTransactional/api/metadata_api.rb', line 58 def update(body = {}) data = @api_client.call_api(:POST, '/metadata/update', body) data end |