Class: SpreeCmCommissioner::Feed::VendorIncludeProduct
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::Feed::VendorIncludeProduct
- Includes:
- ActiveModel::Serialization
- Defined in:
- app/services/spree_cm_commissioner/feed/vendor_include_product.rb
Instance Attribute Summary collapse
-
#app_promotion_banner ⇒ Object
Returns the value of attribute app_promotion_banner.
-
#app_promotion_banner_id ⇒ Object
Returns the value of attribute app_promotion_banner_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#product_ids ⇒ Object
Returns the value of attribute product_ids.
-
#products ⇒ Object
Returns the value of attribute products.
-
#slug ⇒ Object
Returns the value of attribute slug.
Instance Method Summary collapse
-
#initialize(vendor:, products:) ⇒ VendorIncludeProduct
constructor
A new instance of VendorIncludeProduct.
Constructor Details
#initialize(vendor:, products:) ⇒ VendorIncludeProduct
Returns a new instance of VendorIncludeProduct.
8 9 10 11 12 13 14 15 16 17 |
# File 'app/services/spree_cm_commissioner/feed/vendor_include_product.rb', line 8 def initialize(vendor:, products:) @id = vendor.id @name = vendor.name @slug = vendor.slug = vendor. = vendor. @products = products @product_ids = products.map(&:id) end |
Instance Attribute Details
#app_promotion_banner ⇒ Object
Returns the value of attribute app_promotion_banner.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/vendor_include_product.rb', line 6 def end |
#app_promotion_banner_id ⇒ Object
Returns the value of attribute app_promotion_banner_id.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/vendor_include_product.rb', line 6 def end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/vendor_include_product.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/vendor_include_product.rb', line 6 def name @name end |
#product_ids ⇒ Object
Returns the value of attribute product_ids.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/vendor_include_product.rb', line 6 def product_ids @product_ids end |
#products ⇒ Object
Returns the value of attribute products.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/vendor_include_product.rb', line 6 def products @products end |
#slug ⇒ Object
Returns the value of attribute slug.
6 7 8 |
# File 'app/services/spree_cm_commissioner/feed/vendor_include_product.rb', line 6 def slug @slug end |