Module: Slimpay
- Defined in:
- lib/slimpay.rb,
lib/slimpay/error.rb
Defined Under Namespace
Classes: Error
Constant Summary collapse
- LINK_NAMESPACE =
'https://api.slimpay.net/alps#'
Class Attribute Summary collapse
-
.client_id ⇒ Object
Returns the value of attribute client_id.
-
.client_secret ⇒ Object
Returns the value of attribute client_secret.
-
.creditor_reference ⇒ Object
Returns the value of attribute creditor_reference.
-
.logger ⇒ Object
Returns the value of attribute logger.
Class Method Summary collapse
- .base ⇒ Object
- .configure {|_self| ... } ⇒ Object
- .initialize ⇒ Object
- .sandbox ⇒ Object
- .sandbox=(value) ⇒ Object
Class Attribute Details
.client_id ⇒ Object
Returns the value of attribute client_id.
13 14 15 |
# File 'lib/slimpay.rb', line 13 def client_id @client_id end |
.client_secret ⇒ Object
Returns the value of attribute client_secret.
13 14 15 |
# File 'lib/slimpay.rb', line 13 def client_secret @client_secret end |
.creditor_reference ⇒ Object
Returns the value of attribute creditor_reference.
13 14 15 |
# File 'lib/slimpay.rb', line 13 def creditor_reference @creditor_reference end |
.logger ⇒ Object
Returns the value of attribute logger.
13 14 15 |
# File 'lib/slimpay.rb', line 13 def logger @logger end |
Class Method Details
.base ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/slimpay.rb', line 32 def base return @base if @base if !self.client_id || !self.client_secret raise "[Slimpay] client_id or client_secret not defined" end json = request(:get, '/') klass = generate_resource(json) @base = Slimpay.const_set('Base', klass).new(json) @base end |
.configure {|_self| ... } ⇒ Object
19 20 21 |
# File 'lib/slimpay.rb', line 19 def configure yield(self) end |
.initialize ⇒ Object
15 16 17 |
# File 'lib/slimpay.rb', line 15 def initialize sandbox = true end |
.sandbox ⇒ Object
23 24 25 |
# File 'lib/slimpay.rb', line 23 def sandbox @sandbox != false end |
.sandbox=(value) ⇒ Object
27 28 29 30 |
# File 'lib/slimpay.rb', line 27 def sandbox=(value) @sandbox = value update_base_url end |