Class: MonoMerchant::Pubkey

Inherits:
ApiRequest show all
Defined in:
lib/mono-merchant/pubkey.rb

Constant Summary

Constants inherited from ApiRequest

ApiRequest::API_URL, ApiRequest::DEFAULT_CURRENCY

Instance Attribute Summary

Attributes inherited from ApiRequest

#errors, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiRequest

#url

Constructor Details

#initializePubkey

Returns a new instance of Pubkey.



18
19
20
# File 'lib/mono-merchant/pubkey.rb', line 18

def initialize
  super(type: :get)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MonoMerchant::ApiRequest

Class Method Details

.getObject



6
7
8
9
10
11
# File 'lib/mono-merchant/pubkey.rb', line 6

def self.get
  @@get ||= begin
              key = new.key
              Base.decode key if key
            end
end

.resetObject



13
14
15
16
# File 'lib/mono-merchant/pubkey.rb', line 13

def self.reset
  @@get = nil
  self.get
end