Module: BayonetClient
- Defined in:
- lib/bayonet_client.rb,
lib/bayonet_client/lending.rb,
lib/bayonet_client/version.rb,
lib/bayonet_client/response.rb,
lib/bayonet_client/ecommerce.rb,
lib/bayonet_client/api_helper.rb,
lib/bayonet_client/exceptions.rb,
lib/bayonet_client/device_fingerprint.rb
Defined Under Namespace
Classes: ApiHelper, BayonetError, BayonetResponse, DeviceFingerprint, Ecommerce, Lending
Constant Summary collapse
- VERSION =
'2.2.0'- SUPPORTED_API_VERSIONS =
['2']
Class Attribute Summary collapse
-
.api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
.version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
Class Attribute Details
.api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
30 31 32 |
# File 'lib/bayonet_client.rb', line 30 def api_key @api_key end |
.version ⇒ Object (readonly)
Returns the value of attribute version.
31 32 33 |
# File 'lib/bayonet_client.rb', line 31 def version @version end |
Class Method Details
.configure(api_key, version) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/bayonet_client.rb', line 11 def self.configure(api_key, version) if version.nil? || version.empty? = 'Please specify Api version' raise BayonetClient::BayonetError.new(nil, nil, nil, nil, -1, ) end if api_key.nil? || api_key.empty? = 'Please specify Api key' raise BayonetClient::BayonetError.new(nil, nil, nil, nil, -1, ) end unless BayonetClient::SUPPORTED_API_VERSIONS.include?(version) = 'This library does not support the version specified. Please consider updating your dependencies' raise BayonetClient::BayonetError.new(nil, nil, nil, nil, -1, ) end @api_key = api_key @version = version end |