Open
Conversation
The JSON received from the rest request while fetching a customer/invoice has an extra object now - details {}
Since, this object is not present in ServerResponse.java, it throws an exception while parsing it using ObjectMapper.
Here is a response object while fetching an invoice from the staging env (note it has details{}):
{
"code": 200,
"status": "OK",
"message": "",
"details": {},
"response": {
"invoice_id": 10819,
"currency_id": 1,
"terms_id": 3,
"admin_id": null,
"external_key": null,
"token": "n61x45m93ea0",
"refnumber": "10819",
"cycle_pre_from_date": "2016-02-02",
"cycle_pre_to_date": "2016-03-01",
"cycle_this_date": "2016-02-02",
"cycle_post_from_date": "2016-02-01",
"cycle_post_to_date": "2016-02-01",
"bill_addr1": "PO BOX 42637",
"bill_addr2": null,
"bill_addr3": null,
"bill_city": "INDIANAPOLIS",
"bill_state": "Indiana",
"bill_postcode": "46242",
"bill_country": "US",
"bill_notes": null,
"ship_addr1": null,
"ship_addr2": null,
"ship_addr3": null,
"ship_city": null,
"ship_state": null,
"ship_postcode": null,
"ship_country": null,
"ship_notes": null,
"memo": null,
"custom_1": null,
"custom_2": null,
"custom_3": null,
"custom_4": null,
"custom_5": null,
"write_datetime": "2016-02-02 00:26:01",
"void_datetime": null,
"currency_symbol": "$",
"currency_iso4217": "USD",
"admin_name": "",
"invoice_status_name": "Overdue",
"invoice_status_str": "open-overdue",
"invoice_status_state": "o",
"subtotal": 101,
"total": 101,
"taxes": 0,
"credits": 0,
"payments": 0,
"writeoffs": 0,
"applied": 0,
"sum_base": 101,
"sum_usage": 0,
"sum_onetime": 0,
"is_paid": false,
"balance": 101,
"is_void": false,
"due_date": "2016-02-02",
"terms_name": "Due on Receipt",
"terms_days": 0,
"days_overdue": 275,
"is_overdue": true,
"date": "2016-02-02",
"bill_block": "PO BOX 42637\r\nINDIANAPOLIS, Indiana 46242\r\nUS",
"ship_block": "",
"url_permalink": "https:\/\/mykaarma-staging.chargeover.com\/r\/invoice\/view\/n61x45m93ea0",
"url_paylink": "https:\/\/mykaarma-staging.chargeover.com\/r\/trans\/pay\/n61x45m93ea0",
"url_pdflink": "https:\/\/mykaarma-staging.chargeover.com\/r\/invoice\/pdf\/n61x45m93ea0",
"url_self": "https:\/\/mykaarma-staging.chargeover.com\/admin\/r\/invoice\/view\/10819",
"package_id": 1317,
"customer_id": 208,
"line_items": [
{
"invoice_id": 10819,
"item_id": 87,
"tierset_id": 1447,
"admin_id": null,
"descrip": "DirectConnect & myKaarma Pmts",
"line_rate": 1,
"line_quantity": 1,
"line_prorate": 1,
"line_usage": 0,
"usage_from": 0,
"usage_to": 0,
"tax_id": null,
"tax_group_id": null,
"tax_taxable": 1,
"tax_taxed": 0,
"tax_total": 0,
"is_base": true,
"is_free": false,
"is_setup": false,
"is_usage": false,
"is_recurring": true,
"is_latefee": "0",
"is_taxed": "0",
"custom_1": null,
"custom_2": null,
"custom_3": null,
"item_name": "DirectConnect & myKaarma Pmts",
"item_external_key": "dceb-26",
"item_token": "0k9c1zv3gb25",
"item_accounting_sku": null,
"item_units": "",
"tax_name": null,
"tax_group_name": null,
"line_subtotal": 1,
"line_total": 1,
"line_item_id": 4439,
"package_line_id": 2756
},
{
"invoice_id": 10819,
"item_id": 98,
"tierset_id": 1448,
"admin_id": null,
"descrip": "DMS Integration",
"line_rate": 100,
"line_quantity": 1,
"line_prorate": 1,
"line_usage": 0,
"usage_from": 0,
"usage_to": 0,
"tax_id": null,
"tax_group_id": null,
"tax_taxable": 100,
"tax_taxed": 0,
"tax_total": 0,
"is_base": true,
"is_free": false,
"is_setup": false,
"is_usage": false,
"is_recurring": true,
"is_latefee": "0",
"is_taxed": "0",
"custom_1": null,
"custom_2": null,
"custom_3": null,
"item_name": "DMS Integration",
"item_external_key": "dmsi-10",
"item_token": "5rk3q45e361x",
"item_accounting_sku": null,
"item_units": "",
"tax_name": null,
"tax_group_name": null,
"line_subtotal": 100,
"line_total": 100,
"line_item_id": 4440,
"package_line_id": 2757
}
],
"sent": [
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-10-24 14:04:45"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-10-14 14:02:45"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-10-03 14:05:33"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-09-23 14:02:33"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-09-12 14:05:17"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-09-02 14:02:39"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-08-23 14:01:26"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-08-12 14:03:32"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-08-01 14:41:24"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-07-22 14:04:22"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-07-12 14:03:15"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-07-01 14:06:18"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-06-21 14:04:18"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-06-11 14:01:37"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-05-31 14:02:14"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-05-20 14:03:27"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-05-09 14:03:37"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-04-29 14:02:54"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-04-19 14:02:02"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-04-09 14:00:55"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-03-29 14:01:52"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-03-19 14:00:47"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-03-08 14:01:49"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-02-26 14:01:38"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-02-16 14:01:28"
},
{
"email": "burair.ashary@mykaarma.com",
"sent_datetime": "2016-02-05 14:02:21"
}
]
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The JSON received from the rest request while fetching a customer/invoice has an extra object now - details {}
Since, this object is not present in ServerResponse.java, it throws an exception while parsing it using ObjectMapper.
Here is a response object while fetching an invoice from the staging env (note it has details{}):