Class: RestfulKashflow::Services::Customer

Inherits:
BaseService
  • Object
show all
Defined in:
lib/restful_kashflow/services/customer.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


15
16
17
# File 'lib/restful_kashflow/services/customer.rb', line 15

def has_signed_mandate?
  !!@customer["IsGoCardlessMandateSet"]
end