Skip to content

Commit

Permalink
new schemas from capita, v3 (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeclanClarkeCGI authored Jan 18, 2024
1 parent 8479d25 commit fe2dfa5
Show file tree
Hide file tree
Showing 12 changed files with 213 additions and 147 deletions.
112 changes: 0 additions & 112 deletions schemas/AccountDetails/details_out_json.json

This file was deleted.

File renamed without changes.
126 changes: 126 additions & 0 deletions schemas/AccountDetails/of_f_get_defendant_account_out.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"defendant_account": {
"type": "object",
"properties": {
"defendant_account_id": { "type": "integer" },
"account_number": { "type": "string" },
"amount_imposed": { "type": "number" },
"amount_paid": { "type": "number" },
"account_balance": { "type": "number" },
"business_unit_id": { "type": "integer" },
"business_unit_name": { "type": "string" },
"account_status": { "type": "string" },
"originator_name": { "type": "string" },
"imposed_hearing_date": { "type": "string", "format": "date-time" },
"imposing_court_code": { "type": "integer" },
"last_hearing_date": { "type": "string", "format": "date-time" },
"last_hearing_court_code": { "type": "integer" },
"last_changed_date": { "type": "string", "format": "date-time" },
"last_movement_date": { "type": "string", "format": "date-time" },
"collection_order": { "type": "boolean" },
"enforcing_court_code": { "type": "integer" },
"last_enforcement": { "type": "integer" },
"enf_override_result_id": { "type": "string" },
"enf_override_enforcer_code": { "type": "integer" },
"enf_override_tfo_lja_code": { "type": "integer" },
"prosecutor_case_reference": { "type": "string" },
"account_comments": { "type": "string" },
"payment_terms": {
"type": "object",
"properties": {
"terms_date": { "type": "string", "format": "date-time" },
"terms_type_code": { "type": "string" },
"instalment_amount": { "type": "number" },
"instalment_period": { "type": "string" },
"instalment_lump_sum": { "type": "number" },
"jail_days": { "type": "integer" },
"wording": { "type": "string" }
}
},
"parties": {
"type": "object",
"properties": {
"party": {
"type": "array",
"items": {
"type": "object",
"properties": {
"party_id": { "type": "integer" },
"association_type": { "type": "string" },
"debtor": { "type": "boolean" },
"organisation": { "type": "boolean" },
"organisation_name": { "type": "string" },
"surname": { "type": "string" },
"forenames": { "type": "string" },
"initials": { "type": "string" },
"title": { "type": "string" },
"birth_date": { "type": "string", "format": "date-time" },
"age": { "type": "integer" },
"national_insurance_number": { "type": "string" },
"last_changed_date": { "type": "string", "format": "date-time" },
"full_name": { "type": "string" },
"address_line_1": { "type": "string" },
"address_line_2": { "type": "string" },
"address_line_3": { "type": "string" },
"address_line_4": { "type": "string" },
"address_line_5": { "type": "string" },
"postcode": { "type": "string" }
},
"required": ["party_id", "association_type", "debtor", "organisation", "address_line_1", "postcode"]
}
}
}
},
"impositions": {
"type": "object",
"properties": {
"imposition": {
"type": "array",
"items": {
"type": "object",
"properties": {
"imposition_id": { "type": "integer" },
"posted_date": { "type": "string", "format": "date-time" },
"result_id": { "type": "string" },
"imposed_date": { "type": "string", "format": "date-time" },
"imposing_court_code": { "type": "integer" },
"imposed_amount": { "type": "number" },
"paid_amount": { "type": "number" },
"offence_title": { "type": "string" },
"creditor_account_number": { "type": "string" },
"creditor_name": { "type": "string" }
},
"required": ["imposition_id", "posted_date", "result_id", "imposed_date", "offence_title"]
}
}
}
},
"account_activities": {
"type": "object",
"properties": {
"account_activity": {
"type": "array",
"items": {
"type": "object",
"properties": {
"activity_id": { "type": "integer" },
"activity_type": { "type": "string" },
"activity_type_code": { "type": "string" },
"activity_text": { "type": "string" },
"posted_date": { "type": "string", "format": "date-time" },
"posted_by": { "type": "string" },
"amount": { "type": "number" }
},
"required": ["activity_id", "activity_type", "posted_date", "activity_text"]
}
}
}
}
},
"required": ["defendant_account_id", "account_number", "amount_imposed", "amount_paid", "account_balance", "business_unit_id", "business_unit_name", "account_status", "originator_name", "imposing_court_code", "last_hearing_date", "last_hearing_court_code", "last_changed_date", "last_movement_date", "collection_order", "enforcing_court_code", "last_enforcement", "prosecutor_case_reference"]
}
}
}
6 changes: 3 additions & 3 deletions schemas/AccountDetails/of_f_get_defendant_account_out.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
<xsd:element name="payment_terms">
<xsd:complexType>
<xsd:sequence>
<xsd:element type="xsd:long" name="payment_terms_id" minOccurs="0"/>
<xsd:element type="xsd:dateTime" name="effective_date" minOccurs="0"/>
<xsd:element type="xsd:dateTime" name="terms_date" minOccurs="0"/>
<xsd:element type="xsd:string" name="terms_type_code"/>
<xsd:element type="xsd:double" name="instalment_amount" minOccurs="0"/>
<xsd:element type="xsd:string" name="instalment_period" minOccurs="0"/>
Expand Down Expand Up @@ -80,7 +79,7 @@
<xsd:sequence>
<xsd:element type="xsd:long" name="imposition_id"/>
<xsd:element type="xsd:dateTime" name="posted_date"/>
<xsd:element type="xsd:string" name="result_code"/>
<xsd:element type="xsd:string" name="result_id"/>
<xsd:element type="xsd:dateTime" name="imposed_date"/>
<xsd:element type="xsd:int" name="imposing_court_code"/>
<xsd:element type="xsd:double" name="imposed_amount"/>
Expand All @@ -103,6 +102,7 @@
<xsd:element type="xsd:long" name="activity_id"/>
<xsd:element type="xsd:string" name="activity_type"/>
<xsd:element type="xsd:string" name="activity_type_code"/>
<xsd:element type="xsd:string" name="activity_text"/>
<xsd:element type="xsd:dateTime" name="posted_date"/>
<xsd:element type="xsd:string" name="posted_by" minOccurs="0"/>
<xsd:element type="xsd:double" name="amount" minOccurs="0"/>
Expand Down
16 changes: 16 additions & 0 deletions schemas/AccountNotes/of_create_note_in.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"note": {
"type": "object",
"properties": {
"associated_record_id": { "type": "string" },
"associated_record_type": { "type": "string", "enum": ["defendant_accounts", "creditor_accounts", "suspense_accounts"] },
"note_text": { "type": "string" },
"posted_by": { "type": "string" }
},
"required": ["associated_record_id", "associated_record_type", "note_text", "posted_by"]
}
}
}
20 changes: 20 additions & 0 deletions schemas/AccountNotes/of_create_note_in.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="note">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="associated_record_id" type="xsd:string"/>
<xsd:element name="associated_record_type" type="recordType"/>
<xsd:element name="note_text" type="xsd:string"/>
<xsd:element name="posted_by" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="recordType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="defendant_accounts"/>
<xsd:enumeration value="creditor_accounts"/>
<xsd:enumeration value="suspense_accounts"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
10 changes: 10 additions & 0 deletions schemas/AccountNotes/of_create_note_out.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"note_id": {
"type": "integer"
}
},
"required": ["note_id"]
}
4 changes: 4 additions & 0 deletions schemas/AccountNotes/of_create_note_out.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="note_id" type="xsd:long"/>
</xsd:schema>
27 changes: 27 additions & 0 deletions schemas/AccountSearch/of_f_search_defendant_accounts_in.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"defendantAccountSearchCriteria": {
"type": "object",
"properties": {
"account_number": { "type": "string" },
"business_unit_id": { "type": "integer" },
"organisation": { "type": "boolean" },
"organisation_name": { "type": "string" },
"surname": { "type": "string" },
"forenames": { "type": "string" },
"initials": { "type": "string" },
"birth_date": { "type": "string", "format": "date-time" },
"national_insurance_number": { "type": "string" },
"prosecutor_case_reference": { "type": "string" },
"address_line_1": { "type": "string" },
"searchAliases": { "type": "boolean" },
"liveOnly": { "type": "boolean" },
"firstRowNumber": { "type": "integer" },
"lastRowNumber": { "type": "integer" }
},
"required": ["firstRowNumber", "lastRowNumber"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
"business_unit_id": { "type": "integer" },
"business_unit_name": { "type": "string" },
"organisation": { "type": "boolean" },
"organisation_name": { "type": ["string", "null"] },
"surname": { "type": ["string", "null"] },
"forenames": { "type": ["string", "null"] },
"initials": { "type": ["string", "null"] },
"birth_date": { "type": ["string", "null"], "format": "date-time" },
"organisation_name": { "type": "string" },
"surname": { "type": "string" },
"forenames": { "type": "string" },
"initials": { "type": "string" },
"title": { "type": "string" },
"birth_date": { "type": "string", "format": "date-time" },
"address_line_1": { "type": "string" },
"account_balance": { "type": "number" },
"rowNumber": { "type": "integer" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<xsd:element name="surname" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="forenames" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="initials" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="title" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="birth_date" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
<xsd:element name="address_line_1" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="account_balance" type="xsd:double" minOccurs="1" maxOccurs="1"/>
Expand Down
Loading

0 comments on commit fe2dfa5

Please sign in to comment.