Happy Business Starts Here

Highlighted
Scholar

Cannot join products and discount - Amendment InvoiceData is not full

Hi, I'm trying get invoice from amendment response - but InvoiceData do not fill InvoiceItem fully, interested in InvoiceItem.Id and InvoiceItem.AppliedToInvoiceItemId 

 

amendRequest (JSON-like)

Spoiler
{
"SessionHeader": {
"session": "9oIGgBXw3wgNGxZyrcDnceZd3NRNnvLf04FpXJ71nTIGNNMy0XGj2GJIdv5EwXXt5b96TA0pIYPdkxi-wzg-tM7xGf_ng-nCuuzloFzDHt49EVb0iORf9yhWPsNJSajfIR5oHF0FryIxQ2J4kSAzarrooKbyweb_I-U_n_l4mttPnPBF3E0QLJmLi1gAYf4GksfVH8MhYxRwQaWVXeLM5M5fiAC7GRxetHqhpByFYlPdb20Bw6qviOP6rzEXdtM05v9uc0arop8Aa2EVs-0BdqIpnpS_VDJEq6mr8rBP_LCskJK1itMG8wRr-rVJQPTOYvMQgruB1p8ptJVOIOhmSSbII8o-9LfKZ53TWBgsnx0="
},
"requests": [{
"Amendments": [{
"ContractEffectiveDate": "2018-10-22T15:27:31.2798745+03:00",
"ContractEffectiveDateSpecified": true,
"Description": "dropping reseller discount",
"Name": "Dropping reseller discount",
"RatePlanData": {
"RatePlan": {
"AmendmentSubscriptionRatePlanId": "2c92c0f966810ad101669b24351157ff"
}
},
"Status": "Completed",
"SubscriptionId": "2c92c0f966810ad101669b2434cb57f0",
"Type": "RemoveProduct"
}, {
"ContractEffectiveDate": "2018-10-22T15:27:31.2798745+03:00",
"ContractEffectiveDateSpecified": true,
"Description": "removing product",
"Name": "Remove product",
"RatePlanData": {
"RatePlan": {
"AmendmentSubscriptionRatePlanId": "2c92c0f966810ad101669b2434fb57f8"
}
},
"Status": "Completed",
"SubscriptionId": "2c92c0f966810ad101669b2434cb57f0",
"Type": "RemoveProduct"
}, {
"ContractEffectiveDate": "2018-10-22T15:27:31.2798745+03:00",
"ContractEffectiveDateSpecified": true,
"CurrentTerm": 36,
"CurrentTermSpecified": true,
"Description": "changing terms and conditions",
"Name": "Change terms and conditions",
"RenewalTerm": 36,
"RenewalTermSpecified": true,
"Status": "Completed",
"SubscriptionId": "2c92c0f966810ad101669b2434cb57f0",
"TermStartDate": "2018-10-22T15:27:31.2798745+03:00",
"TermStartDateSpecified": true,
"Type": "TermsAndConditions"
}, {
"ContractEffectiveDate": "2018-10-22T15:27:31.2798745+03:00",
"ContractEffectiveDateSpecified": true,
"Description": "adding product",
"Name": "Add product",
"RatePlanData": {
"RatePlan": {
"ProductRatePlanId": "2c92c0f95ecc52cc015ee803294c2189"
},
"RatePlanChargeData": [{
"RatePlanCharge": {
"BillCycleType": "ChargeTriggerDay",
"ProductRatePlanChargeId": "2c92c0f95ecc52cc015ee803296c2191"
}
}
]
},
"Status": "Completed",
"SubscriptionId": "2c92c0f966810ad101669b2434cb57f0",
"Type": "NewProduct"
}
],
"AmendOptions": {
"ApplyCreditBalance": true,
"ApplyCreditBalanceSpecified": true,
"GenerateInvoice": true,
"GenerateInvoiceSpecified": true,
"InvoiceProcessingOptions": {
"InvoiceDate": "2018-10-22T15:27:31.29645+03:00",
"InvoiceDateSpecified": true,
"InvoiceTargetDate": "2018-10-22T15:27:31.2969511+03:00",
"InvoiceTargetDateSpecified": true
},
"ProcessPayments": true,
"ProcessPaymentsSpecified": true
},
"PreviewOptions": {
"EnablePreviewMode": true,
"EnablePreviewModeSpecified": true,
"PreviewType": "InvoiceItem"
}
}
]
}

Amend Response (JSON-like amendResponse.results[0].InvoiceDatas)

Spoiler
[{
"Invoice": {
"AccountId": "2c92c0f86680fd0701669b22355b21d2",
"Amount": 248.38,
"AmountSpecified": true,
"AmountWithoutTax": 248.38,
"AmountWithoutTaxSpecified": true,
"TargetDate": "2018-10-22T00:00:00",
"TargetDateSpecified": true,
"TaxAmount": 0.0,
"TaxAmountSpecified": true
},
"InvoiceItem": [{
"AccountingCode": "2341 - ST Deferred Revenue SaaS",
"ChargeAmount": 335.97,
"ChargeAmountSpecified": true,
"ChargeDate": "2018-10-22T15:27:33+03:00",
"ChargeDateSpecified": true,
"ChargeDescription": "",
"ChargeName": "Carbonite Safe Plus - 3 Year",
"ProductId": "2c92c0f9550fa331015517d30a193817",
"ProductRatePlanChargeId": "2c92c0f95ecc52cc015ee803296c2191",
"Quantity": 1.0,
"QuantitySpecified": true,
"ServiceEndDate": "2021-10-21T00:00:00",
"ServiceEndDateSpecified": true,
"ServiceStartDate": "2018-10-22T00:00:00",
"ServiceStartDateSpecified": true,
"TaxAmount": 0.0,
"TaxAmountSpecified": true,
"TaxExemptAmount": 0.0,
"TaxExemptAmountSpecified": true,
"UnitPrice": 335.97,
"UnitPriceSpecified": true,
"UOM": ""
}, {
"AccountingCode": "2341 - ST Deferred Revenue SaaS",
"ChargeAmount": -33.6,
"ChargeAmountSpecified": true,
"ChargeDate": "2018-10-22T15:27:33+03:00",
"ChargeDateSpecified": true,
"ChargeDescription": "",
"ChargeName": "Discount",
"ProductId": "2c92c0f9550fa331015517d30a193817",
"ProductRatePlanChargeId": "2c92c0f95ecc52cc015ee803295a218b",
"Quantity": 1.0,
"QuantitySpecified": true,
"ServiceEndDate": "2021-10-21T00:00:00",
"ServiceEndDateSpecified": true,
"ServiceStartDate": "2018-10-22T00:00:00",
"ServiceStartDateSpecified": true,
"TaxAmount": 0.0,
"TaxAmountSpecified": true,
"TaxExemptAmount": 0.0,
"TaxExemptAmountSpecified": true,
"UnitPrice": 10.0,
"UnitPriceSpecified": true,
"UOM": ""
}, {
"AccountingCode": "2341 - ST Deferred Revenue SaaS",
"ChargeAmount": -71.99,
"ChargeAmountSpecified": true,
"ChargeDate": "2018-10-22T15:27:33+03:00",
"ChargeDateSpecified": true,
"ChargeDescription": "",
"ChargeName": "Carbonite Safe Basic - 1 Year",
"ChargeNumber": "C-02497047",
"ProductId": "2c92c0f957161ae401571eb2b34677ef",
"ProductRatePlanChargeId": "2c92c0f85716014001571ebc5bd972a7",
"Quantity": 1.0,
"QuantitySpecified": true,
"ServiceEndDate": "2019-10-21T00:00:00",
"ServiceEndDateSpecified": true,
"ServiceStartDate": "2018-10-22T00:00:00",
"ServiceStartDateSpecified": true,
"TaxAmount": 0.0,
"TaxAmountSpecified": true,
"TaxExemptAmount": 0.0,
"TaxExemptAmountSpecified": true,
"UnitPrice": 71.99,
"UnitPriceSpecified": true,
"UOM": ""
}, {
"AccountingCode": "2341 - ST Deferred Revenue SaaS",
"ChargeAmount": 18.0,
"ChargeAmountSpecified": true,
"ChargeDate": "2018-10-22T15:27:33+03:00",
"ChargeDateSpecified": true,
"ChargeDescription": "Default 20% recurring discount (renew to catalog pricing)",
"ChargeName": "Reseller discount",
"ChargeNumber": "A-f948c3f7-05a6-4aab-955a-f6629e657d9c",
"ProductId": "2c92c0f85721ffeb015729ad41016472",
"ProductRatePlanChargeId": "2c92c0f85721ff7c015729b0272e32d8",
"Quantity": 1.0,
"QuantitySpecified": true,
"ServiceEndDate": "2019-10-21T00:00:00",
"ServiceEndDateSpecified": true,
"ServiceStartDate": "2018-10-22T00:00:00",
"ServiceStartDateSpecified": true,
"TaxAmount": 0.0,
"TaxAmountSpecified": true,
"TaxExemptAmount": 0.0,
"TaxExemptAmountSpecified": true,
"UnitPrice": 25.0,
"UnitPriceSpecified": true,
"UOM": ""
}
]
}
]

*null & default - suppress 

 

How can I get these fields or how can I join discount with products in amend() (etc.) response. 

Thank you!