Class: CashPayment
Instance Attribute Summary collapse
Attributes inherited from Payment
#customer, #user_agreement
Instance Method Summary
collapse
Methods inherited from Payment
#authorize, #build_address_from, #build_customer_from, #capture, create, payment_method, #payment_phone_number, #purchase, #reduce_amount_by, #refund, #refundable?, #void
Constructor Details
#initialize(params = {}) ⇒ CashPayment
Returns a new instance of CashPayment.
5
6
7
8
9
|
# File 'app/models/payments/cash_payment.rb', line 5
def initialize(params = {})
self.customer ||= Person.new
build_customer_from(params)
build_address_from(params)
end
|
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
3
4
5
|
# File 'app/models/payments/cash_payment.rb', line 3
def amount
@amount
end
|
Instance Method Details
#per_item_processing_charge ⇒ Object
19
20
21
|
# File 'app/models/payments/cash_payment.rb', line 19
def per_item_processing_charge
lambda { |item| 0 }
end
|
#requires_authorization? ⇒ Boolean
11
12
13
|
# File 'app/models/payments/cash_payment.rb', line 11
def requires_authorization?
false
end
|
#requires_settlement? ⇒ Boolean
15
16
17
|
# File 'app/models/payments/cash_payment.rb', line 15
def requires_settlement?
false
end
|
#transaction_id ⇒ Object
23
24
25
|
# File 'app/models/payments/cash_payment.rb', line 23
def transaction_id
nil
end
|