Module: MangoApi::SettlementTransfers

Extended by:
UriProvider
Defined in:
lib/mangopay/api/service/settlement_transfers.rb

Overview

Provides API method delegates concerning the SettlementTransfer entity

Class Method Summary collapse

Methods included from UriProvider

provide_uri

Class Method Details

.create(repudiation_id, transfer) ⇒ SettlementTransfer

Creates a new settlement transfer entity.

SettlementTransfer properties:

  • Required

    • author_id

    • debited_funds

    • fees

  • Optional

    • tag

transfer to be created entity object

Parameters:

  • +repudiation_id+ (String)

    ID of the corresponding repudiation

  • +transfer+ (SettlementTransfer)

    model object of the settlement

Returns:

  • (SettlementTransfer)

    the newly-created SettlementTransfer



25
26
27
28
29
# File 'lib/mangopay/api/service/settlement_transfers.rb', line 25

def create(repudiation_id, transfer)
  uri = provide_uri(:create_settlement_transfer, repudiation_id)
  response = HttpClient.post(uri, transfer)
  parse response
end

.get(id) ⇒ SettlementTransfer

Retrieves a settlement transfer entity.

entity object

Parameters:

  • +id+ (String)

    ID of the settlement transfer to retrieve

Returns:

  • (SettlementTransfer)

    the requested SettlementTransfer



36
37
38
39
40
# File 'lib/mangopay/api/service/settlement_transfers.rb', line 36

def get(id)
  uri = provide_uri(:get_settlement_transfer, id)
  response = HttpClient.get(uri)
  parse response
end