Class: Ipizza::Payment

Inherits:
Object
  • Object
show all
Defined in:
lib/ipizza/payment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/ipizza/payment.rb', line 4

def amount
  @amount
end

#currencyObject

Returns the value of attribute currency.



4
5
6
# File 'lib/ipizza/payment.rb', line 4

def currency
  @currency
end

#messageObject

Returns the value of attribute message.



4
5
6
# File 'lib/ipizza/payment.rb', line 4

def message
  @message
end

#providerObject

Returns the value of attribute provider.



4
5
6
# File 'lib/ipizza/payment.rb', line 4

def provider
  @provider
end

#receiver_accountObject

Returns the value of attribute receiver_account.



4
5
6
# File 'lib/ipizza/payment.rb', line 4

def 
  @receiver_account
end

#receiver_nameObject

Returns the value of attribute receiver_name.



4
5
6
# File 'lib/ipizza/payment.rb', line 4

def receiver_name
  @receiver_name
end

#refnumObject

Returns the value of attribute refnum.



4
5
6
# File 'lib/ipizza/payment.rb', line 4

def refnum
  @refnum
end

#sender_accountObject

Returns the value of attribute sender_account.



4
5
6
# File 'lib/ipizza/payment.rb', line 4

def 
  @sender_account
end

#sender_nameObject

Returns the value of attribute sender_name.



4
5
6
# File 'lib/ipizza/payment.rb', line 4

def sender_name
  @sender_name
end

#stampObject

Returns the value of attribute stamp.



4
5
6
# File 'lib/ipizza/payment.rb', line 4

def stamp
  @stamp
end

#transaction_idObject

Returns the value of attribute transaction_id.



4
5
6
# File 'lib/ipizza/payment.rb', line 4

def transaction_id
  @transaction_id
end

#transaction_timeObject

Returns the value of attribute transaction_time.



4
5
6
# File 'lib/ipizza/payment.rb', line 4

def transaction_time
  @transaction_time
end