Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 55 additions & 12 deletions dist/paystack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3975,6 +3975,7 @@ paths:
tags:
- Order
summary: Create Order
description: Create an order for selected items
operationId: order_create
requestBody:
content:
Expand All @@ -3995,6 +3996,7 @@ paths:
tags:
- Order
summary: List Orders
description: List the previously created orders
operationId: order_list
parameters:
- in: query
Expand Down Expand Up @@ -4031,14 +4033,17 @@ paths:
/order/{id}:
parameters:
- name: id
description: The unique identifier of the order
in: path
required: true
schema:
type: string
type: integer
example: 1559046
get:
tags:
- Order
summary: Fetch Order
description: Fetch the details of a previously created order
operationId: order_fetch
responses:
'200':
Expand All @@ -4052,15 +4057,18 @@ paths:
/order/product/{id}:
parameters:
- name: id
description: The unique identifier of the order
in: path
required: true
schema:
type: string
type: integer
example: 1559046
get:
tags:
- Order
summary: Fetch Products Order
operationId: order_fetchProducts
summary: Fetch Product Orders
description: Fetch all orders for a particular product
operationId: order_product
responses:
'200':
$ref: '#/components/responses/OrderFetchProductSuccess'
Expand All @@ -4073,15 +4081,18 @@ paths:
/order/{code}/validate:
parameters:
- name: code
description: The unique code of a previously created order
in: path
required: true
schema:
type: string
example: ORD_6z0lqwpmxrm7dsp
get:
tags:
- Order
summary: Validate pay for me order
operationId: order_validatePayForMe
summary: Validate Order
description: Validate a pay for me order
operationId: order_validate
responses:
'200':
$ref: '#/components/responses/OrderValidateSuccess'
Expand Down Expand Up @@ -14989,7 +15000,7 @@ components:
properties:
item:
description: The product ID of the item
type: string
type: integer
type:
description: The type of the item. `product` is currently the acceptable value
type: string
Expand All @@ -14999,6 +15010,11 @@ components:
amount:
description: The cost of the item
type: integer
example:
item: 2179824
type: product
quantity: 200000
amount: 2
OrderShipping:
type: object
description: The shipping details of the order
Expand Down Expand Up @@ -15027,6 +15043,12 @@ components:
delivery_note:
description: Extra details to be aware of for the delivery
type: string
example:
street_line: Somewhere on Earth
city: Atlantic
state: Pacific
country: Equator
shipping_fee: 10000
OrderCreate:
type: object
required:
Expand All @@ -15051,22 +15073,43 @@ components:
description: The customer's mobile number
type: string
currency:
description: Currency in which amount is set. Allowed values are NGN, GHS, ZAR or USD
description: Currency in which amount is set
type: string
enum:
- GHS
- KES
- NGN
- USD
- ZAR
items:
type: array
items:
$ref: '#/components/schemas/OrderItems'
shipping:
$ref: '#/components/schemas/OrderShipping'
is_gift:
description: |
A flag to indicate if the order is for someone else
description: A flag to indicate if the order is for someone else
type: boolean
pay_for_me:
description: |
A flag to indicate if the someone else should pay for the order
description: A flag to indicate if the someone else should pay for the order
type: boolean
example:
email: test@email.com
first_name: Demo
last_name: User
phone: '+2348031245678'
currency: NGN
items:
- item: 2179824
type: product
quantity: 200000
amount: 2
shipping:
street_line: Somewhere on Earth
city: Atlantic
state: Pacific
country: Equator
shipping_fee: 10000
OrderCreateResponse:
type: object
properties:
Expand Down
31 changes: 26 additions & 5 deletions src/assets/openapi/components/schemas/OrderCreate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,40 @@ properties:
description: The customer's mobile number
type: string
currency:
description: Currency in which amount is set. Allowed values are NGN, GHS, ZAR or USD
description: Currency in which amount is set
type: string
enum:
- GHS
- KES
- NGN
- USD
- ZAR
items:
type: array
items:
$ref: ./OrderItems.yaml
shipping:
$ref: ./OrderShipping.yaml
is_gift:
description: |
A flag to indicate if the order is for someone else
description: A flag to indicate if the order is for someone else
type: boolean
pay_for_me:
description: |
A flag to indicate if the someone else should pay for the order
description: A flag to indicate if the someone else should pay for the order
type: boolean
example:
email: test@email.com
first_name: Demo
last_name: User
phone: '+2348031245678'
currency: NGN
items:
- item: 2179824
type: product
quantity: 200000
amount: 2
shipping:
street_line: Somewhere on Earth
city: Atlantic
state: Pacific
country: Equator
shipping_fee: 10000
7 changes: 6 additions & 1 deletion src/assets/openapi/components/schemas/OrderItems.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ required:
properties:
item:
description: The product ID of the item
type: string
type: integer
type:
description: The type of the item. `product` is currently the acceptable value
type: string
Expand All @@ -18,3 +18,8 @@ properties:
amount:
description: The cost of the item
type: integer
example:
item: 2179824
type: product
quantity: 200000
amount: 2
6 changes: 6 additions & 0 deletions src/assets/openapi/components/schemas/OrderShipping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ properties:
delivery_note:
description: Extra details to be aware of for the delivery
type: string
example:
street_line: Somewhere on Earth
city: Atlantic
state: Pacific
country: Equator
shipping_fee: 10000
2 changes: 2 additions & 0 deletions src/assets/openapi/paths/order.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ post:
tags:
- Order
summary: Create Order
description: Create an order for selected items
operationId: order_create
requestBody:
content:
Expand All @@ -22,6 +23,7 @@ get:
tags:
- Order
summary: List Orders
description: List the previously created orders
operationId: order_list
parameters:
- in: query
Expand Down
9 changes: 6 additions & 3 deletions src/assets/openapi/paths/order_product_{id}.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
parameters:
- name: id
description: The unique identifier of the order
in: path
required: true
schema:
type: string
type: integer
example: 1559046
get:
tags:
- Order
summary: Fetch Products Order
operationId: order_fetchProducts
summary: Fetch Product Orders
description: Fetch all orders for a particular product
operationId: order_product
responses:
'200':
$ref: ../components/responses/OrderFetchProductSuccess.yaml
Expand Down
7 changes: 5 additions & 2 deletions src/assets/openapi/paths/order_{code}_validate.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
parameters:
- name: code
description: The unique code of a previously created order
in: path
required: true
schema:
type: string
example: ORD_6z0lqwpmxrm7dsp
get:
tags:
- Order
summary: Validate pay for me order
operationId: order_validatePayForMe
summary: Validate Order
description: Validate a pay for me order
operationId: order_validate
responses:
'200':
$ref: ../components/responses/OrderValidateSuccess.yaml
Expand Down
5 changes: 4 additions & 1 deletion src/assets/openapi/paths/order_{id}.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
parameters:
- name: id
description: The unique identifier of the order
in: path
required: true
schema:
type: string
type: integer
example: 1559046
get:
tags:
- Order
summary: Fetch Order
description: Fetch the details of a previously created order
operationId: order_fetch
responses:
'200':
Expand Down
Loading