Skip to content

Releases: seventhingsCompany/customer-api-php

v1.5.0

Choose a tag to compare

@hra42 hra42 released this 17 Oct 01:15
Immutable release. Only release title and notes can be modified.
cb3ba97

Support for customer API spec v0.20143_c5f8b54b3_20261005 (Go SDK v1.5.0 parity)

New APIs

  • Catalog items: $client->catalogItems with list(), all(), get(), create(), update() (full PUT replacement), and delete(). Requires the product catalog feature.
  • Custom thumbnail sizes: files->getThumbnail($uuid, $width, $height) fits thumbnails within 1–2000 px, preserving aspect ratio.
  • Timed rentals: optional isFullDay, issueAt, and dueAt on rental create/update requests (omitted when null), exposed on RentalCaseResponse.

Rate limiting and errors

  • Clients throttle to 200 requests per minute by default, evenly spaced without bursts. Pass requestsPerMinute to any Client::with*() factory to override it, or 0 to disable. Throttling blocks the calling process and does not retry HTTP 429 responses.
  • ApiException now exposes response $headers and header(), plus retryAfter() to parse Retry-After as delay-seconds or an HTTP date.

Changes

  • Task reminders: reminders: null omits the field; [] explicitly disables reminders.
  • Breaking: rooms and locations return API responses unchanged; {uuid, fields} unwrapping and Helpers::unwrapResourceFields() are removed.
  • Breaking: PersonResponse reads flat records only; the UUID comes from person_uuid (the uuid alias is removed).
  • Fix: persons->all(), users->all(), and catalogItems->all() yield sequential keys across pages, so iterator_to_array() no longer drops earlier pages.

Documentation and verification

  • Updated README (including a corrected Rentals example) and end-to-end demo with catalog and timed-rental steps.
  • 265 unit tests passed on PHP 8.5.11 against the merged tree.
  • 46 live integration tests passed, no skips, covering catalog CRUD, timed rentals, custom thumbnails, optional reminders, rate limiting, and error headers. Run before the final all() key fix, which is covered by unit tests.
  • Live demo completed successfully.

Pull request: #8

Full changelog: v1.4.0...v1.5.0

v1.4.0

Choose a tag to compare

@hra42 hra42 released this 24 Sep 14:16
Immutable release. Only release title and notes can be modified.
ab60880

Support for the nine new endpoints in customer API spec v0.19571_89862c247_20260915

New APIs

  • Barcode lookup: objects->getByBarcode() safely URL-encodes raw scancodes and supports archived objects.
  • Resource history: paginated history() methods on objects, rooms, locations, persons, tasks, and rentals, with HistoryListOptions and pagination metadata. Non-object resources expose typed history entries; object history preserves dynamic event payloads.
  • PDF reports: reports->listTemplates() returns available templates, and reports->create(new CreateReportRequest(...)) returns binary PDF data in the requested object order.

Compatibility and fixes

  • Accept flat and {uuid, fields} responses for persons, rooms, and locations while preserving custom fields.
  • Support both person_uuid and uuid aliases, preferring a non-empty legacy identifier.
  • Add ApiException::isFeatureInactive() to distinguish explicit inactive-feature responses from permission denials.
  • Gracefully skip rental history in the demo and new integration coverage when the API explicitly reports an inactive rentals feature. Unexpected errors remain failures.

Documentation and verification

  • Updated README and end-to-end demo covering the new APIs.
  • 279 tests passed, 1,006 assertions, no failures or skips: 239 unit tests and 40 live integration tests on PHP 8.5.10.
  • Live demo completed successfully, including PDF generation, resource history, CRUD flows, file attachments, and authentication cleanup.
  • Disabled-feature handling covered with mocked responses; the live instance has rentals enabled.
  • PHP syntax checks passed. The merged main tree matches the tested revision.

Pull request: #7

Full changelog: v1.3.0...v1.4.0

v1.3.0

Choose a tag to compare

@hra42 hra42 released this 04 Jul 23:25
Immutable release. Only release title and notes can be modified.
8679bd3

Additive ergonomics plus a persons sort fix. Verified end-to-end against the live conformance instance (139 unit + 31 integration tests, demo example exit 0).

✨ Custom person fields preserved

PersonResponse now carries a full raw $fields bag plus a null-safe field(string $key) accessor, so template-defined custom fields survive list/get/getById instead of being silently dropped. Typed props are unchanged — fully backward compatible.

🧰 New ergonomics helpers (ported from the Go SDK)

  • Mandatory-field discovery — FieldDefinition::isMandatory()/attribute()/hasAttribute(), FieldDefinitionFieldType::allowedValues(), SystemManagedFieldKeys, and FieldDefinitionsService::mandatoryFieldDefinitions()/missingMandatoryFields() for fail-fast pre-create validation.
  • Fields value object — type-safe string/int/float/bool/time/has/raw/uuid/name accessors over the untyped object/room/location bodies and the PersonResponse fields bag.
  • Auto-pagination — Generator-based all() on objects/rooms/locations (yielding Fields) and persons/users (yielding typed responses); default page size 100, stops on a short page.
  • Error predicates — ApiException::isNotFound()/isUnauthorized()/isForbidden()/isConflict()/isRateLimited()/isServerError().
  • Filter constructors — static FilterEntry::eq()/neq()/gt()/gte()/lt()/lte()/like()/notLike()/in()/nin().

🐛 Fixes

  • Persons list sorting now works. The persons endpoint uses the deep-object sort[field]=DIR format and echoes a sort field→direction map — not sort_by/order, which the API silently ignored. Sorting was previously a no-op and the response sortBy/order always resolved to ''.

⚠️ Breaking changes

  • PersonListOptions: sortBy/order replaced by a sort map (array<string, SortDirection>).
  • PersonListResponse: sortBy/order string props replaced by a sort map (array<string, string>).

(Users keep sort_by/order — that endpoint genuinely uses them.)

Full changelog: v1.2.0...v1.3.0

v1.2.0

Choose a tag to compare

@hra42 hra42 released this 04 Jul 22:17
Immutable release. Only release title and notes can be modified.
cdf95f5

What's Changed

  • Complete Persons lifecycle and add person field-definition template by @hra42 in #5

Full Changelog: v1.1.1...v1.2.0

v1.1.0

Choose a tag to compare

@hra42 hra42 released this 20 May 17:03
Immutable release. Only release title and notes can be modified.
d921542

What's Changed

  • Adds Persons module to SDK by @hra42 in #2

Full Changelog: v1.0.1...v1.1.0

v1.0.1

Choose a tag to compare

@hra42 hra42 released this 20 Mar 17:38
Immutable release. Only release title and notes can be modified.
d4297fa

What's Changed

  • Refactor Rental Management models and tests by @hra42 in #1

Full Changelog: v1.0.0...v1.0.1

v1.0.0 Initial Release

Choose a tag to compare

@seventhingsit seventhingsit released this 18 Mar 14:52
Immutable release. Only release title and notes can be modified.
78862e8

Initial Release for the seventhings Customer API

  • Target Version: v0.16573_15f736c09_20260310 (aka 2026.3)