Class: EPlat::Mapping::Bigcommerce::V3::Webhook

Inherits:
EPlat::Mapping::Base show all
Defined in:
lib/e_plat/mapping/bigcommerce/v_3/webhook.rb

Constant Summary collapse

DEFAULT_VALUES =
{
    is_active: true
}

Instance Attribute Summary

Attributes inherited from EPlat::Mapping::Base

#resource, #virtual_collection

Instance Method Summary collapse

Methods inherited from EPlat::Mapping::Base

#aliases, #e_plat_key_to, #initialize, #inspect, #keys_aliased_to_native_keys, #mappable_keys, #mappings, #native_key_to, #native_setter, #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_aliasesObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/e_plat/mapping/bigcommerce/v_3/webhook.rb', line 28

def native_attribute_aliases
  super.concat([
    {
      existing_entry: {native_key: "id",               e_plat_key: "id"}
    },
    {
      existing_entry: {native_key: "created_at",       e_plat_key: "created_at"}
    },
    {
      existing_entry: {native_key: "updated_at",       e_plat_key: "updated_at"}
    },
    {
      alias_attribute: {native_key: "destination",     e_plat_key: "address"}
    },
    {
      alias_attribute: {native_key: "scope",           e_plat_key: "topic"}
    }
  ])
end

#native_attributesObject



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/e_plat/mapping/bigcommerce/v_3/webhook.rb', line 14

def native_attributes
  super.concat([
    "id",
    "client_id",
    "store_hash",
    "created_at",
    "updated_at",
    "scope",
    "destination",
    "is_active",
    "headers"
  ])
end

#native_top_keyObject



10
11
12
# File 'lib/e_plat/mapping/bigcommerce/v_3/webhook.rb', line 10

def native_top_key
  "data"
end