diff --git a/CHANGELOG.md b/CHANGELOG.md index a06b0c8..09d5742 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 > Entries before 1.2.0 were not tracked in this file; see the git history for details. +## [1.5.0] — 2026-10-06 +### Added +- `FamisClient.getBillCodes(context)` — fetches `GET /billcodes`, with a new `BillCode` + model. (EY) + ## [1.4.1] — 2026-08-14 ### Fixed - Non-JSON error bodies (e.g. a plain-text `"Service Unavailable"` on a FAMIS 503) no diff --git a/famis_client.ts b/famis_client.ts index ea3e1c1..b78dacc 100644 --- a/famis_client.ts +++ b/famis_client.ts @@ -18,6 +18,7 @@ import { AccountSegment, AccountSegmentValue, ActivityGroup, + BillCode, AdjustmentTransactionResponse, AdjustmentType, Asset, @@ -1076,6 +1077,13 @@ export class FamisClient { //#endregion + //#region bill codes + async getBillCodes(context: QueryContext): Promise> { + return this.getAll(context, 'billcodes'); + } + + //#endregion + //#region property bill code associations async getPropertyBillCodeAssociations( context: QueryContext, diff --git a/model/famis_models.ts b/model/famis_models.ts index ef51d57..9e16b8a 100644 --- a/model/famis_models.ts +++ b/model/famis_models.ts @@ -2459,7 +2459,7 @@ export interface ChargeType { export interface BillCode { Id: number; Description: string; - UpdateDate: Date; + UpdateDate: string; UpdatedById: number; UpdatedByExternalId: string; Active: boolean; diff --git a/package.json b/package.json index a113baf..380a310 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "facility360", - "version": "1.4.1", + "version": "1.5.0", "description": "A Node based 360Facility client SDK", "main": "dist/index.js", "files": [ diff --git a/tests/integration.test.ts b/tests/integration.test.ts index 59ac159..b0e0b7a 100644 --- a/tests/integration.test.ts +++ b/tests/integration.test.ts @@ -55,6 +55,12 @@ describe('Lists', async () => { }); }); + it('should fetch all bill codes', async function() { + const resp = await famisClient.getBillCodes(baseContext); + expect(resp).toBeTruthy(); + expect(resp.results).toBeTruthy(); + }); + it('should fetch all account segments', async function() { const resp = await famisClient.getAccountSegments(baseContext); expect(resp).toBeTruthy();