createOne method

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

Creates a QuickbooksAccount with the given accessToken and companyId

Implementation

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

  var newData = QuickbooksAccount.fromMap(result);
  return newData;
}