From 898f06b2d2c0f7c38b727f986738e0922f155b0f Mon Sep 17 00:00:00 2001 From: Noel Light-Hilary Date: Tue, 19 Apr 2022 18:53:32 +0100 Subject: [PATCH] Add regulator fields; use snake case consistently --- Readme.md | 12 ++++++++++++ composer.json | 2 +- composer.lock | 4 ++-- src/Donation.php | 8 +++++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Readme.md b/Readme.md index f4036d1..ed13506 100644 --- a/Readme.md +++ b/Readme.md @@ -9,6 +9,18 @@ them with [ClaimBot](https://github.com/thebiggive/matchbot). ## Changelog +### v3.0.0 + +v3 adds `$org_regulator` and `$org_regulator_numbers`. These are technically +optional, but ClaimBot v1.3 will send claims in a way that only works when +they are set appropriately (except for exempt charities). + +As it is effectively therefore a breaking release of the model already, we +have also taken the opportunity to make the feedback fields `$submission_correlation_id`, +`$response_success` and `$response_detail` snake case for consistency +with the other properties. Implementations using camel case will break +immediately upon upgrade until they are updated. + ### v2.0.0 v2 comes alongside a new assumption about what it means for donations to be sent back diff --git a/composer.json b/composer.json index 34f0a18..5aa1bc7 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "minimum-stability": "stable", "prefer-stable": true, "require": { - "php": "^8.0.2" + "php": "^8.0" }, "config": { "optimize-autoloader": true, diff --git a/composer.lock b/composer.lock index b5ce306..d0fa5dd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "edbf2a4486d4f8e497a3bbbe05fb7bf9", + "content-hash": "b2581442dd1825792bc07e827d38fd9a", "packages": [], "packages-dev": [], "aliases": [], @@ -13,7 +13,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.0.2" + "php": "^8.0" }, "platform-dev": [], "plugin-api-version": "2.2.0" diff --git a/src/Donation.php b/src/Donation.php index c7c0143..1bfe169 100644 --- a/src/Donation.php +++ b/src/Donation.php @@ -19,20 +19,22 @@ class Donation public bool $sponsored = false; public string $org_hmrc_ref; public string $org_name; + public ?string $org_regulator = null; // CCEW, CCNI or OSCR. + public ?string $org_regulator_number = null; /** * @var string|null From HMRC acknowledgement. Used for subsequent polling status checks and HMRC contact. */ - public ?string $submissionCorrelationId = null; + public ?string $submission_correlation_id = null; /** * @var bool|null A minimal status flag: null when claim outcome is not yet determined, false for any * kind of error and true for success. */ - public ?bool $responseSuccess = null; + public ?bool $response_success = null; /** * @var string|null Once provided, finalised errors or "messages" value from HMRC. */ - public ?string $responseDetail = null; + public ?string $response_detail = null; }