createOne method

Future<QuickbooksInvoice> createOne({
  1. required String accessToken,
  2. required String companyId,
  3. required QuickbooksInvoice data,
})

Creates a QuickbooksInvoice with the given accessToken and companyId

Implementation

Future<QuickbooksInvoice> createOne({
  required String accessToken,
  required String companyId,
  required QuickbooksInvoice data,
}) async {
  var result = await post(
    accessToken: accessToken,
    companyId: companyId,
    data: data.toMap(withId: false),
    location: 'Invoice',
  );
  var newData = QuickbooksInvoice.fromMap(result);
  return newData;
}