charitable
/
vendor
/
square
/
square
/
src
/
Webhooks
/
Subscriptions
/
Requests
/
UpdateWebhookSubscriptionSignatureKeyRequest.php
UpdateWebhookSubscriptionSignatureKeyRequest.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13.1, at vendor/square/square/src/Webhooks/Subscriptions/Requests/UpdateWebhookSubscriptionSignatureKeyRequest.php
| 1 | <?php |
| 2 | |
| 3 | namespace Square\Webhooks\Subscriptions\Requests; |
| 4 | |
| 5 | use Square\Core\Json\JsonSerializableType; |
| 6 | use Square\Core\Json\JsonProperty; |
| 7 | |
| 8 | class UpdateWebhookSubscriptionSignatureKeyRequest extends JsonSerializableType |
| 9 | { |
| 10 | /** |
| 11 | * @var string $subscriptionId [REQUIRED] The ID of the [Subscription](entity:WebhookSubscription) to update. |
| 12 | */ |
| 13 | private string $subscriptionId; |
| 14 | |
| 15 | /** |
| 16 | * @var ?string $idempotencyKey A unique string that identifies the [UpdateWebhookSubscriptionSignatureKey](api-endpoint:WebhookSubscriptions-UpdateWebhookSubscriptionSignatureKey) request. |
| 17 | */ |
| 18 | #[JsonProperty('idempotency_key')] |
| 19 | private ?string $idempotencyKey; |
| 20 | |
| 21 | /** |
| 22 | * @param array{ |
| 23 | * subscriptionId: string, |
| 24 | * idempotencyKey?: ?string, |
| 25 | * } $values |
| 26 | */ |
| 27 | public function __construct( |
| 28 | array $values, |
| 29 | ) { |
| 30 | $this->subscriptionId = $values['subscriptionId']; |
| 31 | $this->idempotencyKey = $values['idempotencyKey'] ?? null; |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * @return string |
| 36 | */ |
| 37 | public function getSubscriptionId(): string |
| 38 | { |
| 39 | return $this->subscriptionId; |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * @param string $value |
| 44 | */ |
| 45 | public function setSubscriptionId(string $value): self |
| 46 | { |
| 47 | $this->subscriptionId = $value; |
| 48 | return $this; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * @return ?string |
| 53 | */ |
| 54 | public function getIdempotencyKey(): ?string |
| 55 | { |
| 56 | return $this->idempotencyKey; |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * @param ?string $value |
| 61 | */ |
| 62 | public function setIdempotencyKey(?string $value = null): self |
| 63 | { |
| 64 | $this->idempotencyKey = $value; |
| 65 | return $this; |
| 66 | } |
| 67 | } |
| 68 |