Skip to content

Commit ccb4712

Browse files
Automatically update PHP SDK
1 parent 4a178ed commit ccb4712

5 files changed

Lines changed: 21 additions & 1 deletion

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "trophy/php",
3-
"version": "1.0.14",
3+
"version": "1.0.15",
44
"description": "Trophy PHP Library",
55
"keywords": [
66
"trophy",

src/Traits/UpdatedUser.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Trophy\Traits;
44

55
use Trophy\Core\Json\JsonProperty;
6+
use Trophy\Core\Types\ArrayType;
67

78
/**
89
* An object with editable user fields.
@@ -27,6 +28,12 @@ trait UpdatedUser
2728
#[JsonProperty('tz')]
2829
public ?string $tz;
2930

31+
/**
32+
* @var ?array<string> $deviceTokens The user's device tokens, used for push notifications.
33+
*/
34+
#[JsonProperty('deviceTokens'), ArrayType(['string'])]
35+
public ?array $deviceTokens;
36+
3037
/**
3138
* @var ?bool $subscribeToEmails Whether the user should receive Trophy-powered emails. Cannot be false if an email is provided.
3239
*/

src/Types/UpdatedUser.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Trophy\Core\Json\JsonSerializableType;
66
use Trophy\Core\Json\JsonProperty;
7+
use Trophy\Core\Types\ArrayType;
78

89
/**
910
* An object with editable user fields.
@@ -28,6 +29,12 @@ class UpdatedUser extends JsonSerializableType
2829
#[JsonProperty('tz')]
2930
public ?string $tz;
3031

32+
/**
33+
* @var ?array<string> $deviceTokens The user's device tokens, used for push notifications.
34+
*/
35+
#[JsonProperty('deviceTokens'), ArrayType(['string'])]
36+
public ?array $deviceTokens;
37+
3138
/**
3239
* @var ?bool $subscribeToEmails Whether the user should receive Trophy-powered emails. Cannot be false if an email is provided.
3340
*/
@@ -39,6 +46,7 @@ class UpdatedUser extends JsonSerializableType
3946
* email?: ?string,
4047
* name?: ?string,
4148
* tz?: ?string,
49+
* deviceTokens?: ?array<string>,
4250
* subscribeToEmails?: ?bool,
4351
* } $values
4452
*/
@@ -48,6 +56,7 @@ public function __construct(
4856
$this->email = $values['email'] ?? null;
4957
$this->name = $values['name'] ?? null;
5058
$this->tz = $values['tz'] ?? null;
59+
$this->deviceTokens = $values['deviceTokens'] ?? null;
5160
$this->subscribeToEmails = $values['subscribeToEmails'] ?? null;
5261
}
5362

src/Types/UpsertedUser.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class UpsertedUser extends JsonSerializableType
2525
* email?: ?string,
2626
* name?: ?string,
2727
* tz?: ?string,
28+
* deviceTokens?: ?array<string>,
2829
* subscribeToEmails?: ?bool,
2930
* } $values
3031
*/
@@ -35,6 +36,7 @@ public function __construct(
3536
$this->email = $values['email'] ?? null;
3637
$this->name = $values['name'] ?? null;
3738
$this->tz = $values['tz'] ?? null;
39+
$this->deviceTokens = $values['deviceTokens'] ?? null;
3840
$this->subscribeToEmails = $values['subscribeToEmails'] ?? null;
3941
}
4042

src/Types/User.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class User extends JsonSerializableType
4242
* email?: ?string,
4343
* name?: ?string,
4444
* tz?: ?string,
45+
* deviceTokens?: ?array<string>,
4546
* subscribeToEmails?: ?bool,
4647
* } $values
4748
*/
@@ -55,6 +56,7 @@ public function __construct(
5556
$this->email = $values['email'] ?? null;
5657
$this->name = $values['name'] ?? null;
5758
$this->tz = $values['tz'] ?? null;
59+
$this->deviceTokens = $values['deviceTokens'] ?? null;
5860
$this->subscribeToEmails = $values['subscribeToEmails'] ?? null;
5961
}
6062

0 commit comments

Comments
 (0)