quickbooks-api
Version:
A modular TypeScript SDK for seamless integration with Intuit QuickBooks APIs. Provides robust authentication handling and future-ready foundation for accounting, payments, and commerce operations.
296 lines (294 loc) • 7.1 kB
text/typescript
// Imports
import type { CreditMemo } from '../../src/app';
export const mockCreditMemoData: Array<CreditMemo> = [
{
TxnDate: '2021-01-15',
domain: 'QBO',
PrintStatus: 'NeedToPrint',
TotalAmt: 100.0,
RemainingCredit: 0,
Line: [
{
Description: 'Pest Control Services',
DetailType: 'SalesItemLineDetail',
SalesItemLineDetail: {
TaxCodeRef: { value: 'NON' },
Qty: 1,
UnitPrice: 100,
ItemRef: { name: 'Pest Control', value: '10' },
},
LineNum: 1,
Amount: 100.0,
Id: '1',
},
{
DetailType: 'SubTotalLineDetail',
Amount: 100.0,
SubTotalLineDetail: {},
},
],
ApplyTaxAfterDiscount: false,
DocNumber: '1001',
sparse: false,
CustomerMemo: { value: 'Monthly pest control service.' },
ProjectRef: { value: '39298034' },
Balance: 0,
CustomerRef: { name: "Amy's Bird Sanctuary", value: '1' },
TxnTaxDetail: { TotalTax: 0 },
SyncToken: '3',
CustomField: [{ DefinitionId: '1', Type: 'StringType', Name: 'Crew #' }],
ShipAddr: {
CountrySubDivisionCode: 'CA',
City: 'Bayshore',
PostalCode: '94326',
Id: '108',
Line1: '4581 Finch St.',
},
EmailStatus: 'NotSet',
BillAddr: {
Line4: 'Bayshore, CA 94326',
Line3: '4581 Finch St.',
Id: '79',
Line1: 'Amy Lauterbach',
Line2: "Amy's Bird Sanctuary",
},
MetaData: {
CreateTime: '2019-01-15T10:30:27-07:00',
LastUpdatedTime: '2020-01-15T10:35:28-07:00',
},
BillEmail: { Address: 'amy@birdsanctuary.com' },
Id: '101',
},
{
TxnDate: '2023-02-22',
domain: 'QBO',
PrintStatus: 'NeedToPrint',
TotalAmt: 250.0,
RemainingCredit: 50,
Line: [
{
Description: 'Landscaping Services',
DetailType: 'SalesItemLineDetail',
SalesItemLineDetail: {
TaxCodeRef: { value: 'NON' },
Qty: 5,
UnitPrice: 50,
ItemRef: { name: 'Landscaping', value: '11' },
},
LineNum: 1,
Amount: 250.0,
Id: '2',
},
{
DetailType: 'SubTotalLineDetail',
Amount: 250.0,
SubTotalLineDetail: {},
},
],
ApplyTaxAfterDiscount: false,
DocNumber: '1045',
sparse: false,
CustomerMemo: { value: 'Garden maintenance and tree trimming.' },
ProjectRef: { value: '39298035' },
Balance: 50,
CustomerRef: { name: "Johnson's Hardware", value: '2' },
TxnTaxDetail: { TotalTax: 0 },
SyncToken: '2',
CustomField: [{ DefinitionId: '1', Type: 'StringType', Name: 'Crew #' }],
ShipAddr: {
CountrySubDivisionCode: 'CA',
City: 'Oakland',
PostalCode: '94612',
Id: '109',
Line1: '123 Main St.',
},
EmailStatus: 'NotSet',
BillAddr: {
Line4: 'Oakland, CA 94612',
Line3: '123 Main St.',
Id: '80',
Line1: 'Robert Johnson',
Line2: "Johnson's Hardware",
},
MetaData: {
CreateTime: '2020-02-22T09:15:27-07:00',
LastUpdatedTime: '2021-02-22T09:20:28-07:00',
},
BillEmail: { Address: 'robert@johnsonhardware.com' },
Id: '102',
},
{
TxnDate: '2023-03-10',
domain: 'QBO',
PrintStatus: 'NeedToPrint',
TotalAmt: 175.5,
RemainingCredit: 0,
Line: [
{
Description: 'Consulting Services',
DetailType: 'SalesItemLineDetail',
SalesItemLineDetail: {
TaxCodeRef: { value: 'NON' },
Qty: 3,
UnitPrice: 58.5,
ItemRef: { name: 'Consulting', value: '12' },
},
LineNum: 1,
Amount: 175.5,
Id: '3',
},
{
DetailType: 'SubTotalLineDetail',
Amount: 175.5,
SubTotalLineDetail: {},
},
],
ApplyTaxAfterDiscount: false,
DocNumber: '1078',
sparse: false,
CustomerMemo: { value: 'Business strategy consultation.' },
ProjectRef: { value: '39298036' },
Balance: 0,
CustomerRef: { name: "Smith's Bakery", value: '3' },
TxnTaxDetail: { TotalTax: 0 },
SyncToken: '1',
CustomField: [{ DefinitionId: '1', Type: 'StringType', Name: 'Crew #' }],
ShipAddr: {
CountrySubDivisionCode: 'CA',
City: 'San Francisco',
PostalCode: '94110',
Id: '110',
Line1: '456 Baker Ave.',
},
EmailStatus: 'NotSet',
BillAddr: {
Line4: 'San Francisco, CA 94110',
Line3: '456 Baker Ave.',
Id: '81',
Line1: 'Emma Smith',
Line2: "Smith's Bakery",
},
MetaData: {
CreateTime: '2023-03-10T14:20:27-07:00',
LastUpdatedTime: '2025-01-10T14:25:28-07:00',
},
BillEmail: { Address: 'emma@smithsbakery.com' },
Id: '103',
},
{
TxnDate: '2023-04-05',
domain: 'QBO',
PrintStatus: 'NeedToPrint',
TotalAmt: 320.75,
RemainingCredit: 100,
Line: [
{
Description: 'IT Support',
DetailType: 'SalesItemLineDetail',
SalesItemLineDetail: {
TaxCodeRef: { value: 'NON' },
Qty: 4.5,
UnitPrice: 71.28,
ItemRef: { name: 'Tech Support', value: '13' },
},
LineNum: 1,
Amount: 320.75,
Id: '4',
},
{
DetailType: 'SubTotalLineDetail',
Amount: 320.75,
SubTotalLineDetail: {},
},
],
ApplyTaxAfterDiscount: false,
DocNumber: '1092',
sparse: false,
CustomerMemo: { value: 'Network troubleshooting and software installation.' },
ProjectRef: { value: '39298037' },
Balance: 100,
CustomerRef: { name: 'Davis Law Firm', value: '4' },
TxnTaxDetail: { TotalTax: 0 },
SyncToken: '4',
CustomField: [{ DefinitionId: '1', Type: 'StringType', Name: 'Crew #' }],
ShipAddr: {
CountrySubDivisionCode: 'CA',
City: 'San Jose',
PostalCode: '95112',
Id: '111',
Line1: '789 Legal Blvd.',
},
EmailStatus: 'NotSet',
BillAddr: {
Line4: 'San Jose, CA 95112',
Line3: '789 Legal Blvd.',
Id: '82',
Line1: 'Michael Davis',
Line2: 'Davis Law Firm',
},
MetaData: {
CreateTime: '2023-04-05T11:10:27-07:00',
LastUpdatedTime: '2023-04-05T11:15:28-07:00',
},
BillEmail: { Address: 'michael@davislawfirm.com' },
Id: '104',
},
{
TxnDate: '2023-05-20',
domain: 'QBO',
PrintStatus: 'NeedToPrint',
TotalAmt: 500.0,
RemainingCredit: 0,
Line: [
{
Description: 'Marketing Campaign',
DetailType: 'SalesItemLineDetail',
SalesItemLineDetail: {
TaxCodeRef: { value: 'NON' },
Qty: 1,
UnitPrice: 500,
ItemRef: { name: 'Marketing', value: '14' },
},
LineNum: 1,
Amount: 500.0,
Id: '5',
},
{
DetailType: 'SubTotalLineDetail',
Amount: 500.0,
SubTotalLineDetail: {},
},
],
ApplyTaxAfterDiscount: false,
DocNumber: '1120',
sparse: false,
CustomerMemo: { value: 'Social media marketing campaign for summer promotion.' },
ProjectRef: { value: '39298038' },
Balance: 0,
CustomerRef: { name: "Wilson's Coffee Shop", value: '5' },
TxnTaxDetail: { TotalTax: 0 },
SyncToken: '2',
CustomField: [{ DefinitionId: '1', Type: 'StringType', Name: 'Crew #' }],
ShipAddr: {
CountrySubDivisionCode: 'CA',
City: 'Palo Alto',
PostalCode: '94301',
Id: '112',
Line1: '321 Coffee Lane',
},
EmailStatus: 'NotSet',
BillAddr: {
Line4: 'Palo Alto, CA 94301',
Line3: '321 Coffee Lane',
Id: '83',
Line1: 'James Wilson',
Line2: "Wilson's Coffee Shop",
},
MetaData: {
CreateTime: '2021-05-20T15:45:27-07:00',
LastUpdatedTime: '2022-05-20T15:50:28-07:00',
},
BillEmail: { Address: 'james@wilsonscoffee.com' },
Id: '105',
},
];