class ReferralOperation
- ReferralOperation
- Avram::Operation
- Reference
- Object
Defined in:
operations/referral_operation.crConstant Summary
-
ATTRIBUTES =
[user_order_id : Array(String), referrer_id : Array(String)] of Nil
-
OPERATION_NEEDS =
[] of Nil
Constructors
-
.new(params : Avram::Paramable, user_order_id : Array(String) | Avram::Nothing = Avram::Nothing.new, referrer_id : Array(String) | Avram::Nothing = Avram::Nothing.new)
This is called at the end so @type will be of the subclass, and not the parent abstract class.
-
.new(user_order_id : Array(String) | Avram::Nothing = Avram::Nothing.new, referrer_id : Array(String) | Avram::Nothing = Avram::Nothing.new)
This is called at the end so @type will be of the subclass, and not the parent abstract class.
Instance Method Summary
- #attributes
- #bonuses : Float64
- #error_code : Int32 | Nil
- #order?
- #referrer?
- #referrer_id
- #run
-
#set_attributes(user_order_id : Array(String) | Avram::Nothing = Avram::Nothing.new, referrer_id : Array(String) | Avram::Nothing = Avram::Nothing.new)
This is called at the end so @type will be of the subclass, and not the parent abstract class.
- #user_order_id
-
#valid?
Returns
true
if all attributes are valid, and there's no custom errors
Macro Summary
Constructor Detail
def self.new(params : Avram::Paramable, user_order_id : Array(String) | Avram::Nothing = Avram::Nothing.new, referrer_id : Array(String) | Avram::Nothing = Avram::Nothing.new)
#
This is called at the end so @type will be of the subclass, and not the parent abstract class.
def self.new(user_order_id : Array(String) | Avram::Nothing = Avram::Nothing.new, referrer_id : Array(String) | Avram::Nothing = Avram::Nothing.new)
#
This is called at the end so @type will be of the subclass, and not the parent abstract class.
Instance Method Detail
def set_attributes(user_order_id : Array(String) | Avram::Nothing = Avram::Nothing.new, referrer_id : Array(String) | Avram::Nothing = Avram::Nothing.new)
#
This is called at the end so @type will be of the subclass, and not the parent abstract class.
def valid?
#
Description copied from class Avram::Operation
Returns true
if all attributes are valid,
and there's no custom errors