Skip to content

Commit b6d7def

Browse files
committed
Updated API from documentation release
1 parent cb9c89e commit b6d7def

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

api-specs/api/resources/recurrence-policies.raml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ type:
77
sortExample: createdAt asc
88
(updateable): RecurrencePolicy
99
(createable): RecurrencePolicyDraft
10+
(deleteable): RecurrencePolicy
1011
description: A Recurrence Policy is a configuration of a schedule.
1112
get:
1213
displayName: Query RecurrencePolicies
@@ -74,6 +75,18 @@ post:
7475
body:
7576
application/json:
7677
example: !include ../examples/recurrence-policy.example.json
78+
delete:
79+
displayName: Delete RecurrencePolicy by Key
80+
securedBy: [oauth_2_0: { scopes: ['manage_recurring_orders:{projectKey}'] }]
81+
description: |
82+
Deletes a Recurrence Policy in the Project.
83+
84+
A Recurrence Policy can be deleted only if it is not referenced by any Embedded Price, Standalone Price, or (Custom) Line Item, otherwise a [ReferenceExists](ctp:api:type:ReferenceExistsError) error is returned.
85+
responses:
86+
200:
87+
body:
88+
application/json:
89+
example: !include ../examples/recurrence-policy.example.json
7790
/{ID}:
7891
(methodName): withId
7992
type:
@@ -109,3 +122,15 @@ post:
109122
body:
110123
application/json:
111124
example: !include ../examples/recurrence-policy.example.json
125+
delete:
126+
displayName: Delete RecurrencePolicy by ID
127+
securedBy: [oauth_2_0: { scopes: ['manage_recurring_orders:{projectKey}'] }]
128+
description: |
129+
Deletes a Recurrence Policy in the Project.
130+
131+
A Recurrence Policy can be deleted only if it is not referenced by any Embedded Price, Standalone Price, or (Custom) Line Item, otherwise a [ReferenceExists](ctp:api:type:ReferenceExistsError) error is returned.
132+
responses:
133+
200:
134+
body:
135+
application/json:
136+
example: !include ../examples/recurrence-policy.example.json

api-specs/graphql/schema.sdl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6927,6 +6927,15 @@ type Mutation {
69276927
"Queries with specified key"
69286928
key: String): RecurrencePolicy
69296929

6930+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
6931+
deleteRecurrencePolicy(version: Long!,
6932+
6933+
"Queries with specified ID"
6934+
id: String,
6935+
6936+
"Queries with specified key"
6937+
key: String): RecurrencePolicy
6938+
69306939
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
69316940
createPaymentMethod(draft: PaymentMethodDraft!): PaymentMethod
69326941

0 commit comments

Comments
 (0)