Class: TigerPayment::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/tiger-payment/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_typeObject (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

#amountObject (readonly)

Returns the value of attribute amount.



3
4
5
# File 'lib/tiger-payment/action.rb', line 3

def amount
  @amount
end

#batch_idObject (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

#dateObject (readonly)

Returns the value of attribute date.



3
4
5
# File 'lib/tiger-payment/action.rb', line 3

def date
  @date
end

#ip_addressObject (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_idObject (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_codeObject (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_textObject (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

#sourceObject (readonly)

Returns the value of attribute source.



3
4
5
# File 'lib/tiger-payment/action.rb', line 3

def source
  @source
end

#successObject (readonly)

Returns the value of attribute success.



3
4
5
# File 'lib/tiger-payment/action.rb', line 3

def success
  @success
end

#usernameObject (readonly)

Returns the value of attribute username.



3
4
5
# File 'lib/tiger-payment/action.rb', line 3

def username
  @username
end