Skip to content

Commit 87b51e9

Browse files
Merge pull request #53 from PaystackOSS/patch-subscriptions
chore: update subscriptions examples and descriptions
2 parents 1ae7fef + 17931c1 commit 87b51e9

File tree

10 files changed

+46
-4
lines changed

10 files changed

+46
-4
lines changed

dist/paystack.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2549,6 +2549,7 @@ paths:
25492549
tags:
25502550
- Plan
25512551
summary: Update Plan
2552+
description: Update a plan details on your integration
25522553
operationId: plan_update
25532554
requestBody:
25542555
content:
@@ -2572,6 +2573,7 @@ paths:
25722573
tags:
25732574
- Subscription
25742575
summary: Create Subscription
2576+
description: Create a subscription a customer
25752577
operationId: subscription_create
25762578
requestBody:
25772579
content:
@@ -2592,6 +2594,7 @@ paths:
25922594
tags:
25932595
- Subscription
25942596
summary: List Subscriptions
2597+
description: List all subscriptions available on your integration
25952598
operationId: subscription_list
25962599
parameters:
25972600
- in: query
@@ -2606,9 +2609,10 @@ paths:
26062609
description: The section to retrieve
26072610
- in: query
26082611
name: plan
2609-
schema:
2610-
type: string
26112612
description: Plan ID
2613+
schema:
2614+
type: integer
2615+
example: 2697466
26122616
- in: query
26132617
name: customer
26142618
schema:
@@ -2640,12 +2644,15 @@ paths:
26402644
- name: code
26412645
in: path
26422646
required: true
2647+
description: The subscription code for the subscription you want to fetch
26432648
schema:
26442649
type: string
2650+
example: SUB_5co81xgmwg78x3d
26452651
get:
26462652
tags:
26472653
- Subscription
26482654
summary: Fetch Subscription
2655+
description: Get details of a customer's subscription
26492656
operationId: subscription_fetch
26502657
responses:
26512658
'200':
@@ -2661,6 +2668,7 @@ paths:
26612668
tags:
26622669
- Subscription
26632670
summary: Disable Subscription
2671+
description: Disable a subscription on your integration
26642672
operationId: subscription_disable
26652673
requestBody:
26662674
content:
@@ -2682,6 +2690,7 @@ paths:
26822690
tags:
26832691
- Subscription
26842692
summary: Enable Subscription
2693+
description: Enable a subscription on your integration
26852694
operationId: subscription_enable
26862695
requestBody:
26872696
content:
@@ -2703,13 +2712,16 @@ paths:
27032712
tags:
27042713
- Subscription
27052714
summary: Generate Update Subscription Link
2715+
description: Generate a link for updating the card on a subscription
27062716
operationId: subscription_manageLink
27072717
parameters:
27082718
- name: code
27092719
in: path
27102720
required: true
2721+
description: Subscription code
27112722
schema:
27122723
type: string
2724+
example: qlgwhpyq1ts9nsw
27132725
responses:
27142726
'200':
27152727
$ref: '#/components/responses/Ok'
@@ -2722,13 +2734,16 @@ paths:
27222734
tags:
27232735
- Subscription
27242736
summary: Send Update Subscription Link
2737+
description: Email a customer a link for updating the card on their subscription
27252738
operationId: subscription_manageEmail
27262739
parameters:
27272740
- name: code
27282741
in: path
27292742
required: true
2743+
description: Subscription code
27302744
schema:
27312745
type: string
2746+
example: qlgwhpyq1ts9nsw
27322747
responses:
27332748
'200':
27342749
$ref: '#/components/responses/Ok'
@@ -11097,6 +11112,9 @@ components:
1109711112
description: Set the date for the first debit. (ISO 8601 format) e.g. 2017-05-16T00:30:13+01:00
1109811113
type: string
1109911114
format: date-time
11115+
example:
11116+
customer: CUS_xnxdt6s1zg1f4nx
11117+
plan: PLN_gx2wn530m0i3w3m
1110011118
SubscriptionCreateResponse:
1110111119
type: object
1110211120
properties:
@@ -11376,6 +11394,9 @@ components:
1137611394
token:
1137711395
description: Email token
1137811396
type: string
11397+
example:
11398+
code: SUB_vsyqdmlzble3uii
11399+
token: d7gofp6yppn3qz7
1137911400
SubscriptionDisableResponse:
1138011401
type: object
1138111402
properties:

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ properties:
2323
2017-05-16T00:30:13+01:00
2424
type: string
2525
format: date-time
26+
example:
27+
customer: "CUS_xnxdt6s1zg1f4nx"
28+
plan: "PLN_gx2wn530m0i3w3m"

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ properties:
99
token:
1010
description: Email token
1111
type: string
12+
example:
13+
code: "SUB_vsyqdmlzble3uii"
14+
token: "d7gofp6yppn3qz7"

src/assets/openapi/paths/plan_{code}.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ put:
2525
tags:
2626
- Plan
2727
summary: Update Plan
28+
description: Update a plan details on your integration
2829
operationId: plan_update
2930
requestBody:
3031
content:

src/assets/openapi/paths/subscription.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ post:
22
tags:
33
- Subscription
44
summary: Create Subscription
5+
description: Create a subscription a customer
56
operationId: subscription_create
67
requestBody:
78
content:
@@ -22,6 +23,7 @@ get:
2223
tags:
2324
- Subscription
2425
summary: List Subscriptions
26+
description: List all subscriptions available on your integration
2527
operationId: subscription_list
2628
parameters:
2729
- in: query
@@ -36,9 +38,10 @@ get:
3638
description: The section to retrieve
3739
- in: query
3840
name: plan
39-
schema:
40-
type: string
4141
description: Plan ID
42+
schema:
43+
type: integer
44+
example: 2697466
4245
- in: query
4346
name: customer
4447
schema:

src/assets/openapi/paths/subscription_disable.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ post:
22
tags:
33
- Subscription
44
summary: Disable Subscription
5+
description: Disable a subscription on your integration
56
operationId: subscription_disable
67
requestBody:
78
content:

src/assets/openapi/paths/subscription_enable.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ post:
22
tags:
33
- Subscription
44
summary: Enable Subscription
5+
description: Enable a subscription on your integration
56
operationId: subscription_enable
67
requestBody:
78
content:

src/assets/openapi/paths/subscription_{code}.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ parameters:
22
- name: code
33
in: path
44
required: true
5+
description: The subscription code for the subscription you want to fetch
56
schema:
67
type: string
8+
example: "SUB_5co81xgmwg78x3d"
79
get:
810
tags:
911
- Subscription
1012
summary: Fetch Subscription
13+
description: Get details of a customer's subscription
1114
operationId: subscription_fetch
1215
responses:
1316
'200':

src/assets/openapi/paths/subscription_{code}_manage_email.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ post:
22
tags:
33
- Subscription
44
summary: Send Update Subscription Link
5+
description: Email a customer a link for updating the card on their subscription
56
operationId: subscription_manageEmail
67
parameters:
78
- name: code
89
in: path
910
required: true
11+
description: Subscription code
1012
schema:
1113
type: string
14+
example: "qlgwhpyq1ts9nsw"
1215
responses:
1316
'200':
1417
$ref: ../components/responses/Ok.yaml

src/assets/openapi/paths/subscription_{code}_manage_link.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ get:
22
tags:
33
- Subscription
44
summary: Generate Update Subscription Link
5+
description: Generate a link for updating the card on a subscription
56
operationId: subscription_manageLink
67
parameters:
78
- name: code
89
in: path
910
required: true
11+
description: Subscription code
1012
schema:
1113
type: string
14+
example: "qlgwhpyq1ts9nsw"
1215
responses:
1316
'200':
1417
$ref: ../components/responses/Ok.yaml

0 commit comments

Comments
 (0)