Skip to content

Commit

Permalink
fix(sdk): add state change for order detail (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuelianhan007 authored Nov 22, 2024
1 parent 99f085d commit 04b8798
Show file tree
Hide file tree
Showing 21 changed files with 556 additions and 209 deletions.
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

0 comments on commit 04b8798

Please sign in to comment.