1
0

Beta Release 0.5.0 (#3)

* Automated commit message

* Automated commit message

* Automated commit message

* Automated commit message

---------

Co-authored-by: PayPalServerSDKs <server-sdks@paypal.com>
This commit is contained in:
Dani Kirby
2024-09-09 12:10:34 -05:00
committed by GitHub
parent c9cb1ad04a
commit 6b43a4225b
732 changed files with 73569 additions and 1 deletions

View File

@@ -0,0 +1,127 @@
<?php
declare(strict_types=1);
/*
* PaypalServerSDKLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
namespace PaypalServerSDKLib\Models;
use stdClass;
/**
* The shipping details.
*/
class VaultedDigitalWalletShippingDetails implements \JsonSerializable
{
/**
* @var ShippingName|null
*/
private $name;
/**
* @var string|null
*/
private $type;
/**
* @var Address|null
*/
private $address;
/**
* Returns Name.
* The name of the party.
*/
public function getName(): ?ShippingName
{
return $this->name;
}
/**
* Sets Name.
* The name of the party.
*
* @maps name
*/
public function setName(?ShippingName $name): void
{
$this->name = $name;
}
/**
* Returns Type.
* A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either
* `type` or `options` may be present, but not both.
*/
public function getType(): ?string
{
return $this->type;
}
/**
* Sets Type.
* A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either
* `type` or `options` may be present, but not both.
*
* @maps type
*/
public function setType(?string $type): void
{
$this->type = $type;
}
/**
* Returns Address.
* The portable international postal address. Maps to [AddressValidationMetadata](https://github.
* com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form
* controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-
* controls-the-autocomplete-attribute).
*/
public function getAddress(): ?Address
{
return $this->address;
}
/**
* Sets Address.
* The portable international postal address. Maps to [AddressValidationMetadata](https://github.
* com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form
* controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-
* controls-the-autocomplete-attribute).
*
* @maps address
*/
public function setAddress(?Address $address): void
{
$this->address = $address;
}
/**
* 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->name)) {
$json['name'] = $this->name;
}
if (isset($this->type)) {
$json['type'] = FullfillmentType::checkValue($this->type);
}
if (isset($this->address)) {
$json['address'] = $this->address;
}
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
}
}