Class: Ipizza::Payment
- Inherits:
-
Object
- Object
- Ipizza::Payment
- Defined in:
- lib/ipizza/payment.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#message ⇒ Object
Returns the value of attribute message.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#receiver_account ⇒ Object
Returns the value of attribute receiver_account.
-
#receiver_name ⇒ Object
Returns the value of attribute receiver_name.
-
#refnum ⇒ Object
Returns the value of attribute refnum.
-
#sender_account ⇒ Object
Returns the value of attribute sender_account.
-
#sender_name ⇒ Object
Returns the value of attribute sender_name.
-
#stamp ⇒ Object
Returns the value of attribute stamp.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
-
#transaction_time ⇒ Object
Returns the value of attribute transaction_time.
Instance Method Summary collapse
-
#initialize(attribs = {}) ⇒ Payment
constructor
A new instance of Payment.
Constructor Details
#initialize(attribs = {}) ⇒ Payment
Returns a new instance of Payment.
6 7 8 9 10 11 12 13 |
# File 'lib/ipizza/payment.rb', line 6 def initialize(attribs = {}) attribs.each do |key, value| if self.respond_to?("#{key.to_s}=".to_sym) v = key.to_sym == :transaction_time && value.is_a?(String) ? Time.parse(value) : value self.send("#{key.to_s}=".to_sym, v) end end end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
4 5 6 |
# File 'lib/ipizza/payment.rb', line 4 def amount @amount end |
#currency ⇒ Object
Returns the value of attribute currency.
4 5 6 |
# File 'lib/ipizza/payment.rb', line 4 def currency @currency end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/ipizza/payment.rb', line 4 def @message end |
#provider ⇒ Object
Returns the value of attribute provider.
4 5 6 |
# File 'lib/ipizza/payment.rb', line 4 def provider @provider end |
#receiver_account ⇒ Object
Returns the value of attribute receiver_account.
4 5 6 |
# File 'lib/ipizza/payment.rb', line 4 def receiver_account @receiver_account end |
#receiver_name ⇒ Object
Returns the value of attribute receiver_name.
4 5 6 |
# File 'lib/ipizza/payment.rb', line 4 def receiver_name @receiver_name end |
#refnum ⇒ Object
Returns the value of attribute refnum.
4 5 6 |
# File 'lib/ipizza/payment.rb', line 4 def refnum @refnum end |
#sender_account ⇒ Object
Returns the value of attribute sender_account.
4 5 6 |
# File 'lib/ipizza/payment.rb', line 4 def sender_account @sender_account end |
#sender_name ⇒ Object
Returns the value of attribute sender_name.
4 5 6 |
# File 'lib/ipizza/payment.rb', line 4 def sender_name @sender_name end |
#stamp ⇒ Object
Returns the value of attribute stamp.
4 5 6 |
# File 'lib/ipizza/payment.rb', line 4 def stamp @stamp end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
4 5 6 |
# File 'lib/ipizza/payment.rb', line 4 def transaction_id @transaction_id end |
#transaction_time ⇒ Object
Returns the value of attribute transaction_time.
4 5 6 |
# File 'lib/ipizza/payment.rb', line 4 def transaction_time @transaction_time end |