Class: ItemBuilderMwh::Modes::Create::TokopediaService
- Inherits:
-
Base
- Object
- Base
- ItemBuilderMwh::Modes::Create::TokopediaService
show all
- Defined in:
- lib/item_builder_mwh/modes/create/tokopedia_service.rb
Instance Attribute Summary
Attributes inherited from Base
#item_listing, #shipping_providers
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#category ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/item_builder_mwh/modes/create/tokopedia_service.rb', line 15
def category
{
id: item_listing&.item_listing_category&.id,
local_id: item_listing&.item_listing_category&.tokopedia&.local_id,
name: item_listing&.item_listing_category&.tokopedia&.name
}
end
|
#master_option_types ⇒ Object
23
24
25
26
27
28
29
30
|
# File 'lib/item_builder_mwh/modes/create/tokopedia_service.rb', line 23
def master_option_types
item.option_types.map do |option_type|
{
name: option_type.name,
option_list: option_list(option_type)
}
end
end
|
8
9
10
11
12
13
|
# File 'lib/item_builder_mwh/modes/create/tokopedia_service.rb', line 8
def perform
{
category: category,
master_option_types: master_option_types
}
end
|