Skip to content

Commit 01d9891

Browse files
committed
TASK: Updating RAML types, Postman and OAS definition
1 parent aa83bf0 commit 01d9891

68 files changed

Lines changed: 1872 additions & 849 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
meta {
2+
name: SetRecurringOrderScope
3+
type: http
4+
seq: 792
5+
}
6+
7+
post {
8+
url: {{apiUrl}}/{{project-key}}/cart-discounts/{{cart-discount-id}}
9+
body: json
10+
auth: inherit
11+
}
12+
13+
body:json {
14+
{
15+
"version": {{cart-discount-version}},
16+
"actions": [
17+
{
18+
"action" : "setRecurringOrderScope",
19+
"recurringOrderScope" : {
20+
"type" : "ApplicableRecurrencePolicies",
21+
"recurrencePolicies" : [ {
22+
"typeId" : "recurrence-policy",
23+
"id" : "{{recurrence-policy-id}}"
24+
} ]
25+
}
26+
}
27+
]
28+
}
29+
}
30+
31+
query {
32+
~expand:
33+
}
34+
35+
script:post-response {
36+
var data = res.body;
37+
if(res.status == 200 || res.status == 201) {
38+
if(data.results && data.results[0] && data.results[0].id && data.results[0].version){
39+
bru.setEnvVar("cart-discount-id", data.results[0].id);
40+
bru.setEnvVar("cart-discount-version", data.results[0].version);
41+
}
42+
if(data.results && data.results[0] && data.results[0].key){
43+
bru.setEnvVar("cart-discount-key", data.results[0].key);
44+
}
45+
if(data.version){
46+
bru.setEnvVar("cart-discount-version", data.version);
47+
}
48+
if(data.id){
49+
bru.setEnvVar("cart-discount-id", data.id);
50+
}
51+
if(data.key){
52+
bru.setEnvVar("cart-discount-key", data.key);
53+
}
54+
55+
}
56+
}
57+
58+
assert {
59+
res.status: in [200, 201]
60+
}

bruno/api/Project/Cart-discounts/Update actions/SetStores.bru

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

77
post {

bruno/api/Project/Cart-discounts/Update actions/SetValidFrom.bru

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

77
post {

bruno/api/Project/Cart-discounts/Update actions/SetValidFromAndUntil.bru

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

77
post {

bruno/api/Project/Cart-discounts/Update actions/SetValidUntil.bru

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

77
post {

oas/api/openapi.yaml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43335,6 +43335,7 @@ components:
4333543335
- isActive
4333643336
- lastModifiedAt
4333743337
- name
43338+
- recurringOrderScope
4333843339
- references
4333943340
- requiresDiscountCode
4334043341
- sortOrder
@@ -43396,6 +43397,8 @@ components:
4339643397
$ref: '#/components/schemas/CustomFields'
4339743398
discountGroup:
4339843399
$ref: '#/components/schemas/DiscountGroupReference'
43400+
recurringOrderScope:
43401+
$ref: '#/components/schemas/RecurringOrderScope'
4339943402
CartDiscountCustomLineItemsTarget:
4340043403
allOf:
4340143404
- $ref: '#/components/schemas/CartDiscountTarget'
@@ -43448,6 +43451,8 @@ components:
4344843451
$ref: '#/components/schemas/CustomFieldsDraft'
4344943452
discountGroup:
4345043453
$ref: '#/components/schemas/DiscountGroupResourceIdentifier'
43454+
recurringOrderScope:
43455+
$ref: '#/components/schemas/RecurringOrderScopeDraft'
4345143456
CartDiscountLineItemsTarget:
4345243457
allOf:
4345343458
- $ref: '#/components/schemas/CartDiscountTarget'
@@ -43595,6 +43600,7 @@ components:
4359543600
setDescription: '#/components/schemas/CartDiscountSetDescriptionAction'
4359643601
setDiscountGroup: '#/components/schemas/CartDiscountSetDiscountGroupAction'
4359743602
setKey: '#/components/schemas/CartDiscountSetKeyAction'
43603+
setRecurringOrderScope: '#/components/schemas/CartDiscountSetRecurringOrderScopeAction'
4359843604
setStores: '#/components/schemas/CartDiscountSetStoresAction'
4359943605
setValidFrom: '#/components/schemas/CartDiscountSetValidFromAction'
4360043606
setValidFromAndUntil: '#/components/schemas/CartDiscountSetValidFromAndUntilAction'
@@ -44056,6 +44062,17 @@ components:
4405644062
type: "string"
4405744063
key:
4405844064
type: "string"
44065+
CartDiscountSetRecurringOrderScopeAction:
44066+
allOf:
44067+
- $ref: '#/components/schemas/CartDiscountUpdateAction'
44068+
- type: "object"
44069+
required:
44070+
- recurringOrderScope
44071+
properties:
44072+
action:
44073+
type: "string"
44074+
recurringOrderScope:
44075+
$ref: '#/components/schemas/RecurringOrderScopeDraft'
4405944076
CartDiscountSetStoresAction:
4406044077
allOf:
4406144078
- $ref: '#/components/schemas/CartDiscountUpdateAction'
@@ -83782,6 +83799,104 @@ components:
8378283799
properties:
8378383800
type:
8378483801
type: "string"
83802+
AnyOrder:
83803+
allOf:
83804+
- $ref: '#/components/schemas/RecurringOrderScope'
83805+
- type: "object"
83806+
properties:
83807+
type:
83808+
type: "string"
83809+
AnyOrderDraft:
83810+
allOf:
83811+
- $ref: '#/components/schemas/RecurringOrderScopeDraft'
83812+
- type: "object"
83813+
properties:
83814+
type:
83815+
type: "string"
83816+
ApplicableRecurrencePolicies:
83817+
allOf:
83818+
- $ref: '#/components/schemas/RecurringOrderScope'
83819+
- type: "object"
83820+
required:
83821+
- recurrencePolicies
83822+
- type
83823+
properties:
83824+
type:
83825+
type: "string"
83826+
recurrencePolicies:
83827+
type: "array"
83828+
items:
83829+
$ref: '#/components/schemas/RecurrencePolicyReference'
83830+
ApplicableRecurrencePoliciesDraft:
83831+
allOf:
83832+
- $ref: '#/components/schemas/RecurringOrderScopeDraft'
83833+
- type: "object"
83834+
required:
83835+
- recurrencePolicies
83836+
- type
83837+
properties:
83838+
type:
83839+
type: "string"
83840+
recurrencePolicies:
83841+
type: "array"
83842+
items:
83843+
$ref: '#/components/schemas/RecurrencePolicyResourceIdentifier'
83844+
NonRecurringOrdersOnly:
83845+
allOf:
83846+
- $ref: '#/components/schemas/RecurringOrderScope'
83847+
- type: "object"
83848+
properties:
83849+
type:
83850+
type: "string"
83851+
NonRecurringOrdersOnlyDraft:
83852+
allOf:
83853+
- $ref: '#/components/schemas/RecurringOrderScopeDraft'
83854+
- type: "object"
83855+
properties:
83856+
type:
83857+
type: "string"
83858+
RecurringOrderScope:
83859+
type: "object"
83860+
discriminator:
83861+
propertyName: type
83862+
mapping:
83863+
AnyOrder: '#/components/schemas/AnyOrder'
83864+
ApplicableRecurrencePolicies: '#/components/schemas/ApplicableRecurrencePolicies'
83865+
NonRecurringOrdersOnly: '#/components/schemas/NonRecurringOrdersOnly'
83866+
RecurringOrdersOnly: '#/components/schemas/RecurringOrdersOnly'
83867+
required:
83868+
- type
83869+
properties:
83870+
type:
83871+
type: "string"
83872+
RecurringOrderScopeDraft:
83873+
type: "object"
83874+
discriminator:
83875+
propertyName: type
83876+
mapping:
83877+
AnyOrder: '#/components/schemas/AnyOrderDraft'
83878+
ApplicableRecurrencePolicies: '#/components/schemas/ApplicableRecurrencePoliciesDraft'
83879+
NonRecurringOrdersOnly: '#/components/schemas/NonRecurringOrdersOnlyDraft'
83880+
RecurringOrdersOnly: '#/components/schemas/RecurringOrdersOnlyDraft'
83881+
required:
83882+
- type
83883+
properties:
83884+
type:
83885+
type: "string"
83886+
RecurringOrdersOnly:
83887+
allOf:
83888+
- $ref: '#/components/schemas/RecurringOrderScope'
83889+
- type: "object"
83890+
properties:
83891+
type:
83892+
type: "string"
83893+
RecurringOrdersOnlyDraft:
83894+
allOf:
83895+
- $ref: '#/components/schemas/RecurringOrderScopeDraft'
83896+
- type: "object"
83897+
properties:
83898+
type:
83899+
type: "string"
8378583900
RecurringOrderSetCustomFieldAction:
8378683901
allOf:
8378783902
- $ref: '#/components/schemas/RecurringOrderUpdateAction'

uml/api/AnyOrder.puml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@startuml
2+
3+
hide empty fields
4+
hide empty methods
5+
legend
6+
|= |= line |
7+
|<back:black> </back>| inheritance |
8+
|<back:green> </back>| property reference |
9+
|<back:blue> </back>| discriminated class |
10+
endlegend
11+
interface AnyOrder [[AnyOrder.svg]] extends RecurringOrderScope {
12+
type: String
13+
}
14+
interface RecurringOrderScope [[RecurringOrderScope.svg]] {
15+
type: String
16+
}
17+
18+
19+
20+
21+
22+
@enduml

uml/api/AnyOrderDraft.puml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@startuml
2+
3+
hide empty fields
4+
hide empty methods
5+
legend
6+
|= |= line |
7+
|<back:black> </back>| inheritance |
8+
|<back:green> </back>| property reference |
9+
|<back:blue> </back>| discriminated class |
10+
endlegend
11+
interface AnyOrderDraft [[AnyOrderDraft.svg]] extends RecurringOrderScopeDraft {
12+
type: String
13+
}
14+
interface RecurringOrderScopeDraft [[RecurringOrderScopeDraft.svg]] {
15+
type: String
16+
}
17+
18+
19+
20+
21+
22+
@enduml
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@startuml
2+
3+
hide empty fields
4+
hide empty methods
5+
legend
6+
|= |= line |
7+
|<back:black> </back>| inheritance |
8+
|<back:green> </back>| property reference |
9+
|<back:blue> </back>| discriminated class |
10+
endlegend
11+
interface ApplicableRecurrencePolicies [[ApplicableRecurrencePolicies.svg]] extends RecurringOrderScope {
12+
type: String
13+
recurrencePolicies: [[RecurrencePolicyReference.svg List<RecurrencePolicyReference>]]
14+
}
15+
interface RecurringOrderScope [[RecurringOrderScope.svg]] {
16+
type: String
17+
}
18+
19+
20+
21+
22+
23+
@enduml
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@startuml
2+
3+
hide empty fields
4+
hide empty methods
5+
legend
6+
|= |= line |
7+
|<back:black> </back>| inheritance |
8+
|<back:green> </back>| property reference |
9+
|<back:blue> </back>| discriminated class |
10+
endlegend
11+
interface ApplicableRecurrencePoliciesDraft [[ApplicableRecurrencePoliciesDraft.svg]] extends RecurringOrderScopeDraft {
12+
type: String
13+
recurrencePolicies: [[RecurrencePolicyResourceIdentifier.svg List<RecurrencePolicyResourceIdentifier>]]
14+
}
15+
interface RecurringOrderScopeDraft [[RecurringOrderScopeDraft.svg]] {
16+
type: String
17+
}
18+
19+
20+
21+
22+
23+
@enduml

0 commit comments

Comments
 (0)