Class: EPlat::Mapping::Woocommerce::V3::Metafield
- Defined in:
- lib/e_plat/mapping/woocommerce/v_3/metafield.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#resource, #virtual_collection
Instance Method Summary collapse
- #native_attribute_aliases ⇒ Object
- #native_attributes ⇒ Object
-
#native_top_key ⇒ Object
WooCommerce Metafield mapping In WooCommerce, metafields are part of a resource’s returned meta_data array Each metafield has id, key, and value attributes.
Methods inherited from Base
#aliases, #e_plat_key_to, #initialize, #inspect, #keys_aliased_to_native_keys, #mappable_keys, #mappings, #native_key_to, #native_setter, #platform, #protected_attributes_rename_on_initialize, #to_e_plat_keys, #to_native_keys, #via_native_attributes_where_possible, virtual_collection
Methods included from RequestBodyRoot
#include_root_in_request_body?
Constructor Details
This class inherits a constructor from EPlat::Mapping::Base
Instance Method Details
#native_attribute_aliases ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/e_plat/mapping/woocommerce/v_3/metafield.rb', line 22 def native_attribute_aliases super.concat([ { existing_entry: {native_key: "id", e_plat_key: "id"} }, { existing_entry: {native_key: "key", e_plat_key: "key"} }, { existing_entry: {native_key: "value", e_plat_key: "value"} } ]) end |
#native_attributes ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/e_plat/mapping/woocommerce/v_3/metafield.rb', line 14 def native_attributes super.concat([ "id", "key", "value" ]) end |
#native_top_key ⇒ Object
WooCommerce Metafield mapping In WooCommerce, metafields are part of a resource’s returned meta_data array Each metafield has id, key, and value attributes
10 11 12 |
# File 'lib/e_plat/mapping/woocommerce/v_3/metafield.rb', line 10 def native_top_key :itself end |