Class: Mobilepay::Security

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Requests::GenerateSignature

#generate_signature

Methods included from PublicKey

#public_key

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

#bodyObject (readonly)

Returns the value of attribute body.



17
18
19
# File 'lib/mobilepay/security.rb', line 17

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



17
18
19
# File 'lib/mobilepay/security.rb', line 17

def headers
  @headers
end

#privatekeyObject (readonly)

Returns the value of attribute privatekey.



17
18
19
# File 'lib/mobilepay/security.rb', line 17

def privatekey
  @privatekey
end