Skip to content

Commit

Permalink
Add Customer Payout Log pagination and response schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
jamalsoueidan committed Mar 31, 2024
1 parent a34d045 commit a40a296
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 1 deletion.
18 changes: 18 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ components:
$ref: paths/customer/payout-account/_types/payout-account.yaml
CustomerPayoutAccountType:
$ref: paths/customer/payout-account/_types/payout-account-type.yaml
CustomerPayoutAccountCreateBody:
$ref: paths/customer/payout-account/create/body.yaml
CustomerPayoutAccountCreateResponse:
$ref: paths/customer/payout-account/create/response.yaml
CustomerPayoutAccountDestroy:
$ref: paths/customer/payout-account/destroy/destroy.yaml
CustomerPayoutAccountDestroyResponse:
$ref: paths/customer/payout-account/destroy/response.yaml
CustomerPayoutAccountGetResponse:
$ref: paths/customer/payout-account/get/response.yaml
CustomerPayoutMobilePay:
$ref: paths/customer/payout-account/_types/payout-account-mobile-pay.yaml
CustomerPayoutBankAccount:
Expand Down Expand Up @@ -172,6 +182,10 @@ components:
CustomerPayoutPaginateResponse:
$ref: paths/customer/payout/paginate/response.yaml

# Payout Log
CustomerPayoutLogResponse:
$ref: paths/customer/payout-log/paginate/response.yaml

# Booking
CustomerBooking:
$ref: paths/customer/booking/_types/booking.yaml
Expand Down Expand Up @@ -367,6 +381,10 @@ paths:
/customer/{customerId}/payout/{payoutId}:
$ref: "./paths/customer/payout/get/index.yaml"

# Customer Payout Log Management
/customer/{customerId}/payout-log/{payoutId}:
$ref: "./paths/customer/payout-log/paginate/index.yaml"

# Customer Payout Account Management
/customer/{customerId}/payout-account:
$ref: "./paths/customer/payout-account/payout-account.yaml"
Expand Down
53 changes: 53 additions & 0 deletions openapi/paths/customer/payout-log/paginate/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
get:
parameters:
- name: customerId
in: path
description: The ID of the customerId
required: true
schema:
type: string
- name: payoutId
in: path
description: The ID of the payoutId
required: true
schema:
type: string
- name: page
in: query
description: The page number
required: true
schema:
type: string
- name: sortOrder
in: query
description: The sort order either asc eller desc = default desc
schema:
type: string
- name: limit
in: query
description: The limit = default to 10
schema:
type: string
tags:
- CustomerPayoutLog
operationId: customerPayoutLogPaginate
summary: GET get all payout logs for specific payout using paginate
description: This endpoint get all payout logs for specific payout

responses:
"200":
description: Response with payouts payload
content:
application/json:
schema:
$ref: "./response.yaml"
"400":
$ref: "../../../../responses/bad.yaml"
"401":
$ref: "../../../../responses/unauthorized.yaml"
"403":
$ref: "../../../../responses/forbidden.yaml"
"404":
$ref: "../../../../responses/not-found.yaml"

security: []
14 changes: 14 additions & 0 deletions openapi/paths/customer/payout-log/paginate/response.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
type: object
properties:
success:
type: boolean
example: true
payload:
type: array
items:
oneOf:
- $ref: "../../_types/order/line-item.yaml"
- $ref: ../../../shipping/_types/shipping.yaml
required:
- success
- payload
2 changes: 1 addition & 1 deletion openapi/paths/customer/payout/paginate/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ get:
- CustomerPayout
operationId: customerPayoutPaginate
summary: GET get all payouts using paginate
description: This endpoint get all payyouts
description: This endpoint get all payouts

responses:
"200":
Expand Down

0 comments on commit a40a296

Please sign in to comment.