Class: GoPay::PaymentMethod
- Inherits:
-
Object
- Object
- GoPay::PaymentMethod
- Defined in:
- lib/gopay/models/payment_method.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#logo ⇒ Object
readonly
Returns the value of attribute logo.
-
#offline ⇒ Object
readonly
Returns the value of attribute offline.
-
#payment_method ⇒ Object
readonly
Returns the value of attribute payment_method.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ PaymentMethod
constructor
A new instance of PaymentMethod.
Constructor Details
#initialize(attributes = {}) ⇒ PaymentMethod
Returns a new instance of PaymentMethod.
8 9 10 11 12 |
# File 'lib/gopay/models/payment_method.rb', line 8 def initialize(attributes = {}) attributes.each do |key, value| instance_variable_set(:"@#{key}", value) if self.respond_to?(key) end end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/gopay/models/payment_method.rb', line 6 def code @code end |
#logo ⇒ Object (readonly)
Returns the value of attribute logo.
6 7 8 |
# File 'lib/gopay/models/payment_method.rb', line 6 def logo @logo end |
#offline ⇒ Object (readonly)
Returns the value of attribute offline.
6 7 8 |
# File 'lib/gopay/models/payment_method.rb', line 6 def offline @offline end |
#payment_method ⇒ Object (readonly)
Returns the value of attribute payment_method.
6 7 8 |
# File 'lib/gopay/models/payment_method.rb', line 6 def payment_method @payment_method end |
Class Method Details
.all ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/gopay/models/payment_method.rb', line 14 def self.all client = Savon::Client.new :wsdl => GoPay.configuration.urls["wsdl"], :log => false response = client.call :payment_method_list response.to_hash[:payment_method_list_response][:payment_method_list_return][:payment_method_list_return].map do |item| PaymentMethod.new(item) end end |