Class: GoCardlessPro::Services::TransferredMandatesService

Inherits:
BaseService
  • Object
show all
Defined in:
lib/gocardless_pro/services/transferred_mandates_service.rb

Overview

Service for making requests to the TransferredMandate endpoints

Instance Method Summary collapse

Methods inherited from BaseService

#initialize, #make_request, #sub_url

Constructor Details

This class inherits a constructor from GoCardlessPro::Services::BaseService

Instance Method Details

#transferred_mandates(identity, options = {}) ⇒ Object

Returns new customer bank details for a mandate that’s been recently transferred Example URL: /transferred_mandates/:identity

apply to mandates created before 2016.

Parameters:

  • identity

    # Unique identifier, beginning with “MD”. Note that this prefix may not

  • options (Hash) (defaults to: {})

    parameters as a hash, under a params key.



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/gocardless_pro/services/transferred_mandates_service.rb', line 20

def transferred_mandates(identity, options = {})
  path = sub_url('/transferred_mandates/:identity', {
                   'identity' => identity
                 })

  options[:retry_failures] = false

  response = make_request(:get, path, options)

  return if response.body.nil?

  Resources::TransferredMandate.new(unenvelope_body(response.body), response)
end