Class: Emarsys::Field
- Inherits:
-
DataObject
- Object
- DataObject
- Emarsys::Field
- Defined in:
- lib/emarsys/data_objects/field.rb
Overview
Methods for the Field API
Class Method Summary collapse
-
.choice(id) ⇒ Hash
Query the choice option for a specific field.
-
.collection(params = {}) ⇒ Hash
List data fields.
Methods inherited from DataObject
delete, get, parameterize_params, post, put, #request
Class Method Details
.choice(id) ⇒ Hash
Query the choice option for a specific field
32 33 34 |
# File 'lib/emarsys/data_objects/field.rb', line 32 def choice(id) get "field/#{id}/choice", {} end |
.collection(params = {}) ⇒ Hash
List data fields
17 18 19 20 21 22 23 24 |
# File 'lib/emarsys/data_objects/field.rb', line 17 def collection(params = {}) params = params.stringify_keys if params['translate'] get "field/translate/#{params['translate'].to_s}", {} else get 'field', {} end end |