-
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 endpoints #124
Payouts endpoints #124
Conversation
…nt_status in LineItemSchema
• Implement CustomerPayoutServiceCreate to create payouts and payout logs for fulfilled line items. • Add tests to ensure payouts and logs are created correctly and handle cases with no fulfilled line items left.
PR Description updated to latest commit (b3bd380) |
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. |
…e items - Replace hardcoded collection name with `ShippingModel.collection.name` in `shippingAggregation`. - Simplify balance calculation logic in `CustomerPayoutServiceBalance` using `reduce` and filtering for unique shippings. - Rename `CustomerPayoutServiceCreateGetLineItemsFulfilled` to `CustomerPayoutServiceGetLineItemsFulfilled` and update references. - Insert payout logs for shipping and line items separately, with error handling for insertion failures. - Add new `CustomerPayoutServiceGet` to fetch payout details for a customer. - Create new test file `get.spec.ts` for `CustomerPayoutServiceGet`.
… CustomerPayoutServiceList with pagination
…instead of cursors
/describe |
PR Description updated to latest commit (8b12e3c) |
• Implement new API endpoints for managing customer payouts, including getting a single payout, listing payouts with pagination, and retrieving payout balance. • Adjust payout balance service to return an object with detailed balance information instead of a single sum. • Remove deprecated payout list service and associated tests. • Fix incorrect indentation in payout-account get response schema.
… with page number and limit
• Implement new customer-payout-log.function.ts for payout log pagination • Create CustomerPayoutLogControllerPaginate with schema and handler • Fix incorrect import in payout-log/paginate.spec.ts • Update CustomerPayoutLogServicePaginate to include type enhancements and correct aggregation logic
/describe |
PR Description updated to latest commit (a40a296) |
Type
enhancement, bug_fix
Description
Changes walkthrough
19 files
customer-payout-log.function.ts
Add Azure Function for Customer Payout Log Pagination
src/functions/customer-payout-log.function.ts
customer-payout.functions.ts
Add Azure Functions for Customer Payout Operations
src/functions/customer-payout.functions.ts
balance, get, and paginate.
paginate.ts
Implement Controller for Customer Payout Log Pagination
src/functions/customer/controllers/payout-log/paginate.ts
balance.ts
Implement Controller for Fetching Customer Payout Balance
src/functions/customer/controllers/payout/balance.ts
get.ts
Implement Controller for Fetching a Single Customer Payout
src/functions/customer/controllers/payout/get.ts
paginate.ts
Implement Controller for Customer Payout Pagination
src/functions/customer/controllers/payout/paginate.ts
list.ts
Refactor Customer Blocked Service List for hasNextPage Logic
src/functions/customer/services/blocked/list.ts
paginate.ts
Implement Service for Customer Payout Log Pagination
src/functions/customer/services/payout-log/paginate.ts
aggregation.ts
Add Aggregation Pipelines for Payout Calculations
src/functions/customer/services/payout/aggregation.ts
balance.ts
Implement Service for Calculating Customer Payout Balance
src/functions/customer/services/payout/balance.ts
create.ts
Implement Service for Creating Customer Payouts
src/functions/customer/services/payout/create.ts
get.ts
Implement Service for Fetching a Single Customer Payout
src/functions/customer/services/payout/get.ts
paginate.ts
Implement Service for Customer Payout Pagination
src/functions/customer/services/payout/paginate.ts
order.schema.ts
Add Indexing to LineItemSchema Fields
src/functions/order/order.schema.ts
fulfillment_status in LineItemSchema.
payout-log.schema.ts
Refactor Payout Log Schema for Multiple Reference Types
src/functions/payout-log/payout-log.schema.ts
payout-log.types.ts
Update PayoutLogZodSchema and Add PayoutLogReferenceType Enum
src/functions/payout-log/payout-log.types.ts
list.ts
Refactor UserServiceList to Use Page Numbers
src/functions/user/services/user/list.ts
shipping.ts
Allow Custom customerId in createShipping Helper Function
src/library/jest/helpers/shipping.ts
index.ts
Update Zod Schemas and Types
src/library/zod/index.ts
9 files
paginate.spec.ts
Add Tests for Customer Payout Log Pagination Service
src/functions/customer/services/payout-log/paginate.spec.ts
balance.spec.ts
Add Tests for Customer Payout Balance Service
src/functions/customer/services/payout/balance.spec.ts
create.spec.ts
Add Tests for Customer Payout Creation Service
src/functions/customer/services/payout/create.spec.ts
get.spec.ts
Add Tests for Customer Payout Get Service
src/functions/customer/services/payout/get.spec.ts
paginate.spec.ts
Add Tests for Customer Payout Pagination Service
src/functions/customer/services/payout/paginate.spec.ts
generate.spec.ts
Set Up Fake Timers in Tests for Availability Generation
src/functions/user/services/availability/generate.spec.ts
get.spec.ts
Set Up Fake Timers in Tests for Availability Get Service
src/functions/user/services/availability/get.spec.ts
generate-availability.spec.ts
Set Up Fake Timers in Tests for Availability Generation
src/library/availability/generate-availability.spec.ts
payout.ts
Add Helper Functions for Creating Payout in Tests
src/library/jest/helpers/payout.ts
3 files
dummydata.balance.ts
Remove default_address from Payout Fixtures
src/functions/customer/services/payout/fixtures/dummydata.balance.ts
generate.ts
Remove toDate from Availability Service Generate Function
src/functions/user/services/availability/generate.ts
list.spec.ts
Rename 'total' to 'totalCount' in UserServiceList Tests
src/functions/user/services/user/list.spec.ts
1 files
openapi.yaml
Add API Documentation for Customer Payout and Payout Log Endpoints
openapi/openapi.yaml
endpoints.