Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sdk): add state change for order detail #222

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,19 @@ spec:
- partial
- rejected
valueMapping:
CREATING: acknowledged,
ACTIVATING: inProgress,
ACCEPTED: inProgress,
MANUAL: inProgress,
DELETING: inProgress,
DISABLING: inProgress,
DENIED: rejected,
ERROR: failed,
ACTIVE: completed,
DISABLED: disabled,
CANCELLED: disabled,
PENDING: pending,
PENDING_ACCEPTANCE: pending,
CREATING: acknowledged
ACTIVATING: inProgress
ACCEPTED: inProgress
MANUAL: inProgress
DELETING: inProgress
DISABLING: inProgress
DENIED: rejected
ERROR: failed
ACTIVE: completed
DISABLED: disabled
CANCELLED: disabled
PENDING: pending
PENDING_ACCEPTANCE: pending
DELETED: completed
source: "@{{responseBody.status}}"
sourceLocation: BODY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,44 @@ spec:
sourceLocation: BODY
targetLocation: BODY
customizedField: false
requiredMapping: false
- name: mapper.order.uni.read.stateChange.state
title: state in state change history
description: ''
source: '@{{status}}'
target: '@{{productOrderItem[0].stateChange[*].state}}'
targetType: enum
targetValues:
- acknowledged
- assessingCancellation
- held.assessingCharge
- pending.assessingModification
- cancelled
- pendingCancellation
- completed
- failed
- inProgress
- partial
- rejected
valueMapping:
done: completed
error: failed
allocated: acknowledged
cancelled: cancelled
activating: acknowledged
progressing: inProgress
replaceStar: true
sourceLocation: BODY
targetLocation: BODY
customizedField: false
requiredMapping: false
- name: mapper.order.uni.read.stateChange.changeDate
title: change date in state change history
description: ''
source: '@{{updatedAt}}'
target: '@{{productOrderItem[0].stateChange[*].changeDate}}'
replaceStar: true
sourceLocation: BODY
targetLocation: BODY
customizedField: false
requiredMapping: false
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,44 @@ spec:
sourceLocation: BODY
targetLocation: BODY
customizedField: false
requiredMapping: false
- name: mapper.order.uni.read.stateChange.state
title: state in state change history
description: ''
source: '@{{status}}'
target: '@{{productOrderItem[0].stateChange[*].state}}'
targetType: enum
targetValues:
- acknowledged
- assessingCancellation
- held.assessingCharge
- pending.assessingModification
- cancelled
- pendingCancellation
- completed
- failed
- inProgress
- partial
- rejected
valueMapping:
done: completed
error: failed
allocated: acknowledged
cancelled: cancelled
activating: acknowledged
progressing: inProgress
replaceStar: true
sourceLocation: BODY
targetLocation: BODY
customizedField: false
requiredMapping: false
- name: mapper.order.uni.read.stateChange.changeDate
title: change date in state change history
description: ''
source: '@{{updatedAt}}'
target: '@{{productOrderItem[0].stateChange[*].changeDate}}'
replaceStar: true
sourceLocation: BODY
targetLocation: BODY
customizedField: false
requiredMapping: false
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,21 @@ spec:
- partial
- rejected
valueMapping:
progressing: inProgress,
created: acknowledged,
CREATING: acknowledged,
ACTIVATING: inProgress,
ACCEPTED: inProgress,
MANUAL: inProgress,
DELETING: inProgress,
DISABLING: inProgress,
DENIED: rejected,
ERROR: failed,
ACTIVE: completed,
DISABLED: disabled,
CANCELLED: disabled,
PENDING: pending,
PENDING_ACCEPTANCE: pending,
progressing: inProgress
created: acknowledged
CREATING: acknowledged
ACTIVATING: inProgress
ACCEPTED: inProgress
MANUAL: inProgress
DELETING: inProgress
DISABLING: inProgress
DENIED: rejected
ERROR: failed
ACTIVE: completed
DISABLED: disabled
CANCELLED: disabled
PENDING: pending
PENDING_ACCEPTANCE: pending
DELETED: completed
source: "@{{responseBody.status}}"
sourceLocation: BODY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,44 @@ spec:
sourceLocation: BODY
targetLocation: BODY
customizedField: false
requiredMapping: false
- name: mapper.order.uni.read.stateChange.state
title: state in state change history
description: ''
source: '@{{status}}'
target: '@{{productOrderItem[0].stateChange[*].state}}'
targetType: enum
targetValues:
- acknowledged
- assessingCancellation
- held.assessingCharge
- pending.assessingModification
- cancelled
- pendingCancellation
- completed
- failed
- inProgress
- partial
- rejected
valueMapping:
done: completed
error: failed
allocated: acknowledged
cancelled: cancelled
activating: acknowledged
progressing: inProgress
replaceStar: true
sourceLocation: BODY
targetLocation: BODY
customizedField: false
requiredMapping: false
- name: mapper.order.uni.read.stateChange.changeDate
title: change date in state change history
description: ''
source: '@{{updatedAt}}'
target: '@{{productOrderItem[0].stateChange[*].changeDate}}'
replaceStar: true
sourceLocation: BODY
targetLocation: BODY
customizedField: false
requiredMapping: false
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,47 @@ spec:
sourceLocation: BODY
targetLocation: BODY
customizedField: false
requiredMapping: false
requiredMapping: false
- name: mapper.order.uni.read.stateChange.state
title: state in state change history
description: ''
source: '@{{status}}'
target: '@{{productOrderItem[0].stateChange[*].state}}'
targetType: enum
targetValues:
- acknowledged
- assessingCancellation
- held.assessingCharge
- pending.assessingModification
- cancelled
- pendingCancellation
- completed
- failed
- inProgress
- partial
- rejected
valueMapping:
done: completed
error: failed
allocated: acknowledged
cancelled: cancelled
activating: acknowledged
progressing: inProgress
replaceStar: true
sourceLocation: BODY
targetLocation: BODY
customizedField: false
requiredMapping: false
- name: mapper.order.uni.read.stateChange.changeDate
title: change date in state change history
description: ''
source: '@{{updatedAt}}'
target: '@{{productOrderItem[0].stateChange[*].changeDate}}'
replaceStar: true
sourceLocation: BODY
targetLocation: BODY
customizedField: false
requiredMapping: false



Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ spec:
"itemTerm": "${entity.renderedResponse.productOrderItem[0].itemTerm}",
"milestone": "${entity.renderedResponse.productOrderItem[0].milestone}",
"state": "((mefResponseBody.state))",
"terminationError": "${entity.renderedResponse.productOrderItem[0].terminationError}"
"terminationError": "${entity.renderedResponse.productOrderItem[0].terminationError}",
"stateChange":[
{
"state":"((mefResponseBody.state))",
"changeDate":""
}
]
}
],
"orderDate":"${entity.renderedResponse.orderDate}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ spec:
"itemTerm": "${entity.renderedResponse.productOrderItem[0].itemTerm}",
"milestone": "${entity.renderedResponse.productOrderItem[0].milestone}",
"state": "((mefResponseBody.state))",
"terminationError": "${entity.renderedResponse.productOrderItem[0].terminationError}"
"terminationError": "${entity.renderedResponse.productOrderItem[0].terminationError}",
"stateChange":[
{
"state":"((mefResponseBody.state))",
"changeDate":""
}
]
}
],
"orderDate":"${entity.renderedResponse.orderDate}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,48 +23,54 @@ spec:
pathReferId: "mef.sonata.api-target-mapper.order.uni.add#mapper.order.uni.add.orderId"
responseBody: |
{
"id": "${entity.id}",
"relatedContactInformation": "${T(com.consoleconnect.kraken.operator.gateway.func.SpelFunc).appendSellerInformation(env.seller.role, env.seller.name, env.seller.emailAddress, env.seller.number, entity.request.relatedContactInformation)}",
"productOrderItem": [
"id": "${entity.id}",
"relatedContactInformation": "${T(com.consoleconnect.kraken.operator.gateway.func.SpelFunc).appendSellerInformation(env.seller.role, env.seller.name, env.seller.emailAddress, env.seller.number, entity.request.relatedContactInformation)}",
"productOrderItem": [
{
"action": "${entity.renderedResponse.productOrderItem[0].action}",
"agreementName": "${entity.renderedResponse.productOrderItem[0].agreementName}",
"billingAccount": "${entity.renderedResponse.productOrderItem[0].billingAccount}",
"coordinatedAction": "${entity.renderedResponse.productOrderItem[0].coordinatedAction}",
"endCustomerName": "${entity.renderedResponse.productOrderItem[0].endCustomerName}",
"expediteIndicator": "${entity.renderedResponse.productOrderItem[0].expediteIndicator}",
"id": "${entity.renderedResponse.productOrderItem[0].id}",
"expectedCompletionDate": "${entity.renderedResponse.productOrderItem[0].expectedCompletionDate}",
"note": "${entity.renderedResponse.productOrderItem[0].note}",
"product": {
"productOffering": "${entity.renderedResponse.productOrderItem[0].product.productOffering}",
"productConfiguration": "${entity.renderedResponse.productOrderItem[0].product.productConfiguration}",
"productRelationship": "${entity.renderedResponse.productOrderItem[0].product.productRelationship}",
"place": "${entity.renderedResponse.productOrderItem[0].product.place}",
"href": "${entity.renderedResponse.productOrderItem[0].product.href}",
"id": ""
},
"productOfferingQualificationItem": "${entity.renderedResponse.productOrderItem[0].productOfferingQualificationItem}",
"productOrderItemRelationship": "${entity.renderedResponse.productOrderItem[0].productOrderItemRelationship}",
"quoteItem": "${entity.renderedResponse.productOrderItem[0].quoteItem}",
"relatedBuyerPON": "${entity.renderedResponse.productOrderItem[0].relatedBuyerPON}",
"relatedContactInformation": "${entity.renderedResponse.productOrderItem[0].relatedContactInformation}",
"requestedCompletionDate": "${entity.renderedResponse.productOrderItem[0].requestedCompletionDate}",
"requestedItemTerm": "${entity.renderedResponse.productOrderItem[0].requestedItemTerm}",
"tspRestorationPriority": "${entity.renderedResponse.productOrderItem[0].tspRestorationPriority}",
"charge": "${entity.renderedResponse.productOrderItem[0].charge}",
"completionDate": "((mefResponseBody.state=='completed'?mefResponseBody.completionDate:null))",
"expectedCompletionDate": "${entity.renderedResponse.productOrderItem[0].requestedCompletionDate}",
"expediteAcceptedIndicator": "${entity.renderedResponse.productOrderItem[0].expediteIndicator}",
"itemTerm": "${entity.renderedResponse.productOrderItem[0].itemTerm}",
"milestone": "${entity.renderedResponse.productOrderItem[0].milestone}",
"state": "((mefResponseBody.state))",
"terminationError": "${entity.renderedResponse.productOrderItem[0].terminationError}"
"action": "${entity.renderedResponse.productOrderItem[0].action}",
"agreementName": "${entity.renderedResponse.productOrderItem[0].agreementName}",
"billingAccount": "${entity.renderedResponse.productOrderItem[0].billingAccount}",
"coordinatedAction": "${entity.renderedResponse.productOrderItem[0].coordinatedAction}",
"endCustomerName": "${entity.renderedResponse.productOrderItem[0].endCustomerName}",
"expediteIndicator": "${entity.renderedResponse.productOrderItem[0].expediteIndicator}",
"id": "${entity.renderedResponse.productOrderItem[0].id}",
"expectedCompletionDate": "${entity.renderedResponse.productOrderItem[0].expectedCompletionDate}",
"note": "${entity.renderedResponse.productOrderItem[0].note}",
"product": {
"productOffering": "${entity.renderedResponse.productOrderItem[0].product.productOffering}",
"productConfiguration": "${entity.renderedResponse.productOrderItem[0].product.productConfiguration}",
"productRelationship": "${entity.renderedResponse.productOrderItem[0].product.productRelationship}",
"place": "${entity.renderedResponse.productOrderItem[0].product.place}",
"href": "${entity.renderedResponse.productOrderItem[0].product.href}",
"id": ""
},
"productOfferingQualificationItem": "${entity.renderedResponse.productOrderItem[0].productOfferingQualificationItem}",
"productOrderItemRelationship": "${entity.renderedResponse.productOrderItem[0].productOrderItemRelationship}",
"quoteItem": "${entity.renderedResponse.productOrderItem[0].quoteItem}",
"relatedBuyerPON": "${entity.renderedResponse.productOrderItem[0].relatedBuyerPON}",
"relatedContactInformation": "${entity.renderedResponse.productOrderItem[0].relatedContactInformation}",
"requestedCompletionDate": "${entity.renderedResponse.productOrderItem[0].requestedCompletionDate}",
"requestedItemTerm": "${entity.renderedResponse.productOrderItem[0].requestedItemTerm}",
"tspRestorationPriority": "${entity.renderedResponse.productOrderItem[0].tspRestorationPriority}",
"charge": "${entity.renderedResponse.productOrderItem[0].charge}",
"completionDate": "((mefResponseBody.state=='completed'?mefResponseBody.completionDate:null))",
"expectedCompletionDate": "${entity.renderedResponse.productOrderItem[0].requestedCompletionDate}",
"expediteAcceptedIndicator": "${entity.renderedResponse.productOrderItem[0].expediteIndicator}",
"itemTerm": "${entity.renderedResponse.productOrderItem[0].itemTerm}",
"milestone": "${entity.renderedResponse.productOrderItem[0].milestone}",
"state": "((mefResponseBody.state))",
"terminationError": "${entity.renderedResponse.productOrderItem[0].terminationError}",
"stateChange":[
{
"state":"((mefResponseBody.state))",
"changeDate":""
}
]
}
],
"orderDate":"${entity.renderedResponse.orderDate}",
"state": "",
"orderId": "${entity.renderedResponse.orderId}",
"completionDate": "((mefResponseBody.state=='completed'?mefResponseBody.completionDate:null))",
"instanceId": ""
],
"orderDate":"${entity.renderedResponse.orderDate}",
"state": "",
"orderId": "${entity.renderedResponse.orderId}",
"completionDate": "((mefResponseBody.state=='completed'?mefResponseBody.completionDate:null))",
"instanceId": ""
}
Loading
Loading