Class: Iterable::CatalogFieldMappings
- Inherits:
-
ApiResource
- Object
- ApiResource
- Iterable::CatalogFieldMappings
- Defined in:
- lib/iterable/catalog_field_mappings.rb
Overview
Interact with /catalogs/catalogName/fieldMappings API endpoints **currently in Beta only**
Instance Attribute Summary collapse
-
#catalog ⇒ Object
readonly
Returns the value of attribute catalog.
Attributes inherited from ApiResource
Instance Method Summary collapse
-
#get ⇒ Iterable::Response
Get field mappings for a catalog.
-
#initialize(catalog, conf = nil) ⇒ Iterable::Catalog
constructor
Initialize CatalogFieldMappings with a catalog name **currently in Beta only**.
-
#update(mappings_updates = []) ⇒ Iterable::Response
Set a catalog’s field mappings (data types).
Methods inherited from ApiResource
default_config, #default_config
Constructor Details
#initialize(catalog, conf = nil) ⇒ Iterable::Catalog
Initialize CatalogFieldMappings with a catalog name **currently in Beta only**
26 27 28 29 |
# File 'lib/iterable/catalog_field_mappings.rb', line 26 def initialize(catalog, conf = nil) @catalog = catalog super conf end |
Instance Attribute Details
#catalog ⇒ Object (readonly)
Returns the value of attribute catalog.
16 17 18 |
# File 'lib/iterable/catalog_field_mappings.rb', line 16 def catalog @catalog end |
Instance Method Details
#get ⇒ Iterable::Response
Get field mappings for a catalog
36 37 38 |
# File 'lib/iterable/catalog_field_mappings.rb', line 36 def get Iterable.request(conf, base_path).get end |
#update(mappings_updates = []) ⇒ Iterable::Response
Set a catalog’s field mappings (data types)
53 54 55 56 |
# File 'lib/iterable/catalog_field_mappings.rb', line 53 def update(mappings_updates = []) body = { mappingsUpdates: mappings_updates } Iterable.request(conf, base_path).put(body) end |