Class: Skrill::Payment::Configuration
- Inherits:
-
Object
- Object
- Skrill::Payment::Configuration
- Extended by:
- Utils
- Defined in:
- lib/skrill/payment/configuration.rb
Constant Summary collapse
- OPTIONS =
[:merchant_email, :merchant_password, :currency, :subject, :note, :http_proxy]
Class Method Summary collapse
-
.configure(options = {}, &block) ⇒ Configuration
Sets the Skrill::Payment::Configuration options.
-
.serialized_data ⇒ Hash
Returns all Skrill::Payment::Configuration options in a Hash.
Methods included from Utils
assign_attirbutes, serialize_arguments
Class Method Details
.configure(options = {}, &block) ⇒ Configuration
Sets the Skrill::Payment::Configuration options. Attributes can be passed in by using a block or a Hash. The Skrill API expects the merchant password to be a MD5 hash generated from the password entered in the Skrill developer settings page.
24 25 26 27 28 29 30 |
# File 'lib/skrill/payment/configuration.rb', line 24 def configure( = {}, &block) Skrill::Payment::Configuration.tap do |config| .each { |option, value| config.public_send("#{option}=", value) } yield(config) if block_given? end end |
.serialized_data ⇒ Hash
Returns all Skrill::Payment::Configuration options in a Hash.
37 38 39 |
# File 'lib/skrill/payment/configuration.rb', line 37 def serialized_data serialize_arguments(OPTIONS) end |