Class: Kentaa::Api::Resources::Payment
Instance Attribute Summary
Attributes inherited from Resource
#id
Attributes inherited from Base
#config, #endpoint_path, #options, #resource_class
Instance Method Summary
collapse
Methods inherited from Resource
#create, #created_at, #delete, #initialize, #load, #save, #updated_at
Methods inherited from Base
attribute_key, #initialize, #load, #loaded?
Instance Method Details
#account_bic ⇒ Object
53
54
55
|
# File 'lib/kentaa/api/resources/payment.rb', line 53
def account_bic
data[:account_bic]
end
|
#account_iban ⇒ Object
49
50
51
|
# File 'lib/kentaa/api/resources/payment.rb', line 49
def account_iban
data[:account_iban]
end
|
#account_name ⇒ Object
57
58
59
|
# File 'lib/kentaa/api/resources/payment.rb', line 57
def account_name
data[:account_name]
end
|
#amount ⇒ Object
25
26
27
|
# File 'lib/kentaa/api/resources/payment.rb', line 25
def amount
BigDecimal(data[:amount])
end
|
#currency ⇒ Object
21
22
23
|
# File 'lib/kentaa/api/resources/payment.rb', line 21
def currency
data[:currency]
end
|
#description ⇒ Object
61
62
63
|
# File 'lib/kentaa/api/resources/payment.rb', line 61
def description
data[:description]
end
|
#donations ⇒ Object
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/kentaa/api/resources/payment.rb', line 65
def donations
@donations ||= begin
donations = []
if data[:donations]
data[:donations].each do |donation|
donations << Kentaa::Api::Resources::Donation.new(config, data: donation, options: options)
end
end
donations
end
end
|
#invoicenumber ⇒ Object
29
30
31
|
# File 'lib/kentaa/api/resources/payment.rb', line 29
def invoicenumber
data[:invoicenumber]
end
|
#object_key ⇒ Object
9
10
11
|
# File 'lib/kentaa/api/resources/payment.rb', line 9
def object_key
"Payment_#{id}"
end
|
#orders ⇒ Object
79
80
81
82
83
84
85
86
87
88
89
90
91
|
# File 'lib/kentaa/api/resources/payment.rb', line 79
def orders
@orders ||= begin
orders = []
if data[:orders]
data[:orders].each do |order|
orders << Kentaa::Api::Resources::Order.new(config, data: order, options: options)
end
end
orders
end
end
|
#payment_id ⇒ Object
45
46
47
|
# File 'lib/kentaa/api/resources/payment.rb', line 45
def payment_id
data[:payment_id]
end
|
#payment_method ⇒ Object
33
34
35
|
# File 'lib/kentaa/api/resources/payment.rb', line 33
def payment_method
data[:payment_method]
end
|
#payment_status ⇒ Object
37
38
39
|
# File 'lib/kentaa/api/resources/payment.rb', line 37
def payment_status
data[:payment_status]
end
|
#site ⇒ Object
13
14
15
|
# File 'lib/kentaa/api/resources/payment.rb', line 13
def site
Kentaa::Api::Resources::Site.new(config, id: site_id, options: options)
end
|
#site_id ⇒ Object
17
18
19
|
# File 'lib/kentaa/api/resources/payment.rb', line 17
def site_id
data[:site_id]
end
|
#transaction_id ⇒ Object
41
42
43
|
# File 'lib/kentaa/api/resources/payment.rb', line 41
def transaction_id
data[:transaction_id]
end
|