Class: RestfulKashflow::Services::Customer
- Inherits:
-
BaseService
- Object
- BaseService
- RestfulKashflow::Services::Customer
- Defined in:
- lib/restful_kashflow/services/customer.rb
Instance Method Summary collapse
- #has_signed_mandate? ⇒ Boolean
-
#initialize(api_service, customer_id) ⇒ Customer
constructor
A new instance of Customer.
Constructor Details
#initialize(api_service, customer_id) ⇒ Customer
Returns a new instance of Customer.
6 7 8 9 10 11 12 13 |
# File 'lib/restful_kashflow/services/customer.rb', line 6 def initialize(api_service, customer_id) @url = "/customers/#{customer_id}" @api_service = api_service call_url @customer = JSON.parse(@response.body) end |
Instance Method Details
#has_signed_mandate? ⇒ Boolean
15 16 17 |
# File 'lib/restful_kashflow/services/customer.rb', line 15 def has_signed_mandate? !!@customer["IsGoCardlessMandateSet"] end |