Class: Paynl::Config
- Inherits:
-
Object
- Object
- Paynl::Config
- Defined in:
- lib/paynl/config.rb
Constant Summary collapse
- @@apiToken =
''- @@tokenCode =
''- @@serviceId =
''- @@apiBase =
'https://rest-api.pay.nl'- @@apiVersion =
5
Class Method Summary collapse
-
.getApiToken ⇒ Object
getApiToken - Retrieves Pay.nl api token.
-
.getApiUrl(endpoint, version = nil) ⇒ Object
getApiUrl - Get constructed API Url for the given endpoint.
-
.getApiVersion ⇒ Object
getApiVersion - Retrieves Pay.nl Api version.
-
.getServiceId ⇒ Object
getServiceId - Retrieves Pay.nl Service Id.
-
.getTokenCode ⇒ Object
getTokenCode - Retrieves Pay.nl tokencode.
-
.setApiToken(apiToken) ⇒ Object
setApiToken - Sets Pay.nl api token.
-
.setApiVersion(apiVersion) ⇒ Object
setApiVersion - Set the Pay.nl Api version.
-
.setServiceId(serviceId) ⇒ Object
setServiceId - Set the Pay.nl Service Id.
-
.setTokenCode(tokenCode) ⇒ Object
setTokenCode - Sets Pay.nl tokencode.
Class Method Details
.getApiToken ⇒ Object
getApiToken - Retrieves Pay.nl api token
20 21 22 |
# File 'lib/paynl/config.rb', line 20 def self.getApiToken return @@apiToken end |
.getApiUrl(endpoint, version = nil) ⇒ Object
getApiUrl - Get constructed API Url for the given endpoint
50 51 52 53 54 55 56 |
# File 'lib/paynl/config.rb', line 50 def self.getApiUrl(endpoint, version = nil) unless !version.nil? version = @@apiVersion end return @@apiBase + '/v' + version.to_s + '/' + endpoint + '/json' end |
.getApiVersion ⇒ Object
getApiVersion - Retrieves Pay.nl Api version
40 41 42 |
# File 'lib/paynl/config.rb', line 40 def self.getApiVersion return @@apiVersion end |
.getServiceId ⇒ Object
getServiceId - Retrieves Pay.nl Service Id
30 31 32 |
# File 'lib/paynl/config.rb', line 30 def self.getServiceId return @@serviceId end |
.getTokenCode ⇒ Object
getTokenCode - Retrieves Pay.nl tokencode
10 11 12 |
# File 'lib/paynl/config.rb', line 10 def self.getTokenCode return @@tokenCode end |
.setApiToken(apiToken) ⇒ Object
setApiToken - Sets Pay.nl api token
25 26 27 |
# File 'lib/paynl/config.rb', line 25 def self.setApiToken(apiToken) @@apiToken = apiToken end |
.setApiVersion(apiVersion) ⇒ Object
setApiVersion - Set the Pay.nl Api version
45 46 47 |
# File 'lib/paynl/config.rb', line 45 def self.setApiVersion(apiVersion) @@apiVersion = apiVersion end |
.setServiceId(serviceId) ⇒ Object
setServiceId - Set the Pay.nl Service Id
35 36 37 |
# File 'lib/paynl/config.rb', line 35 def self.setServiceId(serviceId) @@serviceId = serviceId end |
.setTokenCode(tokenCode) ⇒ Object
setTokenCode - Sets Pay.nl tokencode
15 16 17 |
# File 'lib/paynl/config.rb', line 15 def self.setTokenCode(tokenCode) @@tokenCode = tokenCode end |