Module: Polirb
- Defined in:
- lib/polirb.rb,
lib/polirb/client.rb,
lib/polirb/errors.rb,
lib/polirb/static.rb,
lib/polirb/request.rb,
lib/polirb/version.rb,
lib/polirb/client/transactions.rb
Defined Under Namespace
Modules: Request, Static, Transactions Classes: Client, Error
Constant Summary collapse
- VERSION =
'0.1.1'
- @@options =
{}
Class Method Summary collapse
-
.configuration ⇒ Object
Returns global configuration hash.
-
.configure(options = {}) ⇒ Object
Define a global configuration.
-
.new(options = {}) ⇒ Object
Create a new Polirb::Client instance.
-
.reset_configuration ⇒ Object
Resets the global configuration.
Class Method Details
.configuration ⇒ Object
Returns global configuration hash
45 46 47 |
# File 'lib/polirb.rb', line 45 def self.configuration @@options end |
.configure(options = {}) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/polirb.rb', line 27 def self.configure(={}) unless .kind_of?(Hash) raise ArgumentError, "Options hash required." end @@options[:merchant_code] = [:merchant_code] @@options[:authentication_code] = [:authentication_code] @@options[:merchant_homepage_url] = [:merchant_homepage_url] @@options[:success_url] = [:success_url] @@options[:failure_url] = [:failure_url] @@options[:cancellation_url] = [:cancellation_url] @@options[:notification_url] = [:notification_url] @@options[:timeout] = [:timeout] @@options end |
.new(options = {}) ⇒ Object
Create a new Polirb::Client instance
12 13 14 |
# File 'lib/polirb.rb', line 12 def self.new(={}) Polirb::Client.new() end |
.reset_configuration ⇒ Object
Resets the global configuration
51 52 53 |
# File 'lib/polirb.rb', line 51 def self.reset_configuration @@options = {} end |