Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How do you send query parameters in a find call? #211

Open
yashsway opened this issue Jan 17, 2023 · 1 comment
Open

[Question] How do you send query parameters in a find call? #211

yashsway opened this issue Jan 17, 2023 · 1 comment

Comments

@yashsway
Copy link

My goal: use the findInvoices method to fetch a list of invoices by customer ID, with the InvoiceLink field included for each invoice.

According to https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#the-invoice-object, the InvoiceLink field is only included if the query param include=invoiceLink is passed in.

Sharable link for the invoice sent to external customers. The link is generated only for invoices with online payment enabled and having a valid customer email address. Include query param include=invoiceLink to get the link back on query response.

Here's a snippet of my code:

  getInvoices(customerId: string, limit: number = 1000): Promise<QuickbooksInvoiceEntity[]> {
    return new Promise((res, rej) => {
      this.apiClient.findInvoices(
        {
          CustomerRef: customerId,
          limit,
        },
        (err, invoices: QuickbooksQueryResponse<QuickbooksInvoiceQueryResponse>) => {
          if (err) {
            rej(err);
            return;
          }

          res(invoices.QueryResponse.Invoice);
        },
      );
    });
  }

I can't find any details regarding how I pass in query parameters? Looks like the keys I specify are specifically for the where clause. (other than things like sorting, limits, pagination, and count)

@charlie-s
Copy link

See #163 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants