-
Notifications
You must be signed in to change notification settings - Fork 1
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
Payouts Account (models, api payout-account) #120
Conversation
…ustomer payout accounts
PR Description updated to latest commit (a02362c) |
PR Review
Code feedback:
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
- Rename BlockDateZodSchema to BlockedZodSchema and update references - Implement CRUD operations for customer payout accounts with new controllers and services - Adjust types to allow string or number for customer IDs and phone numbers
• Add new endpoints for creating, retrieving, and deleting customer payout accounts. • Define new OpenAPI components for payout account types, including mobile pay and bank account details. • Remove specific payout account ID requirement from destroy service and controller, changing to delete by customer ID. • Delete the unused blocked.yaml file.
• Implement CustomerPayoutServiceBalance to calculate customer payout balances • Add balance.spec.ts for testing payout balance functionality • Update webhook.function.ts to log JSON stringified webhook responses
- Implement MongoDB aggregation pipeline for calculating customer payout balance - Add lookup to PayoutLog to exclude paid out line items - Remove unused PayoutModel import and related code - Add new dummy data fixture for balance calculation tests - Update tests to reflect new balance calculation logic
…optional in LineItemZod
Type
enhancement, tests
Description
Changes walkthrough
10 files
payout-account.schema.ts
Implement Mongoose Schema for Payout Accounts with Zod Validation
src/functions/payout-account/payout-account.schema.ts
validation using Zod.
validation failures.
payout.schema.ts
Create Mongoose Schema for Payouts
src/functions/payout/payout.schema.ts
status, payout type, and payout details.
payout-account.types.ts
Define Types and Zod Schemas for Payout Account Details
src/functions/payout-account/payout-account.types.ts
get.ts
Service to Retrieve Customer Payout Account
src/functions/customer/services/payout-account/get.ts
destroy.ts
Service to Delete Customer Payout Account
src/functions/customer/services/payout-account/destroy.ts
payout-account.model.ts
Define Mongoose Model for Payout Accounts
src/functions/payout-account/payout-account.model.ts
payout.model.ts
Define Mongoose Model for Payouts
src/functions/payout/payout.model.ts
create.ts
Service to Create New Payout Account
src/functions/customer/services/payout-account/create.ts
index.ts
Export Payout Account Components
src/functions/payout-account/index.ts
index.ts
Export Payout Components
src/functions/payout/index.ts
3 files
create.spec.ts
Test Suite for Creating Payout Accounts
src/functions/customer/services/payout-account/create.spec.ts
details.
get.spec.ts
Test Suite for Retrieving Payout Accounts
src/functions/customer/services/payout-account/get.spec.ts
destroy.spec.ts
Test Suite for Deleting Payout Accounts
src/functions/customer/services/payout-account/destroy.spec.ts