Module: Transbank::Onepay::Response

Includes:
Utils::SignatureUtils, Utils::JSONUtils
Included in:
RefundCreateResponse, TransactionCommitResponse, TransactionCreateResponse
Defined in:
lib/transbank/sdk/onepay/responses/response.rb

Overview

Shared methods and attributes between all types of Responses

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils::SignatureUtils

#hmac_sha256, #signature_for, #to_data, #valid_signature?

Methods included from Utils::JSONUtils

included, #jsonify, #transform_hash_keys, #underscore

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



7
8
9
# File 'lib/transbank/sdk/onepay/responses/response.rb', line 7

def description
  @description
end

#response_codeObject

Returns the value of attribute response_code.



6
7
8
# File 'lib/transbank/sdk/onepay/responses/response.rb', line 6

def response_code
  @response_code
end

Instance Method Details

#full_descriptionObject



13
14
15
# File 'lib/transbank/sdk/onepay/responses/response.rb', line 13

def full_description
  "#{ response_code } : #{ description }"
end

#response_ok?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/transbank/sdk/onepay/responses/response.rb', line 9

def response_ok?
  response_code.downcase == 'ok'
end