Class: Mobilepay::Security
- Inherits:
-
Object
- Object
- Mobilepay::Security
- Includes:
- HTTParty, Requests, Requests::GenerateSignature, PublicKey
- Defined in:
- lib/mobilepay/security.rb,
lib/mobilepay/security/public_key.rb
Overview
Security requests
Defined Under Namespace
Modules: PublicKey
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#privatekey ⇒ Object
readonly
Returns the value of attribute privatekey.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Security
constructor
A new instance of Security.
Methods included from Requests::GenerateSignature
Methods included from PublicKey
Constructor Details
#initialize(args = {}) ⇒ Security
Returns a new instance of Security.
19 20 21 22 23 |
# File 'lib/mobilepay/security.rb', line 19 def initialize(args = {}) @privatekey = args[:privatekey] @headers = { 'Ocp-Apim-Subscription-Key' => args[:subscription_key], 'Content-Type' => 'application/json' } @body = '' end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
17 18 19 |
# File 'lib/mobilepay/security.rb', line 17 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
17 18 19 |
# File 'lib/mobilepay/security.rb', line 17 def headers @headers end |
#privatekey ⇒ Object (readonly)
Returns the value of attribute privatekey.
17 18 19 |
# File 'lib/mobilepay/security.rb', line 17 def privatekey @privatekey end |