Class: SpreedlyCore::Gateway
Instance Attribute Summary collapse
-
#auth_modes ⇒ Object
readonly
Returns the value of attribute auth_modes.
-
#gateway_type ⇒ Object
readonly
Returns the value of attribute gateway_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#supports_authorize ⇒ Object
readonly
Returns the value of attribute supports_authorize.
-
#supports_capture ⇒ Object
readonly
Returns the value of attribute supports_capture.
-
#supports_credit ⇒ Object
readonly
Returns the value of attribute supports_credit.
-
#supports_purchase ⇒ Object
readonly
Returns the value of attribute supports_purchase.
-
#supports_void ⇒ Object
readonly
Returns the value of attribute supports_void.
Class Method Summary collapse
-
.supported_gateways ⇒ Object
returns an array of Gateway which are supported.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Gateway
constructor
A new instance of Gateway.
Methods inherited from Base
configure, gateway_token, login, verify_get, verify_options, verify_post, verify_put, verify_request
Constructor Details
#initialize(attrs = {}) ⇒ Gateway
Returns a new instance of Gateway.
14 15 16 17 |
# File 'lib/spreedly_core/gateway.rb', line 14 def initialize(attrs={}) attrs.merge!(attrs.delete("characteristics") || {}) super(attrs) end |
Instance Attribute Details
#auth_modes ⇒ Object (readonly)
Returns the value of attribute auth_modes.
3 4 5 |
# File 'lib/spreedly_core/gateway.rb', line 3 def auth_modes @auth_modes end |
#gateway_type ⇒ Object (readonly)
Returns the value of attribute gateway_type.
3 4 5 |
# File 'lib/spreedly_core/gateway.rb', line 3 def gateway_type @gateway_type end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/spreedly_core/gateway.rb', line 3 def name @name end |
#supports_authorize ⇒ Object (readonly)
Returns the value of attribute supports_authorize.
3 4 5 |
# File 'lib/spreedly_core/gateway.rb', line 3 def @supports_authorize end |
#supports_capture ⇒ Object (readonly)
Returns the value of attribute supports_capture.
3 4 5 |
# File 'lib/spreedly_core/gateway.rb', line 3 def supports_capture @supports_capture end |
#supports_credit ⇒ Object (readonly)
Returns the value of attribute supports_credit.
3 4 5 |
# File 'lib/spreedly_core/gateway.rb', line 3 def supports_credit @supports_credit end |
#supports_purchase ⇒ Object (readonly)
Returns the value of attribute supports_purchase.
3 4 5 |
# File 'lib/spreedly_core/gateway.rb', line 3 def supports_purchase @supports_purchase end |
#supports_void ⇒ Object (readonly)
Returns the value of attribute supports_void.
3 4 5 |
# File 'lib/spreedly_core/gateway.rb', line 3 def supports_void @supports_void end |
Class Method Details
.supported_gateways ⇒ Object
returns an array of Gateway which are supported
8 9 10 11 12 |
# File 'lib/spreedly_core/gateway.rb', line 8 def self.supported_gateways ("/gateways.xml") do |response| response.parsed_response["gateways"]["gateway"].map{|h| new(h) } end end |