Class: CompPayment
Overview
This class is used to encapsulate a comp made through a payment interface (the box office)
Comping from producer screens doesn’t use this class
Instance Attribute Summary collapse
Attributes inherited from Payment
#customer, #user_agreement
Instance Method Summary
collapse
Methods inherited from Payment
create, payment_method, #payment_phone_number, #purchase
Constructor Details
benefactor is the user that is doing the comping (current_user) person is the person record receiving the comp. It must have the id set
9
10
11
12
13
|
# File 'app/models/payments/comp_payment.rb', line 9
def initialize(params)
params = params.is_a?(Array) ? params[0] : params
self.benefactor = params[:benefactor]
self.customer = params[:customer]
end
|
Instance Attribute Details
#benefactor ⇒ Object
Returns the value of attribute benefactor.
5
6
7
|
# File 'app/models/payments/comp_payment.rb', line 5
def benefactor
@benefactor
end
|
Instance Method Details
#amount ⇒ Object
36
37
38
|
# File 'app/models/payments/comp_payment.rb', line 36
def amount
0
end
|
#amount=(amount) ⇒ Object
32
33
34
|
# File 'app/models/payments/comp_payment.rb', line 32
def amount=(amount)
0
end
|
#per_item_processing_charge ⇒ Object
44
45
46
|
# File 'app/models/payments/comp_payment.rb', line 44
def per_item_processing_charge
lambda { |item| 0 }
end
|
#reduce_amount_by(amount_in_cents) ⇒ Object
40
41
42
|
# File 'app/models/payments/comp_payment.rb', line 40
def reduce_amount_by(amount_in_cents)
0
end
|
#refund ⇒ Object
23
24
25
26
|
# File 'app/models/payments/comp_payment.rb', line 23
def refund
self.errors.add(:base, "Comp orders cannot be refunded. Please return the tickets to inventory instead.")
false
end
|
#refundable? ⇒ Boolean
19
20
21
|
# File 'app/models/payments/comp_payment.rb', line 19
def refundable?
false
end
|
#requires_authorization? ⇒ Boolean
15
16
17
|
# File 'app/models/payments/comp_payment.rb', line 15
def requires_authorization?
false
end
|
#requires_settlement? ⇒ Boolean
28
29
30
|
# File 'app/models/payments/comp_payment.rb', line 28
def requires_settlement?
false
end
|
#transaction_id ⇒ Object
DEBT: Because Orders are creating Orders for record keeping, the transaction ID is stored.
50
51
52
|
# File 'app/models/payments/comp_payment.rb', line 50
def transaction_id
nil
end
|