send method

Future<PayoutBatch> send({
  1. List<String>? ids,
})

Sends your valid payout requests (or only those of ids) as a new batch, priced again and submitted: it then waits for its approvals and the funds, or starts. The rest stay in the list. An empty ids throws an ArgumentError: leave it null to send them all.

Implementation

Future<PayoutBatch> send({List<String>? ids}) async {
  if (ids != null && ids.isEmpty) {
    throw ArgumentError(
        'payitgo: ids is empty: leave it null to send every valid request');
  }
  return PayoutBatch((await _t.request('POST', '/v1/payouts/send',
          body: ids == null ? null : {'ids': ids}))['batch']
      as Map<String, dynamic>);
}