Module: ItemBuilder::Modes
- Included in:
- ActiveService, Price::SalePricePolicy, PriceService, QuantityService, SimpleService, UpdateService
- Defined in:
- lib/item_builder/modes.rb,
lib/item_builder/modes/price/base.rb,
lib/item_builder/modes/update/base.rb,
lib/item_builder/modes/base_service.rb,
lib/item_builder/modes/price_service.rb,
lib/item_builder/modes/quantity/base.rb,
lib/item_builder/modes/active_service.rb,
lib/item_builder/modes/simple_service.rb,
lib/item_builder/modes/update_service.rb,
lib/item_builder/modes/price/jd_service.rb,
lib/item_builder/modes/quantity_service.rb,
lib/item_builder/modes/update/jd_service.rb,
lib/item_builder/modes/price/blibli_service.rb,
lib/item_builder/modes/price/zalora_service.rb,
lib/item_builder/modes/price/shopify_service.rb,
lib/item_builder/modes/update/blibli_service.rb,
lib/item_builder/modes/update/lazada_service.rb,
lib/item_builder/modes/update/zalora_service.rb,
lib/item_builder/modes/update/shopify_service.rb,
lib/item_builder/modes/price/bukalapak_service.rb,
lib/item_builder/modes/price/sale_price_policy.rb,
lib/item_builder/modes/quantity/lazada_service.rb,
lib/item_builder/modes/quantity/zalora_service.rb,
lib/item_builder/modes/update/bukalapak_service.rb,
lib/item_builder/modes/update/tokopedia_service.rb
Defined Under Namespace
Modules: Price, Quantity, Update Classes: ActiveService, BaseService, PriceService, QuantityService, SimpleService, UpdateService
Instance Attribute Summary collapse
-
#bundles ⇒ Object
readonly
Returns the value of attribute bundles.
-
#existing_alloc_stocks ⇒ Object
readonly
Returns the value of attribute existing_alloc_stocks.
-
#item_bundle_variants ⇒ Object
readonly
Returns the value of attribute item_bundle_variants.
-
#listing ⇒ Object
readonly
Returns the value of attribute listing.
-
#stock_allocs ⇒ Object
readonly
Returns the value of attribute stock_allocs.
-
#variant_listings ⇒ Object
readonly
Returns the value of attribute variant_listings.
-
#variants ⇒ Object
readonly
Returns the value of attribute variants.
-
#wh_spaces ⇒ Object
readonly
Returns the value of attribute wh_spaces.
Instance Method Summary collapse
Instance Attribute Details
#bundles ⇒ Object (readonly)
Returns the value of attribute bundles.
15 16 17 |
# File 'lib/item_builder/modes.rb', line 15 def bundles @bundles end |
#existing_alloc_stocks ⇒ Object (readonly)
Returns the value of attribute existing_alloc_stocks.
17 18 19 |
# File 'lib/item_builder/modes.rb', line 17 def existing_alloc_stocks @existing_alloc_stocks end |
#item_bundle_variants ⇒ Object (readonly)
Returns the value of attribute item_bundle_variants.
16 17 18 |
# File 'lib/item_builder/modes.rb', line 16 def item_bundle_variants @item_bundle_variants end |
#listing ⇒ Object (readonly)
Returns the value of attribute listing.
11 12 13 |
# File 'lib/item_builder/modes.rb', line 11 def listing @listing end |
#stock_allocs ⇒ Object (readonly)
Returns the value of attribute stock_allocs.
14 15 16 |
# File 'lib/item_builder/modes.rb', line 14 def stock_allocs @stock_allocs end |
#variant_listings ⇒ Object (readonly)
Returns the value of attribute variant_listings.
18 19 20 |
# File 'lib/item_builder/modes.rb', line 18 def variant_listings @variant_listings end |
#variants ⇒ Object (readonly)
Returns the value of attribute variants.
13 14 15 |
# File 'lib/item_builder/modes.rb', line 13 def variants @variants end |
#wh_spaces ⇒ Object (readonly)
Returns the value of attribute wh_spaces.
12 13 14 |
# File 'lib/item_builder/modes.rb', line 12 def wh_spaces @wh_spaces end |
Instance Method Details
#base ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/item_builder/modes.rb', line 30 def base { id: listing.id, local_id: listing.local_id, local_item_id: listing.local_item_id, sku: listing.sku } end |
#initialize(args) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/item_builder/modes.rb', line 19 def initialize(args) @listing = args.fetch(:listing) @wh_spaces = args.fetch(:wh_spaces, []) @variants = args.fetch(:variants, []) @stock_allocs = args.fetch(:stock_allocs, []) @bundles = args.fetch(:bundles, []) @item_bundle_variants = args.fetch(:item_bundle_variants, []) @existing_alloc_stocks = args.fetch(:existing_alloc_stocks, []) @variant_listings = args.fetch(:variant_listings, []) end |