Replaces top-level price fields with improved price modeling on Invoice Items and Invoice Line ItemsBreaking changes
What’s new
We’re introducing a new polymorphic pricing concept on Invoice Items and Invoice Line Items. It contains all price-related data and unifies the structure of pricing objects (Price and Plan) to prepare for adding new pricing object types. We’re also moving unit amount data into pricing.
Why is this a breaking change?
- priceand- planfields are no longer available on Invoice Items and Invoice Line Items.
- Move unit_andamount unit_to the newamount_ decimal pricingconcept on Invoice Items and Invoice Line Items.
Impact
Replace all references to price or plan on Invoice Items or Invoice Line Items with the pricing field:
- Instead of invoice_, useitem. price. id invoice_after verifying thatitem. pricing. price_ details. price invoice_isitem. pricing. type price_details 
- When creating or updating Invoice Items, use the pricingparameter instead ofprice(e.g., setpricing.instead of passing theprice priceparameter)
- For unit amounts, use pricing.instead ofunit_ amount_ decimal unit_oramount unit_amount_ decimal 
- When creating or updating Invoice Items, use the unit_parameter instead ofamount_ decimal unit_amount