PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / vendor / square / square / src / Legacy / Models / BulkRetrieveCustomersRequest.php

BulkRetrieveCustomersRequest.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13, at vendor/square/square/src/Legacy/Models/BulkRetrieveCustomersRequest.php

73 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Square\Legacy\Models;
6
7 use stdClass;
8
9 /**
10 * Defines the body parameters that can be included in requests to the
11 * [BulkRetrieveCustomers]($e/Customers/BulkRetrieveCustomers) endpoint.
12 */
13 class BulkRetrieveCustomersRequest implements \JsonSerializable
14 {
15 /**
16 * @var string[]
17 */
18 private $customerIds;
19
20 /**
21 * @param string[] $customerIds
22 */
23 public function __construct(array $customerIds)
24 {
25 $this->customerIds = $customerIds;
26 }
27
28 /**
29 * Returns Customer Ids.
30 * The IDs of the [customer profiles](entity:Customer) to retrieve.
31 *
32 * @return string[]
33 */
34 public function getCustomerIds(): array
35 {
36 return $this->customerIds;
37 }
38
39 /**
40 * Sets Customer Ids.
41 * The IDs of the [customer profiles](entity:Customer) to retrieve.
42 *
43 * @required
44 * @maps customer_ids
45 *
46 * @param string[] $customerIds
47 */
48 public function setCustomerIds(array $customerIds): void
49 {
50 $this->customerIds = $customerIds;
51 }
52
53 /**
54 * Encode this object to JSON
55 *
56 * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
57 * are set. (default: false)
58 *
59 * @return array|stdClass
60 */
61 #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
62 public function jsonSerialize(bool $asArrayWhenEmpty = false)
63 {
64 $json = [];
65 $json['customer_ids'] = $this->customerIds;
66 $json = array_filter($json, function ($val) {
67 return $val !== null;
68 });
69
70 return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
71 }
72 }
73