Class: Payoneer::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/payoneer/response.rb

Constant Summary collapse

OK_STATUS_CODE =
'000'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, body) ⇒ Response

Returns a new instance of Response.



7
8
9
10
# File 'lib/payoneer/response.rb', line 7

def initialize(code, body)
  @code = code
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



5
6
7
# File 'lib/payoneer/response.rb', line 5

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/payoneer/response.rb', line 5

def code
  @code
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/payoneer/response.rb', line 12

def ok?
  code == OK_STATUS_CODE
end