Class: MasspayRubySdk::SubaccountService

Inherits:
Object
  • Object
show all
Defined in:
lib/masspay_ruby_sdk/api/subaccount_service.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ SubaccountService

Returns a new instance of SubaccountService.



15
16
17
# File 'lib/masspay_ruby_sdk/api/subaccount_service.rb', line 15

def initialize(client)
  @client = client ||= Client.new
end

Instance Method Details

#create_subaccount(body) ⇒ Object

Create a subaccount POST /subaccount

Parameters:

  • body

    The body of the request



22
23
24
25
26
# File 'lib/masspay_ruby_sdk/api/subaccount_service.rb', line 22

def create_subaccount body
  @client.post("subaccount") do |req|
    req.body = body
  end
end

#get_subaccount_subaccount_token_ubo(subaccount_token, body) ⇒ Object

Add UBOs to subaccount POST /subaccount/subaccount_token/ubo

Parameters:

  • body

    The body of the request



31
32
33
34
35
# File 'lib/masspay_ruby_sdk/api/subaccount_service.rb', line 31

def get_subaccount_subaccount_token_ubo subaccount_token, body
  @client.post("subaccount/#{subaccount_token}/ubo") do |req|
    req.body = body
  end
end

#upload_subaccount_ubo_id(subaccount_token, ubo_token, body) ⇒ Object

Upload UBO ID photos POST /subaccount/subaccount_token/ubo/ubo_token/id

Parameters:

  • body

    The body of the request



40
41
42
43
44
# File 'lib/masspay_ruby_sdk/api/subaccount_service.rb', line 40

def upload_subaccount_ubo_id subaccount_token, ubo_token, body
  @client.post("subaccount/#{subaccount_token}/ubo/#{ubo_token}/id") do |req|
    req.body = body
  end
end