Skip to main content

CreditNoteModel

Version: v4.1.0

Stored entity

Partition key pk, sort key sk • discriminator type = "CREDIT_NOTE"

Overview

Credit note model

Fields

FieldTypeRequiredDefaultDescription
pkstr
skstr
credit_idstr
credit_display_idstr
contact_namestr
contact_idstr
tenant_idstr
is_deletedboolFalse
referencestr
notestr
issue_datestr
reasonstr
sales_personstr
sales_person_idstr
line_amount_tax_typestr
sub_totalfloat
total_taxfloat
totalfloat
restocking_feefloat
last_emailed_atstr
updated_atstr
created_atstr
meta_datadict
line_itemsList[CreditNoteLineItem]
allocationsList[CreditNoteAllocation]
statusstr
amount_refundedfloat
amount_remainingfloat
dont_sync_to_xerobool
typestrCREDIT_NOTE

Embedded models

Models embedded in the fields above — shown inline; they have no separate page.

CreditNoteLineItem — v1.0.1
FieldTypeRequiredDefaultDescription
item_typestr
item_namestr
descriptionstr
unit_pricefloat
tax_typestr
quantityint
accountAccountAccount model
tag_idstr
part_idstr
is_restockedboolFalse
discountfloat
tax_amountfloat
line_amountfloat
line_item_idstr

Change history

  • v1.0.1 · 2025-09-12 · Olaniyi Ajayi · Field discount default changed: None → Field(None, ge=0).; Field line_amount default changed: None → Field(None, ge=0).; Field tax_amount default changed: None → Field(None, ge=0).; Field unit_price default changed: None → Field(None, ge=0). (e2ad92a30)
  • v1.0.0 · 2025-03-15 · Olaniyi Ajayi · Initial version. (338416124)
Account — v5.0.0
FieldTypeRequiredDefaultDescription
account_codestr
account_idstr
account_namestr

Change history

  • v5.0.0 · 2025-05-26 · Cian (shared account) · Field account_code type changed: str → Optional[str] (breaking).; Field account_code became optional. (509648ddf)
  • v4.0.0 · 2025-05-15 · Cian (shared account) · Field account_code type changed: Optional[str] → str (breaking).; Field account_code became required (breaking). (bdb212c0f)
  • v3.0.0 · 2025-05-09 · Cian (shared account) · Field account_code type changed: str → Optional[str] (breaking).; Field account_code became optional. (3a7865c16)
  • v2.0.0 · 2025-04-09 · Cian (shared account) · Field account_code type changed: Optional[str] → str (breaking).; Field account_code became required (breaking). (6c65e2d22)
  • v1.0.0 · 2025-03-15 · Olaniyi Ajayi · Initial version. (338416124)
CreditNoteAllocation — v2.1.0
FieldTypeRequiredDefaultDescription
invoice_idstr
invoice_display_idstr
amountfloat
datestr
allocation_idstr

Change history

  • v2.1.0 · 2025-09-12 · Olaniyi Ajayi · Field amount became optional.; Field amount default changed: None → Field(..., ge=0). (e2ad92a30)
  • v2.0.0 · 2025-05-15 · Cian (shared account) · Field invoice_display_id type changed: int → str (breaking). (9d75bf4fd)
  • v1.0.0 · 2025-05-14 · Cian (shared account) · Initial version. (02e6bfcc7)

APIs / Triggers

TriggerEndpoint / SourceDetailHandler
StreamDynamoDB streamtable items where type is one of CREDIT_NOTE, INVOICEsrc/invoice_opensearch_sync.py
StreamDynamoDB streamtable items where type is one of CREDIT_NOTE, INVOICEsrc/invoice_algolia_sync.py
StreamDynamoDB streamtable items where type is one of CREDIT_NOTE, INVOICEsrc/history/invoice_history_process.py

Change history

v4.1.0 · 2026-06-05 · Cian (shared account) · 4465f0590

Add credit note history support

  • Added optional field meta_data.
v4.0.0 · 2026-06-02 · Cian (shared account) · 82b67e3db

Restore source files without generated outputs

  • Removed field note (breaking).
v3.4.0 · 2026-05-29 · Olaniyi Ajayi · 424792de4

Invoice: add note to credit note model

  • Added optional field note.
v3.3.0 · 2025-09-12 · Olaniyi Ajayi · e2ad92a30

account unique check

  • Field amount_refunded became optional.
  • Field amount_refunded default changed: None → Field(..., ge=0).
  • Field amount_remaining became optional.
  • Field amount_remaining default changed: None → Field(..., ge=0).
  • Field restocking_fee became optional.
  • Field restocking_fee default changed: None → Field(..., ge=0).
  • Field sub_total became optional.
  • Field sub_total default changed: None → Field(..., ge=0).
  • Field total became optional.
  • Field total default changed: None → Field(..., ge=0).
  • Field total_tax became optional.
  • Field total_tax default changed: None → Field(..., ge=0).
v3.2.0 · 2025-08-04 · Cian (shared account) · b2be28a52

fx

  • Added optional field is_deleted.
v3.1.0 · 2025-05-15 · Cian (shared account) · d2498b9a1

fx

  • Added required field tenant_id.
v3.0.0 · 2025-05-14 · Cian (shared account) · 02e6bfcc7

fx

  • Field allocations type changed: List[Allocation] → List[CreditNoteAllocation] (breaking).
v2.2.0 · 2025-04-11 · Cian (shared account) · 706dfc159

migration scripts

  • Added required field credit_display_id.
v2.1.0 · 2025-04-09 · Cian (shared account) · 6c65e2d22

fx

  • Field type became optional.
  • Field type default changed: None → 'CREDIT_NOTE'.
v2.0.0 · 2025-03-18 · Olaniyi Ajayi · 3ded38209

updated

  • Added required field amount_refunded.
  • Added required field amount_remaining.
  • Added optional field last_emailed_at.
  • Added required field pk.
  • Added required field sk.
  • Added required field status.
  • Added required field sub_total.
  • Added required field total_tax.
  • Field restocking_fee type changed: Optional[float] → float (breaking).
  • Field restocking_fee became required (breaking).
  • Field total type changed: Optional[float] → float (breaking).
  • Field total became required (breaking).
v1.0.0 · 2025-03-15 · Olaniyi Ajayi · 338416124

fx

  • Initial version.

Generated from dismantly-backend/Microservices/Invoice/dependencies/models.py. Do not edit by hand.

Models last synced: 2026-06-23 13:21 UTC