Class: SpreeCmCommissioner::Feed::VendorIncludeProduct

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Serialization
Defined in:
app/services/spree_cm_commissioner/feed/vendor_include_product.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vendor:, products:) ⇒ 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
  @app_promotion_banner_id = vendor.app_promotion_banner_id
  @app_promotion_banner = vendor.app_promotion_banner

  @products = products
  @product_ids = products.map(&:id)
end

Instance Attribute Details

#app_promotion_bannerObject

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 app_promotion_banner
  @app_promotion_banner
end

#app_promotion_banner_idObject

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 app_promotion_banner_id
  @app_promotion_banner_id
end

#idObject

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

#nameObject

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_idsObject

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

#productsObject

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

#slugObject

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