Module: Telleroo::API::Recipients

Included in:
Telleroo::API
Defined in:
lib/telleroo/api/recipients.rb

Overview

Telleroo Recipients. These are Bank Accounts that receive funds

Instance Method Summary collapse

Instance Method Details

#create_recipient(name: nil, currency_code: nil, options: {}) ⇒ Hash

Returns:

  • (Hash)


61
62
63
64
65
66
67
68
# File 'lib/telleroo/api/recipients.rb', line 61

def create_recipient(name: nil, currency_code: nil, options: {})
  params = {
    name: name,
    currency_code: currency_code
  }.merge(options)

  post('recipients', params)
end

#delete_recipient(id) ⇒ Object

Parameters:

  • id (String)

    The Telleroo ID of the Recipient



74
75
76
# File 'lib/telleroo/api/recipients.rb', line 74

def delete_recipient(id)
  delete("recipients/#{id}")
end

#get_recipient(id) ⇒ Hash

Parameters:

  • id (String)

    The Telleroo ID of the Recipient

Returns:

  • (Hash)


37
38
39
# File 'lib/telleroo/api/recipients.rb', line 37

def get_recipient(id)
  get("recipients/#{id}")
end

#recipientsArray

Returns:

  • (Array)


29
30
31
# File 'lib/telleroo/api/recipients.rb', line 29

def recipients
  get('recipients')
end