Class: TigerPayment::Action
- Inherits:
-
Object
- Object
- TigerPayment::Action
- Defined in:
- lib/tiger-payment/action.rb
Instance Attribute Summary collapse
-
#action_type ⇒ Object
readonly
Returns the value of attribute action_type.
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#batch_id ⇒ Object
readonly
Returns the value of attribute batch_id.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#ip_address ⇒ Object
readonly
Returns the value of attribute ip_address.
-
#processor_batch_id ⇒ Object
readonly
Returns the value of attribute processor_batch_id.
-
#response_code ⇒ Object
readonly
Returns the value of attribute response_code.
-
#response_text ⇒ Object
readonly
Returns the value of attribute response_text.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Action
constructor
A new instance of Action.
Constructor Details
#initialize(params = {}) ⇒ Action
Returns a new instance of Action.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/tiger-payment/action.rb', line 14 def initialize(params={}) params.each_pair do |k,v| if v == [{}] instance_variable_set('@'+k, nil) else instance_variable_set('@'+k, v.size == 1 ? v.first : v) end end end |
Instance Attribute Details
#action_type ⇒ Object (readonly)
Returns the value of attribute action_type.
3 4 5 |
# File 'lib/tiger-payment/action.rb', line 3 def action_type @action_type end |
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
3 4 5 |
# File 'lib/tiger-payment/action.rb', line 3 def amount @amount end |
#batch_id ⇒ Object (readonly)
Returns the value of attribute batch_id.
3 4 5 |
# File 'lib/tiger-payment/action.rb', line 3 def batch_id @batch_id end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
3 4 5 |
# File 'lib/tiger-payment/action.rb', line 3 def date @date end |
#ip_address ⇒ Object (readonly)
Returns the value of attribute ip_address.
3 4 5 |
# File 'lib/tiger-payment/action.rb', line 3 def ip_address @ip_address end |
#processor_batch_id ⇒ Object (readonly)
Returns the value of attribute processor_batch_id.
3 4 5 |
# File 'lib/tiger-payment/action.rb', line 3 def processor_batch_id @processor_batch_id end |
#response_code ⇒ Object (readonly)
Returns the value of attribute response_code.
3 4 5 |
# File 'lib/tiger-payment/action.rb', line 3 def response_code @response_code end |
#response_text ⇒ Object (readonly)
Returns the value of attribute response_text.
3 4 5 |
# File 'lib/tiger-payment/action.rb', line 3 def response_text @response_text end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
3 4 5 |
# File 'lib/tiger-payment/action.rb', line 3 def source @source end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
3 4 5 |
# File 'lib/tiger-payment/action.rb', line 3 def success @success end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
3 4 5 |
# File 'lib/tiger-payment/action.rb', line 3 def username @username end |