Class: Workarea::Pricing::Discount::Redemption

Inherits:
Object
  • Object
show all
Includes:
ApplicationDocument
Defined in:
app/models/workarea/pricing/discount/redemption.rb

Overview

Represents an instance of redemption for a Workarea::Pricing::Discount. Used for calculating single use discounts.

Instance Attribute Summary collapse

Method Summary

Methods included from ApplicationDocument

#releasable?

Methods included from Sidekiq::Callbacks

assert_valid_config!, async, disable, enable, inline, #run_callbacks

Methods included from Mongoid::Document

#embedded_children

Instance Attribute Details

#discountDiscount

Returns the discount.

Returns:



18
19
# File 'app/models/workarea/pricing/discount/redemption.rb', line 18

belongs_to :discount,
class_name: 'Workarea::Pricing::Discount'

#emailString

Returns the email that received the discount.

Returns:

  • (String)

    the email that received the discount



13
# File 'app/models/workarea/pricing/discount/redemption.rb', line 13

field :email, type: String