Module: Transbank::Onepay::Request
- Includes:
- Utils::JSONUtils, Utils::SignatureUtils
- Included in:
- RefundCreateRequest, TransactionCommitRequest, TransactionCreateRequest
- Defined in:
- lib/transbank/sdk/onepay/requests/request.rb
Overview
Base module with methods & attributes common to Requests
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#app_key ⇒ Object
Returns the value of attribute app_key.
Instance Method Summary collapse
-
#set_keys_from_options(options) ⇒ Object
Set the request’s @api_key overriding the one in the [Base] class.
Methods included from Utils::JSONUtils
included, #jsonify, #transform_hash_keys, #underscore
Methods included from Utils::SignatureUtils
#hmac_sha256, #signature_for, #to_data, #valid_signature?
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
6 7 8 |
# File 'lib/transbank/sdk/onepay/requests/request.rb', line 6 def api_key @api_key end |
#app_key ⇒ Object
Returns the value of attribute app_key.
7 8 9 |
# File 'lib/transbank/sdk/onepay/requests/request.rb', line 7 def app_key @app_key end |
Instance Method Details
#set_keys_from_options(options) ⇒ Object
Set the request’s @api_key overriding the one in the [Base] class
11 12 13 14 15 |
# File 'lib/transbank/sdk/onepay/requests/request.rb', line 11 def () transform_hash_keys() new_api_key = .fetch(:api_key, nil) self.api_key = new_api_key unless new_api_key.nil? end |