Skip to content

Commit 78e9e01

Browse files
committed
TASK: Updating RAML types, Postman and OAS definition
1 parent ed2d65a commit 78e9e01

File tree

102 files changed

+1652
-781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

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

bruno/api/Project/Product-tailoring/Update actions/SetSlug.bru

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

77
post {

bruno/api/Project/Product-tailoring/Update actions/Unpublish.bru

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

77
post {
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
meta {
2+
name: SetProductAttribute
3+
type: http
4+
seq: 782
5+
}
6+
7+
post {
8+
url: {{apiUrl}}/{{project-key}}/products/{{product-id}}
9+
body: json
10+
auth: inherit
11+
}
12+
13+
body:json {
14+
{
15+
"version": {{product-version}},
16+
"actions": [
17+
{
18+
"action" : "setProductAttribute",
19+
"name" : "ExampleStringTypeAttribute",
20+
"value" : "TextString"
21+
}
22+
]
23+
}
24+
}
25+
26+
query {
27+
~priceCurrency:
28+
~priceCountry:
29+
~priceCustomerGroup:
30+
~priceCustomerGroupAssignments:
31+
~priceChannel:
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("product-id", data.results[0].id);
40+
bru.setEnvVar("product-version", data.results[0].version);
41+
}
42+
if(data.results && data.results[0] && data.results[0].key){
43+
bru.setEnvVar("product-key", data.results[0].key);
44+
}
45+
if(data.version){
46+
bru.setEnvVar("product-version", data.version);
47+
}
48+
if(data.id){
49+
bru.setEnvVar("product-id", data.id);
50+
}
51+
if(data.key){
52+
bru.setEnvVar("product-key", data.key);
53+
}
54+
55+
}
56+
}
57+
58+
assert {
59+
res.status: in [200, 201]
60+
}

bruno/api/Project/Products/Update actions/SetProductPriceCustomField.bru

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

77
post {

bruno/api/Project/Products/Update actions/SetProductPriceCustomType.bru

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

77
post {

bruno/api/Project/Products/Update actions/SetProductVariantKey.bru

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

77
post {

bruno/api/Project/Products/Update actions/SetSearchKeywords.bru

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

77
post {

bruno/api/Project/Products/Update actions/SetSku.bru

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

77
post {

bruno/api/Project/Products/Update actions/SetTaxCategory.bru

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

77
post {

0 commit comments

Comments
 (0)