Skip to content

Commit a7aa20c

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

File tree

187 files changed

+3301
-1211
lines changed

Some content is hidden

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

187 files changed

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

bruno/api/Project/Customers/Update actions/AddShippingAddressId.bru

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

77
post {

bruno/api/Project/Customers/Update actions/AddStore.bru

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

77
post {

bruno/api/Project/Customers/Update actions/ChangeAddress.bru

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

77
post {

bruno/api/Project/Customers/Update actions/ChangeEmail.bru

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

77
post {

bruno/api/Project/Customers/Update actions/RemoveAddress.bru

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

77
post {

bruno/api/Project/Customers/Update actions/RemoveBillingAddressId.bru

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

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

bruno/api/Project/Customers/Update actions/RemoveShippingAddressId.bru

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

77
post {

bruno/api/Project/Customers/Update actions/RemoveStore.bru

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

77
post {

0 commit comments

Comments
 (0)