forked from LiveCarta/PayPal-PHP-Server-SDK
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:
114
src/Models/AVSCode.php
Normal file
114
src/Models/AVSCode.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use Exception;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* The address verification code for Visa, Discover, Mastercard, or American Express transactions.
|
||||
*/
|
||||
class AVSCode
|
||||
{
|
||||
public const A = 'A';
|
||||
|
||||
public const B = 'B';
|
||||
|
||||
public const C = 'C';
|
||||
|
||||
public const D = 'D';
|
||||
|
||||
public const E = 'E';
|
||||
|
||||
public const F = 'F';
|
||||
|
||||
public const G = 'G';
|
||||
|
||||
public const I = 'I';
|
||||
|
||||
public const M = 'M';
|
||||
|
||||
public const N = 'N';
|
||||
|
||||
public const P = 'P';
|
||||
|
||||
public const R = 'R';
|
||||
|
||||
public const S = 'S';
|
||||
|
||||
public const U = 'U';
|
||||
|
||||
public const W = 'W';
|
||||
|
||||
public const X = 'X';
|
||||
|
||||
public const Y = 'Y';
|
||||
|
||||
public const Z = 'Z';
|
||||
|
||||
public const NULL = 'Null';
|
||||
|
||||
public const ENUM_0 = '0';
|
||||
|
||||
public const ENUM_1 = '1';
|
||||
|
||||
public const ENUM_2 = '2';
|
||||
|
||||
public const ENUM_3 = '3';
|
||||
|
||||
public const ENUM_4 = '4';
|
||||
|
||||
private const _ALL_VALUES = [
|
||||
self::A,
|
||||
self::B,
|
||||
self::C,
|
||||
self::D,
|
||||
self::E,
|
||||
self::F,
|
||||
self::G,
|
||||
self::I,
|
||||
self::M,
|
||||
self::N,
|
||||
self::P,
|
||||
self::R,
|
||||
self::S,
|
||||
self::U,
|
||||
self::W,
|
||||
self::X,
|
||||
self::Y,
|
||||
self::Z,
|
||||
self::NULL,
|
||||
self::ENUM_0,
|
||||
self::ENUM_1,
|
||||
self::ENUM_2,
|
||||
self::ENUM_3,
|
||||
self::ENUM_4
|
||||
];
|
||||
|
||||
/**
|
||||
* Ensures that all the given values are present in this Enum.
|
||||
*
|
||||
* @param array|stdClass|null|string $value Value or a list/map of values to be checked
|
||||
*
|
||||
* @return array|null|string Input value(s), if all are a part of this Enum
|
||||
*
|
||||
* @throws Exception Throws exception if any given value is not in this Enum
|
||||
*/
|
||||
public static function checkValue($value)
|
||||
{
|
||||
$value = json_decode(json_encode($value), true); // converts stdClass into array
|
||||
if (CoreHelper::checkValueOrValuesInList($value, self::_ALL_VALUES)) {
|
||||
return $value;
|
||||
}
|
||||
throw new Exception("$value is invalid for AVSCode.");
|
||||
}
|
||||
}
|
||||
100
src/Models/ActivityTimestamps.php
Normal file
100
src/Models/ActivityTimestamps.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?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 date and time stamps that are common to authorized payment, captured payment, and refund
|
||||
* transactions.
|
||||
*/
|
||||
class ActivityTimestamps implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $createTime;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $updateTime;
|
||||
|
||||
/**
|
||||
* Returns Create Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*/
|
||||
public function getCreateTime(): ?string
|
||||
{
|
||||
return $this->createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Create Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*
|
||||
* @maps create_time
|
||||
*/
|
||||
public function setCreateTime(?string $createTime): void
|
||||
{
|
||||
$this->createTime = $createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Update Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*/
|
||||
public function getUpdateTime(): ?string
|
||||
{
|
||||
return $this->updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Update Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*
|
||||
* @maps update_time
|
||||
*/
|
||||
public function setUpdateTime(?string $updateTime): void
|
||||
{
|
||||
$this->updateTime = $updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->createTime)) {
|
||||
$json['create_time'] = $this->createTime;
|
||||
}
|
||||
if (isset($this->updateTime)) {
|
||||
$json['update_time'] = $this->updateTime;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
231
src/Models/Address.php
Normal file
231
src/Models/Address.php
Normal file
@@ -0,0 +1,231 @@
|
||||
<?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 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).
|
||||
*/
|
||||
class Address implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $addressLine1;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $addressLine2;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $adminArea2;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $adminArea1;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $postalCode;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $countryCode;
|
||||
|
||||
/**
|
||||
* @param string $countryCode
|
||||
*/
|
||||
public function __construct(string $countryCode)
|
||||
{
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Address Line 1.
|
||||
* The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for
|
||||
* data entry, and Compliance and Risk checks. This field needs to pass the full address.
|
||||
*/
|
||||
public function getAddressLine1(): ?string
|
||||
{
|
||||
return $this->addressLine1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Address Line 1.
|
||||
* The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for
|
||||
* data entry, and Compliance and Risk checks. This field needs to pass the full address.
|
||||
*
|
||||
* @maps address_line_1
|
||||
*/
|
||||
public function setAddressLine1(?string $addressLine1): void
|
||||
{
|
||||
$this->addressLine1 = $addressLine1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Address Line 2.
|
||||
* The second line of the address, for example, a suite or apartment number.
|
||||
*/
|
||||
public function getAddressLine2(): ?string
|
||||
{
|
||||
return $this->addressLine2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Address Line 2.
|
||||
* The second line of the address, for example, a suite or apartment number.
|
||||
*
|
||||
* @maps address_line_2
|
||||
*/
|
||||
public function setAddressLine2(?string $addressLine2): void
|
||||
{
|
||||
$this->addressLine2 = $addressLine2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Admin Area 2.
|
||||
* A city, town, or village. Smaller than `admin_area_level_1`.
|
||||
*/
|
||||
public function getAdminArea2(): ?string
|
||||
{
|
||||
return $this->adminArea2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Admin Area 2.
|
||||
* A city, town, or village. Smaller than `admin_area_level_1`.
|
||||
*
|
||||
* @maps admin_area_2
|
||||
*/
|
||||
public function setAdminArea2(?string $adminArea2): void
|
||||
{
|
||||
$this->adminArea2 = $adminArea2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Admin Area 1.
|
||||
* The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2
|
||||
* subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`.
|
||||
* Value, by country, is:<ul><li>UK. A county.</li><li>US. A state.</li><li>Canada. A province.
|
||||
* </li><li>Japan. A prefecture.</li><li>Switzerland. A *kanton*.</li></ul>
|
||||
*/
|
||||
public function getAdminArea1(): ?string
|
||||
{
|
||||
return $this->adminArea1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Admin Area 1.
|
||||
* The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2
|
||||
* subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`.
|
||||
* Value, by country, is:<ul><li>UK. A county.</li><li>US. A state.</li><li>Canada. A province.
|
||||
* </li><li>Japan. A prefecture.</li><li>Switzerland. A *kanton*.</li></ul>
|
||||
*
|
||||
* @maps admin_area_1
|
||||
*/
|
||||
public function setAdminArea1(?string $adminArea1): void
|
||||
{
|
||||
$this->adminArea1 = $adminArea1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Postal Code.
|
||||
* The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal
|
||||
* code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code).
|
||||
*/
|
||||
public function getPostalCode(): ?string
|
||||
{
|
||||
return $this->postalCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Postal Code.
|
||||
* The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal
|
||||
* code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code).
|
||||
*
|
||||
* @maps postal_code
|
||||
*/
|
||||
public function setPostalCode(?string $postalCode): void
|
||||
{
|
||||
$this->postalCode = $postalCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Country Code.
|
||||
* The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or
|
||||
* region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code> and
|
||||
* not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*/
|
||||
public function getCountryCode(): string
|
||||
{
|
||||
return $this->countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Country Code.
|
||||
* The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or
|
||||
* region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code> and
|
||||
* not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*
|
||||
* @required
|
||||
* @maps country_code
|
||||
*/
|
||||
public function setCountryCode(string $countryCode): void
|
||||
{
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->addressLine1)) {
|
||||
$json['address_line_1'] = $this->addressLine1;
|
||||
}
|
||||
if (isset($this->addressLine2)) {
|
||||
$json['address_line_2'] = $this->addressLine2;
|
||||
}
|
||||
if (isset($this->adminArea2)) {
|
||||
$json['admin_area_2'] = $this->adminArea2;
|
||||
}
|
||||
if (isset($this->adminArea1)) {
|
||||
$json['admin_area_1'] = $this->adminArea1;
|
||||
}
|
||||
if (isset($this->postalCode)) {
|
||||
$json['postal_code'] = $this->postalCode;
|
||||
}
|
||||
$json['country_code'] = $this->countryCode;
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
372
src/Models/AddressDetails.php
Normal file
372
src/Models/AddressDetails.php
Normal file
@@ -0,0 +1,372 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Address request details.
|
||||
*/
|
||||
class AddressDetails implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $addressLine1;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $addressLine2;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $adminArea2;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $adminArea1;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $postalCode;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $countryCode;
|
||||
|
||||
/**
|
||||
* @var Name|null
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $company;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $phone;
|
||||
|
||||
/**
|
||||
* @var Phone|null
|
||||
*/
|
||||
private $phoneNumber;
|
||||
|
||||
/**
|
||||
* @param string $countryCode
|
||||
*/
|
||||
public function __construct(string $countryCode)
|
||||
{
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Address Line 1.
|
||||
* The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for
|
||||
* data entry, and Compliance and Risk checks. This field needs to pass the full address.
|
||||
*/
|
||||
public function getAddressLine1(): ?string
|
||||
{
|
||||
return $this->addressLine1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Address Line 1.
|
||||
* The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for
|
||||
* data entry, and Compliance and Risk checks. This field needs to pass the full address.
|
||||
*
|
||||
* @maps address_line_1
|
||||
*/
|
||||
public function setAddressLine1(?string $addressLine1): void
|
||||
{
|
||||
$this->addressLine1 = $addressLine1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Address Line 2.
|
||||
* The second line of the address, for example, a suite or apartment number.
|
||||
*/
|
||||
public function getAddressLine2(): ?string
|
||||
{
|
||||
return $this->addressLine2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Address Line 2.
|
||||
* The second line of the address, for example, a suite or apartment number.
|
||||
*
|
||||
* @maps address_line_2
|
||||
*/
|
||||
public function setAddressLine2(?string $addressLine2): void
|
||||
{
|
||||
$this->addressLine2 = $addressLine2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Admin Area 2.
|
||||
* A city, town, or village. Smaller than `admin_area_level_1`.
|
||||
*/
|
||||
public function getAdminArea2(): ?string
|
||||
{
|
||||
return $this->adminArea2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Admin Area 2.
|
||||
* A city, town, or village. Smaller than `admin_area_level_1`.
|
||||
*
|
||||
* @maps admin_area_2
|
||||
*/
|
||||
public function setAdminArea2(?string $adminArea2): void
|
||||
{
|
||||
$this->adminArea2 = $adminArea2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Admin Area 1.
|
||||
* The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2
|
||||
* subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`.
|
||||
* Value, by country, is:<ul><li>UK. A county.</li><li>US. A state.</li><li>Canada. A province.
|
||||
* </li><li>Japan. A prefecture.</li><li>Switzerland. A *kanton*.</li></ul>
|
||||
*/
|
||||
public function getAdminArea1(): ?string
|
||||
{
|
||||
return $this->adminArea1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Admin Area 1.
|
||||
* The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2
|
||||
* subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`.
|
||||
* Value, by country, is:<ul><li>UK. A county.</li><li>US. A state.</li><li>Canada. A province.
|
||||
* </li><li>Japan. A prefecture.</li><li>Switzerland. A *kanton*.</li></ul>
|
||||
*
|
||||
* @maps admin_area_1
|
||||
*/
|
||||
public function setAdminArea1(?string $adminArea1): void
|
||||
{
|
||||
$this->adminArea1 = $adminArea1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Postal Code.
|
||||
* The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal
|
||||
* code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code).
|
||||
*/
|
||||
public function getPostalCode(): ?string
|
||||
{
|
||||
return $this->postalCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Postal Code.
|
||||
* The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal
|
||||
* code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code).
|
||||
*
|
||||
* @maps postal_code
|
||||
*/
|
||||
public function setPostalCode(?string $postalCode): void
|
||||
{
|
||||
$this->postalCode = $postalCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Country Code.
|
||||
* The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or
|
||||
* region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code> and
|
||||
* not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*/
|
||||
public function getCountryCode(): string
|
||||
{
|
||||
return $this->countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Country Code.
|
||||
* The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or
|
||||
* region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code> and
|
||||
* not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*
|
||||
* @required
|
||||
* @maps country_code
|
||||
*/
|
||||
public function setCountryCode(string $countryCode): void
|
||||
{
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Name.
|
||||
* The name of the party.
|
||||
*/
|
||||
public function getName(): ?Name
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Name.
|
||||
* The name of the party.
|
||||
*
|
||||
* @maps name
|
||||
*/
|
||||
public function setName(?Name $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Id.
|
||||
* The resource ID of the address.
|
||||
*/
|
||||
public function getId(): ?string
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Id.
|
||||
* The resource ID of the address.
|
||||
*
|
||||
* @maps id
|
||||
*/
|
||||
public function setId(?string $id): void
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Company.
|
||||
* The name of the company or business associated to the address.
|
||||
*/
|
||||
public function getCompany(): ?string
|
||||
{
|
||||
return $this->company;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Company.
|
||||
* The name of the company or business associated to the address.
|
||||
*
|
||||
* @maps company
|
||||
*/
|
||||
public function setCompany(?string $company): void
|
||||
{
|
||||
$this->company = $company;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Phone.
|
||||
* The phone number that can go on the mailing label with the address to track the shipping. Phone
|
||||
* number is in E.164 format.
|
||||
*/
|
||||
public function getPhone(): ?string
|
||||
{
|
||||
return $this->phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Phone.
|
||||
* The phone number that can go on the mailing label with the address to track the shipping. Phone
|
||||
* number is in E.164 format.
|
||||
*
|
||||
* @maps phone
|
||||
*/
|
||||
public function setPhone(?string $phone): void
|
||||
{
|
||||
$this->phone = $phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Phone Number.
|
||||
* The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.
|
||||
* int/rec/T-REC-E.164/en).
|
||||
*/
|
||||
public function getPhoneNumber(): ?Phone
|
||||
{
|
||||
return $this->phoneNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Phone Number.
|
||||
* The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.
|
||||
* int/rec/T-REC-E.164/en).
|
||||
*
|
||||
* @maps phone_number
|
||||
*/
|
||||
public function setPhoneNumber(?Phone $phoneNumber): void
|
||||
{
|
||||
$this->phoneNumber = $phoneNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->addressLine1)) {
|
||||
$json['address_line_1'] = $this->addressLine1;
|
||||
}
|
||||
if (isset($this->addressLine2)) {
|
||||
$json['address_line_2'] = $this->addressLine2;
|
||||
}
|
||||
if (isset($this->adminArea2)) {
|
||||
$json['admin_area_2'] = $this->adminArea2;
|
||||
}
|
||||
if (isset($this->adminArea1)) {
|
||||
$json['admin_area_1'] = $this->adminArea1;
|
||||
}
|
||||
if (isset($this->postalCode)) {
|
||||
$json['postal_code'] = $this->postalCode;
|
||||
}
|
||||
$json['country_code'] = $this->countryCode;
|
||||
if (isset($this->name)) {
|
||||
$json['name'] = $this->name;
|
||||
}
|
||||
if (isset($this->id)) {
|
||||
$json['id'] = $this->id;
|
||||
}
|
||||
if (isset($this->company)) {
|
||||
$json['company'] = $this->company;
|
||||
}
|
||||
if (isset($this->phone)) {
|
||||
$json['phone'] = $this->phone;
|
||||
}
|
||||
if (isset($this->phoneNumber)) {
|
||||
$json['phone_number'] = $this->phoneNumber;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
232
src/Models/AmountBreakdown.php
Normal file
232
src/Models/AmountBreakdown.php
Normal file
@@ -0,0 +1,232 @@
|
||||
<?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 breakdown of the amount. Breakdown provides details such as total item amount, total tax amount,
|
||||
* shipping, handling, insurance, and discounts, if any.
|
||||
*/
|
||||
class AmountBreakdown implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var Money|null
|
||||
*/
|
||||
private $itemTotal;
|
||||
|
||||
/**
|
||||
* @var Money|null
|
||||
*/
|
||||
private $shipping;
|
||||
|
||||
/**
|
||||
* @var Money|null
|
||||
*/
|
||||
private $handling;
|
||||
|
||||
/**
|
||||
* @var Money|null
|
||||
*/
|
||||
private $taxTotal;
|
||||
|
||||
/**
|
||||
* @var Money|null
|
||||
*/
|
||||
private $insurance;
|
||||
|
||||
/**
|
||||
* @var Money|null
|
||||
*/
|
||||
private $shippingDiscount;
|
||||
|
||||
/**
|
||||
* @var Money|null
|
||||
*/
|
||||
private $discount;
|
||||
|
||||
/**
|
||||
* Returns Item Total.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*/
|
||||
public function getItemTotal(): ?Money
|
||||
{
|
||||
return $this->itemTotal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Item Total.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*
|
||||
* @maps item_total
|
||||
*/
|
||||
public function setItemTotal(?Money $itemTotal): void
|
||||
{
|
||||
$this->itemTotal = $itemTotal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Shipping.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*/
|
||||
public function getShipping(): ?Money
|
||||
{
|
||||
return $this->shipping;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Shipping.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*
|
||||
* @maps shipping
|
||||
*/
|
||||
public function setShipping(?Money $shipping): void
|
||||
{
|
||||
$this->shipping = $shipping;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Handling.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*/
|
||||
public function getHandling(): ?Money
|
||||
{
|
||||
return $this->handling;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Handling.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*
|
||||
* @maps handling
|
||||
*/
|
||||
public function setHandling(?Money $handling): void
|
||||
{
|
||||
$this->handling = $handling;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Tax Total.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*/
|
||||
public function getTaxTotal(): ?Money
|
||||
{
|
||||
return $this->taxTotal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Tax Total.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*
|
||||
* @maps tax_total
|
||||
*/
|
||||
public function setTaxTotal(?Money $taxTotal): void
|
||||
{
|
||||
$this->taxTotal = $taxTotal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Insurance.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*/
|
||||
public function getInsurance(): ?Money
|
||||
{
|
||||
return $this->insurance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Insurance.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*
|
||||
* @maps insurance
|
||||
*/
|
||||
public function setInsurance(?Money $insurance): void
|
||||
{
|
||||
$this->insurance = $insurance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Shipping Discount.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*/
|
||||
public function getShippingDiscount(): ?Money
|
||||
{
|
||||
return $this->shippingDiscount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Shipping Discount.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*
|
||||
* @maps shipping_discount
|
||||
*/
|
||||
public function setShippingDiscount(?Money $shippingDiscount): void
|
||||
{
|
||||
$this->shippingDiscount = $shippingDiscount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Discount.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*/
|
||||
public function getDiscount(): ?Money
|
||||
{
|
||||
return $this->discount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Discount.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*
|
||||
* @maps discount
|
||||
*/
|
||||
public function setDiscount(?Money $discount): void
|
||||
{
|
||||
$this->discount = $discount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->itemTotal)) {
|
||||
$json['item_total'] = $this->itemTotal;
|
||||
}
|
||||
if (isset($this->shipping)) {
|
||||
$json['shipping'] = $this->shipping;
|
||||
}
|
||||
if (isset($this->handling)) {
|
||||
$json['handling'] = $this->handling;
|
||||
}
|
||||
if (isset($this->taxTotal)) {
|
||||
$json['tax_total'] = $this->taxTotal;
|
||||
}
|
||||
if (isset($this->insurance)) {
|
||||
$json['insurance'] = $this->insurance;
|
||||
}
|
||||
if (isset($this->shippingDiscount)) {
|
||||
$json['shipping_discount'] = $this->shippingDiscount;
|
||||
}
|
||||
if (isset($this->discount)) {
|
||||
$json['discount'] = $this->discount;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
142
src/Models/AmountWithBreakdown.php
Normal file
142
src/Models/AmountWithBreakdown.php
Normal file
@@ -0,0 +1,142 @@
|
||||
<?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 total order amount with an optional breakdown that provides details, such as the total item
|
||||
* amount, total tax amount, shipping, handling, insurance, and discounts, if any.<br/>If you specify
|
||||
* `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling`
|
||||
* plus `insurance` minus `shipping_discount` minus discount.<br/>The amount must be a positive number.
|
||||
* For listed of supported currencies and decimal precision, see the PayPal REST APIs <a
|
||||
* href="/docs/integration/direct/rest/currency-codes/">Currency Codes</a>.
|
||||
*/
|
||||
class AmountWithBreakdown implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $currencyCode;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $value;
|
||||
|
||||
/**
|
||||
* @var AmountBreakdown|null
|
||||
*/
|
||||
private $breakdown;
|
||||
|
||||
/**
|
||||
* @param string $currencyCode
|
||||
* @param string $value
|
||||
*/
|
||||
public function __construct(string $currencyCode, string $value)
|
||||
{
|
||||
$this->currencyCode = $currencyCode;
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Currency Code.
|
||||
* The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies
|
||||
* the currency.
|
||||
*/
|
||||
public function getCurrencyCode(): string
|
||||
{
|
||||
return $this->currencyCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Currency Code.
|
||||
* The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies
|
||||
* the currency.
|
||||
*
|
||||
* @required
|
||||
* @maps currency_code
|
||||
*/
|
||||
public function setCurrencyCode(string $currencyCode): void
|
||||
{
|
||||
$this->currencyCode = $currencyCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Value.
|
||||
* The value, which might be:<ul><li>An integer for currencies like `JPY` that are not typically
|
||||
* fractional.</li><li>A decimal fraction for currencies like `TND` that are subdivided into
|
||||
* thousandths.</li></ul>For the required number of decimal places for a currency code, see [Currency
|
||||
* Codes](/api/rest/reference/currency-codes/).
|
||||
*/
|
||||
public function getValue(): string
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Value.
|
||||
* The value, which might be:<ul><li>An integer for currencies like `JPY` that are not typically
|
||||
* fractional.</li><li>A decimal fraction for currencies like `TND` that are subdivided into
|
||||
* thousandths.</li></ul>For the required number of decimal places for a currency code, see [Currency
|
||||
* Codes](/api/rest/reference/currency-codes/).
|
||||
*
|
||||
* @required
|
||||
* @maps value
|
||||
*/
|
||||
public function setValue(string $value): void
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Breakdown.
|
||||
* The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount,
|
||||
* shipping, handling, insurance, and discounts, if any.
|
||||
*/
|
||||
public function getBreakdown(): ?AmountBreakdown
|
||||
{
|
||||
return $this->breakdown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Breakdown.
|
||||
* The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount,
|
||||
* shipping, handling, insurance, and discounts, if any.
|
||||
*
|
||||
* @maps breakdown
|
||||
*/
|
||||
public function setBreakdown(?AmountBreakdown $breakdown): void
|
||||
{
|
||||
$this->breakdown = $breakdown;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 = [];
|
||||
$json['currency_code'] = $this->currencyCode;
|
||||
$json['value'] = $this->value;
|
||||
if (isset($this->breakdown)) {
|
||||
$json['breakdown'] = $this->breakdown;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
93
src/Models/ApplePayAttributes.php
Normal file
93
src/Models/ApplePayAttributes.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Additional attributes associated with apple pay.
|
||||
*/
|
||||
class ApplePayAttributes implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var CustomerInformation|null
|
||||
*/
|
||||
private $customer;
|
||||
|
||||
/**
|
||||
* @var VaultInstruction|null
|
||||
*/
|
||||
private $vault;
|
||||
|
||||
/**
|
||||
* Returns Customer.
|
||||
* The details about a customer in PayPal's system of record.
|
||||
*/
|
||||
public function getCustomer(): ?CustomerInformation
|
||||
{
|
||||
return $this->customer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Customer.
|
||||
* The details about a customer in PayPal's system of record.
|
||||
*
|
||||
* @maps customer
|
||||
*/
|
||||
public function setCustomer(?CustomerInformation $customer): void
|
||||
{
|
||||
$this->customer = $customer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Vault.
|
||||
* Base vaulting specification. The object can be extended for specific use cases within each
|
||||
* payment_source that supports vaulting.
|
||||
*/
|
||||
public function getVault(): ?VaultInstruction
|
||||
{
|
||||
return $this->vault;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Vault.
|
||||
* Base vaulting specification. The object can be extended for specific use cases within each
|
||||
* payment_source that supports vaulting.
|
||||
*
|
||||
* @maps vault
|
||||
*/
|
||||
public function setVault(?VaultInstruction $vault): void
|
||||
{
|
||||
$this->vault = $vault;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->customer)) {
|
||||
$json['customer'] = $this->customer;
|
||||
}
|
||||
if (isset($this->vault)) {
|
||||
$json['vault'] = $this->vault;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
63
src/Models/ApplePayAttributesResponse.php
Normal file
63
src/Models/ApplePayAttributesResponse.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Additional attributes associated with the use of Apple Pay.
|
||||
*/
|
||||
class ApplePayAttributesResponse implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var VaultResponse|null
|
||||
*/
|
||||
private $vault;
|
||||
|
||||
/**
|
||||
* Returns Vault.
|
||||
* The details about a saved payment source.
|
||||
*/
|
||||
public function getVault(): ?VaultResponse
|
||||
{
|
||||
return $this->vault;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Vault.
|
||||
* The details about a saved payment source.
|
||||
*
|
||||
* @maps vault
|
||||
*/
|
||||
public function setVault(?VaultResponse $vault): void
|
||||
{
|
||||
$this->vault = $vault;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->vault)) {
|
||||
$json['vault'] = $this->vault;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
181
src/Models/ApplePayCard.php
Normal file
181
src/Models/ApplePayCard.php
Normal file
@@ -0,0 +1,181 @@
|
||||
<?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 payment card to be used to fund a payment. Can be a credit or debit card.
|
||||
*/
|
||||
class ApplePayCard implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $lastDigits;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $type;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $brand;
|
||||
|
||||
/**
|
||||
* @var Address|null
|
||||
*/
|
||||
private $billingAddress;
|
||||
|
||||
/**
|
||||
* Returns Name.
|
||||
* The card holder's name as it appears on the card.
|
||||
*/
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Name.
|
||||
* The card holder's name as it appears on the card.
|
||||
*
|
||||
* @maps name
|
||||
*/
|
||||
public function setName(?string $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Last Digits.
|
||||
* The last digits of the payment card.
|
||||
*/
|
||||
public function getLastDigits(): ?string
|
||||
{
|
||||
return $this->lastDigits;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Last Digits.
|
||||
* The last digits of the payment card.
|
||||
*
|
||||
* @maps last_digits
|
||||
*/
|
||||
public function setLastDigits(?string $lastDigits): void
|
||||
{
|
||||
$this->lastDigits = $lastDigits;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Type.
|
||||
* Type of card. i.e Credit, Debit and so on.
|
||||
*/
|
||||
public function getType(): ?string
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Type.
|
||||
* Type of card. i.e Credit, Debit and so on.
|
||||
*
|
||||
* @maps type
|
||||
*/
|
||||
public function setType(?string $type): void
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Brand.
|
||||
* The card network or brand. Applies to credit, debit, gift, and payment cards.
|
||||
*/
|
||||
public function getBrand(): ?string
|
||||
{
|
||||
return $this->brand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Brand.
|
||||
* The card network or brand. Applies to credit, debit, gift, and payment cards.
|
||||
*
|
||||
* @maps brand
|
||||
*/
|
||||
public function setBrand(?string $brand): void
|
||||
{
|
||||
$this->brand = $brand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Billing 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 getBillingAddress(): ?Address
|
||||
{
|
||||
return $this->billingAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Billing 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 billing_address
|
||||
*/
|
||||
public function setBillingAddress(?Address $billingAddress): void
|
||||
{
|
||||
$this->billingAddress = $billingAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->lastDigits)) {
|
||||
$json['last_digits'] = $this->lastDigits;
|
||||
}
|
||||
if (isset($this->type)) {
|
||||
$json['type'] = CardType::checkValue($this->type);
|
||||
}
|
||||
if (isset($this->brand)) {
|
||||
$json['brand'] = CardBrand::checkValue($this->brand);
|
||||
}
|
||||
if (isset($this->billingAddress)) {
|
||||
$json['billing_address'] = $this->billingAddress;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
391
src/Models/ApplePayCardResponse.php
Normal file
391
src/Models/ApplePayCardResponse.php
Normal file
@@ -0,0 +1,391 @@
|
||||
<?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 Card from Apple Pay Wallet used to fund the payment.
|
||||
*/
|
||||
class ApplePayCardResponse implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $lastDigits;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $brand;
|
||||
|
||||
/**
|
||||
* @var string[]|null
|
||||
*/
|
||||
private $availableNetworks;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $type;
|
||||
|
||||
/**
|
||||
* @var AuthenticationResponse|null
|
||||
*/
|
||||
private $authenticationResult;
|
||||
|
||||
/**
|
||||
* @var CardAttributesResponse|null
|
||||
*/
|
||||
private $attributes;
|
||||
|
||||
/**
|
||||
* @var CardFromRequest|null
|
||||
*/
|
||||
private $fromRequest;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $expiry;
|
||||
|
||||
/**
|
||||
* @var BinDetails|null
|
||||
*/
|
||||
private $binDetails;
|
||||
|
||||
/**
|
||||
* @var Address|null
|
||||
*/
|
||||
private $billingAddress;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $countryCode;
|
||||
|
||||
/**
|
||||
* Returns Name.
|
||||
* The card holder's name as it appears on the card.
|
||||
*/
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Name.
|
||||
* The card holder's name as it appears on the card.
|
||||
*
|
||||
* @maps name
|
||||
*/
|
||||
public function setName(?string $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Last Digits.
|
||||
* The last digits of the payment card.
|
||||
*/
|
||||
public function getLastDigits(): ?string
|
||||
{
|
||||
return $this->lastDigits;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Last Digits.
|
||||
* The last digits of the payment card.
|
||||
*
|
||||
* @maps last_digits
|
||||
*/
|
||||
public function setLastDigits(?string $lastDigits): void
|
||||
{
|
||||
$this->lastDigits = $lastDigits;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Brand.
|
||||
* The card network or brand. Applies to credit, debit, gift, and payment cards.
|
||||
*/
|
||||
public function getBrand(): ?string
|
||||
{
|
||||
return $this->brand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Brand.
|
||||
* The card network or brand. Applies to credit, debit, gift, and payment cards.
|
||||
*
|
||||
* @maps brand
|
||||
*/
|
||||
public function setBrand(?string $brand): void
|
||||
{
|
||||
$this->brand = $brand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Available Networks.
|
||||
* Array of brands or networks associated with the card.
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getAvailableNetworks(): ?array
|
||||
{
|
||||
return $this->availableNetworks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Available Networks.
|
||||
* Array of brands or networks associated with the card.
|
||||
*
|
||||
* @maps available_networks
|
||||
*
|
||||
* @param string[]|null $availableNetworks
|
||||
*/
|
||||
public function setAvailableNetworks(?array $availableNetworks): void
|
||||
{
|
||||
$this->availableNetworks = $availableNetworks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Type.
|
||||
* Type of card. i.e Credit, Debit and so on.
|
||||
*/
|
||||
public function getType(): ?string
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Type.
|
||||
* Type of card. i.e Credit, Debit and so on.
|
||||
*
|
||||
* @maps type
|
||||
*/
|
||||
public function setType(?string $type): void
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Authentication Result.
|
||||
* Results of Authentication such as 3D Secure.
|
||||
*/
|
||||
public function getAuthenticationResult(): ?AuthenticationResponse
|
||||
{
|
||||
return $this->authenticationResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Authentication Result.
|
||||
* Results of Authentication such as 3D Secure.
|
||||
*
|
||||
* @maps authentication_result
|
||||
*/
|
||||
public function setAuthenticationResult(?AuthenticationResponse $authenticationResult): void
|
||||
{
|
||||
$this->authenticationResult = $authenticationResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Attributes.
|
||||
* Additional attributes associated with the use of this card.
|
||||
*/
|
||||
public function getAttributes(): ?CardAttributesResponse
|
||||
{
|
||||
return $this->attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Attributes.
|
||||
* Additional attributes associated with the use of this card.
|
||||
*
|
||||
* @maps attributes
|
||||
*/
|
||||
public function setAttributes(?CardAttributesResponse $attributes): void
|
||||
{
|
||||
$this->attributes = $attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns From Request.
|
||||
* Representation of card details as received in the request.
|
||||
*/
|
||||
public function getFromRequest(): ?CardFromRequest
|
||||
{
|
||||
return $this->fromRequest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets From Request.
|
||||
* Representation of card details as received in the request.
|
||||
*
|
||||
* @maps from_request
|
||||
*/
|
||||
public function setFromRequest(?CardFromRequest $fromRequest): void
|
||||
{
|
||||
$this->fromRequest = $fromRequest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Expiry.
|
||||
* The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https:
|
||||
* //tools.ietf.org/html/rfc3339#section-5.6).
|
||||
*/
|
||||
public function getExpiry(): ?string
|
||||
{
|
||||
return $this->expiry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Expiry.
|
||||
* The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https:
|
||||
* //tools.ietf.org/html/rfc3339#section-5.6).
|
||||
*
|
||||
* @maps expiry
|
||||
*/
|
||||
public function setExpiry(?string $expiry): void
|
||||
{
|
||||
$this->expiry = $expiry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Bin Details.
|
||||
* Bank Identification Number (BIN) details used to fund a payment.
|
||||
*/
|
||||
public function getBinDetails(): ?BinDetails
|
||||
{
|
||||
return $this->binDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Bin Details.
|
||||
* Bank Identification Number (BIN) details used to fund a payment.
|
||||
*
|
||||
* @maps bin_details
|
||||
*/
|
||||
public function setBinDetails(?BinDetails $binDetails): void
|
||||
{
|
||||
$this->binDetails = $binDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Billing 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 getBillingAddress(): ?Address
|
||||
{
|
||||
return $this->billingAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Billing 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 billing_address
|
||||
*/
|
||||
public function setBillingAddress(?Address $billingAddress): void
|
||||
{
|
||||
$this->billingAddress = $billingAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Country Code.
|
||||
* The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country
|
||||
* or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code>
|
||||
* and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*/
|
||||
public function getCountryCode(): ?string
|
||||
{
|
||||
return $this->countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Country Code.
|
||||
* The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country
|
||||
* or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code>
|
||||
* and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*
|
||||
* @maps country_code
|
||||
*/
|
||||
public function setCountryCode(?string $countryCode): void
|
||||
{
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->lastDigits)) {
|
||||
$json['last_digits'] = $this->lastDigits;
|
||||
}
|
||||
if (isset($this->brand)) {
|
||||
$json['brand'] = CardBrand::checkValue($this->brand);
|
||||
}
|
||||
if (isset($this->availableNetworks)) {
|
||||
$json['available_networks'] = CardBrand::checkValue($this->availableNetworks);
|
||||
}
|
||||
if (isset($this->type)) {
|
||||
$json['type'] = CardType::checkValue($this->type);
|
||||
}
|
||||
if (isset($this->authenticationResult)) {
|
||||
$json['authentication_result'] = $this->authenticationResult;
|
||||
}
|
||||
if (isset($this->attributes)) {
|
||||
$json['attributes'] = $this->attributes;
|
||||
}
|
||||
if (isset($this->fromRequest)) {
|
||||
$json['from_request'] = $this->fromRequest;
|
||||
}
|
||||
if (isset($this->expiry)) {
|
||||
$json['expiry'] = $this->expiry;
|
||||
}
|
||||
if (isset($this->binDetails)) {
|
||||
$json['bin_details'] = $this->binDetails;
|
||||
}
|
||||
if (isset($this->billingAddress)) {
|
||||
$json['billing_address'] = $this->billingAddress;
|
||||
}
|
||||
if (isset($this->countryCode)) {
|
||||
$json['country_code'] = $this->countryCode;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
186
src/Models/ApplePayDecryptedTokenData.php
Normal file
186
src/Models/ApplePayDecryptedTokenData.php
Normal file
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Information about the Payment data obtained by decrypting Apple Pay token.
|
||||
*/
|
||||
class ApplePayDecryptedTokenData implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var Money|null
|
||||
*/
|
||||
private $transactionAmount;
|
||||
|
||||
/**
|
||||
* @var ApplePayTokenizedCard
|
||||
*/
|
||||
private $tokenizedCard;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $deviceManufacturerId;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $paymentDataType;
|
||||
|
||||
/**
|
||||
* @var ApplePayPaymentData|null
|
||||
*/
|
||||
private $paymentData;
|
||||
|
||||
/**
|
||||
* @param ApplePayTokenizedCard $tokenizedCard
|
||||
*/
|
||||
public function __construct(ApplePayTokenizedCard $tokenizedCard)
|
||||
{
|
||||
$this->tokenizedCard = $tokenizedCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Transaction Amount.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*/
|
||||
public function getTransactionAmount(): ?Money
|
||||
{
|
||||
return $this->transactionAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Transaction Amount.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*
|
||||
* @maps transaction_amount
|
||||
*/
|
||||
public function setTransactionAmount(?Money $transactionAmount): void
|
||||
{
|
||||
$this->transactionAmount = $transactionAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Tokenized Card.
|
||||
* The payment card to use to fund a payment. Can be a credit or debit card.
|
||||
*/
|
||||
public function getTokenizedCard(): ApplePayTokenizedCard
|
||||
{
|
||||
return $this->tokenizedCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Tokenized Card.
|
||||
* The payment card to use to fund a payment. Can be a credit or debit card.
|
||||
*
|
||||
* @required
|
||||
* @maps tokenized_card
|
||||
*/
|
||||
public function setTokenizedCard(ApplePayTokenizedCard $tokenizedCard): void
|
||||
{
|
||||
$this->tokenizedCard = $tokenizedCard;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Device Manufacturer Id.
|
||||
* Apple Pay Hex-encoded device manufacturer identifier. The pattern is defined by an external party
|
||||
* and supports Unicode.
|
||||
*/
|
||||
public function getDeviceManufacturerId(): ?string
|
||||
{
|
||||
return $this->deviceManufacturerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Device Manufacturer Id.
|
||||
* Apple Pay Hex-encoded device manufacturer identifier. The pattern is defined by an external party
|
||||
* and supports Unicode.
|
||||
*
|
||||
* @maps device_manufacturer_id
|
||||
*/
|
||||
public function setDeviceManufacturerId(?string $deviceManufacturerId): void
|
||||
{
|
||||
$this->deviceManufacturerId = $deviceManufacturerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Payment Data Type.
|
||||
* Indicates the type of payment data passed, in case of Non China the payment data is 3DSECURE and for
|
||||
* China it is EMV.
|
||||
*/
|
||||
public function getPaymentDataType(): ?string
|
||||
{
|
||||
return $this->paymentDataType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Payment Data Type.
|
||||
* Indicates the type of payment data passed, in case of Non China the payment data is 3DSECURE and for
|
||||
* China it is EMV.
|
||||
*
|
||||
* @maps payment_data_type
|
||||
*/
|
||||
public function setPaymentDataType(?string $paymentDataType): void
|
||||
{
|
||||
$this->paymentDataType = $paymentDataType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Payment Data.
|
||||
* Information about the decrypted apple pay payment data for the token like cryptogram, eci indicator.
|
||||
*/
|
||||
public function getPaymentData(): ?ApplePayPaymentData
|
||||
{
|
||||
return $this->paymentData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Payment Data.
|
||||
* Information about the decrypted apple pay payment data for the token like cryptogram, eci indicator.
|
||||
*
|
||||
* @maps payment_data
|
||||
*/
|
||||
public function setPaymentData(?ApplePayPaymentData $paymentData): void
|
||||
{
|
||||
$this->paymentData = $paymentData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->transactionAmount)) {
|
||||
$json['transaction_amount'] = $this->transactionAmount;
|
||||
}
|
||||
$json['tokenized_card'] = $this->tokenizedCard;
|
||||
if (isset($this->deviceManufacturerId)) {
|
||||
$json['device_manufacturer_id'] = $this->deviceManufacturerId;
|
||||
}
|
||||
if (isset($this->paymentDataType)) {
|
||||
$json['payment_data_type'] = ApplePayPaymentDataType::checkValue($this->paymentDataType);
|
||||
}
|
||||
if (isset($this->paymentData)) {
|
||||
$json['payment_data'] = $this->paymentData;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
153
src/Models/ApplePayPaymentData.php
Normal file
153
src/Models/ApplePayPaymentData.php
Normal file
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Information about the decrypted apple pay payment data for the token like cryptogram, eci indicator.
|
||||
*/
|
||||
class ApplePayPaymentData implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $cryptogram;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $eciIndicator;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $emvData;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $pin;
|
||||
|
||||
/**
|
||||
* Returns Cryptogram.
|
||||
* Online payment cryptogram, as defined by 3D Secure. The pattern is defined by an external party and
|
||||
* supports Unicode.
|
||||
*/
|
||||
public function getCryptogram(): ?string
|
||||
{
|
||||
return $this->cryptogram;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Cryptogram.
|
||||
* Online payment cryptogram, as defined by 3D Secure. The pattern is defined by an external party and
|
||||
* supports Unicode.
|
||||
*
|
||||
* @maps cryptogram
|
||||
*/
|
||||
public function setCryptogram(?string $cryptogram): void
|
||||
{
|
||||
$this->cryptogram = $cryptogram;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Eci Indicator.
|
||||
* ECI indicator, as defined by 3- Secure. The pattern is defined by an external party and supports
|
||||
* Unicode.
|
||||
*/
|
||||
public function getEciIndicator(): ?string
|
||||
{
|
||||
return $this->eciIndicator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Eci Indicator.
|
||||
* ECI indicator, as defined by 3- Secure. The pattern is defined by an external party and supports
|
||||
* Unicode.
|
||||
*
|
||||
* @maps eci_indicator
|
||||
*/
|
||||
public function setEciIndicator(?string $eciIndicator): void
|
||||
{
|
||||
$this->eciIndicator = $eciIndicator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Emv Data.
|
||||
* Encoded Apple Pay EMV Payment Structure used for payments in China. The pattern is defined by an
|
||||
* external party and supports Unicode.
|
||||
*/
|
||||
public function getEmvData(): ?string
|
||||
{
|
||||
return $this->emvData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Emv Data.
|
||||
* Encoded Apple Pay EMV Payment Structure used for payments in China. The pattern is defined by an
|
||||
* external party and supports Unicode.
|
||||
*
|
||||
* @maps emv_data
|
||||
*/
|
||||
public function setEmvData(?string $emvData): void
|
||||
{
|
||||
$this->emvData = $emvData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Pin.
|
||||
* Bank Key encrypted Apple Pay PIN. The pattern is defined by an external party and supports Unicode.
|
||||
*/
|
||||
public function getPin(): ?string
|
||||
{
|
||||
return $this->pin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Pin.
|
||||
* Bank Key encrypted Apple Pay PIN. The pattern is defined by an external party and supports Unicode.
|
||||
*
|
||||
* @maps pin
|
||||
*/
|
||||
public function setPin(?string $pin): void
|
||||
{
|
||||
$this->pin = $pin;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->cryptogram)) {
|
||||
$json['cryptogram'] = $this->cryptogram;
|
||||
}
|
||||
if (isset($this->eciIndicator)) {
|
||||
$json['eci_indicator'] = $this->eciIndicator;
|
||||
}
|
||||
if (isset($this->emvData)) {
|
||||
$json['emv_data'] = $this->emvData;
|
||||
}
|
||||
if (isset($this->pin)) {
|
||||
$json['pin'] = $this->pin;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
46
src/Models/ApplePayPaymentDataType.php
Normal file
46
src/Models/ApplePayPaymentDataType.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use Exception;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Indicates the type of payment data passed, in case of Non China the payment data is 3DSECURE and for
|
||||
* China it is EMV.
|
||||
*/
|
||||
class ApplePayPaymentDataType
|
||||
{
|
||||
public const ENUM_3DSECURE = '3DSECURE';
|
||||
|
||||
public const EMV = 'EMV';
|
||||
|
||||
private const _ALL_VALUES = [self::ENUM_3DSECURE, self::EMV];
|
||||
|
||||
/**
|
||||
* Ensures that all the given values are present in this Enum.
|
||||
*
|
||||
* @param array|stdClass|null|string $value Value or a list/map of values to be checked
|
||||
*
|
||||
* @return array|null|string Input value(s), if all are a part of this Enum
|
||||
*
|
||||
* @throws Exception Throws exception if any given value is not in this Enum
|
||||
*/
|
||||
public static function checkValue($value)
|
||||
{
|
||||
$value = json_decode(json_encode($value), true); // converts stdClass into array
|
||||
if (CoreHelper::checkValueOrValuesInList($value, self::_ALL_VALUES)) {
|
||||
return $value;
|
||||
}
|
||||
throw new Exception("$value is invalid for ApplePayPaymentDataType.");
|
||||
}
|
||||
}
|
||||
243
src/Models/ApplePayPaymentObject.php
Normal file
243
src/Models/ApplePayPaymentObject.php
Normal file
@@ -0,0 +1,243 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Information needed to pay using ApplePay.
|
||||
*/
|
||||
class ApplePayPaymentObject implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $token;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $emailAddress;
|
||||
|
||||
/**
|
||||
* @var PhoneNumber|null
|
||||
*/
|
||||
private $phoneNumber;
|
||||
|
||||
/**
|
||||
* @var ApplePayCardResponse|null
|
||||
*/
|
||||
private $card;
|
||||
|
||||
/**
|
||||
* @var ApplePayAttributesResponse|null
|
||||
*/
|
||||
private $attributes;
|
||||
|
||||
/**
|
||||
* Returns Id.
|
||||
* ApplePay transaction identifier, this will be the unique identifier for this transaction provided by
|
||||
* Apple. The pattern is defined by an external party and supports Unicode.
|
||||
*/
|
||||
public function getId(): ?string
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Id.
|
||||
* ApplePay transaction identifier, this will be the unique identifier for this transaction provided by
|
||||
* Apple. The pattern is defined by an external party and supports Unicode.
|
||||
*
|
||||
* @maps id
|
||||
*/
|
||||
public function setId(?string $id): void
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Token.
|
||||
* Encrypted ApplePay token, containing card information. This token would be base64encoded. The
|
||||
* pattern is defined by an external party and supports Unicode.
|
||||
*/
|
||||
public function getToken(): ?string
|
||||
{
|
||||
return $this->token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Token.
|
||||
* Encrypted ApplePay token, containing card information. This token would be base64encoded. The
|
||||
* pattern is defined by an external party and supports Unicode.
|
||||
*
|
||||
* @maps token
|
||||
*/
|
||||
public function setToken(?string $token): void
|
||||
{
|
||||
$this->token = $token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Name.
|
||||
* The full name representation like Mr J Smith.
|
||||
*/
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Name.
|
||||
* The full name representation like Mr J Smith.
|
||||
*
|
||||
* @maps name
|
||||
*/
|
||||
public function setName(?string $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Email Address.
|
||||
* The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are
|
||||
* allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally
|
||||
* accepted maximum length for an email address is 254 characters. The pattern verifies that an
|
||||
* unquoted <code>@</code> sign exists.</blockquote>
|
||||
*/
|
||||
public function getEmailAddress(): ?string
|
||||
{
|
||||
return $this->emailAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Email Address.
|
||||
* The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are
|
||||
* allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally
|
||||
* accepted maximum length for an email address is 254 characters. The pattern verifies that an
|
||||
* unquoted <code>@</code> sign exists.</blockquote>
|
||||
*
|
||||
* @maps email_address
|
||||
*/
|
||||
public function setEmailAddress(?string $emailAddress): void
|
||||
{
|
||||
$this->emailAddress = $emailAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Phone Number.
|
||||
* The phone number in its canonical international [E.164 numbering plan format](https://www.itu.
|
||||
* int/rec/T-REC-E.164/en).
|
||||
*/
|
||||
public function getPhoneNumber(): ?PhoneNumber
|
||||
{
|
||||
return $this->phoneNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Phone Number.
|
||||
* The phone number in its canonical international [E.164 numbering plan format](https://www.itu.
|
||||
* int/rec/T-REC-E.164/en).
|
||||
*
|
||||
* @maps phone_number
|
||||
*/
|
||||
public function setPhoneNumber(?PhoneNumber $phoneNumber): void
|
||||
{
|
||||
$this->phoneNumber = $phoneNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Card.
|
||||
* The Card from Apple Pay Wallet used to fund the payment.
|
||||
*/
|
||||
public function getCard(): ?ApplePayCardResponse
|
||||
{
|
||||
return $this->card;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Card.
|
||||
* The Card from Apple Pay Wallet used to fund the payment.
|
||||
*
|
||||
* @maps card
|
||||
*/
|
||||
public function setCard(?ApplePayCardResponse $card): void
|
||||
{
|
||||
$this->card = $card;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Attributes.
|
||||
* Additional attributes associated with the use of Apple Pay.
|
||||
*/
|
||||
public function getAttributes(): ?ApplePayAttributesResponse
|
||||
{
|
||||
return $this->attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Attributes.
|
||||
* Additional attributes associated with the use of Apple Pay.
|
||||
*
|
||||
* @maps attributes
|
||||
*/
|
||||
public function setAttributes(?ApplePayAttributesResponse $attributes): void
|
||||
{
|
||||
$this->attributes = $attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->id)) {
|
||||
$json['id'] = $this->id;
|
||||
}
|
||||
if (isset($this->token)) {
|
||||
$json['token'] = $this->token;
|
||||
}
|
||||
if (isset($this->name)) {
|
||||
$json['name'] = $this->name;
|
||||
}
|
||||
if (isset($this->emailAddress)) {
|
||||
$json['email_address'] = $this->emailAddress;
|
||||
}
|
||||
if (isset($this->phoneNumber)) {
|
||||
$json['phone_number'] = $this->phoneNumber;
|
||||
}
|
||||
if (isset($this->card)) {
|
||||
$json['card'] = $this->card;
|
||||
}
|
||||
if (isset($this->attributes)) {
|
||||
$json['attributes'] = $this->attributes;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
63
src/Models/ApplePayPaymentToken.php
Normal file
63
src/Models/ApplePayPaymentToken.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* A resource representing a response for Apple Pay.
|
||||
*/
|
||||
class ApplePayPaymentToken implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var ApplePayCard|null
|
||||
*/
|
||||
private $card;
|
||||
|
||||
/**
|
||||
* Returns Card.
|
||||
* The payment card to be used to fund a payment. Can be a credit or debit card.
|
||||
*/
|
||||
public function getCard(): ?ApplePayCard
|
||||
{
|
||||
return $this->card;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Card.
|
||||
* The payment card to be used to fund a payment. Can be a credit or debit card.
|
||||
*
|
||||
* @maps card
|
||||
*/
|
||||
public function setCard(?ApplePayCard $card): void
|
||||
{
|
||||
$this->card = $card;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
285
src/Models/ApplePayRequest.php
Normal file
285
src/Models/ApplePayRequest.php
Normal file
@@ -0,0 +1,285 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Information needed to pay using ApplePay.
|
||||
*/
|
||||
class ApplePayRequest implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $emailAddress;
|
||||
|
||||
/**
|
||||
* @var PhoneNumber|null
|
||||
*/
|
||||
private $phoneNumber;
|
||||
|
||||
/**
|
||||
* @var ApplePayDecryptedTokenData|null
|
||||
*/
|
||||
private $decryptedToken;
|
||||
|
||||
/**
|
||||
* @var CardStoredCredential|null
|
||||
*/
|
||||
private $storedCredential;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $vaultId;
|
||||
|
||||
/**
|
||||
* @var ApplePayAttributes|null
|
||||
*/
|
||||
private $attributes;
|
||||
|
||||
/**
|
||||
* Returns Id.
|
||||
* ApplePay transaction identifier, this will be the unique identifier for this transaction provided by
|
||||
* Apple. The pattern is defined by an external party and supports Unicode.
|
||||
*/
|
||||
public function getId(): ?string
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Id.
|
||||
* ApplePay transaction identifier, this will be the unique identifier for this transaction provided by
|
||||
* Apple. The pattern is defined by an external party and supports Unicode.
|
||||
*
|
||||
* @maps id
|
||||
*/
|
||||
public function setId(?string $id): void
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Name.
|
||||
* The full name representation like Mr J Smith.
|
||||
*/
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Name.
|
||||
* The full name representation like Mr J Smith.
|
||||
*
|
||||
* @maps name
|
||||
*/
|
||||
public function setName(?string $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Email Address.
|
||||
* The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are
|
||||
* allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally
|
||||
* accepted maximum length for an email address is 254 characters. The pattern verifies that an
|
||||
* unquoted <code>@</code> sign exists.</blockquote>
|
||||
*/
|
||||
public function getEmailAddress(): ?string
|
||||
{
|
||||
return $this->emailAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Email Address.
|
||||
* The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are
|
||||
* allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally
|
||||
* accepted maximum length for an email address is 254 characters. The pattern verifies that an
|
||||
* unquoted <code>@</code> sign exists.</blockquote>
|
||||
*
|
||||
* @maps email_address
|
||||
*/
|
||||
public function setEmailAddress(?string $emailAddress): void
|
||||
{
|
||||
$this->emailAddress = $emailAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Phone Number.
|
||||
* The phone number in its canonical international [E.164 numbering plan format](https://www.itu.
|
||||
* int/rec/T-REC-E.164/en).
|
||||
*/
|
||||
public function getPhoneNumber(): ?PhoneNumber
|
||||
{
|
||||
return $this->phoneNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Phone Number.
|
||||
* The phone number in its canonical international [E.164 numbering plan format](https://www.itu.
|
||||
* int/rec/T-REC-E.164/en).
|
||||
*
|
||||
* @maps phone_number
|
||||
*/
|
||||
public function setPhoneNumber(?PhoneNumber $phoneNumber): void
|
||||
{
|
||||
$this->phoneNumber = $phoneNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Decrypted Token.
|
||||
* Information about the Payment data obtained by decrypting Apple Pay token.
|
||||
*/
|
||||
public function getDecryptedToken(): ?ApplePayDecryptedTokenData
|
||||
{
|
||||
return $this->decryptedToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Decrypted Token.
|
||||
* Information about the Payment data obtained by decrypting Apple Pay token.
|
||||
*
|
||||
* @maps decrypted_token
|
||||
*/
|
||||
public function setDecryptedToken(?ApplePayDecryptedTokenData $decryptedToken): void
|
||||
{
|
||||
$this->decryptedToken = $decryptedToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Stored Credential.
|
||||
* Provides additional details to process a payment using a `card` that has been stored or is intended
|
||||
* to be stored (also referred to as stored_credential or card-on-file).<br/>Parameter compatibility:
|
||||
* <br/><ul><li>`payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
|
||||
* </li><li>`usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
|
||||
* </li><li>`previous_transaction_reference` or `previous_network_transaction_reference` is compatible
|
||||
* only with `payment_initiator=MERCHANT`.</li><li>Only one of the parameters -
|
||||
* `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in
|
||||
* the request.</li></ul>
|
||||
*/
|
||||
public function getStoredCredential(): ?CardStoredCredential
|
||||
{
|
||||
return $this->storedCredential;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Stored Credential.
|
||||
* Provides additional details to process a payment using a `card` that has been stored or is intended
|
||||
* to be stored (also referred to as stored_credential or card-on-file).<br/>Parameter compatibility:
|
||||
* <br/><ul><li>`payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
|
||||
* </li><li>`usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
|
||||
* </li><li>`previous_transaction_reference` or `previous_network_transaction_reference` is compatible
|
||||
* only with `payment_initiator=MERCHANT`.</li><li>Only one of the parameters -
|
||||
* `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in
|
||||
* the request.</li></ul>
|
||||
*
|
||||
* @maps stored_credential
|
||||
*/
|
||||
public function setStoredCredential(?CardStoredCredential $storedCredential): void
|
||||
{
|
||||
$this->storedCredential = $storedCredential;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Vault Id.
|
||||
* The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's
|
||||
* server so the saved payment source can be used for future transactions.
|
||||
*/
|
||||
public function getVaultId(): ?string
|
||||
{
|
||||
return $this->vaultId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Vault Id.
|
||||
* The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's
|
||||
* server so the saved payment source can be used for future transactions.
|
||||
*
|
||||
* @maps vault_id
|
||||
*/
|
||||
public function setVaultId(?string $vaultId): void
|
||||
{
|
||||
$this->vaultId = $vaultId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Attributes.
|
||||
* Additional attributes associated with apple pay.
|
||||
*/
|
||||
public function getAttributes(): ?ApplePayAttributes
|
||||
{
|
||||
return $this->attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Attributes.
|
||||
* Additional attributes associated with apple pay.
|
||||
*
|
||||
* @maps attributes
|
||||
*/
|
||||
public function setAttributes(?ApplePayAttributes $attributes): void
|
||||
{
|
||||
$this->attributes = $attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->id)) {
|
||||
$json['id'] = $this->id;
|
||||
}
|
||||
if (isset($this->name)) {
|
||||
$json['name'] = $this->name;
|
||||
}
|
||||
if (isset($this->emailAddress)) {
|
||||
$json['email_address'] = $this->emailAddress;
|
||||
}
|
||||
if (isset($this->phoneNumber)) {
|
||||
$json['phone_number'] = $this->phoneNumber;
|
||||
}
|
||||
if (isset($this->decryptedToken)) {
|
||||
$json['decrypted_token'] = $this->decryptedToken;
|
||||
}
|
||||
if (isset($this->storedCredential)) {
|
||||
$json['stored_credential'] = $this->storedCredential;
|
||||
}
|
||||
if (isset($this->vaultId)) {
|
||||
$json['vault_id'] = $this->vaultId;
|
||||
}
|
||||
if (isset($this->attributes)) {
|
||||
$json['attributes'] = $this->attributes;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
239
src/Models/ApplePayTokenizedCard.php
Normal file
239
src/Models/ApplePayTokenizedCard.php
Normal file
@@ -0,0 +1,239 @@
|
||||
<?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 payment card to use to fund a payment. Can be a credit or debit card.
|
||||
*/
|
||||
class ApplePayTokenizedCard implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $number;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $expiry;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $cardType;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $type;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $brand;
|
||||
|
||||
/**
|
||||
* @var Address|null
|
||||
*/
|
||||
private $billingAddress;
|
||||
|
||||
/**
|
||||
* Returns Name.
|
||||
* The card holder's name as it appears on the card.
|
||||
*/
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Name.
|
||||
* The card holder's name as it appears on the card.
|
||||
*
|
||||
* @maps name
|
||||
*/
|
||||
public function setName(?string $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Number.
|
||||
* The primary account number (PAN) for the payment card.
|
||||
*/
|
||||
public function getNumber(): ?string
|
||||
{
|
||||
return $this->number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Number.
|
||||
* The primary account number (PAN) for the payment card.
|
||||
*
|
||||
* @maps number
|
||||
*/
|
||||
public function setNumber(?string $number): void
|
||||
{
|
||||
$this->number = $number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Expiry.
|
||||
* The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https:
|
||||
* //tools.ietf.org/html/rfc3339#section-5.6).
|
||||
*/
|
||||
public function getExpiry(): ?string
|
||||
{
|
||||
return $this->expiry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Expiry.
|
||||
* The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https:
|
||||
* //tools.ietf.org/html/rfc3339#section-5.6).
|
||||
*
|
||||
* @maps expiry
|
||||
*/
|
||||
public function setExpiry(?string $expiry): void
|
||||
{
|
||||
$this->expiry = $expiry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Card Type.
|
||||
* The card network or brand. Applies to credit, debit, gift, and payment cards.
|
||||
*/
|
||||
public function getCardType(): ?string
|
||||
{
|
||||
return $this->cardType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Card Type.
|
||||
* The card network or brand. Applies to credit, debit, gift, and payment cards.
|
||||
*
|
||||
* @maps card_type
|
||||
*/
|
||||
public function setCardType(?string $cardType): void
|
||||
{
|
||||
$this->cardType = $cardType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Type.
|
||||
* Type of card. i.e Credit, Debit and so on.
|
||||
*/
|
||||
public function getType(): ?string
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Type.
|
||||
* Type of card. i.e Credit, Debit and so on.
|
||||
*
|
||||
* @maps type
|
||||
*/
|
||||
public function setType(?string $type): void
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Brand.
|
||||
* The card network or brand. Applies to credit, debit, gift, and payment cards.
|
||||
*/
|
||||
public function getBrand(): ?string
|
||||
{
|
||||
return $this->brand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Brand.
|
||||
* The card network or brand. Applies to credit, debit, gift, and payment cards.
|
||||
*
|
||||
* @maps brand
|
||||
*/
|
||||
public function setBrand(?string $brand): void
|
||||
{
|
||||
$this->brand = $brand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Billing 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 getBillingAddress(): ?Address
|
||||
{
|
||||
return $this->billingAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Billing 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 billing_address
|
||||
*/
|
||||
public function setBillingAddress(?Address $billingAddress): void
|
||||
{
|
||||
$this->billingAddress = $billingAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->number)) {
|
||||
$json['number'] = $this->number;
|
||||
}
|
||||
if (isset($this->expiry)) {
|
||||
$json['expiry'] = $this->expiry;
|
||||
}
|
||||
if (isset($this->cardType)) {
|
||||
$json['card_type'] = CardBrand::checkValue($this->cardType);
|
||||
}
|
||||
if (isset($this->type)) {
|
||||
$json['type'] = CardType::checkValue($this->type);
|
||||
}
|
||||
if (isset($this->brand)) {
|
||||
$json['brand'] = CardBrand::checkValue($this->brand);
|
||||
}
|
||||
if (isset($this->billingAddress)) {
|
||||
$json['billing_address'] = $this->billingAddress;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
100
src/Models/AssuranceDetails.php
Normal file
100
src/Models/AssuranceDetails.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Information about cardholder possession validation and cardholder identification and verifications
|
||||
* (ID&V).
|
||||
*/
|
||||
class AssuranceDetails implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var bool|null
|
||||
*/
|
||||
private $accountVerified = false;
|
||||
|
||||
/**
|
||||
* @var bool|null
|
||||
*/
|
||||
private $cardHolderAuthenticated = false;
|
||||
|
||||
/**
|
||||
* Returns Account Verified.
|
||||
* If true, indicates that Cardholder possession validation has been performed on returned payment
|
||||
* credential.
|
||||
*/
|
||||
public function getAccountVerified(): ?bool
|
||||
{
|
||||
return $this->accountVerified;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Account Verified.
|
||||
* If true, indicates that Cardholder possession validation has been performed on returned payment
|
||||
* credential.
|
||||
*
|
||||
* @maps account_verified
|
||||
*/
|
||||
public function setAccountVerified(?bool $accountVerified): void
|
||||
{
|
||||
$this->accountVerified = $accountVerified;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Card Holder Authenticated.
|
||||
* If true, indicates that identification and verifications (ID&V) was performed on the returned
|
||||
* payment credential.If false, the same risk-based authentication can be performed as you would for
|
||||
* card transactions. This risk-based authentication can include, but not limited to, step-up with 3D
|
||||
* Secure protocol if applicable.
|
||||
*/
|
||||
public function getCardHolderAuthenticated(): ?bool
|
||||
{
|
||||
return $this->cardHolderAuthenticated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Card Holder Authenticated.
|
||||
* If true, indicates that identification and verifications (ID&V) was performed on the returned
|
||||
* payment credential.If false, the same risk-based authentication can be performed as you would for
|
||||
* card transactions. This risk-based authentication can include, but not limited to, step-up with 3D
|
||||
* Secure protocol if applicable.
|
||||
*
|
||||
* @maps card_holder_authenticated
|
||||
*/
|
||||
public function setCardHolderAuthenticated(?bool $cardHolderAuthenticated): void
|
||||
{
|
||||
$this->cardHolderAuthenticated = $cardHolderAuthenticated;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->accountVerified)) {
|
||||
$json['account_verified'] = $this->accountVerified;
|
||||
}
|
||||
if (isset($this->cardHolderAuthenticated)) {
|
||||
$json['card_holder_authenticated'] = $this->cardHolderAuthenticated;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
91
src/Models/AuthenticationResponse.php
Normal file
91
src/Models/AuthenticationResponse.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Results of Authentication such as 3D Secure.
|
||||
*/
|
||||
class AuthenticationResponse implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $liabilityShift;
|
||||
|
||||
/**
|
||||
* @var ThreeDSecureAuthenticationResponse|null
|
||||
*/
|
||||
private $threeDSecure;
|
||||
|
||||
/**
|
||||
* Returns Liability Shift.
|
||||
* Liability shift indicator. The outcome of the issuer's authentication.
|
||||
*/
|
||||
public function getLiabilityShift(): ?string
|
||||
{
|
||||
return $this->liabilityShift;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Liability Shift.
|
||||
* Liability shift indicator. The outcome of the issuer's authentication.
|
||||
*
|
||||
* @maps liability_shift
|
||||
*/
|
||||
public function setLiabilityShift(?string $liabilityShift): void
|
||||
{
|
||||
$this->liabilityShift = $liabilityShift;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Three D Secure.
|
||||
* Results of 3D Secure Authentication.
|
||||
*/
|
||||
public function getThreeDSecure(): ?ThreeDSecureAuthenticationResponse
|
||||
{
|
||||
return $this->threeDSecure;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Three D Secure.
|
||||
* Results of 3D Secure Authentication.
|
||||
*
|
||||
* @maps three_d_secure
|
||||
*/
|
||||
public function setThreeDSecure(?ThreeDSecureAuthenticationResponse $threeDSecure): void
|
||||
{
|
||||
$this->threeDSecure = $threeDSecure;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->liabilityShift)) {
|
||||
$json['liability_shift'] = LiabilityShiftIndicator::checkValue($this->liabilityShift);
|
||||
}
|
||||
if (isset($this->threeDSecure)) {
|
||||
$json['three_d_secure'] = $this->threeDSecure;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
393
src/Models/Authorization.php
Normal file
393
src/Models/Authorization.php
Normal file
@@ -0,0 +1,393 @@
|
||||
<?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 authorized payment transaction.
|
||||
*/
|
||||
class Authorization implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $status;
|
||||
|
||||
/**
|
||||
* @var AuthorizationStatusDetails|null
|
||||
*/
|
||||
private $statusDetails;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var Money|null
|
||||
*/
|
||||
private $amount;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $invoiceId;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $customId;
|
||||
|
||||
/**
|
||||
* @var NetworkTransactionReference|null
|
||||
*/
|
||||
private $networkTransactionReference;
|
||||
|
||||
/**
|
||||
* @var SellerProtection|null
|
||||
*/
|
||||
private $sellerProtection;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $expirationTime;
|
||||
|
||||
/**
|
||||
* @var LinkDescription[]|null
|
||||
*/
|
||||
private $links;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $createTime;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $updateTime;
|
||||
|
||||
/**
|
||||
* Returns Status.
|
||||
* The status for the authorized payment.
|
||||
*/
|
||||
public function getStatus(): ?string
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Status.
|
||||
* The status for the authorized payment.
|
||||
*
|
||||
* @maps status
|
||||
*/
|
||||
public function setStatus(?string $status): void
|
||||
{
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Status Details.
|
||||
* The details of the authorized payment status.
|
||||
*/
|
||||
public function getStatusDetails(): ?AuthorizationStatusDetails
|
||||
{
|
||||
return $this->statusDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Status Details.
|
||||
* The details of the authorized payment status.
|
||||
*
|
||||
* @maps status_details
|
||||
*/
|
||||
public function setStatusDetails(?AuthorizationStatusDetails $statusDetails): void
|
||||
{
|
||||
$this->statusDetails = $statusDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Id.
|
||||
* The PayPal-generated ID for the authorized payment.
|
||||
*/
|
||||
public function getId(): ?string
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Id.
|
||||
* The PayPal-generated ID for the authorized payment.
|
||||
*
|
||||
* @maps id
|
||||
*/
|
||||
public function setId(?string $id): void
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Amount.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*/
|
||||
public function getAmount(): ?Money
|
||||
{
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Amount.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*
|
||||
* @maps amount
|
||||
*/
|
||||
public function setAmount(?Money $amount): void
|
||||
{
|
||||
$this->amount = $amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Invoice Id.
|
||||
* The API caller-provided external invoice number for this order. Appears in both the payer's
|
||||
* transaction history and the emails that the payer receives.
|
||||
*/
|
||||
public function getInvoiceId(): ?string
|
||||
{
|
||||
return $this->invoiceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Invoice Id.
|
||||
* The API caller-provided external invoice number for this order. Appears in both the payer's
|
||||
* transaction history and the emails that the payer receives.
|
||||
*
|
||||
* @maps invoice_id
|
||||
*/
|
||||
public function setInvoiceId(?string $invoiceId): void
|
||||
{
|
||||
$this->invoiceId = $invoiceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Custom Id.
|
||||
* The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal
|
||||
* transactions. Appears in transaction and settlement reports.
|
||||
*/
|
||||
public function getCustomId(): ?string
|
||||
{
|
||||
return $this->customId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Custom Id.
|
||||
* The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal
|
||||
* transactions. Appears in transaction and settlement reports.
|
||||
*
|
||||
* @maps custom_id
|
||||
*/
|
||||
public function setCustomId(?string $customId): void
|
||||
{
|
||||
$this->customId = $customId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Network Transaction Reference.
|
||||
* Reference values used by the card network to identify a transaction.
|
||||
*/
|
||||
public function getNetworkTransactionReference(): ?NetworkTransactionReference
|
||||
{
|
||||
return $this->networkTransactionReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Network Transaction Reference.
|
||||
* Reference values used by the card network to identify a transaction.
|
||||
*
|
||||
* @maps network_transaction_reference
|
||||
*/
|
||||
public function setNetworkTransactionReference(?NetworkTransactionReference $networkTransactionReference): void
|
||||
{
|
||||
$this->networkTransactionReference = $networkTransactionReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Seller Protection.
|
||||
* The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.
|
||||
* paypal.com/us/webapps/mpp/security/seller-protection).
|
||||
*/
|
||||
public function getSellerProtection(): ?SellerProtection
|
||||
{
|
||||
return $this->sellerProtection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Seller Protection.
|
||||
* The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.
|
||||
* paypal.com/us/webapps/mpp/security/seller-protection).
|
||||
*
|
||||
* @maps seller_protection
|
||||
*/
|
||||
public function setSellerProtection(?SellerProtection $sellerProtection): void
|
||||
{
|
||||
$this->sellerProtection = $sellerProtection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Expiration Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*/
|
||||
public function getExpirationTime(): ?string
|
||||
{
|
||||
return $this->expirationTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Expiration Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*
|
||||
* @maps expiration_time
|
||||
*/
|
||||
public function setExpirationTime(?string $expirationTime): void
|
||||
{
|
||||
$this->expirationTime = $expirationTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Links.
|
||||
* An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
|
||||
*
|
||||
* @return LinkDescription[]|null
|
||||
*/
|
||||
public function getLinks(): ?array
|
||||
{
|
||||
return $this->links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Links.
|
||||
* An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
|
||||
*
|
||||
* @maps links
|
||||
*
|
||||
* @param LinkDescription[]|null $links
|
||||
*/
|
||||
public function setLinks(?array $links): void
|
||||
{
|
||||
$this->links = $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Create Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*/
|
||||
public function getCreateTime(): ?string
|
||||
{
|
||||
return $this->createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Create Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*
|
||||
* @maps create_time
|
||||
*/
|
||||
public function setCreateTime(?string $createTime): void
|
||||
{
|
||||
$this->createTime = $createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Update Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*/
|
||||
public function getUpdateTime(): ?string
|
||||
{
|
||||
return $this->updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Update Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*
|
||||
* @maps update_time
|
||||
*/
|
||||
public function setUpdateTime(?string $updateTime): void
|
||||
{
|
||||
$this->updateTime = $updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->status)) {
|
||||
$json['status'] = AuthorizationStatus::checkValue($this->status);
|
||||
}
|
||||
if (isset($this->statusDetails)) {
|
||||
$json['status_details'] = $this->statusDetails;
|
||||
}
|
||||
if (isset($this->id)) {
|
||||
$json['id'] = $this->id;
|
||||
}
|
||||
if (isset($this->amount)) {
|
||||
$json['amount'] = $this->amount;
|
||||
}
|
||||
if (isset($this->invoiceId)) {
|
||||
$json['invoice_id'] = $this->invoiceId;
|
||||
}
|
||||
if (isset($this->customId)) {
|
||||
$json['custom_id'] = $this->customId;
|
||||
}
|
||||
if (isset($this->networkTransactionReference)) {
|
||||
$json['network_transaction_reference'] = $this->networkTransactionReference;
|
||||
}
|
||||
if (isset($this->sellerProtection)) {
|
||||
$json['seller_protection'] = $this->sellerProtection;
|
||||
}
|
||||
if (isset($this->expirationTime)) {
|
||||
$json['expiration_time'] = $this->expirationTime;
|
||||
}
|
||||
if (isset($this->links)) {
|
||||
$json['links'] = $this->links;
|
||||
}
|
||||
if (isset($this->createTime)) {
|
||||
$json['create_time'] = $this->createTime;
|
||||
}
|
||||
if (isset($this->updateTime)) {
|
||||
$json['update_time'] = $this->updateTime;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
45
src/Models/AuthorizationIncompleteReason.php
Normal file
45
src/Models/AuthorizationIncompleteReason.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use Exception;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* The reason why the authorized status is `PENDING`.
|
||||
*/
|
||||
class AuthorizationIncompleteReason
|
||||
{
|
||||
public const PENDING_REVIEW = 'PENDING_REVIEW';
|
||||
|
||||
public const DECLINED_BY_RISK_FRAUD_FILTERS = 'DECLINED_BY_RISK_FRAUD_FILTERS';
|
||||
|
||||
private const _ALL_VALUES = [self::PENDING_REVIEW, self::DECLINED_BY_RISK_FRAUD_FILTERS];
|
||||
|
||||
/**
|
||||
* Ensures that all the given values are present in this Enum.
|
||||
*
|
||||
* @param array|stdClass|null|string $value Value or a list/map of values to be checked
|
||||
*
|
||||
* @return array|null|string Input value(s), if all are a part of this Enum
|
||||
*
|
||||
* @throws Exception Throws exception if any given value is not in this Enum
|
||||
*/
|
||||
public static function checkValue($value)
|
||||
{
|
||||
$value = json_decode(json_encode($value), true); // converts stdClass into array
|
||||
if (CoreHelper::checkValueOrValuesInList($value, self::_ALL_VALUES)) {
|
||||
return $value;
|
||||
}
|
||||
throw new Exception("$value is invalid for AuthorizationIncompleteReason.");
|
||||
}
|
||||
}
|
||||
54
src/Models/AuthorizationStatus.php
Normal file
54
src/Models/AuthorizationStatus.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use Exception;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* The status for the authorized payment.
|
||||
*/
|
||||
class AuthorizationStatus
|
||||
{
|
||||
public const CREATED = 'CREATED';
|
||||
|
||||
public const CAPTURED = 'CAPTURED';
|
||||
|
||||
public const DENIED = 'DENIED';
|
||||
|
||||
public const PARTIALLY_CAPTURED = 'PARTIALLY_CAPTURED';
|
||||
|
||||
public const VOIDED = 'VOIDED';
|
||||
|
||||
public const PENDING = 'PENDING';
|
||||
|
||||
private const _ALL_VALUES =
|
||||
[self::CREATED, self::CAPTURED, self::DENIED, self::PARTIALLY_CAPTURED, self::VOIDED, self::PENDING];
|
||||
|
||||
/**
|
||||
* Ensures that all the given values are present in this Enum.
|
||||
*
|
||||
* @param array|stdClass|null|string $value Value or a list/map of values to be checked
|
||||
*
|
||||
* @return array|null|string Input value(s), if all are a part of this Enum
|
||||
*
|
||||
* @throws Exception Throws exception if any given value is not in this Enum
|
||||
*/
|
||||
public static function checkValue($value)
|
||||
{
|
||||
$value = json_decode(json_encode($value), true); // converts stdClass into array
|
||||
if (CoreHelper::checkValueOrValuesInList($value, self::_ALL_VALUES)) {
|
||||
return $value;
|
||||
}
|
||||
throw new Exception("$value is invalid for AuthorizationStatus.");
|
||||
}
|
||||
}
|
||||
63
src/Models/AuthorizationStatusDetails.php
Normal file
63
src/Models/AuthorizationStatusDetails.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?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 details of the authorized payment status.
|
||||
*/
|
||||
class AuthorizationStatusDetails implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $reason;
|
||||
|
||||
/**
|
||||
* Returns Reason.
|
||||
* The reason why the authorized status is `PENDING`.
|
||||
*/
|
||||
public function getReason(): ?string
|
||||
{
|
||||
return $this->reason;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Reason.
|
||||
* The reason why the authorized status is `PENDING`.
|
||||
*
|
||||
* @maps reason
|
||||
*/
|
||||
public function setReason(?string $reason): void
|
||||
{
|
||||
$this->reason = $reason;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->reason)) {
|
||||
$json['reason'] = AuthorizationIncompleteReason::checkValue($this->reason);
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
91
src/Models/AuthorizationStatusWithDetails.php
Normal file
91
src/Models/AuthorizationStatusWithDetails.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<?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 status fields and status details for an authorized payment.
|
||||
*/
|
||||
class AuthorizationStatusWithDetails implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $status;
|
||||
|
||||
/**
|
||||
* @var AuthorizationStatusDetails|null
|
||||
*/
|
||||
private $statusDetails;
|
||||
|
||||
/**
|
||||
* Returns Status.
|
||||
* The status for the authorized payment.
|
||||
*/
|
||||
public function getStatus(): ?string
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Status.
|
||||
* The status for the authorized payment.
|
||||
*
|
||||
* @maps status
|
||||
*/
|
||||
public function setStatus(?string $status): void
|
||||
{
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Status Details.
|
||||
* The details of the authorized payment status.
|
||||
*/
|
||||
public function getStatusDetails(): ?AuthorizationStatusDetails
|
||||
{
|
||||
return $this->statusDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Status Details.
|
||||
* The details of the authorized payment status.
|
||||
*
|
||||
* @maps status_details
|
||||
*/
|
||||
public function setStatusDetails(?AuthorizationStatusDetails $statusDetails): void
|
||||
{
|
||||
$this->statusDetails = $statusDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->status)) {
|
||||
$json['status'] = AuthorizationStatus::checkValue($this->status);
|
||||
}
|
||||
if (isset($this->statusDetails)) {
|
||||
$json['status_details'] = $this->statusDetails;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
422
src/Models/AuthorizationWithAdditionalData.php
Normal file
422
src/Models/AuthorizationWithAdditionalData.php
Normal file
@@ -0,0 +1,422 @@
|
||||
<?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 authorization with additional payment details, such as risk assessment and processor response.
|
||||
* These details are populated only for certain payment methods.
|
||||
*/
|
||||
class AuthorizationWithAdditionalData implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $status;
|
||||
|
||||
/**
|
||||
* @var AuthorizationStatusDetails|null
|
||||
*/
|
||||
private $statusDetails;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var Money|null
|
||||
*/
|
||||
private $amount;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $invoiceId;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $customId;
|
||||
|
||||
/**
|
||||
* @var NetworkTransactionReference|null
|
||||
*/
|
||||
private $networkTransactionReference;
|
||||
|
||||
/**
|
||||
* @var SellerProtection|null
|
||||
*/
|
||||
private $sellerProtection;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $expirationTime;
|
||||
|
||||
/**
|
||||
* @var LinkDescription[]|null
|
||||
*/
|
||||
private $links;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $createTime;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $updateTime;
|
||||
|
||||
/**
|
||||
* @var ProcessorResponse|null
|
||||
*/
|
||||
private $processorResponse;
|
||||
|
||||
/**
|
||||
* Returns Status.
|
||||
* The status for the authorized payment.
|
||||
*/
|
||||
public function getStatus(): ?string
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Status.
|
||||
* The status for the authorized payment.
|
||||
*
|
||||
* @maps status
|
||||
*/
|
||||
public function setStatus(?string $status): void
|
||||
{
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Status Details.
|
||||
* The details of the authorized payment status.
|
||||
*/
|
||||
public function getStatusDetails(): ?AuthorizationStatusDetails
|
||||
{
|
||||
return $this->statusDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Status Details.
|
||||
* The details of the authorized payment status.
|
||||
*
|
||||
* @maps status_details
|
||||
*/
|
||||
public function setStatusDetails(?AuthorizationStatusDetails $statusDetails): void
|
||||
{
|
||||
$this->statusDetails = $statusDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Id.
|
||||
* The PayPal-generated ID for the authorized payment.
|
||||
*/
|
||||
public function getId(): ?string
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Id.
|
||||
* The PayPal-generated ID for the authorized payment.
|
||||
*
|
||||
* @maps id
|
||||
*/
|
||||
public function setId(?string $id): void
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Amount.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*/
|
||||
public function getAmount(): ?Money
|
||||
{
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Amount.
|
||||
* The currency and amount for a financial transaction, such as a balance or payment due.
|
||||
*
|
||||
* @maps amount
|
||||
*/
|
||||
public function setAmount(?Money $amount): void
|
||||
{
|
||||
$this->amount = $amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Invoice Id.
|
||||
* The API caller-provided external invoice number for this order. Appears in both the payer's
|
||||
* transaction history and the emails that the payer receives.
|
||||
*/
|
||||
public function getInvoiceId(): ?string
|
||||
{
|
||||
return $this->invoiceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Invoice Id.
|
||||
* The API caller-provided external invoice number for this order. Appears in both the payer's
|
||||
* transaction history and the emails that the payer receives.
|
||||
*
|
||||
* @maps invoice_id
|
||||
*/
|
||||
public function setInvoiceId(?string $invoiceId): void
|
||||
{
|
||||
$this->invoiceId = $invoiceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Custom Id.
|
||||
* The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal
|
||||
* transactions. Appears in transaction and settlement reports.
|
||||
*/
|
||||
public function getCustomId(): ?string
|
||||
{
|
||||
return $this->customId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Custom Id.
|
||||
* The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal
|
||||
* transactions. Appears in transaction and settlement reports.
|
||||
*
|
||||
* @maps custom_id
|
||||
*/
|
||||
public function setCustomId(?string $customId): void
|
||||
{
|
||||
$this->customId = $customId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Network Transaction Reference.
|
||||
* Reference values used by the card network to identify a transaction.
|
||||
*/
|
||||
public function getNetworkTransactionReference(): ?NetworkTransactionReference
|
||||
{
|
||||
return $this->networkTransactionReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Network Transaction Reference.
|
||||
* Reference values used by the card network to identify a transaction.
|
||||
*
|
||||
* @maps network_transaction_reference
|
||||
*/
|
||||
public function setNetworkTransactionReference(?NetworkTransactionReference $networkTransactionReference): void
|
||||
{
|
||||
$this->networkTransactionReference = $networkTransactionReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Seller Protection.
|
||||
* The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.
|
||||
* paypal.com/us/webapps/mpp/security/seller-protection).
|
||||
*/
|
||||
public function getSellerProtection(): ?SellerProtection
|
||||
{
|
||||
return $this->sellerProtection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Seller Protection.
|
||||
* The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.
|
||||
* paypal.com/us/webapps/mpp/security/seller-protection).
|
||||
*
|
||||
* @maps seller_protection
|
||||
*/
|
||||
public function setSellerProtection(?SellerProtection $sellerProtection): void
|
||||
{
|
||||
$this->sellerProtection = $sellerProtection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Expiration Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*/
|
||||
public function getExpirationTime(): ?string
|
||||
{
|
||||
return $this->expirationTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Expiration Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*
|
||||
* @maps expiration_time
|
||||
*/
|
||||
public function setExpirationTime(?string $expirationTime): void
|
||||
{
|
||||
$this->expirationTime = $expirationTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Links.
|
||||
* An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
|
||||
*
|
||||
* @return LinkDescription[]|null
|
||||
*/
|
||||
public function getLinks(): ?array
|
||||
{
|
||||
return $this->links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Links.
|
||||
* An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
|
||||
*
|
||||
* @maps links
|
||||
*
|
||||
* @param LinkDescription[]|null $links
|
||||
*/
|
||||
public function setLinks(?array $links): void
|
||||
{
|
||||
$this->links = $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Create Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*/
|
||||
public function getCreateTime(): ?string
|
||||
{
|
||||
return $this->createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Create Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*
|
||||
* @maps create_time
|
||||
*/
|
||||
public function setCreateTime(?string $createTime): void
|
||||
{
|
||||
$this->createTime = $createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Update Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*/
|
||||
public function getUpdateTime(): ?string
|
||||
{
|
||||
return $this->updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Update Time.
|
||||
* The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.
|
||||
* 6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong>
|
||||
* The regular expression provides guidance but does not reject all invalid dates.</blockquote>
|
||||
*
|
||||
* @maps update_time
|
||||
*/
|
||||
public function setUpdateTime(?string $updateTime): void
|
||||
{
|
||||
$this->updateTime = $updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Processor Response.
|
||||
* The processor response information for payment requests, such as direct credit card transactions.
|
||||
*/
|
||||
public function getProcessorResponse(): ?ProcessorResponse
|
||||
{
|
||||
return $this->processorResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Processor Response.
|
||||
* The processor response information for payment requests, such as direct credit card transactions.
|
||||
*
|
||||
* @maps processor_response
|
||||
*/
|
||||
public function setProcessorResponse(?ProcessorResponse $processorResponse): void
|
||||
{
|
||||
$this->processorResponse = $processorResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->status)) {
|
||||
$json['status'] = AuthorizationStatus::checkValue($this->status);
|
||||
}
|
||||
if (isset($this->statusDetails)) {
|
||||
$json['status_details'] = $this->statusDetails;
|
||||
}
|
||||
if (isset($this->id)) {
|
||||
$json['id'] = $this->id;
|
||||
}
|
||||
if (isset($this->amount)) {
|
||||
$json['amount'] = $this->amount;
|
||||
}
|
||||
if (isset($this->invoiceId)) {
|
||||
$json['invoice_id'] = $this->invoiceId;
|
||||
}
|
||||
if (isset($this->customId)) {
|
||||
$json['custom_id'] = $this->customId;
|
||||
}
|
||||
if (isset($this->networkTransactionReference)) {
|
||||
$json['network_transaction_reference'] = $this->networkTransactionReference;
|
||||
}
|
||||
if (isset($this->sellerProtection)) {
|
||||
$json['seller_protection'] = $this->sellerProtection;
|
||||
}
|
||||
if (isset($this->expirationTime)) {
|
||||
$json['expiration_time'] = $this->expirationTime;
|
||||
}
|
||||
if (isset($this->links)) {
|
||||
$json['links'] = $this->links;
|
||||
}
|
||||
if (isset($this->createTime)) {
|
||||
$json['create_time'] = $this->createTime;
|
||||
}
|
||||
if (isset($this->updateTime)) {
|
||||
$json['update_time'] = $this->updateTime;
|
||||
}
|
||||
if (isset($this->processorResponse)) {
|
||||
$json['processor_response'] = $this->processorResponse;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
247
src/Models/BLIKExperienceContext.php
Normal file
247
src/Models/BLIKExperienceContext.php
Normal file
@@ -0,0 +1,247 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Customizes the payer experience during the approval process for the BLIK payment.
|
||||
*/
|
||||
class BLIKExperienceContext implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $brandName;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $locale;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $shippingPreference = ShippingPreference::GET_FROM_FILE;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $returnUrl;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $cancelUrl;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $consumerIp;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $consumerUserAgent;
|
||||
|
||||
/**
|
||||
* Returns Brand Name.
|
||||
* The label that overrides the business name in the PayPal account on the PayPal site. The pattern is
|
||||
* defined by an external party and supports Unicode.
|
||||
*/
|
||||
public function getBrandName(): ?string
|
||||
{
|
||||
return $this->brandName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Brand Name.
|
||||
* The label that overrides the business name in the PayPal account on the PayPal site. The pattern is
|
||||
* defined by an external party and supports Unicode.
|
||||
*
|
||||
* @maps brand_name
|
||||
*/
|
||||
public function setBrandName(?string $brandName): void
|
||||
{
|
||||
$this->brandName = $brandName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Locale.
|
||||
* The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to
|
||||
* localize the error-related strings, such as messages, issues, and suggested actions. The tag is made
|
||||
* up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the
|
||||
* optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166
|
||||
* alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.
|
||||
* org/unsd/methodology/m49/).
|
||||
*/
|
||||
public function getLocale(): ?string
|
||||
{
|
||||
return $this->locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Locale.
|
||||
* The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to
|
||||
* localize the error-related strings, such as messages, issues, and suggested actions. The tag is made
|
||||
* up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the
|
||||
* optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166
|
||||
* alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.
|
||||
* org/unsd/methodology/m49/).
|
||||
*
|
||||
* @maps locale
|
||||
*/
|
||||
public function setLocale(?string $locale): void
|
||||
{
|
||||
$this->locale = $locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Shipping Preference.
|
||||
* The location from which the shipping address is derived.
|
||||
*/
|
||||
public function getShippingPreference(): ?string
|
||||
{
|
||||
return $this->shippingPreference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Shipping Preference.
|
||||
* The location from which the shipping address is derived.
|
||||
*
|
||||
* @maps shipping_preference
|
||||
*/
|
||||
public function setShippingPreference(?string $shippingPreference): void
|
||||
{
|
||||
$this->shippingPreference = $shippingPreference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Return Url.
|
||||
* Describes the URL.
|
||||
*/
|
||||
public function getReturnUrl(): ?string
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Return Url.
|
||||
* Describes the URL.
|
||||
*
|
||||
* @maps return_url
|
||||
*/
|
||||
public function setReturnUrl(?string $returnUrl): void
|
||||
{
|
||||
$this->returnUrl = $returnUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Cancel Url.
|
||||
* Describes the URL.
|
||||
*/
|
||||
public function getCancelUrl(): ?string
|
||||
{
|
||||
return $this->cancelUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Cancel Url.
|
||||
* Describes the URL.
|
||||
*
|
||||
* @maps cancel_url
|
||||
*/
|
||||
public function setCancelUrl(?string $cancelUrl): void
|
||||
{
|
||||
$this->cancelUrl = $cancelUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Consumer Ip.
|
||||
* An Internet Protocol address (IP address). This address assigns a numerical label to each device
|
||||
* that is connected to a computer network through the Internet Protocol. Supports IPv4 and IPv6
|
||||
* addresses.
|
||||
*/
|
||||
public function getConsumerIp(): ?string
|
||||
{
|
||||
return $this->consumerIp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Consumer Ip.
|
||||
* An Internet Protocol address (IP address). This address assigns a numerical label to each device
|
||||
* that is connected to a computer network through the Internet Protocol. Supports IPv4 and IPv6
|
||||
* addresses.
|
||||
*
|
||||
* @maps consumer_ip
|
||||
*/
|
||||
public function setConsumerIp(?string $consumerIp): void
|
||||
{
|
||||
$this->consumerIp = $consumerIp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Consumer User Agent.
|
||||
* The payer's User Agent. For example, Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0).
|
||||
*/
|
||||
public function getConsumerUserAgent(): ?string
|
||||
{
|
||||
return $this->consumerUserAgent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Consumer User Agent.
|
||||
* The payer's User Agent. For example, Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0).
|
||||
*
|
||||
* @maps consumer_user_agent
|
||||
*/
|
||||
public function setConsumerUserAgent(?string $consumerUserAgent): void
|
||||
{
|
||||
$this->consumerUserAgent = $consumerUserAgent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->brandName)) {
|
||||
$json['brand_name'] = $this->brandName;
|
||||
}
|
||||
if (isset($this->locale)) {
|
||||
$json['locale'] = $this->locale;
|
||||
}
|
||||
if (isset($this->shippingPreference)) {
|
||||
$json['shipping_preference'] = ShippingPreference::checkValue($this->shippingPreference);
|
||||
}
|
||||
if (isset($this->returnUrl)) {
|
||||
$json['return_url'] = $this->returnUrl;
|
||||
}
|
||||
if (isset($this->cancelUrl)) {
|
||||
$json['cancel_url'] = $this->cancelUrl;
|
||||
}
|
||||
if (isset($this->consumerIp)) {
|
||||
$json['consumer_ip'] = $this->consumerIp;
|
||||
}
|
||||
if (isset($this->consumerUserAgent)) {
|
||||
$json['consumer_user_agent'] = $this->consumerUserAgent;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
70
src/Models/BLIKLevel0PaymentObject.php
Normal file
70
src/Models/BLIKLevel0PaymentObject.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Information used to pay using BLIK level_0 flow.
|
||||
*/
|
||||
class BLIKLevel0PaymentObject implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $authCode;
|
||||
|
||||
/**
|
||||
* @param string $authCode
|
||||
*/
|
||||
public function __construct(string $authCode)
|
||||
{
|
||||
$this->authCode = $authCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Auth Code.
|
||||
* The 6-digit code used to authenticate a consumer within BLIK.
|
||||
*/
|
||||
public function getAuthCode(): string
|
||||
{
|
||||
return $this->authCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Auth Code.
|
||||
* The 6-digit code used to authenticate a consumer within BLIK.
|
||||
*
|
||||
* @required
|
||||
* @maps auth_code
|
||||
*/
|
||||
public function setAuthCode(string $authCode): void
|
||||
{
|
||||
$this->authCode = $authCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 = [];
|
||||
$json['auth_code'] = $this->authCode;
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
65
src/Models/BLIKOneClickPaymentObject.php
Normal file
65
src/Models/BLIKOneClickPaymentObject.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Information used to pay using BLIK one-click flow.
|
||||
*/
|
||||
class BLIKOneClickPaymentObject implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $consumerReference;
|
||||
|
||||
/**
|
||||
* Returns Consumer Reference.
|
||||
* The merchant generated, unique reference serving as a primary identifier for accounts connected
|
||||
* between Blik and a merchant.
|
||||
*/
|
||||
public function getConsumerReference(): ?string
|
||||
{
|
||||
return $this->consumerReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Consumer Reference.
|
||||
* The merchant generated, unique reference serving as a primary identifier for accounts connected
|
||||
* between Blik and a merchant.
|
||||
*
|
||||
* @maps consumer_reference
|
||||
*/
|
||||
public function setConsumerReference(?string $consumerReference): void
|
||||
{
|
||||
$this->consumerReference = $consumerReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->consumerReference)) {
|
||||
$json['consumer_reference'] = $this->consumerReference;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
160
src/Models/BLIKOneClickPaymentRequest.php
Normal file
160
src/Models/BLIKOneClickPaymentRequest.php
Normal file
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Information used to pay using BLIK one-click flow.
|
||||
*/
|
||||
class BLIKOneClickPaymentRequest implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $authCode;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $consumerReference;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $aliasLabel;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $aliasKey;
|
||||
|
||||
/**
|
||||
* @param string $consumerReference
|
||||
*/
|
||||
public function __construct(string $consumerReference)
|
||||
{
|
||||
$this->consumerReference = $consumerReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Auth Code.
|
||||
* The 6-digit code used to authenticate a consumer within BLIK.
|
||||
*/
|
||||
public function getAuthCode(): ?string
|
||||
{
|
||||
return $this->authCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Auth Code.
|
||||
* The 6-digit code used to authenticate a consumer within BLIK.
|
||||
*
|
||||
* @maps auth_code
|
||||
*/
|
||||
public function setAuthCode(?string $authCode): void
|
||||
{
|
||||
$this->authCode = $authCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Consumer Reference.
|
||||
* The merchant generated, unique reference serving as a primary identifier for accounts connected
|
||||
* between Blik and a merchant.
|
||||
*/
|
||||
public function getConsumerReference(): string
|
||||
{
|
||||
return $this->consumerReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Consumer Reference.
|
||||
* The merchant generated, unique reference serving as a primary identifier for accounts connected
|
||||
* between Blik and a merchant.
|
||||
*
|
||||
* @required
|
||||
* @maps consumer_reference
|
||||
*/
|
||||
public function setConsumerReference(string $consumerReference): void
|
||||
{
|
||||
$this->consumerReference = $consumerReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Alias Label.
|
||||
* A bank defined identifier used as a display name to allow the payer to differentiate between
|
||||
* multiple registered bank accounts.
|
||||
*/
|
||||
public function getAliasLabel(): ?string
|
||||
{
|
||||
return $this->aliasLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Alias Label.
|
||||
* A bank defined identifier used as a display name to allow the payer to differentiate between
|
||||
* multiple registered bank accounts.
|
||||
*
|
||||
* @maps alias_label
|
||||
*/
|
||||
public function setAliasLabel(?string $aliasLabel): void
|
||||
{
|
||||
$this->aliasLabel = $aliasLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Alias Key.
|
||||
* A Blik-defined identifier for a specific Blik-enabled bank account that is associated with a given
|
||||
* merchant. Used only in conjunction with a Consumer Reference.
|
||||
*/
|
||||
public function getAliasKey(): ?string
|
||||
{
|
||||
return $this->aliasKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Alias Key.
|
||||
* A Blik-defined identifier for a specific Blik-enabled bank account that is associated with a given
|
||||
* merchant. Used only in conjunction with a Consumer Reference.
|
||||
*
|
||||
* @maps alias_key
|
||||
*/
|
||||
public function setAliasKey(?string $aliasKey): void
|
||||
{
|
||||
$this->aliasKey = $aliasKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->authCode)) {
|
||||
$json['auth_code'] = $this->authCode;
|
||||
}
|
||||
$json['consumer_reference'] = $this->consumerReference;
|
||||
if (isset($this->aliasLabel)) {
|
||||
$json['alias_label'] = $this->aliasLabel;
|
||||
}
|
||||
if (isset($this->aliasKey)) {
|
||||
$json['alias_key'] = $this->aliasKey;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
161
src/Models/BLIKPaymentObject.php
Normal file
161
src/Models/BLIKPaymentObject.php
Normal file
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Information used to pay using BLIK.
|
||||
*/
|
||||
class BLIKPaymentObject implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $countryCode;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $email;
|
||||
|
||||
/**
|
||||
* @var BLIKOneClickPaymentObject|null
|
||||
*/
|
||||
private $oneClick;
|
||||
|
||||
/**
|
||||
* Returns Name.
|
||||
* The full name representation like Mr J Smith.
|
||||
*/
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Name.
|
||||
* The full name representation like Mr J Smith.
|
||||
*
|
||||
* @maps name
|
||||
*/
|
||||
public function setName(?string $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Country Code.
|
||||
* The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country
|
||||
* or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code>
|
||||
* and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*/
|
||||
public function getCountryCode(): ?string
|
||||
{
|
||||
return $this->countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Country Code.
|
||||
* The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country
|
||||
* or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code>
|
||||
* and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*
|
||||
* @maps country_code
|
||||
*/
|
||||
public function setCountryCode(?string $countryCode): void
|
||||
{
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Email.
|
||||
* The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are
|
||||
* allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally
|
||||
* accepted maximum length for an email address is 254 characters. The pattern verifies that an
|
||||
* unquoted <code>@</code> sign exists.</blockquote>
|
||||
*/
|
||||
public function getEmail(): ?string
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Email.
|
||||
* The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are
|
||||
* allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally
|
||||
* accepted maximum length for an email address is 254 characters. The pattern verifies that an
|
||||
* unquoted <code>@</code> sign exists.</blockquote>
|
||||
*
|
||||
* @maps email
|
||||
*/
|
||||
public function setEmail(?string $email): void
|
||||
{
|
||||
$this->email = $email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns One Click.
|
||||
* Information used to pay using BLIK one-click flow.
|
||||
*/
|
||||
public function getOneClick(): ?BLIKOneClickPaymentObject
|
||||
{
|
||||
return $this->oneClick;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets One Click.
|
||||
* Information used to pay using BLIK one-click flow.
|
||||
*
|
||||
* @maps one_click
|
||||
*/
|
||||
public function setOneClick(?BLIKOneClickPaymentObject $oneClick): void
|
||||
{
|
||||
$this->oneClick = $oneClick;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->countryCode)) {
|
||||
$json['country_code'] = $this->countryCode;
|
||||
}
|
||||
if (isset($this->email)) {
|
||||
$json['email'] = $this->email;
|
||||
}
|
||||
if (isset($this->oneClick)) {
|
||||
$json['one_click'] = $this->oneClick;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
225
src/Models/BLIKPaymentRequest.php
Normal file
225
src/Models/BLIKPaymentRequest.php
Normal file
@@ -0,0 +1,225 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Information needed to pay using BLIK.
|
||||
*/
|
||||
class BLIKPaymentRequest implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $countryCode;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $email;
|
||||
|
||||
/**
|
||||
* @var BLIKExperienceContext|null
|
||||
*/
|
||||
private $experienceContext;
|
||||
|
||||
/**
|
||||
* @var BLIKLevel0PaymentObject|null
|
||||
*/
|
||||
private $level0;
|
||||
|
||||
/**
|
||||
* @var BLIKOneClickPaymentRequest|null
|
||||
*/
|
||||
private $oneClick;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $countryCode
|
||||
*/
|
||||
public function __construct(string $name, string $countryCode)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Name.
|
||||
* The full name representation like Mr J Smith.
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Name.
|
||||
* The full name representation like Mr J Smith.
|
||||
*
|
||||
* @required
|
||||
* @maps name
|
||||
*/
|
||||
public function setName(string $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Country Code.
|
||||
* The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country
|
||||
* or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code>
|
||||
* and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*/
|
||||
public function getCountryCode(): string
|
||||
{
|
||||
return $this->countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Country Code.
|
||||
* The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country
|
||||
* or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code>
|
||||
* and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*
|
||||
* @required
|
||||
* @maps country_code
|
||||
*/
|
||||
public function setCountryCode(string $countryCode): void
|
||||
{
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Email.
|
||||
* The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are
|
||||
* allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally
|
||||
* accepted maximum length for an email address is 254 characters. The pattern verifies that an
|
||||
* unquoted <code>@</code> sign exists.</blockquote>
|
||||
*/
|
||||
public function getEmail(): ?string
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Email.
|
||||
* The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are
|
||||
* allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally
|
||||
* accepted maximum length for an email address is 254 characters. The pattern verifies that an
|
||||
* unquoted <code>@</code> sign exists.</blockquote>
|
||||
*
|
||||
* @maps email
|
||||
*/
|
||||
public function setEmail(?string $email): void
|
||||
{
|
||||
$this->email = $email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Experience Context.
|
||||
* Customizes the payer experience during the approval process for the BLIK payment.
|
||||
*/
|
||||
public function getExperienceContext(): ?BLIKExperienceContext
|
||||
{
|
||||
return $this->experienceContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Experience Context.
|
||||
* Customizes the payer experience during the approval process for the BLIK payment.
|
||||
*
|
||||
* @maps experience_context
|
||||
*/
|
||||
public function setExperienceContext(?BLIKExperienceContext $experienceContext): void
|
||||
{
|
||||
$this->experienceContext = $experienceContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Level 0.
|
||||
* Information used to pay using BLIK level_0 flow.
|
||||
*/
|
||||
public function getLevel0(): ?BLIKLevel0PaymentObject
|
||||
{
|
||||
return $this->level0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Level 0.
|
||||
* Information used to pay using BLIK level_0 flow.
|
||||
*
|
||||
* @maps level_0
|
||||
*/
|
||||
public function setLevel0(?BLIKLevel0PaymentObject $level0): void
|
||||
{
|
||||
$this->level0 = $level0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns One Click.
|
||||
* Information used to pay using BLIK one-click flow.
|
||||
*/
|
||||
public function getOneClick(): ?BLIKOneClickPaymentRequest
|
||||
{
|
||||
return $this->oneClick;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets One Click.
|
||||
* Information used to pay using BLIK one-click flow.
|
||||
*
|
||||
* @maps one_click
|
||||
*/
|
||||
public function setOneClick(?BLIKOneClickPaymentRequest $oneClick): void
|
||||
{
|
||||
$this->oneClick = $oneClick;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 = [];
|
||||
$json['name'] = $this->name;
|
||||
$json['country_code'] = $this->countryCode;
|
||||
if (isset($this->email)) {
|
||||
$json['email'] = $this->email;
|
||||
}
|
||||
if (isset($this->experienceContext)) {
|
||||
$json['experience_context'] = $this->experienceContext;
|
||||
}
|
||||
if (isset($this->level0)) {
|
||||
$json['level_0'] = $this->level0;
|
||||
}
|
||||
if (isset($this->oneClick)) {
|
||||
$json['one_click'] = $this->oneClick;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
185
src/Models/BancontactPaymentObject.php
Normal file
185
src/Models/BancontactPaymentObject.php
Normal file
@@ -0,0 +1,185 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Information used to pay Bancontact.
|
||||
*/
|
||||
class BancontactPaymentObject implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $countryCode;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $bic;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $ibanLastChars;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $cardLastDigits;
|
||||
|
||||
/**
|
||||
* Returns Name.
|
||||
* The full name representation like Mr J Smith.
|
||||
*/
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Name.
|
||||
* The full name representation like Mr J Smith.
|
||||
*
|
||||
* @maps name
|
||||
*/
|
||||
public function setName(?string $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Country Code.
|
||||
* The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country
|
||||
* or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code>
|
||||
* and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*/
|
||||
public function getCountryCode(): ?string
|
||||
{
|
||||
return $this->countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Country Code.
|
||||
* The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country
|
||||
* or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code>
|
||||
* and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*
|
||||
* @maps country_code
|
||||
*/
|
||||
public function setCountryCode(?string $countryCode): void
|
||||
{
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Bic.
|
||||
* The business identification code (BIC). In payments systems, a BIC is used to identify a specific
|
||||
* business, most commonly a bank.
|
||||
*/
|
||||
public function getBic(): ?string
|
||||
{
|
||||
return $this->bic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Bic.
|
||||
* The business identification code (BIC). In payments systems, a BIC is used to identify a specific
|
||||
* business, most commonly a bank.
|
||||
*
|
||||
* @maps bic
|
||||
*/
|
||||
public function setBic(?string $bic): void
|
||||
{
|
||||
$this->bic = $bic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Iban Last Chars.
|
||||
* The last characters of the IBAN used to pay.
|
||||
*/
|
||||
public function getIbanLastChars(): ?string
|
||||
{
|
||||
return $this->ibanLastChars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Iban Last Chars.
|
||||
* The last characters of the IBAN used to pay.
|
||||
*
|
||||
* @maps iban_last_chars
|
||||
*/
|
||||
public function setIbanLastChars(?string $ibanLastChars): void
|
||||
{
|
||||
$this->ibanLastChars = $ibanLastChars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Card Last Digits.
|
||||
* The last digits of the card used to fund the Bancontact payment.
|
||||
*/
|
||||
public function getCardLastDigits(): ?string
|
||||
{
|
||||
return $this->cardLastDigits;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Card Last Digits.
|
||||
* The last digits of the card used to fund the Bancontact payment.
|
||||
*
|
||||
* @maps card_last_digits
|
||||
*/
|
||||
public function setCardLastDigits(?string $cardLastDigits): void
|
||||
{
|
||||
$this->cardLastDigits = $cardLastDigits;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->countryCode)) {
|
||||
$json['country_code'] = $this->countryCode;
|
||||
}
|
||||
if (isset($this->bic)) {
|
||||
$json['bic'] = $this->bic;
|
||||
}
|
||||
if (isset($this->ibanLastChars)) {
|
||||
$json['iban_last_chars'] = $this->ibanLastChars;
|
||||
}
|
||||
if (isset($this->cardLastDigits)) {
|
||||
$json['card_last_digits'] = $this->cardLastDigits;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
135
src/Models/BancontactPaymentRequest.php
Normal file
135
src/Models/BancontactPaymentRequest.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Information needed to pay using Bancontact.
|
||||
*/
|
||||
class BancontactPaymentRequest implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $countryCode;
|
||||
|
||||
/**
|
||||
* @var ExperienceContext|null
|
||||
*/
|
||||
private $experienceContext;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $countryCode
|
||||
*/
|
||||
public function __construct(string $name, string $countryCode)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Name.
|
||||
* The full name representation like Mr J Smith.
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Name.
|
||||
* The full name representation like Mr J Smith.
|
||||
*
|
||||
* @required
|
||||
* @maps name
|
||||
*/
|
||||
public function setName(string $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Country Code.
|
||||
* The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country
|
||||
* or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code>
|
||||
* and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*/
|
||||
public function getCountryCode(): string
|
||||
{
|
||||
return $this->countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Country Code.
|
||||
* The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country
|
||||
* or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code>
|
||||
* and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*
|
||||
* @required
|
||||
* @maps country_code
|
||||
*/
|
||||
public function setCountryCode(string $countryCode): void
|
||||
{
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Experience Context.
|
||||
* Customizes the payer experience during the approval process for the payment.
|
||||
*/
|
||||
public function getExperienceContext(): ?ExperienceContext
|
||||
{
|
||||
return $this->experienceContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Experience Context.
|
||||
* Customizes the payer experience during the approval process for the payment.
|
||||
*
|
||||
* @maps experience_context
|
||||
*/
|
||||
public function setExperienceContext(?ExperienceContext $experienceContext): void
|
||||
{
|
||||
$this->experienceContext = $experienceContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 = [];
|
||||
$json['name'] = $this->name;
|
||||
$json['country_code'] = $this->countryCode;
|
||||
if (isset($this->experienceContext)) {
|
||||
$json['experience_context'] = $this->experienceContext;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
163
src/Models/BinDetails.php
Normal file
163
src/Models/BinDetails.php
Normal file
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Bank Identification Number (BIN) details used to fund a payment.
|
||||
*/
|
||||
class BinDetails implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $bin;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $issuingBank;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $binCountryCode;
|
||||
|
||||
/**
|
||||
* @var string[]|null
|
||||
*/
|
||||
private $products;
|
||||
|
||||
/**
|
||||
* Returns Bin.
|
||||
* The Bank Identification Number (BIN) signifies the number that is being used to identify the
|
||||
* granular level details (except the PII information) of the card.
|
||||
*/
|
||||
public function getBin(): ?string
|
||||
{
|
||||
return $this->bin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Bin.
|
||||
* The Bank Identification Number (BIN) signifies the number that is being used to identify the
|
||||
* granular level details (except the PII information) of the card.
|
||||
*
|
||||
* @maps bin
|
||||
*/
|
||||
public function setBin(?string $bin): void
|
||||
{
|
||||
$this->bin = $bin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Issuing Bank.
|
||||
* The issuer of the card instrument.
|
||||
*/
|
||||
public function getIssuingBank(): ?string
|
||||
{
|
||||
return $this->issuingBank;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Issuing Bank.
|
||||
* The issuer of the card instrument.
|
||||
*
|
||||
* @maps issuing_bank
|
||||
*/
|
||||
public function setIssuingBank(?string $issuingBank): void
|
||||
{
|
||||
$this->issuingBank = $issuingBank;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Bin Country Code.
|
||||
* The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country
|
||||
* or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code>
|
||||
* and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*/
|
||||
public function getBinCountryCode(): ?string
|
||||
{
|
||||
return $this->binCountryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Bin Country Code.
|
||||
* The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country
|
||||
* or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code>
|
||||
* and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country
|
||||
* code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border
|
||||
* transactions.</blockquote>
|
||||
*
|
||||
* @maps bin_country_code
|
||||
*/
|
||||
public function setBinCountryCode(?string $binCountryCode): void
|
||||
{
|
||||
$this->binCountryCode = $binCountryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Products.
|
||||
* The type of card product assigned to the BIN by the issuer. These values are defined by the issuer
|
||||
* and may change over time. Some examples include: PREPAID_GIFT, CONSUMER, CORPORATE.
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getProducts(): ?array
|
||||
{
|
||||
return $this->products;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Products.
|
||||
* The type of card product assigned to the BIN by the issuer. These values are defined by the issuer
|
||||
* and may change over time. Some examples include: PREPAID_GIFT, CONSUMER, CORPORATE.
|
||||
*
|
||||
* @maps products
|
||||
*
|
||||
* @param string[]|null $products
|
||||
*/
|
||||
public function setProducts(?array $products): void
|
||||
{
|
||||
$this->products = $products;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->bin)) {
|
||||
$json['bin'] = $this->bin;
|
||||
}
|
||||
if (isset($this->issuingBank)) {
|
||||
$json['issuing_bank'] = $this->issuingBank;
|
||||
}
|
||||
if (isset($this->binCountryCode)) {
|
||||
$json['bin_country_code'] = $this->binCountryCode;
|
||||
}
|
||||
if (isset($this->products)) {
|
||||
$json['products'] = $this->products;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
66
src/Models/Builders/ActivityTimestampsBuilder.php
Normal file
66
src/Models/Builders/ActivityTimestampsBuilder.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ActivityTimestamps;
|
||||
|
||||
/**
|
||||
* Builder for model ActivityTimestamps
|
||||
*
|
||||
* @see ActivityTimestamps
|
||||
*/
|
||||
class ActivityTimestampsBuilder
|
||||
{
|
||||
/**
|
||||
* @var ActivityTimestamps
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ActivityTimestamps $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new activity timestamps Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new ActivityTimestamps());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets create time field.
|
||||
*/
|
||||
public function createTime(?string $value): self
|
||||
{
|
||||
$this->instance->setCreateTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets update time field.
|
||||
*/
|
||||
public function updateTime(?string $value): self
|
||||
{
|
||||
$this->instance->setUpdateTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new activity timestamps object.
|
||||
*/
|
||||
public function build(): ActivityTimestamps
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
93
src/Models/Builders/AddressBuilder.php
Normal file
93
src/Models/Builders/AddressBuilder.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\Address;
|
||||
|
||||
/**
|
||||
* Builder for model Address
|
||||
*
|
||||
* @see Address
|
||||
*/
|
||||
class AddressBuilder
|
||||
{
|
||||
/**
|
||||
* @var Address
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(Address $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new address Builder object.
|
||||
*/
|
||||
public static function init(string $countryCode): self
|
||||
{
|
||||
return new self(new Address($countryCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets address line 1 field.
|
||||
*/
|
||||
public function addressLine1(?string $value): self
|
||||
{
|
||||
$this->instance->setAddressLine1($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets address line 2 field.
|
||||
*/
|
||||
public function addressLine2(?string $value): self
|
||||
{
|
||||
$this->instance->setAddressLine2($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets admin area 2 field.
|
||||
*/
|
||||
public function adminArea2(?string $value): self
|
||||
{
|
||||
$this->instance->setAdminArea2($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets admin area 1 field.
|
||||
*/
|
||||
public function adminArea1(?string $value): self
|
||||
{
|
||||
$this->instance->setAdminArea1($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets postal code field.
|
||||
*/
|
||||
public function postalCode(?string $value): self
|
||||
{
|
||||
$this->instance->setPostalCode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new address object.
|
||||
*/
|
||||
public function build(): Address
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
140
src/Models/Builders/AddressDetailsBuilder.php
Normal file
140
src/Models/Builders/AddressDetailsBuilder.php
Normal file
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\AddressDetails;
|
||||
use PaypalServerSDKLib\Models\Name;
|
||||
use PaypalServerSDKLib\Models\Phone;
|
||||
|
||||
/**
|
||||
* Builder for model AddressDetails
|
||||
*
|
||||
* @see AddressDetails
|
||||
*/
|
||||
class AddressDetailsBuilder
|
||||
{
|
||||
/**
|
||||
* @var AddressDetails
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(AddressDetails $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new address details Builder object.
|
||||
*/
|
||||
public static function init(string $countryCode): self
|
||||
{
|
||||
return new self(new AddressDetails($countryCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets address line 1 field.
|
||||
*/
|
||||
public function addressLine1(?string $value): self
|
||||
{
|
||||
$this->instance->setAddressLine1($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets address line 2 field.
|
||||
*/
|
||||
public function addressLine2(?string $value): self
|
||||
{
|
||||
$this->instance->setAddressLine2($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets admin area 2 field.
|
||||
*/
|
||||
public function adminArea2(?string $value): self
|
||||
{
|
||||
$this->instance->setAdminArea2($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets admin area 1 field.
|
||||
*/
|
||||
public function adminArea1(?string $value): self
|
||||
{
|
||||
$this->instance->setAdminArea1($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets postal code field.
|
||||
*/
|
||||
public function postalCode(?string $value): self
|
||||
{
|
||||
$this->instance->setPostalCode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?Name $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets company field.
|
||||
*/
|
||||
public function company(?string $value): self
|
||||
{
|
||||
$this->instance->setCompany($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets phone field.
|
||||
*/
|
||||
public function phone(?string $value): self
|
||||
{
|
||||
$this->instance->setPhone($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets phone number field.
|
||||
*/
|
||||
public function phoneNumber(?Phone $value): self
|
||||
{
|
||||
$this->instance->setPhoneNumber($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new address details object.
|
||||
*/
|
||||
public function build(): AddressDetails
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
112
src/Models/Builders/AmountBreakdownBuilder.php
Normal file
112
src/Models/Builders/AmountBreakdownBuilder.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\AmountBreakdown;
|
||||
use PaypalServerSDKLib\Models\Money;
|
||||
|
||||
/**
|
||||
* Builder for model AmountBreakdown
|
||||
*
|
||||
* @see AmountBreakdown
|
||||
*/
|
||||
class AmountBreakdownBuilder
|
||||
{
|
||||
/**
|
||||
* @var AmountBreakdown
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(AmountBreakdown $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new amount breakdown Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new AmountBreakdown());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets item total field.
|
||||
*/
|
||||
public function itemTotal(?Money $value): self
|
||||
{
|
||||
$this->instance->setItemTotal($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets shipping field.
|
||||
*/
|
||||
public function shipping(?Money $value): self
|
||||
{
|
||||
$this->instance->setShipping($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets handling field.
|
||||
*/
|
||||
public function handling(?Money $value): self
|
||||
{
|
||||
$this->instance->setHandling($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets tax total field.
|
||||
*/
|
||||
public function taxTotal(?Money $value): self
|
||||
{
|
||||
$this->instance->setTaxTotal($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets insurance field.
|
||||
*/
|
||||
public function insurance(?Money $value): self
|
||||
{
|
||||
$this->instance->setInsurance($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets shipping discount field.
|
||||
*/
|
||||
public function shippingDiscount(?Money $value): self
|
||||
{
|
||||
$this->instance->setShippingDiscount($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets discount field.
|
||||
*/
|
||||
public function discount(?Money $value): self
|
||||
{
|
||||
$this->instance->setDiscount($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new amount breakdown object.
|
||||
*/
|
||||
public function build(): AmountBreakdown
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
58
src/Models/Builders/AmountWithBreakdownBuilder.php
Normal file
58
src/Models/Builders/AmountWithBreakdownBuilder.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\AmountBreakdown;
|
||||
use PaypalServerSDKLib\Models\AmountWithBreakdown;
|
||||
|
||||
/**
|
||||
* Builder for model AmountWithBreakdown
|
||||
*
|
||||
* @see AmountWithBreakdown
|
||||
*/
|
||||
class AmountWithBreakdownBuilder
|
||||
{
|
||||
/**
|
||||
* @var AmountWithBreakdown
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(AmountWithBreakdown $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new amount with breakdown Builder object.
|
||||
*/
|
||||
public static function init(string $currencyCode, string $value): self
|
||||
{
|
||||
return new self(new AmountWithBreakdown($currencyCode, $value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets breakdown field.
|
||||
*/
|
||||
public function breakdown(?AmountBreakdown $value): self
|
||||
{
|
||||
$this->instance->setBreakdown($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new amount with breakdown object.
|
||||
*/
|
||||
public function build(): AmountWithBreakdown
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
68
src/Models/Builders/ApplePayAttributesBuilder.php
Normal file
68
src/Models/Builders/ApplePayAttributesBuilder.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ApplePayAttributes;
|
||||
use PaypalServerSDKLib\Models\CustomerInformation;
|
||||
use PaypalServerSDKLib\Models\VaultInstruction;
|
||||
|
||||
/**
|
||||
* Builder for model ApplePayAttributes
|
||||
*
|
||||
* @see ApplePayAttributes
|
||||
*/
|
||||
class ApplePayAttributesBuilder
|
||||
{
|
||||
/**
|
||||
* @var ApplePayAttributes
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ApplePayAttributes $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay attributes Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new ApplePayAttributes());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets customer field.
|
||||
*/
|
||||
public function customer(?CustomerInformation $value): self
|
||||
{
|
||||
$this->instance->setCustomer($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets vault field.
|
||||
*/
|
||||
public function vault(?VaultInstruction $value): self
|
||||
{
|
||||
$this->instance->setVault($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay attributes object.
|
||||
*/
|
||||
public function build(): ApplePayAttributes
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
58
src/Models/Builders/ApplePayAttributesResponseBuilder.php
Normal file
58
src/Models/Builders/ApplePayAttributesResponseBuilder.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ApplePayAttributesResponse;
|
||||
use PaypalServerSDKLib\Models\VaultResponse;
|
||||
|
||||
/**
|
||||
* Builder for model ApplePayAttributesResponse
|
||||
*
|
||||
* @see ApplePayAttributesResponse
|
||||
*/
|
||||
class ApplePayAttributesResponseBuilder
|
||||
{
|
||||
/**
|
||||
* @var ApplePayAttributesResponse
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ApplePayAttributesResponse $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay attributes response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new ApplePayAttributesResponse());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets vault field.
|
||||
*/
|
||||
public function vault(?VaultResponse $value): self
|
||||
{
|
||||
$this->instance->setVault($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay attributes response object.
|
||||
*/
|
||||
public function build(): ApplePayAttributesResponse
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
94
src/Models/Builders/ApplePayCardBuilder.php
Normal file
94
src/Models/Builders/ApplePayCardBuilder.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\Address;
|
||||
use PaypalServerSDKLib\Models\ApplePayCard;
|
||||
|
||||
/**
|
||||
* Builder for model ApplePayCard
|
||||
*
|
||||
* @see ApplePayCard
|
||||
*/
|
||||
class ApplePayCardBuilder
|
||||
{
|
||||
/**
|
||||
* @var ApplePayCard
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ApplePayCard $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay card Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new ApplePayCard());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets last digits field.
|
||||
*/
|
||||
public function lastDigits(?string $value): self
|
||||
{
|
||||
$this->instance->setLastDigits($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type field.
|
||||
*/
|
||||
public function type(?string $value): self
|
||||
{
|
||||
$this->instance->setType($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets brand field.
|
||||
*/
|
||||
public function brand(?string $value): self
|
||||
{
|
||||
$this->instance->setBrand($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets billing address field.
|
||||
*/
|
||||
public function billingAddress(?Address $value): self
|
||||
{
|
||||
$this->instance->setBillingAddress($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay card object.
|
||||
*/
|
||||
public function build(): ApplePayCard
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
161
src/Models/Builders/ApplePayCardResponseBuilder.php
Normal file
161
src/Models/Builders/ApplePayCardResponseBuilder.php
Normal file
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\Address;
|
||||
use PaypalServerSDKLib\Models\ApplePayCardResponse;
|
||||
use PaypalServerSDKLib\Models\AuthenticationResponse;
|
||||
use PaypalServerSDKLib\Models\BinDetails;
|
||||
use PaypalServerSDKLib\Models\CardAttributesResponse;
|
||||
use PaypalServerSDKLib\Models\CardFromRequest;
|
||||
|
||||
/**
|
||||
* Builder for model ApplePayCardResponse
|
||||
*
|
||||
* @see ApplePayCardResponse
|
||||
*/
|
||||
class ApplePayCardResponseBuilder
|
||||
{
|
||||
/**
|
||||
* @var ApplePayCardResponse
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ApplePayCardResponse $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay card response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new ApplePayCardResponse());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets last digits field.
|
||||
*/
|
||||
public function lastDigits(?string $value): self
|
||||
{
|
||||
$this->instance->setLastDigits($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets brand field.
|
||||
*/
|
||||
public function brand(?string $value): self
|
||||
{
|
||||
$this->instance->setBrand($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets available networks field.
|
||||
*/
|
||||
public function availableNetworks(?array $value): self
|
||||
{
|
||||
$this->instance->setAvailableNetworks($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type field.
|
||||
*/
|
||||
public function type(?string $value): self
|
||||
{
|
||||
$this->instance->setType($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets authentication result field.
|
||||
*/
|
||||
public function authenticationResult(?AuthenticationResponse $value): self
|
||||
{
|
||||
$this->instance->setAuthenticationResult($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets attributes field.
|
||||
*/
|
||||
public function attributes(?CardAttributesResponse $value): self
|
||||
{
|
||||
$this->instance->setAttributes($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets from request field.
|
||||
*/
|
||||
public function fromRequest(?CardFromRequest $value): self
|
||||
{
|
||||
$this->instance->setFromRequest($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
$this->instance->setExpiry($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bin details field.
|
||||
*/
|
||||
public function binDetails(?BinDetails $value): self
|
||||
{
|
||||
$this->instance->setBinDetails($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets billing address field.
|
||||
*/
|
||||
public function billingAddress(?Address $value): self
|
||||
{
|
||||
$this->instance->setBillingAddress($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets country code field.
|
||||
*/
|
||||
public function countryCode(?string $value): self
|
||||
{
|
||||
$this->instance->setCountryCode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay card response object.
|
||||
*/
|
||||
public function build(): ApplePayCardResponse
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
87
src/Models/Builders/ApplePayDecryptedTokenDataBuilder.php
Normal file
87
src/Models/Builders/ApplePayDecryptedTokenDataBuilder.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ApplePayDecryptedTokenData;
|
||||
use PaypalServerSDKLib\Models\ApplePayPaymentData;
|
||||
use PaypalServerSDKLib\Models\ApplePayTokenizedCard;
|
||||
use PaypalServerSDKLib\Models\Money;
|
||||
|
||||
/**
|
||||
* Builder for model ApplePayDecryptedTokenData
|
||||
*
|
||||
* @see ApplePayDecryptedTokenData
|
||||
*/
|
||||
class ApplePayDecryptedTokenDataBuilder
|
||||
{
|
||||
/**
|
||||
* @var ApplePayDecryptedTokenData
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ApplePayDecryptedTokenData $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay decrypted token data Builder object.
|
||||
*/
|
||||
public static function init(ApplePayTokenizedCard $tokenizedCard): self
|
||||
{
|
||||
return new self(new ApplePayDecryptedTokenData($tokenizedCard));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets transaction amount field.
|
||||
*/
|
||||
public function transactionAmount(?Money $value): self
|
||||
{
|
||||
$this->instance->setTransactionAmount($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets device manufacturer id field.
|
||||
*/
|
||||
public function deviceManufacturerId(?string $value): self
|
||||
{
|
||||
$this->instance->setDeviceManufacturerId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets payment data type field.
|
||||
*/
|
||||
public function paymentDataType(?string $value): self
|
||||
{
|
||||
$this->instance->setPaymentDataType($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets payment data field.
|
||||
*/
|
||||
public function paymentData(?ApplePayPaymentData $value): self
|
||||
{
|
||||
$this->instance->setPaymentData($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay decrypted token data object.
|
||||
*/
|
||||
public function build(): ApplePayDecryptedTokenData
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
84
src/Models/Builders/ApplePayPaymentDataBuilder.php
Normal file
84
src/Models/Builders/ApplePayPaymentDataBuilder.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ApplePayPaymentData;
|
||||
|
||||
/**
|
||||
* Builder for model ApplePayPaymentData
|
||||
*
|
||||
* @see ApplePayPaymentData
|
||||
*/
|
||||
class ApplePayPaymentDataBuilder
|
||||
{
|
||||
/**
|
||||
* @var ApplePayPaymentData
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ApplePayPaymentData $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay payment data Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new ApplePayPaymentData());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets cryptogram field.
|
||||
*/
|
||||
public function cryptogram(?string $value): self
|
||||
{
|
||||
$this->instance->setCryptogram($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets eci indicator field.
|
||||
*/
|
||||
public function eciIndicator(?string $value): self
|
||||
{
|
||||
$this->instance->setEciIndicator($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets emv data field.
|
||||
*/
|
||||
public function emvData(?string $value): self
|
||||
{
|
||||
$this->instance->setEmvData($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets pin field.
|
||||
*/
|
||||
public function pin(?string $value): self
|
||||
{
|
||||
$this->instance->setPin($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay payment data object.
|
||||
*/
|
||||
public function build(): ApplePayPaymentData
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
114
src/Models/Builders/ApplePayPaymentObjectBuilder.php
Normal file
114
src/Models/Builders/ApplePayPaymentObjectBuilder.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ApplePayAttributesResponse;
|
||||
use PaypalServerSDKLib\Models\ApplePayCardResponse;
|
||||
use PaypalServerSDKLib\Models\ApplePayPaymentObject;
|
||||
use PaypalServerSDKLib\Models\PhoneNumber;
|
||||
|
||||
/**
|
||||
* Builder for model ApplePayPaymentObject
|
||||
*
|
||||
* @see ApplePayPaymentObject
|
||||
*/
|
||||
class ApplePayPaymentObjectBuilder
|
||||
{
|
||||
/**
|
||||
* @var ApplePayPaymentObject
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ApplePayPaymentObject $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay payment object Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new ApplePayPaymentObject());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets token field.
|
||||
*/
|
||||
public function token(?string $value): self
|
||||
{
|
||||
$this->instance->setToken($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets email address field.
|
||||
*/
|
||||
public function emailAddress(?string $value): self
|
||||
{
|
||||
$this->instance->setEmailAddress($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets phone number field.
|
||||
*/
|
||||
public function phoneNumber(?PhoneNumber $value): self
|
||||
{
|
||||
$this->instance->setPhoneNumber($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets card field.
|
||||
*/
|
||||
public function card(?ApplePayCardResponse $value): self
|
||||
{
|
||||
$this->instance->setCard($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets attributes field.
|
||||
*/
|
||||
public function attributes(?ApplePayAttributesResponse $value): self
|
||||
{
|
||||
$this->instance->setAttributes($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay payment object object.
|
||||
*/
|
||||
public function build(): ApplePayPaymentObject
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
58
src/Models/Builders/ApplePayPaymentTokenBuilder.php
Normal file
58
src/Models/Builders/ApplePayPaymentTokenBuilder.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ApplePayCard;
|
||||
use PaypalServerSDKLib\Models\ApplePayPaymentToken;
|
||||
|
||||
/**
|
||||
* Builder for model ApplePayPaymentToken
|
||||
*
|
||||
* @see ApplePayPaymentToken
|
||||
*/
|
||||
class ApplePayPaymentTokenBuilder
|
||||
{
|
||||
/**
|
||||
* @var ApplePayPaymentToken
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ApplePayPaymentToken $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay payment token Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new ApplePayPaymentToken());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets card field.
|
||||
*/
|
||||
public function card(?ApplePayCard $value): self
|
||||
{
|
||||
$this->instance->setCard($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay payment token object.
|
||||
*/
|
||||
public function build(): ApplePayPaymentToken
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
124
src/Models/Builders/ApplePayRequestBuilder.php
Normal file
124
src/Models/Builders/ApplePayRequestBuilder.php
Normal file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ApplePayAttributes;
|
||||
use PaypalServerSDKLib\Models\ApplePayDecryptedTokenData;
|
||||
use PaypalServerSDKLib\Models\ApplePayRequest;
|
||||
use PaypalServerSDKLib\Models\CardStoredCredential;
|
||||
use PaypalServerSDKLib\Models\PhoneNumber;
|
||||
|
||||
/**
|
||||
* Builder for model ApplePayRequest
|
||||
*
|
||||
* @see ApplePayRequest
|
||||
*/
|
||||
class ApplePayRequestBuilder
|
||||
{
|
||||
/**
|
||||
* @var ApplePayRequest
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ApplePayRequest $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay request Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new ApplePayRequest());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets email address field.
|
||||
*/
|
||||
public function emailAddress(?string $value): self
|
||||
{
|
||||
$this->instance->setEmailAddress($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets phone number field.
|
||||
*/
|
||||
public function phoneNumber(?PhoneNumber $value): self
|
||||
{
|
||||
$this->instance->setPhoneNumber($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets decrypted token field.
|
||||
*/
|
||||
public function decryptedToken(?ApplePayDecryptedTokenData $value): self
|
||||
{
|
||||
$this->instance->setDecryptedToken($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets stored credential field.
|
||||
*/
|
||||
public function storedCredential(?CardStoredCredential $value): self
|
||||
{
|
||||
$this->instance->setStoredCredential($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets vault id field.
|
||||
*/
|
||||
public function vaultId(?string $value): self
|
||||
{
|
||||
$this->instance->setVaultId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets attributes field.
|
||||
*/
|
||||
public function attributes(?ApplePayAttributes $value): self
|
||||
{
|
||||
$this->instance->setAttributes($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay request object.
|
||||
*/
|
||||
public function build(): ApplePayRequest
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
112
src/Models/Builders/ApplePayTokenizedCardBuilder.php
Normal file
112
src/Models/Builders/ApplePayTokenizedCardBuilder.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\Address;
|
||||
use PaypalServerSDKLib\Models\ApplePayTokenizedCard;
|
||||
|
||||
/**
|
||||
* Builder for model ApplePayTokenizedCard
|
||||
*
|
||||
* @see ApplePayTokenizedCard
|
||||
*/
|
||||
class ApplePayTokenizedCardBuilder
|
||||
{
|
||||
/**
|
||||
* @var ApplePayTokenizedCard
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ApplePayTokenizedCard $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay tokenized card Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new ApplePayTokenizedCard());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets number field.
|
||||
*/
|
||||
public function number(?string $value): self
|
||||
{
|
||||
$this->instance->setNumber($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
$this->instance->setExpiry($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets card type field.
|
||||
*/
|
||||
public function cardType(?string $value): self
|
||||
{
|
||||
$this->instance->setCardType($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type field.
|
||||
*/
|
||||
public function type(?string $value): self
|
||||
{
|
||||
$this->instance->setType($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets brand field.
|
||||
*/
|
||||
public function brand(?string $value): self
|
||||
{
|
||||
$this->instance->setBrand($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets billing address field.
|
||||
*/
|
||||
public function billingAddress(?Address $value): self
|
||||
{
|
||||
$this->instance->setBillingAddress($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay tokenized card object.
|
||||
*/
|
||||
public function build(): ApplePayTokenizedCard
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
66
src/Models/Builders/AssuranceDetailsBuilder.php
Normal file
66
src/Models/Builders/AssuranceDetailsBuilder.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\AssuranceDetails;
|
||||
|
||||
/**
|
||||
* Builder for model AssuranceDetails
|
||||
*
|
||||
* @see AssuranceDetails
|
||||
*/
|
||||
class AssuranceDetailsBuilder
|
||||
{
|
||||
/**
|
||||
* @var AssuranceDetails
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(AssuranceDetails $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new assurance details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new AssuranceDetails());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets account verified field.
|
||||
*/
|
||||
public function accountVerified(?bool $value): self
|
||||
{
|
||||
$this->instance->setAccountVerified($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets card holder authenticated field.
|
||||
*/
|
||||
public function cardHolderAuthenticated(?bool $value): self
|
||||
{
|
||||
$this->instance->setCardHolderAuthenticated($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new assurance details object.
|
||||
*/
|
||||
public function build(): AssuranceDetails
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
67
src/Models/Builders/AuthenticationResponseBuilder.php
Normal file
67
src/Models/Builders/AuthenticationResponseBuilder.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\AuthenticationResponse;
|
||||
use PaypalServerSDKLib\Models\ThreeDSecureAuthenticationResponse;
|
||||
|
||||
/**
|
||||
* Builder for model AuthenticationResponse
|
||||
*
|
||||
* @see AuthenticationResponse
|
||||
*/
|
||||
class AuthenticationResponseBuilder
|
||||
{
|
||||
/**
|
||||
* @var AuthenticationResponse
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(AuthenticationResponse $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authentication response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new AuthenticationResponse());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets liability shift field.
|
||||
*/
|
||||
public function liabilityShift(?string $value): self
|
||||
{
|
||||
$this->instance->setLiabilityShift($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets three d secure field.
|
||||
*/
|
||||
public function threeDSecure(?ThreeDSecureAuthenticationResponse $value): self
|
||||
{
|
||||
$this->instance->setThreeDSecure($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authentication response object.
|
||||
*/
|
||||
public function build(): AuthenticationResponse
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
160
src/Models/Builders/AuthorizationBuilder.php
Normal file
160
src/Models/Builders/AuthorizationBuilder.php
Normal file
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\Authorization;
|
||||
use PaypalServerSDKLib\Models\AuthorizationStatusDetails;
|
||||
use PaypalServerSDKLib\Models\Money;
|
||||
use PaypalServerSDKLib\Models\NetworkTransactionReference;
|
||||
use PaypalServerSDKLib\Models\SellerProtection;
|
||||
|
||||
/**
|
||||
* Builder for model Authorization
|
||||
*
|
||||
* @see Authorization
|
||||
*/
|
||||
class AuthorizationBuilder
|
||||
{
|
||||
/**
|
||||
* @var Authorization
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(Authorization $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new Authorization());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
$this->instance->setStatus($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status details field.
|
||||
*/
|
||||
public function statusDetails(?AuthorizationStatusDetails $value): self
|
||||
{
|
||||
$this->instance->setStatusDetails($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
$this->instance->setAmount($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets invoice id field.
|
||||
*/
|
||||
public function invoiceId(?string $value): self
|
||||
{
|
||||
$this->instance->setInvoiceId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets custom id field.
|
||||
*/
|
||||
public function customId(?string $value): self
|
||||
{
|
||||
$this->instance->setCustomId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets network transaction reference field.
|
||||
*/
|
||||
public function networkTransactionReference(?NetworkTransactionReference $value): self
|
||||
{
|
||||
$this->instance->setNetworkTransactionReference($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets seller protection field.
|
||||
*/
|
||||
public function sellerProtection(?SellerProtection $value): self
|
||||
{
|
||||
$this->instance->setSellerProtection($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets expiration time field.
|
||||
*/
|
||||
public function expirationTime(?string $value): self
|
||||
{
|
||||
$this->instance->setExpirationTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
$this->instance->setLinks($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets create time field.
|
||||
*/
|
||||
public function createTime(?string $value): self
|
||||
{
|
||||
$this->instance->setCreateTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets update time field.
|
||||
*/
|
||||
public function updateTime(?string $value): self
|
||||
{
|
||||
$this->instance->setUpdateTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization object.
|
||||
*/
|
||||
public function build(): Authorization
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
57
src/Models/Builders/AuthorizationStatusDetailsBuilder.php
Normal file
57
src/Models/Builders/AuthorizationStatusDetailsBuilder.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\AuthorizationStatusDetails;
|
||||
|
||||
/**
|
||||
* Builder for model AuthorizationStatusDetails
|
||||
*
|
||||
* @see AuthorizationStatusDetails
|
||||
*/
|
||||
class AuthorizationStatusDetailsBuilder
|
||||
{
|
||||
/**
|
||||
* @var AuthorizationStatusDetails
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(AuthorizationStatusDetails $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization status details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new AuthorizationStatusDetails());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets reason field.
|
||||
*/
|
||||
public function reason(?string $value): self
|
||||
{
|
||||
$this->instance->setReason($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization status details object.
|
||||
*/
|
||||
public function build(): AuthorizationStatusDetails
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\AuthorizationStatusDetails;
|
||||
use PaypalServerSDKLib\Models\AuthorizationStatusWithDetails;
|
||||
|
||||
/**
|
||||
* Builder for model AuthorizationStatusWithDetails
|
||||
*
|
||||
* @see AuthorizationStatusWithDetails
|
||||
*/
|
||||
class AuthorizationStatusWithDetailsBuilder
|
||||
{
|
||||
/**
|
||||
* @var AuthorizationStatusWithDetails
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(AuthorizationStatusWithDetails $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization status with details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new AuthorizationStatusWithDetails());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
$this->instance->setStatus($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status details field.
|
||||
*/
|
||||
public function statusDetails(?AuthorizationStatusDetails $value): self
|
||||
{
|
||||
$this->instance->setStatusDetails($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization status with details object.
|
||||
*/
|
||||
public function build(): AuthorizationStatusWithDetails
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
170
src/Models/Builders/AuthorizationWithAdditionalDataBuilder.php
Normal file
170
src/Models/Builders/AuthorizationWithAdditionalDataBuilder.php
Normal file
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\AuthorizationStatusDetails;
|
||||
use PaypalServerSDKLib\Models\AuthorizationWithAdditionalData;
|
||||
use PaypalServerSDKLib\Models\Money;
|
||||
use PaypalServerSDKLib\Models\NetworkTransactionReference;
|
||||
use PaypalServerSDKLib\Models\ProcessorResponse;
|
||||
use PaypalServerSDKLib\Models\SellerProtection;
|
||||
|
||||
/**
|
||||
* Builder for model AuthorizationWithAdditionalData
|
||||
*
|
||||
* @see AuthorizationWithAdditionalData
|
||||
*/
|
||||
class AuthorizationWithAdditionalDataBuilder
|
||||
{
|
||||
/**
|
||||
* @var AuthorizationWithAdditionalData
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(AuthorizationWithAdditionalData $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization with additional data Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new AuthorizationWithAdditionalData());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
$this->instance->setStatus($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status details field.
|
||||
*/
|
||||
public function statusDetails(?AuthorizationStatusDetails $value): self
|
||||
{
|
||||
$this->instance->setStatusDetails($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
$this->instance->setAmount($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets invoice id field.
|
||||
*/
|
||||
public function invoiceId(?string $value): self
|
||||
{
|
||||
$this->instance->setInvoiceId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets custom id field.
|
||||
*/
|
||||
public function customId(?string $value): self
|
||||
{
|
||||
$this->instance->setCustomId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets network transaction reference field.
|
||||
*/
|
||||
public function networkTransactionReference(?NetworkTransactionReference $value): self
|
||||
{
|
||||
$this->instance->setNetworkTransactionReference($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets seller protection field.
|
||||
*/
|
||||
public function sellerProtection(?SellerProtection $value): self
|
||||
{
|
||||
$this->instance->setSellerProtection($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets expiration time field.
|
||||
*/
|
||||
public function expirationTime(?string $value): self
|
||||
{
|
||||
$this->instance->setExpirationTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
$this->instance->setLinks($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets create time field.
|
||||
*/
|
||||
public function createTime(?string $value): self
|
||||
{
|
||||
$this->instance->setCreateTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets update time field.
|
||||
*/
|
||||
public function updateTime(?string $value): self
|
||||
{
|
||||
$this->instance->setUpdateTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets processor response field.
|
||||
*/
|
||||
public function processorResponse(?ProcessorResponse $value): self
|
||||
{
|
||||
$this->instance->setProcessorResponse($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization with additional data object.
|
||||
*/
|
||||
public function build(): AuthorizationWithAdditionalData
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
111
src/Models/Builders/BLIKExperienceContextBuilder.php
Normal file
111
src/Models/Builders/BLIKExperienceContextBuilder.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\BLIKExperienceContext;
|
||||
|
||||
/**
|
||||
* Builder for model BLIKExperienceContext
|
||||
*
|
||||
* @see BLIKExperienceContext
|
||||
*/
|
||||
class BLIKExperienceContextBuilder
|
||||
{
|
||||
/**
|
||||
* @var BLIKExperienceContext
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(BLIKExperienceContext $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blikexperience context Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new BLIKExperienceContext());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets brand name field.
|
||||
*/
|
||||
public function brandName(?string $value): self
|
||||
{
|
||||
$this->instance->setBrandName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets locale field.
|
||||
*/
|
||||
public function locale(?string $value): self
|
||||
{
|
||||
$this->instance->setLocale($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets shipping preference field.
|
||||
*/
|
||||
public function shippingPreference(?string $value): self
|
||||
{
|
||||
$this->instance->setShippingPreference($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets return url field.
|
||||
*/
|
||||
public function returnUrl(?string $value): self
|
||||
{
|
||||
$this->instance->setReturnUrl($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets cancel url field.
|
||||
*/
|
||||
public function cancelUrl(?string $value): self
|
||||
{
|
||||
$this->instance->setCancelUrl($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets consumer ip field.
|
||||
*/
|
||||
public function consumerIp(?string $value): self
|
||||
{
|
||||
$this->instance->setConsumerIp($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets consumer user agent field.
|
||||
*/
|
||||
public function consumerUserAgent(?string $value): self
|
||||
{
|
||||
$this->instance->setConsumerUserAgent($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blikexperience context object.
|
||||
*/
|
||||
public function build(): BLIKExperienceContext
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
48
src/Models/Builders/BLIKLevel0PaymentObjectBuilder.php
Normal file
48
src/Models/Builders/BLIKLevel0PaymentObjectBuilder.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\BLIKLevel0PaymentObject;
|
||||
|
||||
/**
|
||||
* Builder for model BLIKLevel0PaymentObject
|
||||
*
|
||||
* @see BLIKLevel0PaymentObject
|
||||
*/
|
||||
class BLIKLevel0PaymentObjectBuilder
|
||||
{
|
||||
/**
|
||||
* @var BLIKLevel0PaymentObject
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(BLIKLevel0PaymentObject $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bliklevel 0 payment object Builder object.
|
||||
*/
|
||||
public static function init(string $authCode): self
|
||||
{
|
||||
return new self(new BLIKLevel0PaymentObject($authCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bliklevel 0 payment object object.
|
||||
*/
|
||||
public function build(): BLIKLevel0PaymentObject
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
57
src/Models/Builders/BLIKOneClickPaymentObjectBuilder.php
Normal file
57
src/Models/Builders/BLIKOneClickPaymentObjectBuilder.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\BLIKOneClickPaymentObject;
|
||||
|
||||
/**
|
||||
* Builder for model BLIKOneClickPaymentObject
|
||||
*
|
||||
* @see BLIKOneClickPaymentObject
|
||||
*/
|
||||
class BLIKOneClickPaymentObjectBuilder
|
||||
{
|
||||
/**
|
||||
* @var BLIKOneClickPaymentObject
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(BLIKOneClickPaymentObject $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blikone click payment object Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new BLIKOneClickPaymentObject());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets consumer reference field.
|
||||
*/
|
||||
public function consumerReference(?string $value): self
|
||||
{
|
||||
$this->instance->setConsumerReference($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blikone click payment object object.
|
||||
*/
|
||||
public function build(): BLIKOneClickPaymentObject
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
75
src/Models/Builders/BLIKOneClickPaymentRequestBuilder.php
Normal file
75
src/Models/Builders/BLIKOneClickPaymentRequestBuilder.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\BLIKOneClickPaymentRequest;
|
||||
|
||||
/**
|
||||
* Builder for model BLIKOneClickPaymentRequest
|
||||
*
|
||||
* @see BLIKOneClickPaymentRequest
|
||||
*/
|
||||
class BLIKOneClickPaymentRequestBuilder
|
||||
{
|
||||
/**
|
||||
* @var BLIKOneClickPaymentRequest
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(BLIKOneClickPaymentRequest $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blikone click payment request Builder object.
|
||||
*/
|
||||
public static function init(string $consumerReference): self
|
||||
{
|
||||
return new self(new BLIKOneClickPaymentRequest($consumerReference));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets auth code field.
|
||||
*/
|
||||
public function authCode(?string $value): self
|
||||
{
|
||||
$this->instance->setAuthCode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets alias label field.
|
||||
*/
|
||||
public function aliasLabel(?string $value): self
|
||||
{
|
||||
$this->instance->setAliasLabel($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets alias key field.
|
||||
*/
|
||||
public function aliasKey(?string $value): self
|
||||
{
|
||||
$this->instance->setAliasKey($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blikone click payment request object.
|
||||
*/
|
||||
public function build(): BLIKOneClickPaymentRequest
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
85
src/Models/Builders/BLIKPaymentObjectBuilder.php
Normal file
85
src/Models/Builders/BLIKPaymentObjectBuilder.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\BLIKOneClickPaymentObject;
|
||||
use PaypalServerSDKLib\Models\BLIKPaymentObject;
|
||||
|
||||
/**
|
||||
* Builder for model BLIKPaymentObject
|
||||
*
|
||||
* @see BLIKPaymentObject
|
||||
*/
|
||||
class BLIKPaymentObjectBuilder
|
||||
{
|
||||
/**
|
||||
* @var BLIKPaymentObject
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(BLIKPaymentObject $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blikpayment object Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new BLIKPaymentObject());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets country code field.
|
||||
*/
|
||||
public function countryCode(?string $value): self
|
||||
{
|
||||
$this->instance->setCountryCode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets email field.
|
||||
*/
|
||||
public function email(?string $value): self
|
||||
{
|
||||
$this->instance->setEmail($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets one click field.
|
||||
*/
|
||||
public function oneClick(?BLIKOneClickPaymentObject $value): self
|
||||
{
|
||||
$this->instance->setOneClick($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blikpayment object object.
|
||||
*/
|
||||
public function build(): BLIKPaymentObject
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
87
src/Models/Builders/BLIKPaymentRequestBuilder.php
Normal file
87
src/Models/Builders/BLIKPaymentRequestBuilder.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\BLIKExperienceContext;
|
||||
use PaypalServerSDKLib\Models\BLIKLevel0PaymentObject;
|
||||
use PaypalServerSDKLib\Models\BLIKOneClickPaymentRequest;
|
||||
use PaypalServerSDKLib\Models\BLIKPaymentRequest;
|
||||
|
||||
/**
|
||||
* Builder for model BLIKPaymentRequest
|
||||
*
|
||||
* @see BLIKPaymentRequest
|
||||
*/
|
||||
class BLIKPaymentRequestBuilder
|
||||
{
|
||||
/**
|
||||
* @var BLIKPaymentRequest
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(BLIKPaymentRequest $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blikpayment request Builder object.
|
||||
*/
|
||||
public static function init(string $name, string $countryCode): self
|
||||
{
|
||||
return new self(new BLIKPaymentRequest($name, $countryCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets email field.
|
||||
*/
|
||||
public function email(?string $value): self
|
||||
{
|
||||
$this->instance->setEmail($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets experience context field.
|
||||
*/
|
||||
public function experienceContext(?BLIKExperienceContext $value): self
|
||||
{
|
||||
$this->instance->setExperienceContext($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets level 0 field.
|
||||
*/
|
||||
public function level0(?BLIKLevel0PaymentObject $value): self
|
||||
{
|
||||
$this->instance->setLevel0($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets one click field.
|
||||
*/
|
||||
public function oneClick(?BLIKOneClickPaymentRequest $value): self
|
||||
{
|
||||
$this->instance->setOneClick($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blikpayment request object.
|
||||
*/
|
||||
public function build(): BLIKPaymentRequest
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
93
src/Models/Builders/BancontactPaymentObjectBuilder.php
Normal file
93
src/Models/Builders/BancontactPaymentObjectBuilder.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\BancontactPaymentObject;
|
||||
|
||||
/**
|
||||
* Builder for model BancontactPaymentObject
|
||||
*
|
||||
* @see BancontactPaymentObject
|
||||
*/
|
||||
class BancontactPaymentObjectBuilder
|
||||
{
|
||||
/**
|
||||
* @var BancontactPaymentObject
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(BancontactPaymentObject $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bancontact payment object Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new BancontactPaymentObject());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets country code field.
|
||||
*/
|
||||
public function countryCode(?string $value): self
|
||||
{
|
||||
$this->instance->setCountryCode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bic field.
|
||||
*/
|
||||
public function bic(?string $value): self
|
||||
{
|
||||
$this->instance->setBic($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets iban last chars field.
|
||||
*/
|
||||
public function ibanLastChars(?string $value): self
|
||||
{
|
||||
$this->instance->setIbanLastChars($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets card last digits field.
|
||||
*/
|
||||
public function cardLastDigits(?string $value): self
|
||||
{
|
||||
$this->instance->setCardLastDigits($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bancontact payment object object.
|
||||
*/
|
||||
public function build(): BancontactPaymentObject
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
58
src/Models/Builders/BancontactPaymentRequestBuilder.php
Normal file
58
src/Models/Builders/BancontactPaymentRequestBuilder.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\BancontactPaymentRequest;
|
||||
use PaypalServerSDKLib\Models\ExperienceContext;
|
||||
|
||||
/**
|
||||
* Builder for model BancontactPaymentRequest
|
||||
*
|
||||
* @see BancontactPaymentRequest
|
||||
*/
|
||||
class BancontactPaymentRequestBuilder
|
||||
{
|
||||
/**
|
||||
* @var BancontactPaymentRequest
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(BancontactPaymentRequest $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bancontact payment request Builder object.
|
||||
*/
|
||||
public static function init(string $name, string $countryCode): self
|
||||
{
|
||||
return new self(new BancontactPaymentRequest($name, $countryCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets experience context field.
|
||||
*/
|
||||
public function experienceContext(?ExperienceContext $value): self
|
||||
{
|
||||
$this->instance->setExperienceContext($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bancontact payment request object.
|
||||
*/
|
||||
public function build(): BancontactPaymentRequest
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
84
src/Models/Builders/BinDetailsBuilder.php
Normal file
84
src/Models/Builders/BinDetailsBuilder.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\BinDetails;
|
||||
|
||||
/**
|
||||
* Builder for model BinDetails
|
||||
*
|
||||
* @see BinDetails
|
||||
*/
|
||||
class BinDetailsBuilder
|
||||
{
|
||||
/**
|
||||
* @var BinDetails
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(BinDetails $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bin details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new BinDetails());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bin field.
|
||||
*/
|
||||
public function bin(?string $value): self
|
||||
{
|
||||
$this->instance->setBin($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets issuing bank field.
|
||||
*/
|
||||
public function issuingBank(?string $value): self
|
||||
{
|
||||
$this->instance->setIssuingBank($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bin country code field.
|
||||
*/
|
||||
public function binCountryCode(?string $value): self
|
||||
{
|
||||
$this->instance->setBinCountryCode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets products field.
|
||||
*/
|
||||
public function products(?array $value): self
|
||||
{
|
||||
$this->instance->setProducts($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bin details object.
|
||||
*/
|
||||
public function build(): BinDetails
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
189
src/Models/Builders/CaptureBuilder.php
Normal file
189
src/Models/Builders/CaptureBuilder.php
Normal file
@@ -0,0 +1,189 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\Capture;
|
||||
use PaypalServerSDKLib\Models\CaptureStatusDetails;
|
||||
use PaypalServerSDKLib\Models\Money;
|
||||
use PaypalServerSDKLib\Models\NetworkTransactionReference;
|
||||
use PaypalServerSDKLib\Models\ProcessorResponse;
|
||||
use PaypalServerSDKLib\Models\SellerProtection;
|
||||
use PaypalServerSDKLib\Models\SellerReceivableBreakdown;
|
||||
|
||||
/**
|
||||
* Builder for model Capture
|
||||
*
|
||||
* @see Capture
|
||||
*/
|
||||
class CaptureBuilder
|
||||
{
|
||||
/**
|
||||
* @var Capture
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(Capture $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new Capture());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
$this->instance->setStatus($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status details field.
|
||||
*/
|
||||
public function statusDetails(?CaptureStatusDetails $value): self
|
||||
{
|
||||
$this->instance->setStatusDetails($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
$this->instance->setAmount($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets invoice id field.
|
||||
*/
|
||||
public function invoiceId(?string $value): self
|
||||
{
|
||||
$this->instance->setInvoiceId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets custom id field.
|
||||
*/
|
||||
public function customId(?string $value): self
|
||||
{
|
||||
$this->instance->setCustomId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets network transaction reference field.
|
||||
*/
|
||||
public function networkTransactionReference(?NetworkTransactionReference $value): self
|
||||
{
|
||||
$this->instance->setNetworkTransactionReference($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets seller protection field.
|
||||
*/
|
||||
public function sellerProtection(?SellerProtection $value): self
|
||||
{
|
||||
$this->instance->setSellerProtection($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets final capture field.
|
||||
*/
|
||||
public function finalCapture(?bool $value): self
|
||||
{
|
||||
$this->instance->setFinalCapture($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets seller receivable breakdown field.
|
||||
*/
|
||||
public function sellerReceivableBreakdown(?SellerReceivableBreakdown $value): self
|
||||
{
|
||||
$this->instance->setSellerReceivableBreakdown($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets disbursement mode field.
|
||||
*/
|
||||
public function disbursementMode(?string $value): self
|
||||
{
|
||||
$this->instance->setDisbursementMode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
$this->instance->setLinks($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets processor response field.
|
||||
*/
|
||||
public function processorResponse(?ProcessorResponse $value): self
|
||||
{
|
||||
$this->instance->setProcessorResponse($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets create time field.
|
||||
*/
|
||||
public function createTime(?string $value): self
|
||||
{
|
||||
$this->instance->setCreateTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets update time field.
|
||||
*/
|
||||
public function updateTime(?string $value): self
|
||||
{
|
||||
$this->instance->setUpdateTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture object.
|
||||
*/
|
||||
public function build(): Capture
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
75
src/Models/Builders/CapturePaymentInstructionBuilder.php
Normal file
75
src/Models/Builders/CapturePaymentInstructionBuilder.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CapturePaymentInstruction;
|
||||
|
||||
/**
|
||||
* Builder for model CapturePaymentInstruction
|
||||
*
|
||||
* @see CapturePaymentInstruction
|
||||
*/
|
||||
class CapturePaymentInstructionBuilder
|
||||
{
|
||||
/**
|
||||
* @var CapturePaymentInstruction
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CapturePaymentInstruction $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture payment instruction Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CapturePaymentInstruction());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets platform fees field.
|
||||
*/
|
||||
public function platformFees(?array $value): self
|
||||
{
|
||||
$this->instance->setPlatformFees($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets disbursement mode field.
|
||||
*/
|
||||
public function disbursementMode(?string $value): self
|
||||
{
|
||||
$this->instance->setDisbursementMode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets payee receivable fx rate id field.
|
||||
*/
|
||||
public function payeeReceivableFxRateId(?string $value): self
|
||||
{
|
||||
$this->instance->setPayeeReceivableFxRateId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture payment instruction object.
|
||||
*/
|
||||
public function build(): CapturePaymentInstruction
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
104
src/Models/Builders/CaptureRequestBuilder.php
Normal file
104
src/Models/Builders/CaptureRequestBuilder.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CapturePaymentInstruction;
|
||||
use PaypalServerSDKLib\Models\CaptureRequest;
|
||||
use PaypalServerSDKLib\Models\Money;
|
||||
|
||||
/**
|
||||
* Builder for model CaptureRequest
|
||||
*
|
||||
* @see CaptureRequest
|
||||
*/
|
||||
class CaptureRequestBuilder
|
||||
{
|
||||
/**
|
||||
* @var CaptureRequest
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CaptureRequest $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture request Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CaptureRequest());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets invoice id field.
|
||||
*/
|
||||
public function invoiceId(?string $value): self
|
||||
{
|
||||
$this->instance->setInvoiceId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets note to payer field.
|
||||
*/
|
||||
public function noteToPayer(?string $value): self
|
||||
{
|
||||
$this->instance->setNoteToPayer($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
$this->instance->setAmount($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets final capture field.
|
||||
*/
|
||||
public function finalCapture(?bool $value): self
|
||||
{
|
||||
$this->instance->setFinalCapture($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets payment instruction field.
|
||||
*/
|
||||
public function paymentInstruction(?CapturePaymentInstruction $value): self
|
||||
{
|
||||
$this->instance->setPaymentInstruction($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets soft descriptor field.
|
||||
*/
|
||||
public function softDescriptor(?string $value): self
|
||||
{
|
||||
$this->instance->setSoftDescriptor($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture request object.
|
||||
*/
|
||||
public function build(): CaptureRequest
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
57
src/Models/Builders/CaptureStatusDetailsBuilder.php
Normal file
57
src/Models/Builders/CaptureStatusDetailsBuilder.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CaptureStatusDetails;
|
||||
|
||||
/**
|
||||
* Builder for model CaptureStatusDetails
|
||||
*
|
||||
* @see CaptureStatusDetails
|
||||
*/
|
||||
class CaptureStatusDetailsBuilder
|
||||
{
|
||||
/**
|
||||
* @var CaptureStatusDetails
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CaptureStatusDetails $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture status details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CaptureStatusDetails());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets reason field.
|
||||
*/
|
||||
public function reason(?string $value): self
|
||||
{
|
||||
$this->instance->setReason($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture status details object.
|
||||
*/
|
||||
public function build(): CaptureStatusDetails
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
67
src/Models/Builders/CaptureStatusWithDetailsBuilder.php
Normal file
67
src/Models/Builders/CaptureStatusWithDetailsBuilder.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CaptureStatusDetails;
|
||||
use PaypalServerSDKLib\Models\CaptureStatusWithDetails;
|
||||
|
||||
/**
|
||||
* Builder for model CaptureStatusWithDetails
|
||||
*
|
||||
* @see CaptureStatusWithDetails
|
||||
*/
|
||||
class CaptureStatusWithDetailsBuilder
|
||||
{
|
||||
/**
|
||||
* @var CaptureStatusWithDetails
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CaptureStatusWithDetails $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture status with details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CaptureStatusWithDetails());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
$this->instance->setStatus($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status details field.
|
||||
*/
|
||||
public function statusDetails(?CaptureStatusDetails $value): self
|
||||
{
|
||||
$this->instance->setStatusDetails($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture status with details object.
|
||||
*/
|
||||
public function build(): CaptureStatusWithDetails
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
209
src/Models/Builders/CapturedPaymentBuilder.php
Normal file
209
src/Models/Builders/CapturedPaymentBuilder.php
Normal file
@@ -0,0 +1,209 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CapturedPayment;
|
||||
use PaypalServerSDKLib\Models\CaptureStatusDetails;
|
||||
use PaypalServerSDKLib\Models\Money;
|
||||
use PaypalServerSDKLib\Models\NetworkTransactionReference;
|
||||
use PaypalServerSDKLib\Models\Payee;
|
||||
use PaypalServerSDKLib\Models\PaymentSupplementaryData;
|
||||
use PaypalServerSDKLib\Models\ProcessorResponse;
|
||||
use PaypalServerSDKLib\Models\SellerProtection;
|
||||
use PaypalServerSDKLib\Models\SellerReceivableBreakdown;
|
||||
|
||||
/**
|
||||
* Builder for model CapturedPayment
|
||||
*
|
||||
* @see CapturedPayment
|
||||
*/
|
||||
class CapturedPaymentBuilder
|
||||
{
|
||||
/**
|
||||
* @var CapturedPayment
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CapturedPayment $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new captured payment Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CapturedPayment());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
$this->instance->setStatus($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status details field.
|
||||
*/
|
||||
public function statusDetails(?CaptureStatusDetails $value): self
|
||||
{
|
||||
$this->instance->setStatusDetails($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
$this->instance->setAmount($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets invoice id field.
|
||||
*/
|
||||
public function invoiceId(?string $value): self
|
||||
{
|
||||
$this->instance->setInvoiceId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets custom id field.
|
||||
*/
|
||||
public function customId(?string $value): self
|
||||
{
|
||||
$this->instance->setCustomId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets network transaction reference field.
|
||||
*/
|
||||
public function networkTransactionReference(?NetworkTransactionReference $value): self
|
||||
{
|
||||
$this->instance->setNetworkTransactionReference($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets seller protection field.
|
||||
*/
|
||||
public function sellerProtection(?SellerProtection $value): self
|
||||
{
|
||||
$this->instance->setSellerProtection($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets final capture field.
|
||||
*/
|
||||
public function finalCapture(?bool $value): self
|
||||
{
|
||||
$this->instance->setFinalCapture($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets seller receivable breakdown field.
|
||||
*/
|
||||
public function sellerReceivableBreakdown(?SellerReceivableBreakdown $value): self
|
||||
{
|
||||
$this->instance->setSellerReceivableBreakdown($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets disbursement mode field.
|
||||
*/
|
||||
public function disbursementMode(?string $value): self
|
||||
{
|
||||
$this->instance->setDisbursementMode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
$this->instance->setLinks($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets processor response field.
|
||||
*/
|
||||
public function processorResponse(?ProcessorResponse $value): self
|
||||
{
|
||||
$this->instance->setProcessorResponse($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets create time field.
|
||||
*/
|
||||
public function createTime(?string $value): self
|
||||
{
|
||||
$this->instance->setCreateTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets update time field.
|
||||
*/
|
||||
public function updateTime(?string $value): self
|
||||
{
|
||||
$this->instance->setUpdateTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets supplementary data field.
|
||||
*/
|
||||
public function supplementaryData(?PaymentSupplementaryData $value): self
|
||||
{
|
||||
$this->instance->setSupplementaryData($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets payee field.
|
||||
*/
|
||||
public function payee(?Payee $value): self
|
||||
{
|
||||
$this->instance->setPayee($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new captured payment object.
|
||||
*/
|
||||
public function build(): CapturedPayment
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
78
src/Models/Builders/CardAttributesBuilder.php
Normal file
78
src/Models/Builders/CardAttributesBuilder.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardAttributes;
|
||||
use PaypalServerSDKLib\Models\CardCustomerInformation;
|
||||
use PaypalServerSDKLib\Models\CardVerification;
|
||||
use PaypalServerSDKLib\Models\VaultInstructionBase;
|
||||
|
||||
/**
|
||||
* Builder for model CardAttributes
|
||||
*
|
||||
* @see CardAttributes
|
||||
*/
|
||||
class CardAttributesBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardAttributes
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardAttributes $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card attributes Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardAttributes());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets customer field.
|
||||
*/
|
||||
public function customer(?CardCustomerInformation $value): self
|
||||
{
|
||||
$this->instance->setCustomer($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets vault field.
|
||||
*/
|
||||
public function vault(?VaultInstructionBase $value): self
|
||||
{
|
||||
$this->instance->setVault($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets verification field.
|
||||
*/
|
||||
public function verification(?CardVerification $value): self
|
||||
{
|
||||
$this->instance->setVerification($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card attributes object.
|
||||
*/
|
||||
public function build(): CardAttributes
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
58
src/Models/Builders/CardAttributesResponseBuilder.php
Normal file
58
src/Models/Builders/CardAttributesResponseBuilder.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardAttributesResponse;
|
||||
use PaypalServerSDKLib\Models\CardVaultResponse;
|
||||
|
||||
/**
|
||||
* Builder for model CardAttributesResponse
|
||||
*
|
||||
* @see CardAttributesResponse
|
||||
*/
|
||||
class CardAttributesResponseBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardAttributesResponse
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardAttributesResponse $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card attributes response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardAttributesResponse());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets vault field.
|
||||
*/
|
||||
public function vault(?CardVaultResponse $value): self
|
||||
{
|
||||
$this->instance->setVault($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card attributes response object.
|
||||
*/
|
||||
public function build(): CardAttributesResponse
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
58
src/Models/Builders/CardAuthenticationResponseBuilder.php
Normal file
58
src/Models/Builders/CardAuthenticationResponseBuilder.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardAuthenticationResponse;
|
||||
use PaypalServerSDKLib\Models\ThreeDSecureAuthenticationResponse;
|
||||
|
||||
/**
|
||||
* Builder for model CardAuthenticationResponse
|
||||
*
|
||||
* @see CardAuthenticationResponse
|
||||
*/
|
||||
class CardAuthenticationResponseBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardAuthenticationResponse
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardAuthenticationResponse $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card authentication response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardAuthenticationResponse());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets three d secure field.
|
||||
*/
|
||||
public function threeDSecure(?ThreeDSecureAuthenticationResponse $value): self
|
||||
{
|
||||
$this->instance->setThreeDSecure($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card authentication response object.
|
||||
*/
|
||||
public function build(): CardAuthenticationResponse
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
85
src/Models/Builders/CardCustomerInformationBuilder.php
Normal file
85
src/Models/Builders/CardCustomerInformationBuilder.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardCustomerInformation;
|
||||
use PaypalServerSDKLib\Models\PhoneWithType;
|
||||
|
||||
/**
|
||||
* Builder for model CardCustomerInformation
|
||||
*
|
||||
* @see CardCustomerInformation
|
||||
*/
|
||||
class CardCustomerInformationBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardCustomerInformation
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardCustomerInformation $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card customer information Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardCustomerInformation());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets email address field.
|
||||
*/
|
||||
public function emailAddress(?string $value): self
|
||||
{
|
||||
$this->instance->setEmailAddress($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets phone field.
|
||||
*/
|
||||
public function phone(?PhoneWithType $value): self
|
||||
{
|
||||
$this->instance->setPhone($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchant customer id field.
|
||||
*/
|
||||
public function merchantCustomerId(?string $value): self
|
||||
{
|
||||
$this->instance->setMerchantCustomerId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card customer information object.
|
||||
*/
|
||||
public function build(): CardCustomerInformation
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
66
src/Models/Builders/CardExperienceContextBuilder.php
Normal file
66
src/Models/Builders/CardExperienceContextBuilder.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardExperienceContext;
|
||||
|
||||
/**
|
||||
* Builder for model CardExperienceContext
|
||||
*
|
||||
* @see CardExperienceContext
|
||||
*/
|
||||
class CardExperienceContextBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardExperienceContext
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardExperienceContext $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card experience context Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardExperienceContext());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets return url field.
|
||||
*/
|
||||
public function returnUrl(?string $value): self
|
||||
{
|
||||
$this->instance->setReturnUrl($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets cancel url field.
|
||||
*/
|
||||
public function cancelUrl(?string $value): self
|
||||
{
|
||||
$this->instance->setCancelUrl($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card experience context object.
|
||||
*/
|
||||
public function build(): CardExperienceContext
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
66
src/Models/Builders/CardFromRequestBuilder.php
Normal file
66
src/Models/Builders/CardFromRequestBuilder.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardFromRequest;
|
||||
|
||||
/**
|
||||
* Builder for model CardFromRequest
|
||||
*
|
||||
* @see CardFromRequest
|
||||
*/
|
||||
class CardFromRequestBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardFromRequest
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardFromRequest $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card from request Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardFromRequest());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
$this->instance->setExpiry($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets last digits field.
|
||||
*/
|
||||
public function lastDigits(?string $value): self
|
||||
{
|
||||
$this->instance->setLastDigits($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card from request object.
|
||||
*/
|
||||
public function build(): CardFromRequest
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
161
src/Models/Builders/CardPaymentTokenBuilder.php
Normal file
161
src/Models/Builders/CardPaymentTokenBuilder.php
Normal file
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\AddressDetails;
|
||||
use PaypalServerSDKLib\Models\BinDetails;
|
||||
use PaypalServerSDKLib\Models\CardAuthenticationResponse;
|
||||
use PaypalServerSDKLib\Models\CardPaymentToken;
|
||||
use PaypalServerSDKLib\Models\CardVerificationDetails;
|
||||
use PaypalServerSDKLib\Models\NetworkTransactionReferenceEntity;
|
||||
|
||||
/**
|
||||
* Builder for model CardPaymentToken
|
||||
*
|
||||
* @see CardPaymentToken
|
||||
*/
|
||||
class CardPaymentTokenBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardPaymentToken
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardPaymentToken $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card payment token Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardPaymentToken());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets last digits field.
|
||||
*/
|
||||
public function lastDigits(?string $value): self
|
||||
{
|
||||
$this->instance->setLastDigits($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets brand field.
|
||||
*/
|
||||
public function brand(?string $value): self
|
||||
{
|
||||
$this->instance->setBrand($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
$this->instance->setExpiry($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets billing address field.
|
||||
*/
|
||||
public function billingAddress(?AddressDetails $value): self
|
||||
{
|
||||
$this->instance->setBillingAddress($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets verification status field.
|
||||
*/
|
||||
public function verificationStatus(?string $value): self
|
||||
{
|
||||
$this->instance->setVerificationStatus($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets verification field.
|
||||
*/
|
||||
public function verification(?CardVerificationDetails $value): self
|
||||
{
|
||||
$this->instance->setVerification($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets network transaction reference field.
|
||||
*/
|
||||
public function networkTransactionReference(?NetworkTransactionReferenceEntity $value): self
|
||||
{
|
||||
$this->instance->setNetworkTransactionReference($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets authentication result field.
|
||||
*/
|
||||
public function authenticationResult(?CardAuthenticationResponse $value): self
|
||||
{
|
||||
$this->instance->setAuthenticationResult($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bin details field.
|
||||
*/
|
||||
public function binDetails(?BinDetails $value): self
|
||||
{
|
||||
$this->instance->setBinDetails($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type field.
|
||||
*/
|
||||
public function type(?string $value): self
|
||||
{
|
||||
$this->instance->setType($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets network token field.
|
||||
*/
|
||||
public function networkToken($value): self
|
||||
{
|
||||
$this->instance->setNetworkToken($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card payment token object.
|
||||
*/
|
||||
public function build(): CardPaymentToken
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
152
src/Models/Builders/CardRequestBuilder.php
Normal file
152
src/Models/Builders/CardRequestBuilder.php
Normal file
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\Address;
|
||||
use PaypalServerSDKLib\Models\CardAttributes;
|
||||
use PaypalServerSDKLib\Models\CardExperienceContext;
|
||||
use PaypalServerSDKLib\Models\CardRequest;
|
||||
use PaypalServerSDKLib\Models\CardStoredCredential;
|
||||
use PaypalServerSDKLib\Models\NetworkToken;
|
||||
|
||||
/**
|
||||
* Builder for model CardRequest
|
||||
*
|
||||
* @see CardRequest
|
||||
*/
|
||||
class CardRequestBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardRequest
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardRequest $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card request Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardRequest());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets number field.
|
||||
*/
|
||||
public function number(?string $value): self
|
||||
{
|
||||
$this->instance->setNumber($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
$this->instance->setExpiry($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets security code field.
|
||||
*/
|
||||
public function securityCode(?string $value): self
|
||||
{
|
||||
$this->instance->setSecurityCode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets billing address field.
|
||||
*/
|
||||
public function billingAddress(?Address $value): self
|
||||
{
|
||||
$this->instance->setBillingAddress($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets attributes field.
|
||||
*/
|
||||
public function attributes(?CardAttributes $value): self
|
||||
{
|
||||
$this->instance->setAttributes($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets vault id field.
|
||||
*/
|
||||
public function vaultId(?string $value): self
|
||||
{
|
||||
$this->instance->setVaultId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets single use token field.
|
||||
*/
|
||||
public function singleUseToken(?string $value): self
|
||||
{
|
||||
$this->instance->setSingleUseToken($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets stored credential field.
|
||||
*/
|
||||
public function storedCredential(?CardStoredCredential $value): self
|
||||
{
|
||||
$this->instance->setStoredCredential($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets network token field.
|
||||
*/
|
||||
public function networkToken(?NetworkToken $value): self
|
||||
{
|
||||
$this->instance->setNetworkToken($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets experience context field.
|
||||
*/
|
||||
public function experienceContext(?CardExperienceContext $value): self
|
||||
{
|
||||
$this->instance->setExperienceContext($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card request object.
|
||||
*/
|
||||
public function build(): CardRequest
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
142
src/Models/Builders/CardResponseBuilder.php
Normal file
142
src/Models/Builders/CardResponseBuilder.php
Normal file
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\AuthenticationResponse;
|
||||
use PaypalServerSDKLib\Models\BinDetails;
|
||||
use PaypalServerSDKLib\Models\CardAttributesResponse;
|
||||
use PaypalServerSDKLib\Models\CardFromRequest;
|
||||
use PaypalServerSDKLib\Models\CardResponse;
|
||||
|
||||
/**
|
||||
* Builder for model CardResponse
|
||||
*
|
||||
* @see CardResponse
|
||||
*/
|
||||
class CardResponseBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardResponse
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardResponse $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardResponse());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets last digits field.
|
||||
*/
|
||||
public function lastDigits(?string $value): self
|
||||
{
|
||||
$this->instance->setLastDigits($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets brand field.
|
||||
*/
|
||||
public function brand(?string $value): self
|
||||
{
|
||||
$this->instance->setBrand($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets available networks field.
|
||||
*/
|
||||
public function availableNetworks(?array $value): self
|
||||
{
|
||||
$this->instance->setAvailableNetworks($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type field.
|
||||
*/
|
||||
public function type(?string $value): self
|
||||
{
|
||||
$this->instance->setType($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets authentication result field.
|
||||
*/
|
||||
public function authenticationResult(?AuthenticationResponse $value): self
|
||||
{
|
||||
$this->instance->setAuthenticationResult($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets attributes field.
|
||||
*/
|
||||
public function attributes(?CardAttributesResponse $value): self
|
||||
{
|
||||
$this->instance->setAttributes($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets from request field.
|
||||
*/
|
||||
public function fromRequest(?CardFromRequest $value): self
|
||||
{
|
||||
$this->instance->setFromRequest($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
$this->instance->setExpiry($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bin details field.
|
||||
*/
|
||||
public function binDetails(?BinDetails $value): self
|
||||
{
|
||||
$this->instance->setBinDetails($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card response object.
|
||||
*/
|
||||
public function build(): CardResponse
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
152
src/Models/Builders/CardResponseEntityBuilder.php
Normal file
152
src/Models/Builders/CardResponseEntityBuilder.php
Normal file
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\AddressDetails;
|
||||
use PaypalServerSDKLib\Models\BinDetails;
|
||||
use PaypalServerSDKLib\Models\CardAuthenticationResponse;
|
||||
use PaypalServerSDKLib\Models\CardResponseEntity;
|
||||
use PaypalServerSDKLib\Models\CardVerificationDetails;
|
||||
use PaypalServerSDKLib\Models\NetworkTransactionReferenceEntity;
|
||||
|
||||
/**
|
||||
* Builder for model CardResponseEntity
|
||||
*
|
||||
* @see CardResponseEntity
|
||||
*/
|
||||
class CardResponseEntityBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardResponseEntity
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardResponseEntity $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card response entity Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardResponseEntity());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets last digits field.
|
||||
*/
|
||||
public function lastDigits(?string $value): self
|
||||
{
|
||||
$this->instance->setLastDigits($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets brand field.
|
||||
*/
|
||||
public function brand(?string $value): self
|
||||
{
|
||||
$this->instance->setBrand($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
$this->instance->setExpiry($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets billing address field.
|
||||
*/
|
||||
public function billingAddress(?AddressDetails $value): self
|
||||
{
|
||||
$this->instance->setBillingAddress($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets verification status field.
|
||||
*/
|
||||
public function verificationStatus(?string $value): self
|
||||
{
|
||||
$this->instance->setVerificationStatus($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets verification field.
|
||||
*/
|
||||
public function verification(?CardVerificationDetails $value): self
|
||||
{
|
||||
$this->instance->setVerification($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets network transaction reference field.
|
||||
*/
|
||||
public function networkTransactionReference(?NetworkTransactionReferenceEntity $value): self
|
||||
{
|
||||
$this->instance->setNetworkTransactionReference($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets authentication result field.
|
||||
*/
|
||||
public function authenticationResult(?CardAuthenticationResponse $value): self
|
||||
{
|
||||
$this->instance->setAuthenticationResult($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bin details field.
|
||||
*/
|
||||
public function binDetails(?BinDetails $value): self
|
||||
{
|
||||
$this->instance->setBinDetails($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type field.
|
||||
*/
|
||||
public function type(?string $value): self
|
||||
{
|
||||
$this->instance->setType($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card response entity object.
|
||||
*/
|
||||
public function build(): CardResponseEntity
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
67
src/Models/Builders/CardStoredCredentialBuilder.php
Normal file
67
src/Models/Builders/CardStoredCredentialBuilder.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardStoredCredential;
|
||||
use PaypalServerSDKLib\Models\NetworkTransactionReference;
|
||||
|
||||
/**
|
||||
* Builder for model CardStoredCredential
|
||||
*
|
||||
* @see CardStoredCredential
|
||||
*/
|
||||
class CardStoredCredentialBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardStoredCredential
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardStoredCredential $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card stored credential Builder object.
|
||||
*/
|
||||
public static function init(string $paymentInitiator, string $paymentType): self
|
||||
{
|
||||
return new self(new CardStoredCredential($paymentInitiator, $paymentType));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets usage field.
|
||||
*/
|
||||
public function usage(?string $value): self
|
||||
{
|
||||
$this->instance->setUsage($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets previous network transaction reference field.
|
||||
*/
|
||||
public function previousNetworkTransactionReference(?NetworkTransactionReference $value): self
|
||||
{
|
||||
$this->instance->setPreviousNetworkTransactionReference($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card stored credential object.
|
||||
*/
|
||||
public function build(): CardStoredCredential
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
68
src/Models/Builders/CardSupplementaryDataBuilder.php
Normal file
68
src/Models/Builders/CardSupplementaryDataBuilder.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardSupplementaryData;
|
||||
use PaypalServerSDKLib\Models\Level2CardProcessingData;
|
||||
use PaypalServerSDKLib\Models\Level3CardProcessingData;
|
||||
|
||||
/**
|
||||
* Builder for model CardSupplementaryData
|
||||
*
|
||||
* @see CardSupplementaryData
|
||||
*/
|
||||
class CardSupplementaryDataBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardSupplementaryData
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardSupplementaryData $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card supplementary data Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardSupplementaryData());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets level 2 field.
|
||||
*/
|
||||
public function level2(?Level2CardProcessingData $value): self
|
||||
{
|
||||
$this->instance->setLevel2($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets level 3 field.
|
||||
*/
|
||||
public function level3(?Level3CardProcessingData $value): self
|
||||
{
|
||||
$this->instance->setLevel3($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card supplementary data object.
|
||||
*/
|
||||
public function build(): CardSupplementaryData
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
85
src/Models/Builders/CardVaultResponseBuilder.php
Normal file
85
src/Models/Builders/CardVaultResponseBuilder.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardCustomerInformation;
|
||||
use PaypalServerSDKLib\Models\CardVaultResponse;
|
||||
|
||||
/**
|
||||
* Builder for model CardVaultResponse
|
||||
*
|
||||
* @see CardVaultResponse
|
||||
*/
|
||||
class CardVaultResponseBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardVaultResponse
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardVaultResponse $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card vault response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardVaultResponse());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
$this->instance->setStatus($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
$this->instance->setLinks($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets customer field.
|
||||
*/
|
||||
public function customer(?CardCustomerInformation $value): self
|
||||
{
|
||||
$this->instance->setCustomer($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card vault response object.
|
||||
*/
|
||||
public function build(): CardVaultResponse
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
57
src/Models/Builders/CardVerificationBuilder.php
Normal file
57
src/Models/Builders/CardVerificationBuilder.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardVerification;
|
||||
|
||||
/**
|
||||
* Builder for model CardVerification
|
||||
*
|
||||
* @see CardVerification
|
||||
*/
|
||||
class CardVerificationBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardVerification
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardVerification $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card verification Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardVerification());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets method field.
|
||||
*/
|
||||
public function method(?string $value): self
|
||||
{
|
||||
$this->instance->setMethod($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card verification object.
|
||||
*/
|
||||
public function build(): CardVerification
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
104
src/Models/Builders/CardVerificationDetailsBuilder.php
Normal file
104
src/Models/Builders/CardVerificationDetailsBuilder.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardVerificationDetails;
|
||||
use PaypalServerSDKLib\Models\CardVerificationProcessorResponse;
|
||||
use PaypalServerSDKLib\Models\Money;
|
||||
|
||||
/**
|
||||
* Builder for model CardVerificationDetails
|
||||
*
|
||||
* @see CardVerificationDetails
|
||||
*/
|
||||
class CardVerificationDetailsBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardVerificationDetails
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardVerificationDetails $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card verification details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardVerificationDetails());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets network transaction id field.
|
||||
*/
|
||||
public function networkTransactionId(?string $value): self
|
||||
{
|
||||
$this->instance->setNetworkTransactionId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets date field.
|
||||
*/
|
||||
public function date(?string $value): self
|
||||
{
|
||||
$this->instance->setDate($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets network field.
|
||||
*/
|
||||
public function network(?string $value): self
|
||||
{
|
||||
$this->instance->setNetwork($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets time field.
|
||||
*/
|
||||
public function time(?string $value): self
|
||||
{
|
||||
$this->instance->setTime($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
$this->instance->setAmount($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets processor response field.
|
||||
*/
|
||||
public function processorResponse(?CardVerificationProcessorResponse $value): self
|
||||
{
|
||||
$this->instance->setProcessorResponse($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card verification details object.
|
||||
*/
|
||||
public function build(): CardVerificationDetails
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardVerificationProcessorResponse;
|
||||
|
||||
/**
|
||||
* Builder for model CardVerificationProcessorResponse
|
||||
*
|
||||
* @see CardVerificationProcessorResponse
|
||||
*/
|
||||
class CardVerificationProcessorResponseBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardVerificationProcessorResponse
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardVerificationProcessorResponse $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card verification processor response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardVerificationProcessorResponse());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets avs code field.
|
||||
*/
|
||||
public function avsCode(?string $value): self
|
||||
{
|
||||
$this->instance->setAvsCode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets cvv code field.
|
||||
*/
|
||||
public function cvvCode(?string $value): self
|
||||
{
|
||||
$this->instance->setCvvCode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card verification processor response object.
|
||||
*/
|
||||
public function build(): CardVerificationProcessorResponse
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
77
src/Models/Builders/CobrandedCardBuilder.php
Normal file
77
src/Models/Builders/CobrandedCardBuilder.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CobrandedCard;
|
||||
use PaypalServerSDKLib\Models\Money;
|
||||
use PaypalServerSDKLib\Models\PayeeBase;
|
||||
|
||||
/**
|
||||
* Builder for model CobrandedCard
|
||||
*
|
||||
* @see CobrandedCard
|
||||
*/
|
||||
class CobrandedCardBuilder
|
||||
{
|
||||
/**
|
||||
* @var CobrandedCard
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CobrandedCard $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new cobranded card Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CobrandedCard());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets labels field.
|
||||
*/
|
||||
public function labels(?array $value): self
|
||||
{
|
||||
$this->instance->setLabels($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets payee field.
|
||||
*/
|
||||
public function payee(?PayeeBase $value): self
|
||||
{
|
||||
$this->instance->setPayee($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
$this->instance->setAmount($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new cobranded card object.
|
||||
*/
|
||||
public function build(): CobrandedCard
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
68
src/Models/Builders/ConfirmOrderRequestBuilder.php
Normal file
68
src/Models/Builders/ConfirmOrderRequestBuilder.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ConfirmOrderRequest;
|
||||
use PaypalServerSDKLib\Models\OrderConfirmApplicationContext;
|
||||
use PaypalServerSDKLib\Models\PaymentSource;
|
||||
|
||||
/**
|
||||
* Builder for model ConfirmOrderRequest
|
||||
*
|
||||
* @see ConfirmOrderRequest
|
||||
*/
|
||||
class ConfirmOrderRequestBuilder
|
||||
{
|
||||
/**
|
||||
* @var ConfirmOrderRequest
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ConfirmOrderRequest $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new confirm order request Builder object.
|
||||
*/
|
||||
public static function init(PaymentSource $paymentSource): self
|
||||
{
|
||||
return new self(new ConfirmOrderRequest($paymentSource));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets processing instruction field.
|
||||
*/
|
||||
public function processingInstruction(?string $value): self
|
||||
{
|
||||
$this->instance->setProcessingInstruction($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets application context field.
|
||||
*/
|
||||
public function applicationContext(?OrderConfirmApplicationContext $value): self
|
||||
{
|
||||
$this->instance->setApplicationContext($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new confirm order request object.
|
||||
*/
|
||||
public function build(): ConfirmOrderRequest
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
76
src/Models/Builders/CustomerInformationBuilder.php
Normal file
76
src/Models/Builders/CustomerInformationBuilder.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CustomerInformation;
|
||||
use PaypalServerSDKLib\Models\PhoneWithType;
|
||||
|
||||
/**
|
||||
* Builder for model CustomerInformation
|
||||
*
|
||||
* @see CustomerInformation
|
||||
*/
|
||||
class CustomerInformationBuilder
|
||||
{
|
||||
/**
|
||||
* @var CustomerInformation
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CustomerInformation $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new customer information Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CustomerInformation());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets email address field.
|
||||
*/
|
||||
public function emailAddress(?string $value): self
|
||||
{
|
||||
$this->instance->setEmailAddress($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets phone field.
|
||||
*/
|
||||
public function phone(?PhoneWithType $value): self
|
||||
{
|
||||
$this->instance->setPhone($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new customer information object.
|
||||
*/
|
||||
public function build(): CustomerInformation
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
66
src/Models/Builders/CustomerRequestBuilder.php
Normal file
66
src/Models/Builders/CustomerRequestBuilder.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CustomerRequest;
|
||||
|
||||
/**
|
||||
* Builder for model CustomerRequest
|
||||
*
|
||||
* @see CustomerRequest
|
||||
*/
|
||||
class CustomerRequestBuilder
|
||||
{
|
||||
/**
|
||||
* @var CustomerRequest
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CustomerRequest $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new customer request Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CustomerRequest());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchant customer id field.
|
||||
*/
|
||||
public function merchantCustomerId(?string $value): self
|
||||
{
|
||||
$this->instance->setMerchantCustomerId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new customer request object.
|
||||
*/
|
||||
public function build(): CustomerRequest
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CustomerRequest;
|
||||
use PaypalServerSDKLib\Models\CustomerVaultPaymentTokensResponse;
|
||||
|
||||
/**
|
||||
* Builder for model CustomerVaultPaymentTokensResponse
|
||||
*
|
||||
* @see CustomerVaultPaymentTokensResponse
|
||||
*/
|
||||
class CustomerVaultPaymentTokensResponseBuilder
|
||||
{
|
||||
/**
|
||||
* @var CustomerVaultPaymentTokensResponse
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CustomerVaultPaymentTokensResponse $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new customer vault payment tokens response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CustomerVaultPaymentTokensResponse());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets total items field.
|
||||
*/
|
||||
public function totalItems(?int $value): self
|
||||
{
|
||||
$this->instance->setTotalItems($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets total pages field.
|
||||
*/
|
||||
public function totalPages(?int $value): self
|
||||
{
|
||||
$this->instance->setTotalPages($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets customer field.
|
||||
*/
|
||||
public function customer(?CustomerRequest $value): self
|
||||
{
|
||||
$this->instance->setCustomer($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets payment tokens field.
|
||||
*/
|
||||
public function paymentTokens(?array $value): self
|
||||
{
|
||||
$this->instance->setPaymentTokens($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
$this->instance->setLinks($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new customer vault payment tokens response object.
|
||||
*/
|
||||
public function build(): CustomerVaultPaymentTokensResponse
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
75
src/Models/Builders/EPSPaymentObjectBuilder.php
Normal file
75
src/Models/Builders/EPSPaymentObjectBuilder.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\EPSPaymentObject;
|
||||
|
||||
/**
|
||||
* Builder for model EPSPaymentObject
|
||||
*
|
||||
* @see EPSPaymentObject
|
||||
*/
|
||||
class EPSPaymentObjectBuilder
|
||||
{
|
||||
/**
|
||||
* @var EPSPaymentObject
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(EPSPaymentObject $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new epspayment object Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new EPSPaymentObject());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets country code field.
|
||||
*/
|
||||
public function countryCode(?string $value): self
|
||||
{
|
||||
$this->instance->setCountryCode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bic field.
|
||||
*/
|
||||
public function bic(?string $value): self
|
||||
{
|
||||
$this->instance->setBic($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new epspayment object object.
|
||||
*/
|
||||
public function build(): EPSPaymentObject
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
58
src/Models/Builders/EPSPaymentRequestBuilder.php
Normal file
58
src/Models/Builders/EPSPaymentRequestBuilder.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\EPSPaymentRequest;
|
||||
use PaypalServerSDKLib\Models\ExperienceContext;
|
||||
|
||||
/**
|
||||
* Builder for model EPSPaymentRequest
|
||||
*
|
||||
* @see EPSPaymentRequest
|
||||
*/
|
||||
class EPSPaymentRequestBuilder
|
||||
{
|
||||
/**
|
||||
* @var EPSPaymentRequest
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(EPSPaymentRequest $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new epspayment request Builder object.
|
||||
*/
|
||||
public static function init(string $name, string $countryCode): self
|
||||
{
|
||||
return new self(new EPSPaymentRequest($name, $countryCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets experience context field.
|
||||
*/
|
||||
public function experienceContext(?ExperienceContext $value): self
|
||||
{
|
||||
$this->instance->setExperienceContext($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new epspayment request object.
|
||||
*/
|
||||
public function build(): EPSPaymentRequest
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
93
src/Models/Builders/ErrorDetailsBuilder.php
Normal file
93
src/Models/Builders/ErrorDetailsBuilder.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ErrorDetails;
|
||||
|
||||
/**
|
||||
* Builder for model ErrorDetails
|
||||
*
|
||||
* @see ErrorDetails
|
||||
*/
|
||||
class ErrorDetailsBuilder
|
||||
{
|
||||
/**
|
||||
* @var ErrorDetails
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ErrorDetails $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new error details Builder object.
|
||||
*/
|
||||
public static function init(string $issue): self
|
||||
{
|
||||
return new self(new ErrorDetails($issue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets field field.
|
||||
*/
|
||||
public function field(?string $value): self
|
||||
{
|
||||
$this->instance->setField($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value field.
|
||||
*/
|
||||
public function value(?string $value): self
|
||||
{
|
||||
$this->instance->setValue($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets location field.
|
||||
*/
|
||||
public function location(?string $value): self
|
||||
{
|
||||
$this->instance->setLocation($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
$this->instance->setLinks($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets description field.
|
||||
*/
|
||||
public function description(?string $value): self
|
||||
{
|
||||
$this->instance->setDescription($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new error details object.
|
||||
*/
|
||||
public function build(): ErrorDetails
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
75
src/Models/Builders/ExchangeRateBuilder.php
Normal file
75
src/Models/Builders/ExchangeRateBuilder.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ExchangeRate;
|
||||
|
||||
/**
|
||||
* Builder for model ExchangeRate
|
||||
*
|
||||
* @see ExchangeRate
|
||||
*/
|
||||
class ExchangeRateBuilder
|
||||
{
|
||||
/**
|
||||
* @var ExchangeRate
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ExchangeRate $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new exchange rate Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new ExchangeRate());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets source currency field.
|
||||
*/
|
||||
public function sourceCurrency(?string $value): self
|
||||
{
|
||||
$this->instance->setSourceCurrency($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets target currency field.
|
||||
*/
|
||||
public function targetCurrency(?string $value): self
|
||||
{
|
||||
$this->instance->setTargetCurrency($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value field.
|
||||
*/
|
||||
public function value(?string $value): self
|
||||
{
|
||||
$this->instance->setValue($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new exchange rate object.
|
||||
*/
|
||||
public function build(): ExchangeRate
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
93
src/Models/Builders/ExperienceContextBuilder.php
Normal file
93
src/Models/Builders/ExperienceContextBuilder.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ExperienceContext;
|
||||
|
||||
/**
|
||||
* Builder for model ExperienceContext
|
||||
*
|
||||
* @see ExperienceContext
|
||||
*/
|
||||
class ExperienceContextBuilder
|
||||
{
|
||||
/**
|
||||
* @var ExperienceContext
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(ExperienceContext $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new experience context Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new ExperienceContext());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets brand name field.
|
||||
*/
|
||||
public function brandName(?string $value): self
|
||||
{
|
||||
$this->instance->setBrandName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets locale field.
|
||||
*/
|
||||
public function locale(?string $value): self
|
||||
{
|
||||
$this->instance->setLocale($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets shipping preference field.
|
||||
*/
|
||||
public function shippingPreference(?string $value): self
|
||||
{
|
||||
$this->instance->setShippingPreference($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets return url field.
|
||||
*/
|
||||
public function returnUrl(?string $value): self
|
||||
{
|
||||
$this->instance->setReturnUrl($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets cancel url field.
|
||||
*/
|
||||
public function cancelUrl(?string $value): self
|
||||
{
|
||||
$this->instance->setCancelUrl($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new experience context object.
|
||||
*/
|
||||
public function build(): ExperienceContext
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
75
src/Models/Builders/GiropayPaymentObjectBuilder.php
Normal file
75
src/Models/Builders/GiropayPaymentObjectBuilder.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\GiropayPaymentObject;
|
||||
|
||||
/**
|
||||
* Builder for model GiropayPaymentObject
|
||||
*
|
||||
* @see GiropayPaymentObject
|
||||
*/
|
||||
class GiropayPaymentObjectBuilder
|
||||
{
|
||||
/**
|
||||
* @var GiropayPaymentObject
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(GiropayPaymentObject $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new giropay payment object Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new GiropayPaymentObject());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets country code field.
|
||||
*/
|
||||
public function countryCode(?string $value): self
|
||||
{
|
||||
$this->instance->setCountryCode($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bic field.
|
||||
*/
|
||||
public function bic(?string $value): self
|
||||
{
|
||||
$this->instance->setBic($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new giropay payment object object.
|
||||
*/
|
||||
public function build(): GiropayPaymentObject
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
58
src/Models/Builders/GiropayPaymentRequestBuilder.php
Normal file
58
src/Models/Builders/GiropayPaymentRequestBuilder.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\ExperienceContext;
|
||||
use PaypalServerSDKLib\Models\GiropayPaymentRequest;
|
||||
|
||||
/**
|
||||
* Builder for model GiropayPaymentRequest
|
||||
*
|
||||
* @see GiropayPaymentRequest
|
||||
*/
|
||||
class GiropayPaymentRequestBuilder
|
||||
{
|
||||
/**
|
||||
* @var GiropayPaymentRequest
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(GiropayPaymentRequest $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new giropay payment request Builder object.
|
||||
*/
|
||||
public static function init(string $name, string $countryCode): self
|
||||
{
|
||||
return new self(new GiropayPaymentRequest($name, $countryCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets experience context field.
|
||||
*/
|
||||
public function experienceContext(?ExperienceContext $value): self
|
||||
{
|
||||
$this->instance->setExperienceContext($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new giropay payment request object.
|
||||
*/
|
||||
public function build(): GiropayPaymentRequest
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
58
src/Models/Builders/GooglePayCardAttributesBuilder.php
Normal file
58
src/Models/Builders/GooglePayCardAttributesBuilder.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\CardVerification;
|
||||
use PaypalServerSDKLib\Models\GooglePayCardAttributes;
|
||||
|
||||
/**
|
||||
* Builder for model GooglePayCardAttributes
|
||||
*
|
||||
* @see GooglePayCardAttributes
|
||||
*/
|
||||
class GooglePayCardAttributesBuilder
|
||||
{
|
||||
/**
|
||||
* @var GooglePayCardAttributes
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(GooglePayCardAttributes $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new google pay card attributes Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new GooglePayCardAttributes());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets verification field.
|
||||
*/
|
||||
public function verification(?CardVerification $value): self
|
||||
{
|
||||
$this->instance->setVerification($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new google pay card attributes object.
|
||||
*/
|
||||
public function build(): GooglePayCardAttributes
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
104
src/Models/Builders/GooglePayCardResponseBuilder.php
Normal file
104
src/Models/Builders/GooglePayCardResponseBuilder.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSDKLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSDKLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSDKLib\Models\Address;
|
||||
use PaypalServerSDKLib\Models\AuthenticationResponse;
|
||||
use PaypalServerSDKLib\Models\GooglePayCardResponse;
|
||||
|
||||
/**
|
||||
* Builder for model GooglePayCardResponse
|
||||
*
|
||||
* @see GooglePayCardResponse
|
||||
*/
|
||||
class GooglePayCardResponseBuilder
|
||||
{
|
||||
/**
|
||||
* @var GooglePayCardResponse
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(GooglePayCardResponse $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new google pay card response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new GooglePayCardResponse());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
$this->instance->setName($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets last digits field.
|
||||
*/
|
||||
public function lastDigits(?string $value): self
|
||||
{
|
||||
$this->instance->setLastDigits($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type field.
|
||||
*/
|
||||
public function type(?string $value): self
|
||||
{
|
||||
$this->instance->setType($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets brand field.
|
||||
*/
|
||||
public function brand(?string $value): self
|
||||
{
|
||||
$this->instance->setBrand($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets billing address field.
|
||||
*/
|
||||
public function billingAddress(?Address $value): self
|
||||
{
|
||||
$this->instance->setBillingAddress($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets authentication result field.
|
||||
*/
|
||||
public function authenticationResult(?AuthenticationResponse $value): self
|
||||
{
|
||||
$this->instance->setAuthenticationResult($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new google pay card response object.
|
||||
*/
|
||||
public function build(): GooglePayCardResponse
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user