Sha256: 3f773eed3243734b07e90cfea367380ca9d4849b293919d3cb9783c91598a1b8

Contents?: true

Size: 1.51 KB

Versions: 1

Compression:

Stored size: 1.51 KB

Contents

require 'singleton'

class VoucherifyData
  include Singleton

  attr_accessor :product, :customer

  def initialize
    @product = nil
    @customer = nil
    @discount_campaign = nil
    @loyalty_campaign = nil
    @voucher = nil
    @voucher_with_more_than_validation_rule = nil
    @loyalty_card = nil
    @product_ids = []
    @sku = nil
  end

  def set_discount_campaign(discount_campaign)
    @discount_campaign = discount_campaign
  end

  def get_discount_campaign
    return @discount_campaign
  end

  def set_product(product)
    @product = product
  end

  def set_customer(customer)
    @customer = customer
  end

  def add_product_id(product_id)
    @product_ids.push(product_id)
  end

  def get_product_ids
    @product_ids
  end

  def get_voucher_with_more_than_validation_rule
    @voucher_with_more_than_validation_rule
  end

  def set_voucher_with_more_than_validation_rule(voucher)
    @voucher_with_more_than_validation_rule = voucher
  end

  def set_sku(sku)
    @sku = sku
  end

  def get_sku
    @sku
  end

  def set_voucher(voucher)
    @voucher = voucher
  end

  def get_product
    @product
  end

  def get_customer
    @customer
  end

  def get_discount_campaign
    @discount_campaign
  end

  def get_voucher
    @voucher
  end

  def get_loyalty_campaign
    @loyalty_campaign
  end

  def set_loyalty_campaign(loyalty_campaign)
    @loyalty_campaign = loyalty_campaign
  end

  def get_loyalty_card
    @loyalty_card
  end

  def set_loyalty_card(loyalty_card)
    @loyalty_card = loyalty_card
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
voucherify-5.0.0 __tests__/lib/voucherify_data.rb