Class: AdyenClient::Configuration
- Inherits:
-
Object
- Object
- AdyenClient::Configuration
- Defined in:
- lib/adyen_client/configuration.rb
Constant Summary collapse
- BASE_URI =
"https://pal-%s.adyen.com/pal/servlet"
Instance Attribute Summary collapse
-
#cse_public_key ⇒ Object
Returns the value of attribute cse_public_key.
-
#default_currency ⇒ Object
Returns the value of attribute default_currency.
-
#default_merchant_account ⇒ Object
Returns the value of attribute default_merchant_account.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
Instance Attribute Details
#cse_public_key ⇒ Object
Returns the value of attribute cse_public_key.
8 9 10 |
# File 'lib/adyen_client/configuration.rb', line 8 def cse_public_key @cse_public_key end |
#default_currency ⇒ Object
Returns the value of attribute default_currency.
10 11 12 |
# File 'lib/adyen_client/configuration.rb', line 10 def default_currency @default_currency end |
#default_merchant_account ⇒ Object
Returns the value of attribute default_merchant_account.
9 10 11 |
# File 'lib/adyen_client/configuration.rb', line 9 def default_merchant_account @default_merchant_account end |
#environment ⇒ Object
Returns the value of attribute environment.
5 6 7 |
# File 'lib/adyen_client/configuration.rb', line 5 def environment @environment end |
#password ⇒ Object
Returns the value of attribute password.
7 8 9 |
# File 'lib/adyen_client/configuration.rb', line 7 def password @password end |
#username ⇒ Object
Returns the value of attribute username.
6 7 8 |
# File 'lib/adyen_client/configuration.rb', line 6 def username @username end |
Instance Method Details
#apply(klass) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/adyen_client/configuration.rb', line 16 def apply(klass) klass.base_uri(BASE_URI % environment) klass.basic_auth(username, password) # prevent following redirects and raise HTTParty::RedirectionTooDeep klass.no_follow(true) klass.format(:json) klass.headers("Content-Type" => "application/json; charset=utf-8") end |
#set(hash) ⇒ Object
12 13 14 |
# File 'lib/adyen_client/configuration.rb', line 12 def set(hash) hash.each { |k, v| send("#{k}=", v) if respond_to?("#{k}=") } end |