Class: GoCardlessPro::Services::FundsAvailabilitiesService
- Inherits:
-
BaseService
- Object
- BaseService
- GoCardlessPro::Services::FundsAvailabilitiesService
- Defined in:
- lib/gocardless_pro/services/funds_availabilities_service.rb
Overview
Service for making requests to the FundsAvailability endpoints
Instance Method Summary collapse
-
#check(identity, options = {}) ⇒ Object
Checks if the payer's current balance is sufficient to cover the amount the merchant wants to charge within the consent parameters defined on the mandate.
Methods inherited from BaseService
#initialize, #make_request, #sub_url
Constructor Details
This class inherits a constructor from GoCardlessPro::Services::BaseService
Instance Method Details
#check(identity, options = {}) ⇒ Object
Checks if the payer's current balance is sufficient to cover the amount the merchant wants to charge within the consent parameters defined on the mandate. Example URL: /funds_availability/:identity
apply to mandates created before 2016.
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/gocardless_pro/services/funds_availabilities_service.rb', line 21 def check(identity, = {}) path = sub_url('/funds_availability/:identity', { 'identity' => identity, }) [:retry_failures] = false response = make_request(:get, path, ) return if response.body.nil? Resources::FundsAvailability.new(unenvelope_body(response.body), response) end |