
[
{
"company_base": {
"business_type": "Life, Accident, and Health",
"established_year": 1998,
"customer_complaint_ratio": 0.001336804425081,
"default_resources": {
"final-expense-life": {
"e_app_link": ""
},
"medicare-advantage": {
"e_app_link": ""
},
"medicare-supplement": {
"e_app_link": "https:\/\/www.unitedhealthproducers.com\/portal\/server.pt"
},
"hospital-indemnity": {
"e_app_link": ""
},
"dental": {
"e_app_link": ""
}
},
"parent_company_base": {
"established_year": 1998,
"code": "707",
},
"sp_rating": "AA-",
"naic": "79413",
"type": "STOCK",
"name": "UnitedHealthcare Ins Co"
},
"has_pdf_app": false,
"rate": {
"quarter": 42681,
"annual": 168324,
"semi_annual": 85362,
"month": 14027
},
"rating_class": "Standard",
"fees": [
],
"archive": null,
"select": false,
"age_increases": [
0.0434875597,
0.0416752067,
0.0399422837,
0.0384712412
],
"rate_type": "community rated",
"note": null,
"discounts": [
{
"type": "percent",
"name": "household",
"value": 0.05
}
],
"location": "aghzfmNzZ2FwaXIVCxIITG9jYXRpb24YgICA2vu9hAsMogEIbWVkX3N1cHA",
"legacy_id": null,
"last_modified": "2017-02-08T21:59:00.189200",
"plan": "F",
"riders": [
],
"expires_date": "2017-03-31T00:00:00",
"tobacco": false,
"has_brochure": false,
"gender": "M",
"age": 65
},
{
"company_base": {
"business_type": "Life, Accident, and Health",
"established_year": 1998,
"customer_complaint_ratio": 0.001336804425081,
"default_resources": {
"final-expense-life": {
"e_app_link": ""
},
"medicare-advantage": {
"e_app_link": ""
},
"medicare-supplement": {
"e_app_link": "https:\/\/www.unitedhealthproducers.com\/portal\/server.pt"
},
"hospital-indemnity": {
"e_app_link": ""
},
"dental": {
"e_app_link": ""
}
},
"parent_company_base": {
"established_year": 1998,
"code": "707",
},
"sp_rating": "AA-",
"naic": "79413",
"type": "STOCK",
"name": "UnitedHealthcare Ins Co"
},
"has_pdf_app": false,
"rate": {
"quarter": 42681,
"annual": 168324,
"semi_annual": 85362,
"month": 14027
},
"rating_class": "Standard",
"fees": [
],
"archive": null,
"select": false,
"age_increases": [
0.0434875597,
0.0416752067,
0.0399422837,
0.0384712412
],
"rate_type": "community rated",
"note": null,
"discounts": [
{
"type": "percent",
"name": "household",
"value": 0.05
}
],
"location": "aghzfmNzZ2FwaXIVCxIITG9jYXRpb24YgICA2vu9hAsMogEIbWVkX3N1cHA",
"legacy_id": null,
"last_modified": "2017-02-08T21:59:00.189200",
"plan": "F",
"riders": [
],
"expires_date": "2017-03-31T00:00:00",
"tobacco": false,
"has_brochure": false,
"gender": "M",
"age": 65
}
]
hello i get from 3d api data like from the up ,
i need to over and collect some details but how i can loop over the map ( i fount that i need to use it ..)
public List<med_supp> my_list = new List<med_supp>();
public object data;
public class discounts{
String type;
String name;
Decimal value;
}
public class rate{
Integer quarter;
Integer annual;
Integer semi_annual;
Integer month;
}
public class med_supp{
Datetime expires_date;
Boolean tobacco;
String gender;
Integer age;
String plan;
List <discounts> discounts;
List <rate> rate;
String name;
}
public appspotApiMedSuppController (ApexPages.StandardController stdController ){
String requestEndPoint ='https://wwww.google.com?zip5=15963&age=65&gender=M&tobacco=0&select=0&plan=F&effective_date=2017-03-01&offset=0';
Http http =new Http();
HttpRequest request = new HttpRequest();
request.setHeader('x-api-token', 'asdasdasdasdasdasd');
request.setEndpoint(requestEndPoint);
request.setMethod('GET');
HttpResponse response = http.send(request);
if(response.getStatusCode() ==200){
Map<String, Object> m =(Map<String, Object>)JSON.deserializeUntyped(response.getBody());
}
else{
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,' There was an error retrieving the data information.');
}
}
}
Thanks for the help
Hello Ofek, This community is focused on help with declarative configuration changes and non-programmatic solutions. You have a better chance of getting relevant answers if you post it on one of the following forums [lots of talented developers out there who must have worked on similar problems before]:
- StackExchange [http://salesforce.stackexchange.com]
- Official Developer Forum [https://developer.salesforce.com/forums]
For any configuration changes and point and click design solutions, feel free to post in this community and we will be glad to help you out.