-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add QuickBooks bill created and updated triggers #16649
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
base: master
Are you sure you want to change the base?
Add QuickBooks bill created and updated triggers #16649
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Someone is attempting to deploy a commit to the Pipedreamers Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughTwo new QuickBooks source components were introduced: "New Bill Created" and "New Bill Updated." Each component includes logic for querying and summarizing bill events and imports a corresponding test event file containing sample bill data for testing purposes. Changes
Sequence Diagram(s)sequenceDiagram
participant QuickBooks
participant NewBillCreatedSource
participant NewBillUpdatedSource
QuickBooks->>NewBillCreatedSource: Bill Created Event
NewBillCreatedSource->>NewBillCreatedSource: getQuery(lastDate)
NewBillCreatedSource->>NewBillCreatedSource: getFieldList()
NewBillCreatedSource->>NewBillCreatedSource: getSummary(item)
NewBillCreatedSource-->>QuickBooks: Emit new bill event
QuickBooks->>NewBillUpdatedSource: Bill Updated Event
NewBillUpdatedSource->>NewBillUpdatedSource: getQuery(lastDate)
NewBillUpdatedSource->>NewBillUpdatedSource: getFieldList()
NewBillUpdatedSource->>NewBillUpdatedSource: getFieldDate()
NewBillUpdatedSource->>NewBillUpdatedSource: getSummary(item)
NewBillUpdatedSource-->>QuickBooks: Emit updated bill event
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/quickbooks/sources/new-bill-updated/test-event.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/quickbooks/sources/new-bill-updated/test-event.mjs (1)
3-74
: Effective test event for bill updates with French commentsThis test event appropriately models a bill update by:
- Incrementing the SyncToken
- Setting different LastUpdatedTime from CreateTime
- Updating the private note and total amount
- Setting sparse to true
- Adding a new line item
The data effectively demonstrates how an updated bill would appear in the QuickBooks API response.
Consider translating the French comments to English for consistency with the rest of the codebase:
- "SyncToken": "1", // Incrémenté car c'est une mise à jour + "SyncToken": "1", // Incremented because this is an update - "LastUpdatedTime": "2023-04-16T14:45:00Z" // Date de mise à jour différente + "LastUpdatedTime": "2023-04-16T14:45:00Z" // Different update date - "PrivateNote": "Monthly office supplies - Updated with additional items", - "TotalAmt": 425.25, // Montant modifié + "TotalAmt": 425.25, // Modified amount - "sparse": true, // Indique que c'est une mise à jour + "sparse": true, // Indicates that this is an update - "Id": "3", // Nouvelle ligne ajoutée + "Id": "3", // New line added
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
components/quickbooks/sources/new-bill-created/new-bill-created.mjs
(1 hunks)components/quickbooks/sources/new-bill-created/test-event.mjs
(1 hunks)components/quickbooks/sources/new-bill-updated/new-bill-updated.mjs
(1 hunks)components/quickbooks/sources/new-bill-updated/test-event.mjs
(1 hunks)
🔇 Additional comments (3)
components/quickbooks/sources/new-bill-created/test-event.mjs (1)
3-59
: Well-structured test event dataThis test event provides a comprehensive representation of a QuickBooks bill with all essential fields including identifiers, references, dates, amounts, and line items. The data is realistic and will serve well for testing the "New Bill Created" source component.
components/quickbooks/sources/new-bill-created/new-bill-created.mjs (1)
4-25
: Clean implementation of the bill creation triggerThe component is well-structured and follows the pattern for QuickBooks sources. The query correctly filters bills by creation time, and the component includes all necessary methods for handling new bill events.
components/quickbooks/sources/new-bill-updated/new-bill-updated.mjs (1)
4-28
: Well-implemented bill update trigger with a notable differenceThe component correctly implements the bill update trigger, using LastUpdatedTime for filtering as expected. One notable difference from the "new-bill-created" component is the additional
getFieldDate()
method that's implemented here but not in the "created" component. This may be intentional if the common base module has default behavior that works for the creation case but needs to be overridden for updates.
Dear PipeDream team, It's the first time I contribute to an OS project, I'm not familiar with the review process. I did changed the comments from French to English, I committed and pushed the code, let me know if I have to do something else? |
WHY
Those triggers were not available
Did some integration tests with other Quickbooks Actions (Get Bill) and everything is working fine.
Summary by CodeRabbit