Skip to content

Commit 5e19dc4

Browse files
Merge pull request #62 from PaystackOSS/patch-pages
chore: update pages examples and descriptions
2 parents 1623ca6 + 203ae1c commit 5e19dc4

File tree

8 files changed

+58
-13
lines changed

8 files changed

+58
-13
lines changed

dist/paystack.yaml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4070,6 +4070,7 @@ paths:
40704070
tags:
40714071
- Page
40724072
summary: Create Page
4073+
description: Create a webpage to receive payments
40734074
operationId: page_create
40744075
requestBody:
40754076
content:
@@ -4090,13 +4091,16 @@ paths:
40904091
tags:
40914092
- Page
40924093
summary: List Pages
4094+
description: List all previously created payment pages
40934095
operationId: page_list
40944096
parameters:
40954097
- in: query
40964098
name: perPage
40974099
schema:
40984100
type: integer
4101+
default: 50
40994102
description: Number of records to fetch per page
4103+
example: 10
41004104
- in: query
41014105
name: page
41024106
schema:
@@ -4127,13 +4131,16 @@ paths:
41274131
parameters:
41284132
- name: id
41294133
in: path
4134+
description: The unique identifier of a payment page
41304135
required: true
41314136
schema:
4132-
type: string
4137+
type: integer
4138+
example: 1891222
41334139
get:
41344140
tags:
41354141
- Page
41364142
summary: Fetch Page
4143+
description: Get a previously created payment page
41374144
operationId: page_fetch
41384145
responses:
41394146
'200':
@@ -4148,6 +4155,7 @@ paths:
41484155
tags:
41494156
- Page
41504157
summary: Update Page
4158+
description: Update a previously created payment page
41514159
operationId: page_update
41524160
requestBody:
41534161
content:
@@ -4170,13 +4178,16 @@ paths:
41704178
parameters:
41714179
- name: slug
41724180
in: path
4181+
description: The custom slug to check
41734182
required: true
41744183
schema:
41754184
type: string
4185+
example: risky-burger
41764186
get:
41774187
tags:
41784188
- Page
41794189
summary: Check Slug Availability
4190+
description: Check if a custom slug is available for use when creating a payment page
41804191
operationId: page_checkSlugAvailability
41814192
responses:
41824193
'200':
@@ -4198,6 +4209,9 @@ paths:
41984209
tags:
41994210
- Page
42004211
summary: Add Products
4212+
description: |
4213+
Add products to a previously created payment page. You can only add products to pages
4214+
that was created with a `product` type.
42014215
operationId: page_addProducts
42024216
requestBody:
42034217
content:
@@ -15715,6 +15729,9 @@ components:
1571515729
type: array
1571615730
items:
1571715731
type: object
15732+
example:
15733+
name: Extra Charges
15734+
amount: 200000
1571815735
PageCreateResponse:
1571915736
type: object
1572015737
properties:
@@ -15858,11 +15875,13 @@ components:
1585815875
description: The description of the page
1585915876
type: string
1586015877
amount:
15861-
description: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR
15878+
description: Amount should be in the subunit of the currency
1586215879
type: integer
1586315880
active:
1586415881
description: Set to false to deactivate page url
1586515882
type: boolean
15883+
example:
15884+
name: Backyard Sale
1586615885
PageUpdateResponse:
1586715886
type: object
1586815887
properties:
@@ -15957,13 +15976,17 @@ components:
1595715976
PageProduct:
1595815977
type: object
1595915978
required:
15960-
- product
15979+
- products
1596115980
properties:
15962-
product:
15963-
description: IDs of all products to add to a page
15981+
products:
15982+
description: A list of IDs of products to add to a page.
1596415983
type: array
1596515984
items:
15966-
type: string
15985+
type: integer
15986+
example:
15987+
products:
15988+
- 2196244
15989+
- 2179824
1596715990
PageProductsArray:
1596815991
type: object
1596915992
properties:

src/assets/openapi/components/schemas/PageCreate.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,6 @@ properties:
7777
type: array
7878
items:
7979
type: object
80+
example:
81+
name: "Extra Charges"
82+
amount: 200000
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
type: object
22
required:
3-
- product
3+
- products
44
properties:
5-
product:
6-
description: IDs of all products to add to a page
5+
products:
6+
description: A list of IDs of products to add to a page.
77
type: array
88
items:
9-
type: string
9+
type: integer
10+
example:
11+
products:
12+
- 2196244
13+
- 2179824

src/assets/openapi/components/schemas/PageUpdate.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ properties:
88
type: string
99
amount:
1010
description: >-
11-
Amount should be in kobo if currency is NGN, pesewas, if currency is GHS,
12-
and cents, if currency is ZAR
11+
Amount should be in the subunit of the currency
1312
type: integer
1413
active:
1514
description: Set to false to deactivate page url
1615
type: boolean
16+
example:
17+
name: "Backyard Sale"

src/assets/openapi/paths/page.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ post:
22
tags:
33
- Page
44
summary: Create Page
5+
description: Create a webpage to receive payments
56
operationId: page_create
67
requestBody:
78
content:
@@ -22,13 +23,16 @@ get:
2223
tags:
2324
- Page
2425
summary: List Pages
26+
description: List all previously created payment pages
2527
operationId: page_list
2628
parameters:
2729
- in: query
2830
name: perPage
2931
schema:
3032
type: integer
33+
default: 50
3134
description: Number of records to fetch per page
35+
example: 10
3236
- in: query
3337
name: page
3438
schema:

src/assets/openapi/paths/page_check_slug_availability_{slug}.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
parameters:
22
- name: slug
33
in: path
4+
description: The custom slug to check
45
required: true
56
schema:
67
type: string
8+
example: risky-burger
79
get:
810
tags:
911
- Page
1012
summary: Check Slug Availability
13+
description: Check if a custom slug is available for use when creating a payment page
1114
operationId: page_checkSlugAvailability
1215
responses:
1316
'200':

src/assets/openapi/paths/page_{id}.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
parameters:
22
- name: id
33
in: path
4+
description: The unique identifier of a payment page
45
required: true
56
schema:
6-
type: string
7+
type: integer
8+
example: 1891222
79
get:
810
tags:
911
- Page
1012
summary: Fetch Page
13+
description: Get a previously created payment page
1114
operationId: page_fetch
1215
responses:
1316
'200':
@@ -22,6 +25,7 @@ put:
2225
tags:
2326
- Page
2427
summary: Update Page
28+
description: Update a previously created payment page
2529
operationId: page_update
2630
requestBody:
2731
content:

src/assets/openapi/paths/page_{id}_product.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ post:
88
tags:
99
- Page
1010
summary: Add Products
11+
description: |
12+
Add products to a previously created payment page. You can only add products to pages
13+
that was created with a `product` type.
1114
operationId: page_addProducts
1215
requestBody:
1316
content:

0 commit comments

Comments
 (0)