Skip to content

Commit

Permalink
Add regulator fields; use snake case consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelLH committed Apr 19, 2022
1 parent 5459200 commit 898f06b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
12 changes: 12 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": "^8.0.2"
"php": "^8.0"
},
"config": {
"optimize-autoloader": true,
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/Donation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 898f06b

Please sign in to comment.