class GoCardlessPro::Services::BankAccountDetailsService
Service for making requests to the BankAccountDetail endpoints
Public Instance Methods
Source
# File lib/gocardless_pro/services/bank_account_details_service.rb, line 19 def get(identity, options = {}) path = sub_url('/bank_account_details/:identity', { 'identity' => identity }) options[:retry_failures] = true response = make_request(:get, path, options) return if response.body.nil? Resources::BankAccountDetail.new(unenvelope_body(response.body), response) end
Returns bank account details in the flattened JSON Web Encryption format described in RFC 7516 Example URL: /bank_account_details/:identity
@param identity # Unique identifier, beginning with “BA”. @param options [Hash] parameters as a hash, under a params key.
Private Instance Methods
Source
# File lib/gocardless_pro/services/bank_account_details_service.rb, line 43 def envelope_key 'bank_account_details' end
return the key which API responses will envelope data under
Source
# File lib/gocardless_pro/services/bank_account_details_service.rb, line 38 def unenvelope_body(body) body[envelope_key] || body['data'] end
Unenvelope the response of the body using the service’s ‘envelope_key`
@param body [Hash]