Class: Giact::PaymentReply

Inherits:
Object
  • Object
show all
Defined in:
lib/giact/payment_reply.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ PaymentReply

Returns a new instance of PaymentReply.



5
6
7
# File 'lib/giact/payment_reply.rb', line 5

def initialize(response)
  @transaction_id, @error, @pass, @details, @code = response.split("|")
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/giact/payment_reply.rb', line 3

def code
  @code
end

#detailsObject (readonly)

Returns the value of attribute details.



3
4
5
# File 'lib/giact/payment_reply.rb', line 3

def details
  @details
end

#errorObject (readonly)

Returns the value of attribute error.



3
4
5
# File 'lib/giact/payment_reply.rb', line 3

def error
  @error
end

#passObject (readonly)

Returns the value of attribute pass.



3
4
5
# File 'lib/giact/payment_reply.rb', line 3

def pass
  @pass
end

#transaction_idObject (readonly)

Returns the value of attribute transaction_id.



3
4
5
# File 'lib/giact/payment_reply.rb', line 3

def transaction_id
  @transaction_id
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/giact/payment_reply.rb', line 13

def error?
  @error.to_s == 'true'
end

#pass?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/giact/payment_reply.rb', line 17

def pass?
  @pass.to_s == 'true'
end