card; } /** * Sets Card. * * @maps card */ public function setCard(?SetupTokenResponseCard $card): void { $this->card = $card; } /** * Returns Paypal. */ public function getPaypal(): ?PaypalPaymentToken { return $this->paypal; } /** * Sets Paypal. * * @maps paypal */ public function setPaypal(?PaypalPaymentToken $paypal): void { $this->paypal = $paypal; } /** * Returns Venmo. */ public function getVenmo(): ?VenmoPaymentToken { return $this->venmo; } /** * Sets Venmo. * * @maps venmo */ public function setVenmo(?VenmoPaymentToken $venmo): void { $this->venmo = $venmo; } /** * 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] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1) public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->card)) { $json['card'] = $this->card; } if (isset($this->paypal)) { $json['paypal'] = $this->paypal; } if (isset($this->venmo)) { $json['venmo'] = $this->venmo; } return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } }