-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathCreateBankAccountRequest.php
More file actions
102 lines (90 loc) · 2.28 KB
/
CreateBankAccountRequest.php
File metadata and controls
102 lines (90 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
namespace Square\BankAccounts\Requests;
use Square\Core\Json\JsonSerializableType;
use Square\Core\Json\JsonProperty;
class CreateBankAccountRequest extends JsonSerializableType
{
/**
* Unique ID. For more information, see the
* [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
*
* @var string $idempotencyKey
*/
#[JsonProperty('idempotency_key')]
private string $idempotencyKey;
/**
* The ID of the source that represents the bank account information to be stored. This field
* accepts the payment token created by WebSDK
*
* @var string $sourceId
*/
#[JsonProperty('source_id')]
private string $sourceId;
/**
* @var ?string $customerId The ID of the customer associated with the bank account to be stored.
*/
#[JsonProperty('customer_id')]
private ?string $customerId;
/**
* @param array{
* idempotencyKey: string,
* sourceId: string,
* customerId?: ?string,
* } $values
*/
public function __construct(
array $values,
) {
$this->idempotencyKey = $values['idempotencyKey'];
$this->sourceId = $values['sourceId'];
$this->customerId = $values['customerId'] ?? null;
}
/**
* @return string
*/
public function getIdempotencyKey(): string
{
return $this->idempotencyKey;
}
/**
* @param string $value
*/
public function setIdempotencyKey(string $value): self
{
$this->idempotencyKey = $value;
$this->_setField('idempotencyKey');
return $this;
}
/**
* @return string
*/
public function getSourceId(): string
{
return $this->sourceId;
}
/**
* @param string $value
*/
public function setSourceId(string $value): self
{
$this->sourceId = $value;
$this->_setField('sourceId');
return $this;
}
/**
* @return ?string
*/
public function getCustomerId(): ?string
{
return $this->customerId;
}
/**
* @param ?string $value
*/
public function setCustomerId(?string $value = null): self
{
$this->customerId = $value;
$this->_setField('customerId');
return $this;
}
}