Module: Supreme

Defined in:
lib/supreme.rb,
lib/supreme/api.rb,
lib/supreme/uri.rb,
lib/supreme/version.rb,
lib/supreme/response.rb

Defined Under Namespace

Classes: API, Banklist, Error, Response, Status, Transaction, URI

Constant Summary collapse

VERSION =
'0.2.1'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.modeObject

Holds either :test or :live to signal whether to run in test or live mode. The default value is :test.



15
16
17
# File 'lib/supreme.rb', line 15

def mode
  @mode
end

.partner_idObject

Your Mollie Partner ID, you can find it under ‘Accountgegevens’ in the settings for your account on mollie.nl.



18
19
20
# File 'lib/supreme.rb', line 18

def partner_id
  @partner_id
end

Class Method Details

.apiObject

Returns an instance of the API with settings from the Supreme class accessors. If you need to handle multiple accounts in your application you will need to instantiate multiple API instances yourself.



23
24
25
26
27
28
# File 'lib/supreme.rb', line 23

def self.api
  Supreme::API.new(
    :mode       => mode,
    :partner_id => partner_id
  )
end

.reset!Object

Resets the class back to the default settings



31
32
33
34
# File 'lib/supreme.rb', line 31

def self.reset!
  self.mode = :test
  self.partner_id = nil
end