createInvoice method

Future<InvoiceModel> createInvoice(
  1. CreateInvoiceModel request, {
  2. required Object authorization,
})

Parameters:

Implementation

Future<InvoiceModel> createInvoice(
  CreateInvoiceModel request, {
  required Object authorization,
}) async {
  final response = await createInvoiceWithHttpInfo(
    request,
    authorization: authorization,
  );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  return await apiClient.deserializeAsync(
    await _decodeBodyBytes(response),
    'InvoiceModel',
  ) as InvoiceModel;
}