Skip to content

Commit 8827089

Browse files
committed
TASK: Updating RAML types, Postman and OAS definition
1 parent ae6bd28 commit 8827089

30 files changed

+1362
-918
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
meta {
2+
name: SetExpiresAt
3+
type: http
4+
seq: 775
5+
}
6+
7+
post {
8+
url: {{apiUrl}}/{{project-key}}/recurring-orders/{{recurring-order-id}}
9+
body: json
10+
auth: inherit
11+
}
12+
13+
body:json {
14+
{
15+
"version": {{recurring-order-version}},
16+
"actions": [
17+
{
18+
"action" : "setExpiresAt",
19+
"expiresAt" : "2025-10-15T15:00:00.000Z"
20+
}
21+
]
22+
}
23+
}
24+
25+
query {
26+
~expand:
27+
}
28+
29+
script:post-response {
30+
var data = res.body;
31+
if(res.status == 200 || res.status == 201) {
32+
if(data.results && data.results[0] && data.results[0].id && data.results[0].version){
33+
bru.setEnvVar("recurring-order-id", data.results[0].id);
34+
bru.setEnvVar("recurring-order-version", data.results[0].version);
35+
}
36+
if(data.results && data.results[0] && data.results[0].key){
37+
bru.setEnvVar("recurring-order-key", data.results[0].key);
38+
}
39+
if(data.version){
40+
bru.setEnvVar("recurring-order-version", data.version);
41+
}
42+
if(data.id){
43+
bru.setEnvVar("recurring-order-id", data.id);
44+
}
45+
if(data.key){
46+
bru.setEnvVar("recurring-order-key", data.key);
47+
}
48+
49+
}
50+
}
51+
52+
assert {
53+
res.status: in [200, 201]
54+
}

bruno/api/Project/Recurring-orders/Update actions/SetKey.bru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
meta {
22
name: SetKey
33
type: http
4-
seq: 775
4+
seq: 776
55
}
66

77
post {

bruno/api/Project/Recurring-orders/Update actions/SetOrderSkipConfiguration.bru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
meta {
22
name: SetOrderSkipConfiguration
33
type: http
4-
seq: 776
4+
seq: 777
55
}
66

77
post {

bruno/api/Project/Recurring-orders/Update actions/SetRecurringOrderState.bru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
meta {
22
name: SetRecurringOrderState
33
type: http
4-
seq: 777
4+
seq: 778
55
}
66

77
post {

bruno/api/Project/Recurring-orders/Update actions/SetSchedule.bru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
meta {
22
name: SetSchedule
33
type: http
4-
seq: 778
4+
seq: 779
55
}
66

77
post {

bruno/api/Project/Recurring-orders/Update actions/SetStartsAt.bru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
meta {
22
name: SetStartsAt
33
type: http
4-
seq: 779
4+
seq: 780
55
}
66

77
post {

bruno/api/Project/Recurring-orders/Update actions/TransitionState.bru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
meta {
22
name: TransitionState
33
type: http
4-
seq: 780
4+
seq: 781
55
}
66

77
post {

oas/api/openapi.yaml

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33634,10 +33634,11 @@ paths:
3363433634
operationId: ByProjectKeyRecurringOrdersPost
3363533635
description: |-
3363633636
Creates a Recurring Order in the Project.
33637-
The Cart is validated to ensure that it is convertible to an [Order](ctp:api:type:Order). If validation fails, an error is returned.
33638-
3363933637
Produces the [RecurringOrderCreated](ctp:api:type:RecurringOrderCreatedMessage) message.
3364033638

33639+
The Cart is validated to ensure that it is convertible to an [Order](ctp:api:type:Order). If the validation fails, an error is returned.
33640+
If the expiration date has been reached when the [Recurring Order](ctp:api:type:RecurringOrder) is processed, its [RecurringOrderState](ctp:api:type:RecurringOrderState) will be updated to `Expired`, and no Order will be created.
33641+
3364133642
If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Recurring Order creation may still successfully complete after the error is returned.
3364233643
If you receive this error, you should verify the status of the Recurring Order by querying a unique identifier supplied during the creation request, such as the key.
3364333644
parameters:
@@ -59775,6 +59776,7 @@ components:
5977559776
RecurringOrderCustomTypeRemoved: '#/components/schemas/RecurringOrderCustomTypeRemovedMessage'
5977659777
RecurringOrderCustomTypeSet: '#/components/schemas/RecurringOrderCustomTypeSetMessage'
5977759778
RecurringOrderDeleted: '#/components/schemas/RecurringOrderDeletedMessage'
59779+
RecurringOrderExpiresAtSet: '#/components/schemas/RecurringOrderExpiresAtSetMessage'
5977859780
RecurringOrderKeySet: '#/components/schemas/RecurringOrderKeySetMessage'
5977959781
RecurringOrderScheduleSet: '#/components/schemas/RecurringOrderScheduleSetMessage'
5978059782
RecurringOrderStartsAtSet: '#/components/schemas/RecurringOrderStartsAtSetMessage'
@@ -65254,6 +65256,47 @@ components:
6525465256
$ref: '#/components/schemas/UserProvidedIdentifiers'
6525565257
recurringOrder:
6525665258
$ref: '#/components/schemas/RecurringOrder'
65259+
RecurringOrderExpiresAtSetMessage:
65260+
allOf:
65261+
- $ref: '#/components/schemas/Message'
65262+
- type: "object"
65263+
required:
65264+
- newExpiresAt
65265+
- oldExpiresAt
65266+
properties:
65267+
id:
65268+
type: "string"
65269+
version:
65270+
type: "integer"
65271+
format: "int64"
65272+
createdAt:
65273+
type: "string"
65274+
format: "datetime"
65275+
lastModifiedAt:
65276+
type: "string"
65277+
format: "datetime"
65278+
lastModifiedBy:
65279+
$ref: '#/components/schemas/LastModifiedBy'
65280+
createdBy:
65281+
$ref: '#/components/schemas/CreatedBy'
65282+
sequenceNumber:
65283+
type: "integer"
65284+
format: "int64"
65285+
resource:
65286+
$ref: '#/components/schemas/Reference'
65287+
resourceVersion:
65288+
type: "integer"
65289+
format: "int64"
65290+
type:
65291+
type: "string"
65292+
resourceUserProvidedIdentifiers:
65293+
$ref: '#/components/schemas/UserProvidedIdentifiers'
65294+
newExpiresAt:
65295+
type: "string"
65296+
format: "datetime"
65297+
oldExpiresAt:
65298+
type: "string"
65299+
format: "datetime"
6525765300
RecurringOrderKeySetMessage:
6525865301
allOf:
6525965302
- $ref: '#/components/schemas/Message'
@@ -68588,6 +68631,7 @@ components:
6858868631
RecurringOrderCustomTypeRemoved: '#/components/schemas/RecurringOrderCustomTypeRemovedMessagePayload'
6858968632
RecurringOrderCustomTypeSet: '#/components/schemas/RecurringOrderCustomTypeSetMessagePayload'
6859068633
RecurringOrderDeleted: '#/components/schemas/RecurringOrderDeletedMessagePayload'
68634+
RecurringOrderExpiresAtSet: '#/components/schemas/RecurringOrderExpiresAtSetMessagePayload'
6859168635
RecurringOrderKeySet: '#/components/schemas/RecurringOrderKeySetMessagePayload'
6859268636
RecurringOrderScheduleSet: '#/components/schemas/RecurringOrderScheduleSetMessagePayload'
6859368637
RecurringOrderStartsAtSet: '#/components/schemas/RecurringOrderStartsAtSetMessagePayload'
@@ -70596,6 +70640,22 @@ components:
7059670640
type: "string"
7059770641
recurringOrder:
7059870642
$ref: '#/components/schemas/RecurringOrder'
70643+
RecurringOrderExpiresAtSetMessagePayload:
70644+
allOf:
70645+
- $ref: '#/components/schemas/MessagePayload'
70646+
- type: "object"
70647+
required:
70648+
- newExpiresAt
70649+
- oldExpiresAt
70650+
properties:
70651+
type:
70652+
type: "string"
70653+
newExpiresAt:
70654+
type: "string"
70655+
format: "datetime"
70656+
oldExpiresAt:
70657+
type: "string"
70658+
format: "datetime"
7059970659
RecurringOrderKeySetMessagePayload:
7060070660
allOf:
7060170661
- $ref: '#/components/schemas/MessagePayload'
@@ -81842,6 +81902,9 @@ components:
8184281902
startsAt:
8184381903
type: "string"
8184481904
format: "datetime"
81905+
expiresAt:
81906+
type: "string"
81907+
format: "datetime"
8184581908
state:
8184681909
$ref: '#/components/schemas/StateResourceIdentifier'
8184781910
custom:
@@ -81960,6 +82023,7 @@ components:
8196082023
mapping:
8196182024
setCustomField: '#/components/schemas/RecurringOrderSetCustomFieldAction'
8196282025
setCustomType: '#/components/schemas/RecurringOrderSetCustomTypeAction'
82026+
setExpiresAt: '#/components/schemas/RecurringOrderSetExpiresAtAction'
8196382027
setKey: '#/components/schemas/RecurringOrderSetKeyAction'
8196482028
setOrderSkipConfiguration: '#/components/schemas/RecurringOrderSetOrderSkipConfigurationAction'
8196582029
setSchedule: '#/components/schemas/RecurringOrderSetScheduleAction'
@@ -82017,6 +82081,16 @@ components:
8201782081
$ref: '#/components/schemas/TypeResourceIdentifier'
8201882082
fields:
8201982083
$ref: '#/components/schemas/FieldContainer'
82084+
RecurringOrderSetExpiresAtAction:
82085+
allOf:
82086+
- $ref: '#/components/schemas/RecurringOrderUpdateAction'
82087+
- type: "object"
82088+
properties:
82089+
action:
82090+
type: "string"
82091+
expiresAt:
82092+
type: "string"
82093+
format: "datetime"
8202082094
RecurringOrderSetKeyAction:
8202182095
allOf:
8202282096
- $ref: '#/components/schemas/RecurringOrderUpdateAction'

uml/api/BaseResource.puml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3915,6 +3915,21 @@ interface RecurringOrderDeletedMessage [[RecurringOrderDeletedMessage.svg]] {
39153915
resourceUserProvidedIdentifiers: [[UserProvidedIdentifiers.svg UserProvidedIdentifiers]]
39163916
recurringOrder: [[RecurringOrder.svg RecurringOrder]]
39173917
}
3918+
interface RecurringOrderExpiresAtSetMessage [[RecurringOrderExpiresAtSetMessage.svg]] {
3919+
id: String
3920+
version: Long
3921+
createdAt: DateTime
3922+
lastModifiedAt: DateTime
3923+
lastModifiedBy: [[LastModifiedBy.svg LastModifiedBy]]
3924+
createdBy: [[CreatedBy.svg CreatedBy]]
3925+
sequenceNumber: Long
3926+
resource: [[Reference.svg Reference]]
3927+
resourceVersion: Long
3928+
type: String
3929+
resourceUserProvidedIdentifiers: [[UserProvidedIdentifiers.svg UserProvidedIdentifiers]]
3930+
newExpiresAt: DateTime
3931+
oldExpiresAt: DateTime
3932+
}
39183933
interface RecurringOrderKeySetMessage [[RecurringOrderKeySetMessage.svg]] {
39193934
id: String
39203935
version: Long
@@ -4681,6 +4696,7 @@ BaseResource --> RecurringOrderCustomFieldRemovedMessage #blue;text:blue : "type
46814696
BaseResource --> RecurringOrderCustomTypeRemovedMessage #blue;text:blue : "type : RecurringOrderCustomTypeRemoved"
46824697
BaseResource --> RecurringOrderCustomTypeSetMessage #blue;text:blue : "type : RecurringOrderCustomTypeSet"
46834698
BaseResource --> RecurringOrderDeletedMessage #blue;text:blue : "type : RecurringOrderDeleted"
4699+
BaseResource --> RecurringOrderExpiresAtSetMessage #blue;text:blue : "type : RecurringOrderExpiresAtSet"
46844700
BaseResource --> RecurringOrderKeySetMessage #blue;text:blue : "type : RecurringOrderKeySet"
46854701
BaseResource --> RecurringOrderScheduleSetMessage #blue;text:blue : "type : RecurringOrderScheduleSet"
46864702
BaseResource --> RecurringOrderStartsAtSetMessage #blue;text:blue : "type : RecurringOrderStartsAtSet"

uml/api/CartResourceIdentifier.puml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ interface RecurringOrderDraft [[RecurringOrderDraft.svg]] {
8989
cart: [[CartResourceIdentifier.svg CartResourceIdentifier]]
9090
cartVersion: Long
9191
startsAt: DateTime
92+
expiresAt: DateTime
9293
state: [[StateResourceIdentifier.svg StateResourceIdentifier]]
9394
custom: [[CustomFieldsDraft.svg CustomFieldsDraft]]
9495
}

0 commit comments

Comments
 (0)