您位於此處:
InsProductJSONService:getAttributes
使用此服務取得 ProductJSON 的屬性節點。
方法:getAttributes
運作方式
-
服務會使用
inputKey將具有一個根產品的標準產品 JSON 識別為輸入 JSON。 -
根據這些遠端選項篩選屬性:
instanceKeyproductCodeattributeCode
-
傳回根據步驟 2 中的設定篩選的屬性節點:
-
如果為
flatten = true,則服務會傳回格式為 (attributeCode, attributeDetails) 的屬性對應。 -
如果為
flatten = false,則服務會以 (attributeDetails) 格式傳回屬性清單。 -
如果是
flatten = true和valueOnly = true,則服務會傳回格式 (attributeCode, userValues) 的屬性。
-
如果為
遠端選項
選項 |
描述 |
|---|---|
|
服務用來從輸入 JSON 取得 預設值為 |
|
根產品代碼或任何子系規格產品代碼。 此服務會從直接與 |
|
傳回符合 |
|
將直接與具有此 |
|
以 ( |
|
與 |
輸出 JSON
輸出 JSON 會傳回使用 inputKey = configureProduct 選項找到之產品 JSON 的屬性節點,尋找具有 instanceKey = Jack Kirkland 和 attributeCode =
lifeCoverageAmt 的屬性。由於 flatten = true 與 valueOnly = true,因此服務會以 attributeCode:userValues 格式傳回屬性。
{
"Jack Kirkland": {
"InsLife": {
"lifeCoveageAmt": "500000"
}
},
"error": "OK"
}下一個範例使用與上一個範例相同的 inputKey。但其沒有設定篩選條件,因此服務會傳回每個 productCode 和 instanceKey 下的所有屬性。
{
"CFACTCLONED": {
"termLimit": 123
},
"Maria Kirkland": {
"ABR": {
"Limit-Agg": null,
"Limit-PerOcc": "50",
"ATTRIBUTE-074": 1200000
},
"ADDCOV": {
"covBenefit": "2"
},
"WOP": {
"claimWait": "90"
},
"InsLife": {
"lifeCoveageAmt": "500000",
"persSalutation": null,
"persPhone": null,
"persEmail": null,
"persCountry": null,
"persCity": null,
"persState": null,
"persPostalCode": null,
"persStreet": null,
"persAddress": null,
"persGender": "Female",
"persIncome": null,
"persBMI": null,
"persHeight": null,
"persLastName": null,
"persMiddleName": null,
"persFirstName": null,
"persWeight": null,
"persSmoke": "N",
"persName": null,
"persBirthdate": "1970-09-09"
}
},
"Jack Kirkland": {
"ABR": {
"Limit-Agg": null,
"Limit-PerOcc": "50",
"ATTRIBUTE-074": 1200000
},
"ADDCOV": {
"covBenefit": "2"
},
"WOP": {
"claimWait": "90"
},
"InsLife": {
"lifeCoveageAmt": "500000",
"persSalutation": null,
"persPhone": null,
"persEmail": null,
"persCountry": null,
"persCity": null,
"persState": null,
"persPostalCode": null,
"persStreet": null,
"persAddress": null,
"persGender": "Male",
"persIncome": null,
"persBMI": null,
"persHeight": null,
"persLastName": null,
"persMiddleName": null,
"persFirstName": null,
"persWeight": null,
"persSmoke": "N",
"persName": null,
"persBirthdate": "1965-09-09"
}
},
"WL-Base": {
"covType": "10",
"ProductCode": "WL",
"termPayment": "check",
"PART": "Participating",
"termDivMeth": "reinvest",
"payFrequency": "month",
"featCashDividends": true,
"featLevelPremium": true,
"featGuaranteedBenefit": true,
"featPolicyLoan": true,
"featAccumCVLI": true
},
"error": "OK"
}