Class: Corzinus::Checkout::ConfirmStep
- Inherits:
-
Rectify::Command
- Object
- Rectify::Command
- Corzinus::Checkout::ConfirmStep
- Defined in:
- app/commands/corzinus/checkout/confirm_step.rb
Instance Attribute Summary collapse
-
#confirm ⇒ Object
readonly
Returns the value of attribute confirm.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#person ⇒ Object
readonly
Returns the value of attribute person.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options) ⇒ ConfirmStep
constructor
A new instance of ConfirmStep.
Constructor Details
#initialize(options) ⇒ ConfirmStep
Returns a new instance of ConfirmStep.
6 7 8 9 10 |
# File 'app/commands/corzinus/checkout/confirm_step.rb', line 6 def initialize() @order = [:order] @person = [:person] @confirm = [:params][:confirm] if [:params] end |
Instance Attribute Details
#confirm ⇒ Object (readonly)
Returns the value of attribute confirm.
4 5 6 |
# File 'app/commands/corzinus/checkout/confirm_step.rb', line 4 def confirm @confirm end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
4 5 6 |
# File 'app/commands/corzinus/checkout/confirm_step.rb', line 4 def order @order end |
#person ⇒ Object (readonly)
Returns the value of attribute person.
4 5 6 |
# File 'app/commands/corzinus/checkout/confirm_step.rb', line 4 def person @person end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/commands/corzinus/checkout/confirm_step.rb', line 12 def call return broadcast(:invalid) if confirm.blank? || person.blank? transaction do order.confirm! send_mail end broadcast :valid end |