Class: EPlat::Mapping::Woocommerce::V3::Order::ShippingLine
- Defined in:
- lib/e_plat/mapping/woocommerce/v_3/order/shipping_line.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#resource, #virtual_collection
Instance Method Summary collapse
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
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/e_plat/mapping/woocommerce/v_3/order/shipping_line.rb', line 24 def native_attribute_aliases super.concat([ { existing_entry: {native_key: "id", e_plat_key: "id"} }, { alias_attribute: {native_key: "method_id", e_plat_key: "code"} }, { alias_attribute: {native_key: "total", e_plat_key: "price"} }, { alias_attribute: {native_key: "total", e_plat_key: "discounted_price"} }, { existing_entry: {native_key: "method_title", e_plat_key: "title"} }, { existing_entry: {native_key: "taxes", e_plat_key: "tax_lines"} }, { custom_e_plat_getter: {native_key: nil, e_plat_key: "carrier_identifier", custom_e_plat_getter: "-> (obj) { obj['method_id'] }"} } ]) end |
#native_attributes ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/e_plat/mapping/woocommerce/v_3/order/shipping_line.rb', line 11 def native_attributes super.concat([ "id", "method_title", "method_id", "instance_id", "total", "total_tax", "taxes", "meta_data" ]) end |
#native_top_key ⇒ Object
7 8 9 |
# File 'lib/e_plat/mapping/woocommerce/v_3/order/shipping_line.rb', line 7 def native_top_key :itself end |