?? GreyFile — Mystic File Browser

Current path: home/webdevt/www/demo2/wp-content/plugins/wpforms-lite/vendor_prefixed/square/square/src/Models/



?? Go up: /home/webdevt/www/demo2/wp-content/plugins/wpforms-lite/vendor_prefixed/square/square/src

?? Viewing: BulkRetrieveVendorsRequest.php

<?php

declare (strict_types=1);
namespace WPForms\Vendor\Square\Models;

use stdClass;
/**
 * Represents an input to a call to [BulkRetrieveVendors]($e/Vendors/BulkRetrieveVendors).
 */
class BulkRetrieveVendorsRequest implements \JsonSerializable
{
    /**
     * @var array
     */
    private $vendorIds = [];
    /**
     * Returns Vendor Ids.
     * IDs of the [Vendor](entity:Vendor) objects to retrieve.
     *
     * @return string[]|null
     */
    public function getVendorIds() : ?array
    {
        if (\count($this->vendorIds) == 0) {
            return null;
        }
        return $this->vendorIds['value'];
    }
    /**
     * Sets Vendor Ids.
     * IDs of the [Vendor](entity:Vendor) objects to retrieve.
     *
     * @maps vendor_ids
     *
     * @param string[]|null $vendorIds
     */
    public function setVendorIds(?array $vendorIds) : void
    {
        $this->vendorIds['value'] = $vendorIds;
    }
    /**
     * Unsets Vendor Ids.
     * IDs of the [Vendor](entity:Vendor) objects to retrieve.
     */
    public function unsetVendorIds() : void
    {
        $this->vendorIds = [];
    }
    /**
     * Encode this object to JSON
     *
     * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
     *        are set. (default: false)
     *
     * @return array|stdClass
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize(bool $asArrayWhenEmpty = \false)
    {
        $json = [];
        if (!empty($this->vendorIds)) {
            $json['vendor_ids'] = $this->vendorIds['value'];
        }
        $json = \array_filter($json, function ($val) {
            return $val !== null;
        });
        return !$asArrayWhenEmpty && empty($json) ? new stdClass() : $json;
    }
}


??

??