forked from LiveCarta/PayPal-PHP-Server-SDK
Release 0.7.0
Beta Release 0.7.0 including: - Bug fixes - Updated model/function names - Updated models to reflect changes in APIs
This commit is contained in:
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -31,8 +32,8 @@ class ActivityTimestamps implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*/
|
||||
public function getCreateTime(): ?string
|
||||
{
|
||||
@@ -42,8 +43,8 @@ class ActivityTimestamps implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*
|
||||
* @maps create_time
|
||||
*/
|
||||
@@ -55,8 +56,8 @@ class ActivityTimestamps implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*/
|
||||
public function getUpdateTime(): ?string
|
||||
{
|
||||
@@ -66,8 +67,8 @@ class ActivityTimestamps implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*
|
||||
* @maps update_time
|
||||
*/
|
||||
@@ -76,6 +77,19 @@ class ActivityTimestamps implements \JsonSerializable
|
||||
$this->updateTime = $updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the ActivityTimestamps object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the ActivityTimestamps object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'ActivityTimestamps',
|
||||
['createTime' => $this->createTime, 'updateTime' => $this->updateTime]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -124,8 +125,8 @@ class Address implements \JsonSerializable
|
||||
* 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>
|
||||
* Value, by country, is: UK. A county. US. A state. Canada. A province. Japan. A prefecture.
|
||||
* Switzerland. A *kanton*.
|
||||
*/
|
||||
public function getAdminArea1(): ?string
|
||||
{
|
||||
@@ -136,8 +137,8 @@ class Address implements \JsonSerializable
|
||||
* 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>
|
||||
* Value, by country, is: UK. A county. US. A state. Canada. A province. Japan. A prefecture.
|
||||
* Switzerland. A *kanton*.
|
||||
*
|
||||
* @maps admin_area_1
|
||||
*/
|
||||
@@ -171,10 +172,9 @@ class Address implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*/
|
||||
public function getCountryCode(): string
|
||||
{
|
||||
@@ -184,10 +184,9 @@ class Address implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*
|
||||
* @required
|
||||
* @maps country_code
|
||||
@@ -197,6 +196,26 @@ class Address implements \JsonSerializable
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the Address object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the Address object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'Address',
|
||||
[
|
||||
'addressLine1' => $this->addressLine1,
|
||||
'addressLine2' => $this->addressLine2,
|
||||
'adminArea2' => $this->adminArea2,
|
||||
'adminArea1' => $this->adminArea1,
|
||||
'postalCode' => $this->postalCode,
|
||||
'countryCode' => $this->countryCode
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -1,372 +0,0 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -193,6 +194,27 @@ class AmountBreakdown implements \JsonSerializable
|
||||
$this->discount = $discount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the AmountBreakdown object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the AmountBreakdown object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'AmountBreakdown',
|
||||
[
|
||||
'itemTotal' => $this->itemTotal,
|
||||
'shipping' => $this->shipping,
|
||||
'handling' => $this->handling,
|
||||
'taxTotal' => $this->taxTotal,
|
||||
'insurance' => $this->insurance,
|
||||
'shippingDiscount' => $this->shippingDiscount,
|
||||
'discount' => $this->discount
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,15 +10,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
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, total tax amount, shipping, handling, insurance, and discounts, if any. 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>.
|
||||
* plus `insurance` minus `shipping_discount` minus discount. The amount must be a positive number. For
|
||||
* listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes.
|
||||
*/
|
||||
class AmountWithBreakdown implements \JsonSerializable
|
||||
{
|
||||
@@ -72,10 +72,10 @@ class AmountWithBreakdown implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* 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/).
|
||||
* The value, which might be: An integer for currencies like `JPY` that are not typically fractional. A
|
||||
* decimal fraction for currencies like `TND` that are subdivided into thousandths. For the required
|
||||
* number of decimal places for a currency code, see [Currency Codes](/api/rest/reference/currency-
|
||||
* codes/).
|
||||
*/
|
||||
public function getValue(): string
|
||||
{
|
||||
@@ -84,10 +84,10 @@ class AmountWithBreakdown implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* 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/).
|
||||
* The value, which might be: An integer for currencies like `JPY` that are not typically fractional. A
|
||||
* decimal fraction for currencies like `TND` that are subdivided into thousandths. For the required
|
||||
* number of decimal places for a currency code, see [Currency Codes](/api/rest/reference/currency-
|
||||
* codes/).
|
||||
*
|
||||
* @required
|
||||
* @maps value
|
||||
@@ -119,6 +119,19 @@ class AmountWithBreakdown implements \JsonSerializable
|
||||
$this->breakdown = $breakdown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the AmountWithBreakdown object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the AmountWithBreakdown object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'AmountWithBreakdown',
|
||||
['currencyCode' => $this->currencyCode, 'value' => $this->value, 'breakdown' => $this->breakdown]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -69,6 +70,16 @@ class ApplePayAttributes implements \JsonSerializable
|
||||
$this->vault = $vault;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the ApplePayAttributes object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the ApplePayAttributes object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify('ApplePayAttributes', ['customer' => $this->customer, 'vault' => $this->vault]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -42,6 +43,16 @@ class ApplePayAttributesResponse implements \JsonSerializable
|
||||
$this->vault = $vault;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the ApplePayAttributesResponse object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the ApplePayAttributesResponse object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify('ApplePayAttributesResponse', ['vault' => $this->vault]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -148,6 +149,25 @@ class ApplePayCard implements \JsonSerializable
|
||||
$this->billingAddress = $billingAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the ApplePayCard object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the ApplePayCard object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'ApplePayCard',
|
||||
[
|
||||
'name' => $this->name,
|
||||
'lastDigits' => $this->lastDigits,
|
||||
'type' => $this->type,
|
||||
'brand' => $this->brand,
|
||||
'billingAddress' => $this->billingAddress
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -167,10 +187,10 @@ class ApplePayCard implements \JsonSerializable
|
||||
$json['last_digits'] = $this->lastDigits;
|
||||
}
|
||||
if (isset($this->type)) {
|
||||
$json['type'] = CardType::checkValue($this->type);
|
||||
$json['type'] = $this->type;
|
||||
}
|
||||
if (isset($this->brand)) {
|
||||
$json['brand'] = CardBrand::checkValue($this->brand);
|
||||
$json['brand'] = $this->brand;
|
||||
}
|
||||
if (isset($this->billingAddress)) {
|
||||
$json['billing_address'] = $this->billingAddress;
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -67,6 +68,11 @@ class ApplePayCardResponse implements \JsonSerializable
|
||||
*/
|
||||
private $binDetails;
|
||||
|
||||
/**
|
||||
* @var CardStoredCredential|null
|
||||
*/
|
||||
private $storedCredential;
|
||||
|
||||
/**
|
||||
* @var Address|null
|
||||
*/
|
||||
@@ -283,6 +289,38 @@ class ApplePayCardResponse implements \JsonSerializable
|
||||
$this->binDetails = $binDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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). Parameter compatibility:
|
||||
* `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`. `usage=FIRST` is
|
||||
* compatible only with `payment_initiator=CUSTOMER`. `previous_transaction_reference` or
|
||||
* `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`. Only
|
||||
* one of the parameters - `previous_transaction_reference` and
|
||||
* `previous_network_transaction_reference` - can be present in the request.
|
||||
*/
|
||||
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). Parameter compatibility:
|
||||
* `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`. `usage=FIRST` is
|
||||
* compatible only with `payment_initiator=CUSTOMER`. `previous_transaction_reference` or
|
||||
* `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`. Only
|
||||
* one of the parameters - `previous_transaction_reference` and
|
||||
* `previous_network_transaction_reference` - can be present in the request.
|
||||
*
|
||||
* @maps stored_credential
|
||||
*/
|
||||
public function setStoredCredential(?CardStoredCredential $storedCredential): void
|
||||
{
|
||||
$this->storedCredential = $storedCredential;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Billing Address.
|
||||
* The portable international postal address. Maps to [AddressValidationMetadata](https://github.
|
||||
@@ -312,10 +350,9 @@ class ApplePayCardResponse implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* or region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*/
|
||||
public function getCountryCode(): ?string
|
||||
{
|
||||
@@ -325,10 +362,9 @@ class ApplePayCardResponse implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* or region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*
|
||||
* @maps country_code
|
||||
*/
|
||||
@@ -337,6 +373,33 @@ class ApplePayCardResponse implements \JsonSerializable
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the ApplePayCardResponse object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the ApplePayCardResponse object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'ApplePayCardResponse',
|
||||
[
|
||||
'name' => $this->name,
|
||||
'lastDigits' => $this->lastDigits,
|
||||
'brand' => $this->brand,
|
||||
'availableNetworks' => $this->availableNetworks,
|
||||
'type' => $this->type,
|
||||
'authenticationResult' => $this->authenticationResult,
|
||||
'attributes' => $this->attributes,
|
||||
'fromRequest' => $this->fromRequest,
|
||||
'expiry' => $this->expiry,
|
||||
'binDetails' => $this->binDetails,
|
||||
'storedCredential' => $this->storedCredential,
|
||||
'billingAddress' => $this->billingAddress,
|
||||
'countryCode' => $this->countryCode
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -356,13 +419,13 @@ class ApplePayCardResponse implements \JsonSerializable
|
||||
$json['last_digits'] = $this->lastDigits;
|
||||
}
|
||||
if (isset($this->brand)) {
|
||||
$json['brand'] = CardBrand::checkValue($this->brand);
|
||||
$json['brand'] = $this->brand;
|
||||
}
|
||||
if (isset($this->availableNetworks)) {
|
||||
$json['available_networks'] = CardBrand::checkValue($this->availableNetworks);
|
||||
$json['available_networks'] = $this->availableNetworks;
|
||||
}
|
||||
if (isset($this->type)) {
|
||||
$json['type'] = CardType::checkValue($this->type);
|
||||
$json['type'] = $this->type;
|
||||
}
|
||||
if (isset($this->authenticationResult)) {
|
||||
$json['authentication_result'] = $this->authenticationResult;
|
||||
@@ -379,6 +442,9 @@ class ApplePayCardResponse implements \JsonSerializable
|
||||
if (isset($this->binDetails)) {
|
||||
$json['bin_details'] = $this->binDetails;
|
||||
}
|
||||
if (isset($this->storedCredential)) {
|
||||
$json['stored_credential'] = $this->storedCredential;
|
||||
}
|
||||
if (isset($this->billingAddress)) {
|
||||
$json['billing_address'] = $this->billingAddress;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -155,6 +156,25 @@ class ApplePayDecryptedTokenData implements \JsonSerializable
|
||||
$this->paymentData = $paymentData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the ApplePayDecryptedTokenData object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the ApplePayDecryptedTokenData object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'ApplePayDecryptedTokenData',
|
||||
[
|
||||
'transactionAmount' => $this->transactionAmount,
|
||||
'tokenizedCard' => $this->tokenizedCard,
|
||||
'deviceManufacturerId' => $this->deviceManufacturerId,
|
||||
'paymentDataType' => $this->paymentDataType,
|
||||
'paymentData' => $this->paymentData
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -175,7 +195,7 @@ class ApplePayDecryptedTokenData implements \JsonSerializable
|
||||
$json['device_manufacturer_id'] = $this->deviceManufacturerId;
|
||||
}
|
||||
if (isset($this->paymentDataType)) {
|
||||
$json['payment_data_type'] = ApplePayPaymentDataType::checkValue($this->paymentDataType);
|
||||
$json['payment_data_type'] = $this->paymentDataType;
|
||||
}
|
||||
if (isset($this->paymentData)) {
|
||||
$json['payment_data'] = $this->paymentData;
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -123,6 +124,24 @@ class ApplePayPaymentData implements \JsonSerializable
|
||||
$this->pin = $pin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the ApplePayPaymentData object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the ApplePayPaymentData object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'ApplePayPaymentData',
|
||||
[
|
||||
'cryptogram' => $this->cryptogram,
|
||||
'eciIndicator' => $this->eciIndicator,
|
||||
'emvData' => $this->emvData,
|
||||
'pin' => $this->pin
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,37 +10,21 @@ declare(strict_types=1);
|
||||
|
||||
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
|
||||
{
|
||||
/**
|
||||
* The card was authenticated using 3D Secure (3DS) authentication scheme. While using this value make
|
||||
* sure to populate cryptogram and eci_indicator as part of payment data..
|
||||
*/
|
||||
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
|
||||
* The card was authenticated using EMV method, which is applicable for China. While using this value
|
||||
* make sure to pass emv_data and pin as part of payment data.
|
||||
*/
|
||||
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.");
|
||||
}
|
||||
public const EMV = 'EMV';
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -52,6 +53,11 @@ class ApplePayPaymentObject implements \JsonSerializable
|
||||
*/
|
||||
private $attributes;
|
||||
|
||||
/**
|
||||
* @var CardStoredCredential|null
|
||||
*/
|
||||
private $storedCredential;
|
||||
|
||||
/**
|
||||
* Returns Id.
|
||||
* ApplePay transaction identifier, this will be the unique identifier for this transaction provided by
|
||||
@@ -118,10 +124,9 @@ class ApplePayPaymentObject implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* 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>
|
||||
* The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters
|
||||
* are allowed after the @ sign. However, the generally accepted maximum length for an email address is
|
||||
* 254 characters. The pattern verifies that an unquoted @ sign exists.
|
||||
*/
|
||||
public function getEmailAddress(): ?string
|
||||
{
|
||||
@@ -130,10 +135,9 @@ class ApplePayPaymentObject implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* 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>
|
||||
* The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters
|
||||
* are allowed after the @ sign. However, the generally accepted maximum length for an email address is
|
||||
* 254 characters. The pattern verifies that an unquoted @ sign exists.
|
||||
*
|
||||
* @maps email_address
|
||||
*/
|
||||
@@ -204,6 +208,60 @@ class ApplePayPaymentObject implements \JsonSerializable
|
||||
$this->attributes = $attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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). Parameter compatibility:
|
||||
* `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`. `usage=FIRST` is
|
||||
* compatible only with `payment_initiator=CUSTOMER`. `previous_transaction_reference` or
|
||||
* `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`. Only
|
||||
* one of the parameters - `previous_transaction_reference` and
|
||||
* `previous_network_transaction_reference` - can be present in the request.
|
||||
*/
|
||||
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). Parameter compatibility:
|
||||
* `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`. `usage=FIRST` is
|
||||
* compatible only with `payment_initiator=CUSTOMER`. `previous_transaction_reference` or
|
||||
* `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`. Only
|
||||
* one of the parameters - `previous_transaction_reference` and
|
||||
* `previous_network_transaction_reference` - can be present in the request.
|
||||
*
|
||||
* @maps stored_credential
|
||||
*/
|
||||
public function setStoredCredential(?CardStoredCredential $storedCredential): void
|
||||
{
|
||||
$this->storedCredential = $storedCredential;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the ApplePayPaymentObject object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the ApplePayPaymentObject object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'ApplePayPaymentObject',
|
||||
[
|
||||
'id' => $this->id,
|
||||
'token' => $this->token,
|
||||
'name' => $this->name,
|
||||
'emailAddress' => $this->emailAddress,
|
||||
'phoneNumber' => $this->phoneNumber,
|
||||
'card' => $this->card,
|
||||
'attributes' => $this->attributes,
|
||||
'storedCredential' => $this->storedCredential
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -217,25 +275,28 @@ class ApplePayPaymentObject implements \JsonSerializable
|
||||
{
|
||||
$json = [];
|
||||
if (isset($this->id)) {
|
||||
$json['id'] = $this->id;
|
||||
$json['id'] = $this->id;
|
||||
}
|
||||
if (isset($this->token)) {
|
||||
$json['token'] = $this->token;
|
||||
$json['token'] = $this->token;
|
||||
}
|
||||
if (isset($this->name)) {
|
||||
$json['name'] = $this->name;
|
||||
$json['name'] = $this->name;
|
||||
}
|
||||
if (isset($this->emailAddress)) {
|
||||
$json['email_address'] = $this->emailAddress;
|
||||
$json['email_address'] = $this->emailAddress;
|
||||
}
|
||||
if (isset($this->phoneNumber)) {
|
||||
$json['phone_number'] = $this->phoneNumber;
|
||||
$json['phone_number'] = $this->phoneNumber;
|
||||
}
|
||||
if (isset($this->card)) {
|
||||
$json['card'] = $this->card;
|
||||
$json['card'] = $this->card;
|
||||
}
|
||||
if (isset($this->attributes)) {
|
||||
$json['attributes'] = $this->attributes;
|
||||
$json['attributes'] = $this->attributes;
|
||||
}
|
||||
if (isset($this->storedCredential)) {
|
||||
$json['stored_credential'] = $this->storedCredential;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -42,6 +43,16 @@ class ApplePayPaymentToken implements \JsonSerializable
|
||||
$this->card = $card;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the ApplePayPaymentToken object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the ApplePayPaymentToken object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify('ApplePayPaymentToken', ['card' => $this->card]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -101,10 +102,9 @@ class ApplePayRequest implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* 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>
|
||||
* The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters
|
||||
* are allowed after the @ sign. However, the generally accepted maximum length for an email address is
|
||||
* 254 characters. The pattern verifies that an unquoted @ sign exists.
|
||||
*/
|
||||
public function getEmailAddress(): ?string
|
||||
{
|
||||
@@ -113,10 +113,9 @@ class ApplePayRequest implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* 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>
|
||||
* The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters
|
||||
* are allowed after the @ sign. However, the generally accepted maximum length for an email address is
|
||||
* 254 characters. The pattern verifies that an unquoted @ sign exists.
|
||||
*
|
||||
* @maps email_address
|
||||
*/
|
||||
@@ -170,13 +169,12 @@ class ApplePayRequest implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* to be stored (also referred to as stored_credential or card-on-file). Parameter compatibility:
|
||||
* `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`. `usage=FIRST` is
|
||||
* compatible only with `payment_initiator=CUSTOMER`. `previous_transaction_reference` or
|
||||
* `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`. Only
|
||||
* one of the parameters - `previous_transaction_reference` and
|
||||
* `previous_network_transaction_reference` - can be present in the request.
|
||||
*/
|
||||
public function getStoredCredential(): ?CardStoredCredential
|
||||
{
|
||||
@@ -186,13 +184,12 @@ class ApplePayRequest implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* to be stored (also referred to as stored_credential or card-on-file). Parameter compatibility:
|
||||
* `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`. `usage=FIRST` is
|
||||
* compatible only with `payment_initiator=CUSTOMER`. `previous_transaction_reference` or
|
||||
* `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`. Only
|
||||
* one of the parameters - `previous_transaction_reference` and
|
||||
* `previous_network_transaction_reference` - can be present in the request.
|
||||
*
|
||||
* @maps stored_credential
|
||||
*/
|
||||
@@ -243,6 +240,28 @@ class ApplePayRequest implements \JsonSerializable
|
||||
$this->attributes = $attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the ApplePayRequest object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the ApplePayRequest object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'ApplePayRequest',
|
||||
[
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'emailAddress' => $this->emailAddress,
|
||||
'phoneNumber' => $this->phoneNumber,
|
||||
'decryptedToken' => $this->decryptedToken,
|
||||
'storedCredential' => $this->storedCredential,
|
||||
'vaultId' => $this->vaultId,
|
||||
'attributes' => $this->attributes
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -200,6 +201,27 @@ class ApplePayTokenizedCard implements \JsonSerializable
|
||||
$this->billingAddress = $billingAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the ApplePayTokenizedCard object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the ApplePayTokenizedCard object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'ApplePayTokenizedCard',
|
||||
[
|
||||
'name' => $this->name,
|
||||
'number' => $this->number,
|
||||
'expiry' => $this->expiry,
|
||||
'cardType' => $this->cardType,
|
||||
'type' => $this->type,
|
||||
'brand' => $this->brand,
|
||||
'billingAddress' => $this->billingAddress
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -222,13 +244,13 @@ class ApplePayTokenizedCard implements \JsonSerializable
|
||||
$json['expiry'] = $this->expiry;
|
||||
}
|
||||
if (isset($this->cardType)) {
|
||||
$json['card_type'] = CardBrand::checkValue($this->cardType);
|
||||
$json['card_type'] = $this->cardType;
|
||||
}
|
||||
if (isset($this->type)) {
|
||||
$json['type'] = CardType::checkValue($this->type);
|
||||
$json['type'] = $this->type;
|
||||
}
|
||||
if (isset($this->brand)) {
|
||||
$json['brand'] = CardBrand::checkValue($this->brand);
|
||||
$json['brand'] = $this->brand;
|
||||
}
|
||||
if (isset($this->billingAddress)) {
|
||||
$json['billing_address'] = $this->billingAddress;
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -76,6 +77,22 @@ class AssuranceDetails implements \JsonSerializable
|
||||
$this->cardHolderAuthenticated = $cardHolderAuthenticated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the AssuranceDetails object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the AssuranceDetails object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'AssuranceDetails',
|
||||
[
|
||||
'accountVerified' => $this->accountVerified,
|
||||
'cardHolderAuthenticated' => $this->cardHolderAuthenticated
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -67,6 +68,19 @@ class AuthenticationResponse implements \JsonSerializable
|
||||
$this->threeDSecure = $threeDSecure;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the AuthenticationResponse object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the AuthenticationResponse object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'AuthenticationResponse',
|
||||
['liabilityShift' => $this->liabilityShift, 'threeDSecure' => $this->threeDSecure]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -80,7 +94,7 @@ class AuthenticationResponse implements \JsonSerializable
|
||||
{
|
||||
$json = [];
|
||||
if (isset($this->liabilityShift)) {
|
||||
$json['liability_shift'] = LiabilityShiftIndicator::checkValue($this->liabilityShift);
|
||||
$json['liability_shift'] = $this->liabilityShift;
|
||||
}
|
||||
if (isset($this->threeDSecure)) {
|
||||
$json['three_d_secure'] = $this->threeDSecure;
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -246,8 +247,8 @@ class Authorization implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*/
|
||||
public function getExpirationTime(): ?string
|
||||
{
|
||||
@@ -257,8 +258,8 @@ class Authorization implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*
|
||||
* @maps expiration_time
|
||||
*/
|
||||
@@ -294,8 +295,8 @@ class Authorization implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*/
|
||||
public function getCreateTime(): ?string
|
||||
{
|
||||
@@ -305,8 +306,8 @@ class Authorization implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*
|
||||
* @maps create_time
|
||||
*/
|
||||
@@ -318,8 +319,8 @@ class Authorization implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*/
|
||||
public function getUpdateTime(): ?string
|
||||
{
|
||||
@@ -329,8 +330,8 @@ class Authorization implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*
|
||||
* @maps update_time
|
||||
*/
|
||||
@@ -339,6 +340,32 @@ class Authorization implements \JsonSerializable
|
||||
$this->updateTime = $updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the Authorization object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the Authorization object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'Authorization',
|
||||
[
|
||||
'status' => $this->status,
|
||||
'statusDetails' => $this->statusDetails,
|
||||
'id' => $this->id,
|
||||
'amount' => $this->amount,
|
||||
'invoiceId' => $this->invoiceId,
|
||||
'customId' => $this->customId,
|
||||
'networkTransactionReference' => $this->networkTransactionReference,
|
||||
'sellerProtection' => $this->sellerProtection,
|
||||
'expirationTime' => $this->expirationTime,
|
||||
'links' => $this->links,
|
||||
'createTime' => $this->createTime,
|
||||
'updateTime' => $this->updateTime
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -352,7 +379,7 @@ class Authorization implements \JsonSerializable
|
||||
{
|
||||
$json = [];
|
||||
if (isset($this->status)) {
|
||||
$json['status'] = AuthorizationStatus::checkValue($this->status);
|
||||
$json['status'] = $this->status;
|
||||
}
|
||||
if (isset($this->statusDetails)) {
|
||||
$json['status_details'] = $this->statusDetails;
|
||||
|
||||
@@ -10,36 +10,18 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use Exception;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* The reason why the authorized status is `PENDING`.
|
||||
*/
|
||||
class AuthorizationIncompleteReason
|
||||
{
|
||||
/**
|
||||
* Authorization is pending manual review.
|
||||
*/
|
||||
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
|
||||
* Risk Filter set by the payee failed for the transaction.
|
||||
*/
|
||||
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.");
|
||||
}
|
||||
public const DECLINED_BY_RISK_FRAUD_FILTERS = 'DECLINED_BY_RISK_FRAUD_FILTERS';
|
||||
}
|
||||
|
||||
@@ -10,45 +10,41 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use Exception;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* The status for the authorized payment.
|
||||
*/
|
||||
class AuthorizationStatus
|
||||
{
|
||||
/**
|
||||
* The authorized payment is created. No captured payments have been made for this authorized payment.
|
||||
*/
|
||||
public const CREATED = 'CREATED';
|
||||
|
||||
/**
|
||||
* The authorized payment has one or more captures against it. The sum of these captured payments is
|
||||
* greater than the amount of the original authorized payment.
|
||||
*/
|
||||
public const CAPTURED = 'CAPTURED';
|
||||
|
||||
/**
|
||||
* PayPal cannot authorize funds for this authorized payment.
|
||||
*/
|
||||
public const DENIED = 'DENIED';
|
||||
|
||||
/**
|
||||
* A captured payment was made for the authorized payment for an amount that is less than the amount of
|
||||
* the original authorized payment.
|
||||
*/
|
||||
public const PARTIALLY_CAPTURED = 'PARTIALLY_CAPTURED';
|
||||
|
||||
/**
|
||||
* The authorized payment was voided. No more captured payments can be made against this authorized
|
||||
* payment.
|
||||
*/
|
||||
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
|
||||
* The created authorization is in pending state. For more information, see status.details.
|
||||
*/
|
||||
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.");
|
||||
}
|
||||
public const PENDING = 'PENDING';
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -42,6 +43,16 @@ class AuthorizationStatusDetails implements \JsonSerializable
|
||||
$this->reason = $reason;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the AuthorizationStatusDetails object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the AuthorizationStatusDetails object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify('AuthorizationStatusDetails', ['reason' => $this->reason]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -55,7 +66,7 @@ class AuthorizationStatusDetails implements \JsonSerializable
|
||||
{
|
||||
$json = [];
|
||||
if (isset($this->reason)) {
|
||||
$json['reason'] = AuthorizationIncompleteReason::checkValue($this->reason);
|
||||
$json['reason'] = $this->reason;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -67,6 +68,19 @@ class AuthorizationStatusWithDetails implements \JsonSerializable
|
||||
$this->statusDetails = $statusDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the AuthorizationStatusWithDetails object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the AuthorizationStatusWithDetails object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'AuthorizationStatusWithDetails',
|
||||
['status' => $this->status, 'statusDetails' => $this->statusDetails]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -80,7 +94,7 @@ class AuthorizationStatusWithDetails implements \JsonSerializable
|
||||
{
|
||||
$json = [];
|
||||
if (isset($this->status)) {
|
||||
$json['status'] = AuthorizationStatus::checkValue($this->status);
|
||||
$json['status'] = $this->status;
|
||||
}
|
||||
if (isset($this->statusDetails)) {
|
||||
$json['status_details'] = $this->statusDetails;
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -252,8 +253,8 @@ class AuthorizationWithAdditionalData implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*/
|
||||
public function getExpirationTime(): ?string
|
||||
{
|
||||
@@ -263,8 +264,8 @@ class AuthorizationWithAdditionalData implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*
|
||||
* @maps expiration_time
|
||||
*/
|
||||
@@ -300,8 +301,8 @@ class AuthorizationWithAdditionalData implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*/
|
||||
public function getCreateTime(): ?string
|
||||
{
|
||||
@@ -311,8 +312,8 @@ class AuthorizationWithAdditionalData implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*
|
||||
* @maps create_time
|
||||
*/
|
||||
@@ -324,8 +325,8 @@ class AuthorizationWithAdditionalData implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*/
|
||||
public function getUpdateTime(): ?string
|
||||
{
|
||||
@@ -335,8 +336,8 @@ class AuthorizationWithAdditionalData implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* 6). Seconds are required while fractional seconds are optional. Note: The regular expression
|
||||
* provides guidance but does not reject all invalid dates.
|
||||
*
|
||||
* @maps update_time
|
||||
*/
|
||||
@@ -365,6 +366,33 @@ class AuthorizationWithAdditionalData implements \JsonSerializable
|
||||
$this->processorResponse = $processorResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the AuthorizationWithAdditionalData object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the AuthorizationWithAdditionalData object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'AuthorizationWithAdditionalData',
|
||||
[
|
||||
'status' => $this->status,
|
||||
'statusDetails' => $this->statusDetails,
|
||||
'id' => $this->id,
|
||||
'amount' => $this->amount,
|
||||
'invoiceId' => $this->invoiceId,
|
||||
'customId' => $this->customId,
|
||||
'networkTransactionReference' => $this->networkTransactionReference,
|
||||
'sellerProtection' => $this->sellerProtection,
|
||||
'expirationTime' => $this->expirationTime,
|
||||
'links' => $this->links,
|
||||
'createTime' => $this->createTime,
|
||||
'updateTime' => $this->updateTime,
|
||||
'processorResponse' => $this->processorResponse
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -378,7 +406,7 @@ class AuthorizationWithAdditionalData implements \JsonSerializable
|
||||
{
|
||||
$json = [];
|
||||
if (isset($this->status)) {
|
||||
$json['status'] = AuthorizationStatus::checkValue($this->status);
|
||||
$json['status'] = $this->status;
|
||||
}
|
||||
if (isset($this->statusDetails)) {
|
||||
$json['status_details'] = $this->statusDetails;
|
||||
|
||||
@@ -10,105 +10,141 @@ declare(strict_types=1);
|
||||
|
||||
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
|
||||
];
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, the address matches but the zip code does not match.
|
||||
* For American Express transactions, the card holder address is correct.
|
||||
*/
|
||||
public const AVS_A = 'A';
|
||||
|
||||
/**
|
||||
* 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
|
||||
* For Visa, Mastercard, or Discover transactions, the address matches. International A.
|
||||
*/
|
||||
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.");
|
||||
}
|
||||
public const AVS_B = 'B';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, no values match. International N.
|
||||
*/
|
||||
public const AVS_C = 'C';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, the address and postal code match. International X.
|
||||
*/
|
||||
public const AVS_D = 'D';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, not allowed for Internet or phone transactions. For
|
||||
* American Express card holder, the name is incorrect but the address and postal code match.
|
||||
*/
|
||||
public const AVS_E = 'E';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, the address and postal code match. UK-specific X.
|
||||
* For American Express card holder, the name is incorrect but the address matches.
|
||||
*/
|
||||
public const AVS_F = 'F';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, global is unavailable. Nothing matches.
|
||||
*/
|
||||
public const AVS_G = 'G';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, international is unavailable. Not applicable.
|
||||
*/
|
||||
public const AVS_I = 'I';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, the address and postal code match. For American
|
||||
* Express card holder, the name, address, and postal code match.
|
||||
*/
|
||||
public const AVS_M = 'M';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, nothing matches. For American Express card holder,
|
||||
* the address and postal code are both incorrect.
|
||||
*/
|
||||
public const AVS_N = 'N';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, postal international Z. Postal code only.
|
||||
*/
|
||||
public const AVS_P = 'P';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, re-try the request. For American Express, the system
|
||||
* is unavailable.
|
||||
*/
|
||||
public const AVS_R = 'R';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, Discover, or American Express, the service is not supported.
|
||||
*/
|
||||
public const AVS_S = 'S';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, the service is unavailable. For American Express,
|
||||
* information is not available. For Maestro, the address is not checked or the acquirer had no
|
||||
* response. The service is not available.
|
||||
*/
|
||||
public const AVS_U = 'U';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, whole ZIP code. For American Express, the card
|
||||
* holder name, address, and postal code are all incorrect.
|
||||
*/
|
||||
public const AVS_W = 'W';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, exact match of the address and the nine-digit ZIP
|
||||
* code. For American Express, the card holder name, address, and postal code are all incorrect.
|
||||
*/
|
||||
public const AVS_X = 'X';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, the address and five-digit ZIP code match. For
|
||||
* American Express, the card holder address and postal code are both correct.
|
||||
*/
|
||||
public const AVS_Y = 'Y';
|
||||
|
||||
/**
|
||||
* For Visa, Mastercard, or Discover transactions, the five-digit ZIP code matches but no address. For
|
||||
* American Express, only the card holder postal code is correct.
|
||||
*/
|
||||
public const AVS_Z = 'Z';
|
||||
|
||||
/**
|
||||
* For Maestro, no AVS response was obtained.
|
||||
*/
|
||||
public const AVS_NULL = 'Null';
|
||||
|
||||
/**
|
||||
* For Maestro, all address information matches.
|
||||
*/
|
||||
public const AVS_0 = '0';
|
||||
|
||||
/**
|
||||
* For Maestro, none of the address information matches.
|
||||
*/
|
||||
public const AVS_1 = '1';
|
||||
|
||||
/**
|
||||
* For Maestro, part of the address information matches.
|
||||
*/
|
||||
public const AVS_2 = '2';
|
||||
|
||||
/**
|
||||
* For Maestro, the merchant did not provide AVS information. It was not processed.
|
||||
*/
|
||||
public const AVS_3 = '3';
|
||||
|
||||
/**
|
||||
* For Maestro, the address was not checked or the acquirer had no response. The service is not
|
||||
* available.
|
||||
*/
|
||||
public const AVS_4 = '4';
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -65,10 +66,9 @@ class BancontactPaymentObject implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* or region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*/
|
||||
public function getCountryCode(): ?string
|
||||
{
|
||||
@@ -78,10 +78,9 @@ class BancontactPaymentObject implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* or region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*
|
||||
* @maps country_code
|
||||
*/
|
||||
@@ -152,6 +151,25 @@ class BancontactPaymentObject implements \JsonSerializable
|
||||
$this->cardLastDigits = $cardLastDigits;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the BancontactPaymentObject object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the BancontactPaymentObject object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'BancontactPaymentObject',
|
||||
[
|
||||
'name' => $this->name,
|
||||
'countryCode' => $this->countryCode,
|
||||
'bic' => $this->bic,
|
||||
'ibanLastChars' => $this->ibanLastChars,
|
||||
'cardLastDigits' => $this->cardLastDigits
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -66,10 +67,9 @@ class BancontactPaymentRequest implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* or region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*/
|
||||
public function getCountryCode(): string
|
||||
{
|
||||
@@ -79,10 +79,9 @@ class BancontactPaymentRequest implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* or region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*
|
||||
* @required
|
||||
* @maps country_code
|
||||
@@ -112,6 +111,23 @@ class BancontactPaymentRequest implements \JsonSerializable
|
||||
$this->experienceContext = $experienceContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the BancontactPaymentRequest object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the BancontactPaymentRequest object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'BancontactPaymentRequest',
|
||||
[
|
||||
'name' => $this->name,
|
||||
'countryCode' => $this->countryCode,
|
||||
'experienceContext' => $this->experienceContext
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
258
src/Models/BillingCycle.php
Normal file
258
src/Models/BillingCycle.php
Normal file
@@ -0,0 +1,258 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PaypalServerSdkLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* The billing cycle providing details of the billing frequency, amount, duration and if the billing
|
||||
* cycle is a free, discounted or regular billing cycle. The sequence of the billing cycle will be in
|
||||
* the following order - free trial billing cycle(s), discounted trial billing cycle(s), regular
|
||||
* billing cycle(s).
|
||||
*/
|
||||
class BillingCycle implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $tenureType;
|
||||
|
||||
/**
|
||||
* @var PricingScheme|null
|
||||
*/
|
||||
private $pricingScheme;
|
||||
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
private $frequency;
|
||||
|
||||
/**
|
||||
* @var int|null
|
||||
*/
|
||||
private $totalCycles = 1;
|
||||
|
||||
/**
|
||||
* @var int|null
|
||||
*/
|
||||
private $sequence = 1;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $startDate;
|
||||
|
||||
/**
|
||||
* @param string $tenureType
|
||||
*/
|
||||
public function __construct(string $tenureType)
|
||||
{
|
||||
$this->tenureType = $tenureType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Tenure Type.
|
||||
* The tenure type of the billing cycle identifies if the billing cycle is a trial(free or discounted)
|
||||
* or regular billing cycle.
|
||||
*/
|
||||
public function getTenureType(): string
|
||||
{
|
||||
return $this->tenureType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Tenure Type.
|
||||
* The tenure type of the billing cycle identifies if the billing cycle is a trial(free or discounted)
|
||||
* or regular billing cycle.
|
||||
*
|
||||
* @required
|
||||
* @maps tenure_type
|
||||
*/
|
||||
public function setTenureType(string $tenureType): void
|
||||
{
|
||||
$this->tenureType = $tenureType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Pricing Scheme.
|
||||
* The pricing scheme details.
|
||||
*/
|
||||
public function getPricingScheme(): ?PricingScheme
|
||||
{
|
||||
return $this->pricingScheme;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Pricing Scheme.
|
||||
* The pricing scheme details.
|
||||
*
|
||||
* @maps pricing_scheme
|
||||
*/
|
||||
public function setPricingScheme(?PricingScheme $pricingScheme): void
|
||||
{
|
||||
$this->pricingScheme = $pricingScheme;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Frequency.
|
||||
* The frequency details for this billing cycle.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getFrequency()
|
||||
{
|
||||
return $this->frequency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Frequency.
|
||||
* The frequency details for this billing cycle.
|
||||
*
|
||||
* @maps frequency
|
||||
*
|
||||
* @param mixed $frequency
|
||||
*/
|
||||
public function setFrequency($frequency): void
|
||||
{
|
||||
$this->frequency = $frequency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Total Cycles.
|
||||
* The number of times this billing cycle gets executed. Trial billing cycles can only be executed a
|
||||
* finite number of times (value between 1 and 999 for total_cycles). Regular billing cycles can be
|
||||
* executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1
|
||||
* and 999 for total_cycles).
|
||||
*/
|
||||
public function getTotalCycles(): ?int
|
||||
{
|
||||
return $this->totalCycles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Total Cycles.
|
||||
* The number of times this billing cycle gets executed. Trial billing cycles can only be executed a
|
||||
* finite number of times (value between 1 and 999 for total_cycles). Regular billing cycles can be
|
||||
* executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1
|
||||
* and 999 for total_cycles).
|
||||
*
|
||||
* @maps total_cycles
|
||||
*/
|
||||
public function setTotalCycles(?int $totalCycles): void
|
||||
{
|
||||
$this->totalCycles = $totalCycles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Sequence.
|
||||
* The order in which this cycle is to run among other billing cycles. For example, a trial billing
|
||||
* cycle has a `sequence` of `1` while a regular billing cycle has a `sequence` of `2`, so that trial
|
||||
* cycle runs before the regular cycle.
|
||||
*/
|
||||
public function getSequence(): ?int
|
||||
{
|
||||
return $this->sequence;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Sequence.
|
||||
* The order in which this cycle is to run among other billing cycles. For example, a trial billing
|
||||
* cycle has a `sequence` of `1` while a regular billing cycle has a `sequence` of `2`, so that trial
|
||||
* cycle runs before the regular cycle.
|
||||
*
|
||||
* @maps sequence
|
||||
*/
|
||||
public function setSequence(?int $sequence): void
|
||||
{
|
||||
$this->sequence = $sequence;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Start Date.
|
||||
* The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-
|
||||
* 5.6). To represent special legal values, such as a date of birth, you should use dates with no
|
||||
* associated time or time-zone data. Whenever possible, use the standard `date_time` type. This
|
||||
* regular expression does not validate all dates. For example, February 31 is valid and nothing is
|
||||
* known about leap years.
|
||||
*/
|
||||
public function getStartDate(): ?string
|
||||
{
|
||||
return $this->startDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Start Date.
|
||||
* The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-
|
||||
* 5.6). To represent special legal values, such as a date of birth, you should use dates with no
|
||||
* associated time or time-zone data. Whenever possible, use the standard `date_time` type. This
|
||||
* regular expression does not validate all dates. For example, February 31 is valid and nothing is
|
||||
* known about leap years.
|
||||
*
|
||||
* @maps start_date
|
||||
*/
|
||||
public function setStartDate(?string $startDate): void
|
||||
{
|
||||
$this->startDate = $startDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the BillingCycle object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the BillingCycle object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'BillingCycle',
|
||||
[
|
||||
'tenureType' => $this->tenureType,
|
||||
'pricingScheme' => $this->pricingScheme,
|
||||
'frequency' => $this->frequency,
|
||||
'totalCycles' => $this->totalCycles,
|
||||
'sequence' => $this->sequence,
|
||||
'startDate' => $this->startDate
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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['tenure_type'] = $this->tenureType;
|
||||
if (isset($this->pricingScheme)) {
|
||||
$json['pricing_scheme'] = $this->pricingScheme;
|
||||
}
|
||||
if (isset($this->frequency)) {
|
||||
$json['frequency'] = $this->frequency;
|
||||
}
|
||||
if (isset($this->totalCycles)) {
|
||||
$json['total_cycles'] = $this->totalCycles;
|
||||
}
|
||||
if (isset($this->sequence)) {
|
||||
$json['sequence'] = $this->sequence;
|
||||
}
|
||||
if (isset($this->startDate)) {
|
||||
$json['start_date'] = $this->startDate;
|
||||
}
|
||||
|
||||
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -82,10 +83,9 @@ class BinDetails implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* or region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*/
|
||||
public function getBinCountryCode(): ?string
|
||||
{
|
||||
@@ -95,10 +95,9 @@ class BinDetails implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* or region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*
|
||||
* @maps bin_country_code
|
||||
*/
|
||||
@@ -133,6 +132,24 @@ class BinDetails implements \JsonSerializable
|
||||
$this->products = $products;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the BinDetails object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the BinDetails object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'BinDetails',
|
||||
[
|
||||
'bin' => $this->bin,
|
||||
'issuingBank' => $this->issuingBank,
|
||||
'binCountryCode' => $this->binCountryCode,
|
||||
'products' => $this->products
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -208,6 +209,27 @@ class BlikExperienceContext implements \JsonSerializable
|
||||
$this->consumerUserAgent = $consumerUserAgent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the BlikExperienceContext object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the BlikExperienceContext object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'BlikExperienceContext',
|
||||
[
|
||||
'brandName' => $this->brandName,
|
||||
'locale' => $this->locale,
|
||||
'shippingPreference' => $this->shippingPreference,
|
||||
'returnUrl' => $this->returnUrl,
|
||||
'cancelUrl' => $this->cancelUrl,
|
||||
'consumerIp' => $this->consumerIp,
|
||||
'consumerUserAgent' => $this->consumerUserAgent
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -227,7 +249,7 @@ class BlikExperienceContext implements \JsonSerializable
|
||||
$json['locale'] = $this->locale;
|
||||
}
|
||||
if (isset($this->shippingPreference)) {
|
||||
$json['shipping_preference'] = ShippingPreference::checkValue($this->shippingPreference);
|
||||
$json['shipping_preference'] = $this->shippingPreference;
|
||||
}
|
||||
if (isset($this->returnUrl)) {
|
||||
$json['return_url'] = $this->returnUrl;
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -51,6 +52,16 @@ class BlikLevel0PaymentObject implements \JsonSerializable
|
||||
$this->authCode = $authCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the BlikLevel0PaymentObject object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the BlikLevel0PaymentObject object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify('BlikLevel0PaymentObject', ['authCode' => $this->authCode]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -44,6 +45,16 @@ class BlikOneClickPaymentObject implements \JsonSerializable
|
||||
$this->consumerReference = $consumerReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the BlikOneClickPaymentObject object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the BlikOneClickPaymentObject object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify('BlikOneClickPaymentObject', ['consumerReference' => $this->consumerReference]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -132,6 +133,24 @@ class BlikOneClickPaymentRequest implements \JsonSerializable
|
||||
$this->aliasKey = $aliasKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the BlikOneClickPaymentRequest object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the BlikOneClickPaymentRequest object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'BlikOneClickPaymentRequest',
|
||||
[
|
||||
'authCode' => $this->authCode,
|
||||
'consumerReference' => $this->consumerReference,
|
||||
'aliasLabel' => $this->aliasLabel,
|
||||
'aliasKey' => $this->aliasKey
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -60,10 +61,9 @@ class BlikPaymentObject implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* or region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*/
|
||||
public function getCountryCode(): ?string
|
||||
{
|
||||
@@ -73,10 +73,9 @@ class BlikPaymentObject implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* or region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*
|
||||
* @maps country_code
|
||||
*/
|
||||
@@ -87,10 +86,9 @@ class BlikPaymentObject implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* 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>
|
||||
* The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters
|
||||
* are allowed after the @ sign. However, the generally accepted maximum length for an email address is
|
||||
* 254 characters. The pattern verifies that an unquoted @ sign exists.
|
||||
*/
|
||||
public function getEmail(): ?string
|
||||
{
|
||||
@@ -99,10 +97,9 @@ class BlikPaymentObject implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* 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>
|
||||
* The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters
|
||||
* are allowed after the @ sign. However, the generally accepted maximum length for an email address is
|
||||
* 254 characters. The pattern verifies that an unquoted @ sign exists.
|
||||
*
|
||||
* @maps email
|
||||
*/
|
||||
@@ -131,6 +128,24 @@ class BlikPaymentObject implements \JsonSerializable
|
||||
$this->oneClick = $oneClick;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the BlikPaymentObject object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the BlikPaymentObject object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'BlikPaymentObject',
|
||||
[
|
||||
'name' => $this->name,
|
||||
'countryCode' => $this->countryCode,
|
||||
'email' => $this->email,
|
||||
'oneClick' => $this->oneClick
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PaypalServerSdkLib\Models;
|
||||
|
||||
use PaypalServerSdkLib\ApiHelper;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -81,10 +82,9 @@ class BlikPaymentRequest implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* or region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*/
|
||||
public function getCountryCode(): string
|
||||
{
|
||||
@@ -94,10 +94,9 @@ class BlikPaymentRequest implements \JsonSerializable
|
||||
/**
|
||||
* 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>
|
||||
* or region. Note: The country code for Great Britain is GB and not UK 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.
|
||||
*
|
||||
* @required
|
||||
* @maps country_code
|
||||
@@ -109,10 +108,9 @@ class BlikPaymentRequest implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* 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>
|
||||
* The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters
|
||||
* are allowed after the @ sign. However, the generally accepted maximum length for an email address is
|
||||
* 254 characters. The pattern verifies that an unquoted @ sign exists.
|
||||
*/
|
||||
public function getEmail(): ?string
|
||||
{
|
||||
@@ -121,10 +119,9 @@ class BlikPaymentRequest implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* 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>
|
||||
* The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters
|
||||
* are allowed after the @ sign. However, the generally accepted maximum length for an email address is
|
||||
* 254 characters. The pattern verifies that an unquoted @ sign exists.
|
||||
*
|
||||
* @maps email
|
||||
*/
|
||||
@@ -193,6 +190,26 @@ class BlikPaymentRequest implements \JsonSerializable
|
||||
$this->oneClick = $oneClick;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the BlikPaymentRequest object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the BlikPaymentRequest object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'BlikPaymentRequest',
|
||||
[
|
||||
'name' => $this->name,
|
||||
'countryCode' => $this->countryCode,
|
||||
'email' => $this->email,
|
||||
'experienceContext' => $this->experienceContext,
|
||||
'level0' => $this->level0,
|
||||
'oneClick' => $this->oneClick
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
|
||||
@@ -31,7 +31,7 @@ class ActivityTimestampsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new activity timestamps Builder object.
|
||||
* Initializes a new Activity Timestamps Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class ActivityTimestampsBuilder
|
||||
|
||||
/**
|
||||
* Sets create time field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function createTime(?string $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class ActivityTimestampsBuilder
|
||||
|
||||
/**
|
||||
* Sets update time field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function updateTime(?string $value): self
|
||||
{
|
||||
@@ -57,7 +61,7 @@ class ActivityTimestampsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new activity timestamps object.
|
||||
* Initializes a new Activity Timestamps object.
|
||||
*/
|
||||
public function build(): ActivityTimestamps
|
||||
{
|
||||
|
||||
@@ -31,7 +31,9 @@ class AddressBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new address Builder object.
|
||||
* Initializes a new Address Builder object.
|
||||
*
|
||||
* @param string $countryCode
|
||||
*/
|
||||
public static function init(string $countryCode): self
|
||||
{
|
||||
@@ -40,6 +42,8 @@ class AddressBuilder
|
||||
|
||||
/**
|
||||
* Sets address line 1 field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function addressLine1(?string $value): self
|
||||
{
|
||||
@@ -49,6 +53,8 @@ class AddressBuilder
|
||||
|
||||
/**
|
||||
* Sets address line 2 field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function addressLine2(?string $value): self
|
||||
{
|
||||
@@ -58,6 +64,8 @@ class AddressBuilder
|
||||
|
||||
/**
|
||||
* Sets admin area 2 field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function adminArea2(?string $value): self
|
||||
{
|
||||
@@ -67,6 +75,8 @@ class AddressBuilder
|
||||
|
||||
/**
|
||||
* Sets admin area 1 field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function adminArea1(?string $value): self
|
||||
{
|
||||
@@ -76,6 +86,8 @@ class AddressBuilder
|
||||
|
||||
/**
|
||||
* Sets postal code field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function postalCode(?string $value): self
|
||||
{
|
||||
@@ -84,7 +96,7 @@ class AddressBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new address object.
|
||||
* Initializes a new Address object.
|
||||
*/
|
||||
public function build(): Address
|
||||
{
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ class AmountBreakdownBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new amount breakdown Builder object.
|
||||
* Initializes a new Amount Breakdown Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +41,8 @@ class AmountBreakdownBuilder
|
||||
|
||||
/**
|
||||
* Sets item total field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function itemTotal(?Money $value): self
|
||||
{
|
||||
@@ -50,6 +52,8 @@ class AmountBreakdownBuilder
|
||||
|
||||
/**
|
||||
* Sets shipping field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function shipping(?Money $value): self
|
||||
{
|
||||
@@ -59,6 +63,8 @@ class AmountBreakdownBuilder
|
||||
|
||||
/**
|
||||
* Sets handling field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function handling(?Money $value): self
|
||||
{
|
||||
@@ -68,6 +74,8 @@ class AmountBreakdownBuilder
|
||||
|
||||
/**
|
||||
* Sets tax total field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function taxTotal(?Money $value): self
|
||||
{
|
||||
@@ -77,6 +85,8 @@ class AmountBreakdownBuilder
|
||||
|
||||
/**
|
||||
* Sets insurance field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function insurance(?Money $value): self
|
||||
{
|
||||
@@ -86,6 +96,8 @@ class AmountBreakdownBuilder
|
||||
|
||||
/**
|
||||
* Sets shipping discount field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function shippingDiscount(?Money $value): self
|
||||
{
|
||||
@@ -95,6 +107,8 @@ class AmountBreakdownBuilder
|
||||
|
||||
/**
|
||||
* Sets discount field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function discount(?Money $value): self
|
||||
{
|
||||
@@ -103,7 +117,7 @@ class AmountBreakdownBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new amount breakdown object.
|
||||
* Initializes a new Amount Breakdown object.
|
||||
*/
|
||||
public function build(): AmountBreakdown
|
||||
{
|
||||
|
||||
@@ -32,7 +32,10 @@ class AmountWithBreakdownBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new amount with breakdown Builder object.
|
||||
* Initializes a new Amount With Breakdown Builder object.
|
||||
*
|
||||
* @param string $currencyCode
|
||||
* @param string $value
|
||||
*/
|
||||
public static function init(string $currencyCode, string $value): self
|
||||
{
|
||||
@@ -41,6 +44,8 @@ class AmountWithBreakdownBuilder
|
||||
|
||||
/**
|
||||
* Sets breakdown field.
|
||||
*
|
||||
* @param AmountBreakdown|null $value
|
||||
*/
|
||||
public function breakdown(?AmountBreakdown $value): self
|
||||
{
|
||||
@@ -49,7 +54,7 @@ class AmountWithBreakdownBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new amount with breakdown object.
|
||||
* Initializes a new Amount With Breakdown object.
|
||||
*/
|
||||
public function build(): AmountWithBreakdown
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ class ApplePayAttributesBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay attributes Builder object.
|
||||
* Initializes a new Apple Pay Attributes Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -42,6 +42,8 @@ class ApplePayAttributesBuilder
|
||||
|
||||
/**
|
||||
* Sets customer field.
|
||||
*
|
||||
* @param CustomerInformation|null $value
|
||||
*/
|
||||
public function customer(?CustomerInformation $value): self
|
||||
{
|
||||
@@ -51,6 +53,8 @@ class ApplePayAttributesBuilder
|
||||
|
||||
/**
|
||||
* Sets vault field.
|
||||
*
|
||||
* @param VaultInstruction|null $value
|
||||
*/
|
||||
public function vault(?VaultInstruction $value): self
|
||||
{
|
||||
@@ -59,7 +63,7 @@ class ApplePayAttributesBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay attributes object.
|
||||
* Initializes a new Apple Pay Attributes object.
|
||||
*/
|
||||
public function build(): ApplePayAttributes
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ class ApplePayAttributesResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay attributes response Builder object.
|
||||
* Initializes a new Apple Pay Attributes Response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +41,8 @@ class ApplePayAttributesResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets vault field.
|
||||
*
|
||||
* @param VaultResponse|null $value
|
||||
*/
|
||||
public function vault(?VaultResponse $value): self
|
||||
{
|
||||
@@ -49,7 +51,7 @@ class ApplePayAttributesResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay attributes response object.
|
||||
* Initializes a new Apple Pay Attributes Response object.
|
||||
*/
|
||||
public function build(): ApplePayAttributesResponse
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ class ApplePayCardBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay card Builder object.
|
||||
* Initializes a new Apple Pay Card Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +41,8 @@ class ApplePayCardBuilder
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
@@ -50,6 +52,8 @@ class ApplePayCardBuilder
|
||||
|
||||
/**
|
||||
* Sets last digits field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function lastDigits(?string $value): self
|
||||
{
|
||||
@@ -59,6 +63,8 @@ class ApplePayCardBuilder
|
||||
|
||||
/**
|
||||
* Sets type field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function type(?string $value): self
|
||||
{
|
||||
@@ -68,6 +74,8 @@ class ApplePayCardBuilder
|
||||
|
||||
/**
|
||||
* Sets brand field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function brand(?string $value): self
|
||||
{
|
||||
@@ -77,6 +85,8 @@ class ApplePayCardBuilder
|
||||
|
||||
/**
|
||||
* Sets billing address field.
|
||||
*
|
||||
* @param Address|null $value
|
||||
*/
|
||||
public function billingAddress(?Address $value): self
|
||||
{
|
||||
@@ -85,7 +95,7 @@ class ApplePayCardBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay card object.
|
||||
* Initializes a new Apple Pay Card object.
|
||||
*/
|
||||
public function build(): ApplePayCard
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@ use PaypalServerSdkLib\Models\AuthenticationResponse;
|
||||
use PaypalServerSdkLib\Models\BinDetails;
|
||||
use PaypalServerSdkLib\Models\CardAttributesResponse;
|
||||
use PaypalServerSdkLib\Models\CardFromRequest;
|
||||
use PaypalServerSdkLib\Models\CardStoredCredential;
|
||||
|
||||
/**
|
||||
* Builder for model ApplePayCardResponse
|
||||
@@ -36,7 +37,7 @@ class ApplePayCardResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay card response Builder object.
|
||||
* Initializes a new Apple Pay Card Response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -45,6 +46,8 @@ class ApplePayCardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
@@ -54,6 +57,8 @@ class ApplePayCardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets last digits field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function lastDigits(?string $value): self
|
||||
{
|
||||
@@ -63,6 +68,8 @@ class ApplePayCardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets brand field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function brand(?string $value): self
|
||||
{
|
||||
@@ -72,6 +79,8 @@ class ApplePayCardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets available networks field.
|
||||
*
|
||||
* @param string[]|null $value
|
||||
*/
|
||||
public function availableNetworks(?array $value): self
|
||||
{
|
||||
@@ -81,6 +90,8 @@ class ApplePayCardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets type field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function type(?string $value): self
|
||||
{
|
||||
@@ -90,6 +101,8 @@ class ApplePayCardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets authentication result field.
|
||||
*
|
||||
* @param AuthenticationResponse|null $value
|
||||
*/
|
||||
public function authenticationResult(?AuthenticationResponse $value): self
|
||||
{
|
||||
@@ -99,6 +112,8 @@ class ApplePayCardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets attributes field.
|
||||
*
|
||||
* @param CardAttributesResponse|null $value
|
||||
*/
|
||||
public function attributes(?CardAttributesResponse $value): self
|
||||
{
|
||||
@@ -108,6 +123,8 @@ class ApplePayCardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets from request field.
|
||||
*
|
||||
* @param CardFromRequest|null $value
|
||||
*/
|
||||
public function fromRequest(?CardFromRequest $value): self
|
||||
{
|
||||
@@ -117,6 +134,8 @@ class ApplePayCardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
@@ -126,6 +145,8 @@ class ApplePayCardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets bin details field.
|
||||
*
|
||||
* @param BinDetails|null $value
|
||||
*/
|
||||
public function binDetails(?BinDetails $value): self
|
||||
{
|
||||
@@ -133,8 +154,21 @@ class ApplePayCardResponseBuilder
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets stored credential field.
|
||||
*
|
||||
* @param CardStoredCredential|null $value
|
||||
*/
|
||||
public function storedCredential(?CardStoredCredential $value): self
|
||||
{
|
||||
$this->instance->setStoredCredential($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets billing address field.
|
||||
*
|
||||
* @param Address|null $value
|
||||
*/
|
||||
public function billingAddress(?Address $value): self
|
||||
{
|
||||
@@ -144,6 +178,8 @@ class ApplePayCardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets country code field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function countryCode(?string $value): self
|
||||
{
|
||||
@@ -152,7 +188,7 @@ class ApplePayCardResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay card response object.
|
||||
* Initializes a new Apple Pay Card Response object.
|
||||
*/
|
||||
public function build(): ApplePayCardResponse
|
||||
{
|
||||
|
||||
@@ -34,7 +34,9 @@ class ApplePayDecryptedTokenDataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay decrypted token data Builder object.
|
||||
* Initializes a new Apple Pay Decrypted Token Data Builder object.
|
||||
*
|
||||
* @param ApplePayTokenizedCard $tokenizedCard
|
||||
*/
|
||||
public static function init(ApplePayTokenizedCard $tokenizedCard): self
|
||||
{
|
||||
@@ -43,6 +45,8 @@ class ApplePayDecryptedTokenDataBuilder
|
||||
|
||||
/**
|
||||
* Sets transaction amount field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function transactionAmount(?Money $value): self
|
||||
{
|
||||
@@ -52,6 +56,8 @@ class ApplePayDecryptedTokenDataBuilder
|
||||
|
||||
/**
|
||||
* Sets device manufacturer id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function deviceManufacturerId(?string $value): self
|
||||
{
|
||||
@@ -61,6 +67,8 @@ class ApplePayDecryptedTokenDataBuilder
|
||||
|
||||
/**
|
||||
* Sets payment data type field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function paymentDataType(?string $value): self
|
||||
{
|
||||
@@ -70,6 +78,8 @@ class ApplePayDecryptedTokenDataBuilder
|
||||
|
||||
/**
|
||||
* Sets payment data field.
|
||||
*
|
||||
* @param ApplePayPaymentData|null $value
|
||||
*/
|
||||
public function paymentData(?ApplePayPaymentData $value): self
|
||||
{
|
||||
@@ -78,7 +88,7 @@ class ApplePayDecryptedTokenDataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay decrypted token data object.
|
||||
* Initializes a new Apple Pay Decrypted Token Data object.
|
||||
*/
|
||||
public function build(): ApplePayDecryptedTokenData
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class ApplePayPaymentDataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay payment data Builder object.
|
||||
* Initializes a new Apple Pay Payment Data Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class ApplePayPaymentDataBuilder
|
||||
|
||||
/**
|
||||
* Sets cryptogram field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function cryptogram(?string $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class ApplePayPaymentDataBuilder
|
||||
|
||||
/**
|
||||
* Sets eci indicator field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function eciIndicator(?string $value): self
|
||||
{
|
||||
@@ -58,6 +62,8 @@ class ApplePayPaymentDataBuilder
|
||||
|
||||
/**
|
||||
* Sets emv data field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function emvData(?string $value): self
|
||||
{
|
||||
@@ -67,6 +73,8 @@ class ApplePayPaymentDataBuilder
|
||||
|
||||
/**
|
||||
* Sets pin field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function pin(?string $value): self
|
||||
{
|
||||
@@ -75,7 +83,7 @@ class ApplePayPaymentDataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay payment data object.
|
||||
* Initializes a new Apple Pay Payment Data object.
|
||||
*/
|
||||
public function build(): ApplePayPaymentData
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@ use Core\Utils\CoreHelper;
|
||||
use PaypalServerSdkLib\Models\ApplePayAttributesResponse;
|
||||
use PaypalServerSdkLib\Models\ApplePayCardResponse;
|
||||
use PaypalServerSdkLib\Models\ApplePayPaymentObject;
|
||||
use PaypalServerSdkLib\Models\CardStoredCredential;
|
||||
use PaypalServerSdkLib\Models\PhoneNumber;
|
||||
|
||||
/**
|
||||
@@ -34,7 +35,7 @@ class ApplePayPaymentObjectBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay payment object Builder object.
|
||||
* Initializes a new Apple Pay Payment Object Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -43,6 +44,8 @@ class ApplePayPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
@@ -52,6 +55,8 @@ class ApplePayPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets token field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function token(?string $value): self
|
||||
{
|
||||
@@ -61,6 +66,8 @@ class ApplePayPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
@@ -70,6 +77,8 @@ class ApplePayPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets email address field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function emailAddress(?string $value): self
|
||||
{
|
||||
@@ -79,6 +88,8 @@ class ApplePayPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets phone number field.
|
||||
*
|
||||
* @param PhoneNumber|null $value
|
||||
*/
|
||||
public function phoneNumber(?PhoneNumber $value): self
|
||||
{
|
||||
@@ -88,6 +99,8 @@ class ApplePayPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets card field.
|
||||
*
|
||||
* @param ApplePayCardResponse|null $value
|
||||
*/
|
||||
public function card(?ApplePayCardResponse $value): self
|
||||
{
|
||||
@@ -97,6 +110,8 @@ class ApplePayPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets attributes field.
|
||||
*
|
||||
* @param ApplePayAttributesResponse|null $value
|
||||
*/
|
||||
public function attributes(?ApplePayAttributesResponse $value): self
|
||||
{
|
||||
@@ -105,7 +120,18 @@ class ApplePayPaymentObjectBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay payment object object.
|
||||
* Sets stored credential field.
|
||||
*
|
||||
* @param CardStoredCredential|null $value
|
||||
*/
|
||||
public function storedCredential(?CardStoredCredential $value): self
|
||||
{
|
||||
$this->instance->setStoredCredential($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new Apple Pay Payment Object object.
|
||||
*/
|
||||
public function build(): ApplePayPaymentObject
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ class ApplePayPaymentTokenBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay payment token Builder object.
|
||||
* Initializes a new Apple Pay Payment Token Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +41,8 @@ class ApplePayPaymentTokenBuilder
|
||||
|
||||
/**
|
||||
* Sets card field.
|
||||
*
|
||||
* @param ApplePayCard|null $value
|
||||
*/
|
||||
public function card(?ApplePayCard $value): self
|
||||
{
|
||||
@@ -49,7 +51,7 @@ class ApplePayPaymentTokenBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay payment token object.
|
||||
* Initializes a new Apple Pay Payment Token object.
|
||||
*/
|
||||
public function build(): ApplePayPaymentToken
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ class ApplePayRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay request Builder object.
|
||||
* Initializes a new Apple Pay Request Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -44,6 +44,8 @@ class ApplePayRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
@@ -53,6 +55,8 @@ class ApplePayRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
@@ -62,6 +66,8 @@ class ApplePayRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets email address field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function emailAddress(?string $value): self
|
||||
{
|
||||
@@ -71,6 +77,8 @@ class ApplePayRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets phone number field.
|
||||
*
|
||||
* @param PhoneNumber|null $value
|
||||
*/
|
||||
public function phoneNumber(?PhoneNumber $value): self
|
||||
{
|
||||
@@ -80,6 +88,8 @@ class ApplePayRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets decrypted token field.
|
||||
*
|
||||
* @param ApplePayDecryptedTokenData|null $value
|
||||
*/
|
||||
public function decryptedToken(?ApplePayDecryptedTokenData $value): self
|
||||
{
|
||||
@@ -89,6 +99,8 @@ class ApplePayRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets stored credential field.
|
||||
*
|
||||
* @param CardStoredCredential|null $value
|
||||
*/
|
||||
public function storedCredential(?CardStoredCredential $value): self
|
||||
{
|
||||
@@ -98,6 +110,8 @@ class ApplePayRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets vault id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function vaultId(?string $value): self
|
||||
{
|
||||
@@ -107,6 +121,8 @@ class ApplePayRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets attributes field.
|
||||
*
|
||||
* @param ApplePayAttributes|null $value
|
||||
*/
|
||||
public function attributes(?ApplePayAttributes $value): self
|
||||
{
|
||||
@@ -115,7 +131,7 @@ class ApplePayRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay request object.
|
||||
* Initializes a new Apple Pay Request object.
|
||||
*/
|
||||
public function build(): ApplePayRequest
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ class ApplePayTokenizedCardBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay tokenized card Builder object.
|
||||
* Initializes a new Apple Pay Tokenized Card Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +41,8 @@ class ApplePayTokenizedCardBuilder
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
@@ -50,6 +52,8 @@ class ApplePayTokenizedCardBuilder
|
||||
|
||||
/**
|
||||
* Sets number field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function number(?string $value): self
|
||||
{
|
||||
@@ -59,6 +63,8 @@ class ApplePayTokenizedCardBuilder
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
@@ -68,6 +74,8 @@ class ApplePayTokenizedCardBuilder
|
||||
|
||||
/**
|
||||
* Sets card type field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function cardType(?string $value): self
|
||||
{
|
||||
@@ -77,6 +85,8 @@ class ApplePayTokenizedCardBuilder
|
||||
|
||||
/**
|
||||
* Sets type field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function type(?string $value): self
|
||||
{
|
||||
@@ -86,6 +96,8 @@ class ApplePayTokenizedCardBuilder
|
||||
|
||||
/**
|
||||
* Sets brand field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function brand(?string $value): self
|
||||
{
|
||||
@@ -95,6 +107,8 @@ class ApplePayTokenizedCardBuilder
|
||||
|
||||
/**
|
||||
* Sets billing address field.
|
||||
*
|
||||
* @param Address|null $value
|
||||
*/
|
||||
public function billingAddress(?Address $value): self
|
||||
{
|
||||
@@ -103,7 +117,7 @@ class ApplePayTokenizedCardBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new apple pay tokenized card object.
|
||||
* Initializes a new Apple Pay Tokenized Card object.
|
||||
*/
|
||||
public function build(): ApplePayTokenizedCard
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class AssuranceDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new assurance details Builder object.
|
||||
* Initializes a new Assurance Details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class AssuranceDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets account verified field.
|
||||
*
|
||||
* @param bool|null $value
|
||||
*/
|
||||
public function accountVerified(?bool $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class AssuranceDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets card holder authenticated field.
|
||||
*
|
||||
* @param bool|null $value
|
||||
*/
|
||||
public function cardHolderAuthenticated(?bool $value): self
|
||||
{
|
||||
@@ -57,7 +61,7 @@ class AssuranceDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new assurance details object.
|
||||
* Initializes a new Assurance Details object.
|
||||
*/
|
||||
public function build(): AssuranceDetails
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ class AuthenticationResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authentication response Builder object.
|
||||
* Initializes a new Authentication Response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +41,8 @@ class AuthenticationResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets liability shift field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function liabilityShift(?string $value): self
|
||||
{
|
||||
@@ -50,6 +52,8 @@ class AuthenticationResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets three d secure field.
|
||||
*
|
||||
* @param ThreeDSecureAuthenticationResponse|null $value
|
||||
*/
|
||||
public function threeDSecure(?ThreeDSecureAuthenticationResponse $value): self
|
||||
{
|
||||
@@ -58,7 +62,7 @@ class AuthenticationResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authentication response object.
|
||||
* Initializes a new Authentication Response object.
|
||||
*/
|
||||
public function build(): AuthenticationResponse
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace PaypalServerSdkLib\Models\Builders;
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSdkLib\Models\Authorization;
|
||||
use PaypalServerSdkLib\Models\AuthorizationStatusDetails;
|
||||
use PaypalServerSdkLib\Models\LinkDescription;
|
||||
use PaypalServerSdkLib\Models\Money;
|
||||
use PaypalServerSdkLib\Models\NetworkTransactionReference;
|
||||
use PaypalServerSdkLib\Models\SellerProtection;
|
||||
@@ -35,7 +36,7 @@ class AuthorizationBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization Builder object.
|
||||
* Initializes a new Authorization Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -44,6 +45,8 @@ class AuthorizationBuilder
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
@@ -53,6 +56,8 @@ class AuthorizationBuilder
|
||||
|
||||
/**
|
||||
* Sets status details field.
|
||||
*
|
||||
* @param AuthorizationStatusDetails|null $value
|
||||
*/
|
||||
public function statusDetails(?AuthorizationStatusDetails $value): self
|
||||
{
|
||||
@@ -62,6 +67,8 @@ class AuthorizationBuilder
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
@@ -71,6 +78,8 @@ class AuthorizationBuilder
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
@@ -80,6 +89,8 @@ class AuthorizationBuilder
|
||||
|
||||
/**
|
||||
* Sets invoice id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function invoiceId(?string $value): self
|
||||
{
|
||||
@@ -89,6 +100,8 @@ class AuthorizationBuilder
|
||||
|
||||
/**
|
||||
* Sets custom id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function customId(?string $value): self
|
||||
{
|
||||
@@ -98,6 +111,8 @@ class AuthorizationBuilder
|
||||
|
||||
/**
|
||||
* Sets network transaction reference field.
|
||||
*
|
||||
* @param NetworkTransactionReference|null $value
|
||||
*/
|
||||
public function networkTransactionReference(?NetworkTransactionReference $value): self
|
||||
{
|
||||
@@ -107,6 +122,8 @@ class AuthorizationBuilder
|
||||
|
||||
/**
|
||||
* Sets seller protection field.
|
||||
*
|
||||
* @param SellerProtection|null $value
|
||||
*/
|
||||
public function sellerProtection(?SellerProtection $value): self
|
||||
{
|
||||
@@ -116,6 +133,8 @@ class AuthorizationBuilder
|
||||
|
||||
/**
|
||||
* Sets expiration time field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function expirationTime(?string $value): self
|
||||
{
|
||||
@@ -125,6 +144,8 @@ class AuthorizationBuilder
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*
|
||||
* @param LinkDescription[]|null $value
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
@@ -134,6 +155,8 @@ class AuthorizationBuilder
|
||||
|
||||
/**
|
||||
* Sets create time field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function createTime(?string $value): self
|
||||
{
|
||||
@@ -143,6 +166,8 @@ class AuthorizationBuilder
|
||||
|
||||
/**
|
||||
* Sets update time field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function updateTime(?string $value): self
|
||||
{
|
||||
@@ -151,7 +176,7 @@ class AuthorizationBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization object.
|
||||
* Initializes a new Authorization object.
|
||||
*/
|
||||
public function build(): Authorization
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class AuthorizationStatusDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization status details Builder object.
|
||||
* Initializes a new Authorization Status Details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class AuthorizationStatusDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets reason field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function reason(?string $value): self
|
||||
{
|
||||
@@ -48,7 +50,7 @@ class AuthorizationStatusDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization status details object.
|
||||
* Initializes a new Authorization Status Details object.
|
||||
*/
|
||||
public function build(): AuthorizationStatusDetails
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ class AuthorizationStatusWithDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization status with details Builder object.
|
||||
* Initializes a new Authorization Status With Details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +41,8 @@ class AuthorizationStatusWithDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
@@ -50,6 +52,8 @@ class AuthorizationStatusWithDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets status details field.
|
||||
*
|
||||
* @param AuthorizationStatusDetails|null $value
|
||||
*/
|
||||
public function statusDetails(?AuthorizationStatusDetails $value): self
|
||||
{
|
||||
@@ -58,7 +62,7 @@ class AuthorizationStatusWithDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization status with details object.
|
||||
* Initializes a new Authorization Status With Details object.
|
||||
*/
|
||||
public function build(): AuthorizationStatusWithDetails
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace PaypalServerSdkLib\Models\Builders;
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSdkLib\Models\AuthorizationStatusDetails;
|
||||
use PaypalServerSdkLib\Models\AuthorizationWithAdditionalData;
|
||||
use PaypalServerSdkLib\Models\LinkDescription;
|
||||
use PaypalServerSdkLib\Models\Money;
|
||||
use PaypalServerSdkLib\Models\NetworkTransactionReference;
|
||||
use PaypalServerSdkLib\Models\ProcessorResponse;
|
||||
@@ -36,7 +37,7 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization with additional data Builder object.
|
||||
* Initializes a new Authorization With Additional Data Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -45,6 +46,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
@@ -54,6 +57,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets status details field.
|
||||
*
|
||||
* @param AuthorizationStatusDetails|null $value
|
||||
*/
|
||||
public function statusDetails(?AuthorizationStatusDetails $value): self
|
||||
{
|
||||
@@ -63,6 +68,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
@@ -72,6 +79,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
@@ -81,6 +90,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets invoice id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function invoiceId(?string $value): self
|
||||
{
|
||||
@@ -90,6 +101,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets custom id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function customId(?string $value): self
|
||||
{
|
||||
@@ -99,6 +112,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets network transaction reference field.
|
||||
*
|
||||
* @param NetworkTransactionReference|null $value
|
||||
*/
|
||||
public function networkTransactionReference(?NetworkTransactionReference $value): self
|
||||
{
|
||||
@@ -108,6 +123,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets seller protection field.
|
||||
*
|
||||
* @param SellerProtection|null $value
|
||||
*/
|
||||
public function sellerProtection(?SellerProtection $value): self
|
||||
{
|
||||
@@ -117,6 +134,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets expiration time field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function expirationTime(?string $value): self
|
||||
{
|
||||
@@ -126,6 +145,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*
|
||||
* @param LinkDescription[]|null $value
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
@@ -135,6 +156,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets create time field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function createTime(?string $value): self
|
||||
{
|
||||
@@ -144,6 +167,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets update time field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function updateTime(?string $value): self
|
||||
{
|
||||
@@ -153,6 +178,8 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
|
||||
/**
|
||||
* Sets processor response field.
|
||||
*
|
||||
* @param ProcessorResponse|null $value
|
||||
*/
|
||||
public function processorResponse(?ProcessorResponse $value): self
|
||||
{
|
||||
@@ -161,7 +188,7 @@ class AuthorizationWithAdditionalDataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new authorization with additional data object.
|
||||
* Initializes a new Authorization With Additional Data object.
|
||||
*/
|
||||
public function build(): AuthorizationWithAdditionalData
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class BancontactPaymentObjectBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bancontact payment object Builder object.
|
||||
* Initializes a new Bancontact Payment Object Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class BancontactPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class BancontactPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets country code field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function countryCode(?string $value): self
|
||||
{
|
||||
@@ -58,6 +62,8 @@ class BancontactPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets bic field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function bic(?string $value): self
|
||||
{
|
||||
@@ -67,6 +73,8 @@ class BancontactPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets iban last chars field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function ibanLastChars(?string $value): self
|
||||
{
|
||||
@@ -76,6 +84,8 @@ class BancontactPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets card last digits field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function cardLastDigits(?string $value): self
|
||||
{
|
||||
@@ -84,7 +94,7 @@ class BancontactPaymentObjectBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bancontact payment object object.
|
||||
* Initializes a new Bancontact Payment Object object.
|
||||
*/
|
||||
public function build(): BancontactPaymentObject
|
||||
{
|
||||
|
||||
@@ -32,7 +32,10 @@ class BancontactPaymentRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bancontact payment request Builder object.
|
||||
* Initializes a new Bancontact Payment Request Builder object.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $countryCode
|
||||
*/
|
||||
public static function init(string $name, string $countryCode): self
|
||||
{
|
||||
@@ -41,6 +44,8 @@ class BancontactPaymentRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets experience context field.
|
||||
*
|
||||
* @param ExperienceContext|null $value
|
||||
*/
|
||||
public function experienceContext(?ExperienceContext $value): self
|
||||
{
|
||||
@@ -49,7 +54,7 @@ class BancontactPaymentRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bancontact payment request object.
|
||||
* Initializes a new Bancontact Payment Request object.
|
||||
*/
|
||||
public function build(): BancontactPaymentRequest
|
||||
{
|
||||
|
||||
106
src/Models/Builders/BillingCycleBuilder.php
Normal file
106
src/Models/Builders/BillingCycleBuilder.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?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\BillingCycle;
|
||||
use PaypalServerSdkLib\Models\PricingScheme;
|
||||
|
||||
/**
|
||||
* Builder for model BillingCycle
|
||||
*
|
||||
* @see BillingCycle
|
||||
*/
|
||||
class BillingCycleBuilder
|
||||
{
|
||||
/**
|
||||
* @var BillingCycle
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(BillingCycle $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new Billing Cycle Builder object.
|
||||
*
|
||||
* @param string $tenureType
|
||||
*/
|
||||
public static function init(string $tenureType): self
|
||||
{
|
||||
return new self(new BillingCycle($tenureType));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets pricing scheme field.
|
||||
*
|
||||
* @param PricingScheme|null $value
|
||||
*/
|
||||
public function pricingScheme(?PricingScheme $value): self
|
||||
{
|
||||
$this->instance->setPricingScheme($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets frequency field.
|
||||
*
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function frequency($value): self
|
||||
{
|
||||
$this->instance->setFrequency($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets total cycles field.
|
||||
*
|
||||
* @param int|null $value
|
||||
*/
|
||||
public function totalCycles(?int $value): self
|
||||
{
|
||||
$this->instance->setTotalCycles($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets sequence field.
|
||||
*
|
||||
* @param int|null $value
|
||||
*/
|
||||
public function sequence(?int $value): self
|
||||
{
|
||||
$this->instance->setSequence($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets start date field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function startDate(?string $value): self
|
||||
{
|
||||
$this->instance->setStartDate($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new Billing Cycle object.
|
||||
*/
|
||||
public function build(): BillingCycle
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ class BinDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bin details Builder object.
|
||||
* Initializes a new Bin Details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class BinDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets bin field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function bin(?string $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class BinDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets issuing bank field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function issuingBank(?string $value): self
|
||||
{
|
||||
@@ -58,6 +62,8 @@ class BinDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets bin country code field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function binCountryCode(?string $value): self
|
||||
{
|
||||
@@ -67,6 +73,8 @@ class BinDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets products field.
|
||||
*
|
||||
* @param string[]|null $value
|
||||
*/
|
||||
public function products(?array $value): self
|
||||
{
|
||||
@@ -75,7 +83,7 @@ class BinDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new bin details object.
|
||||
* Initializes a new Bin Details object.
|
||||
*/
|
||||
public function build(): BinDetails
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class BlikExperienceContextBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blik experience context Builder object.
|
||||
* Initializes a new Blik Experience Context Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class BlikExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets brand name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function brandName(?string $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class BlikExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets locale field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function locale(?string $value): self
|
||||
{
|
||||
@@ -58,6 +62,8 @@ class BlikExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets shipping preference field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function shippingPreference(?string $value): self
|
||||
{
|
||||
@@ -67,6 +73,8 @@ class BlikExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets return url field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function returnUrl(?string $value): self
|
||||
{
|
||||
@@ -76,6 +84,8 @@ class BlikExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets cancel url field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function cancelUrl(?string $value): self
|
||||
{
|
||||
@@ -85,6 +95,8 @@ class BlikExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets consumer ip field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function consumerIp(?string $value): self
|
||||
{
|
||||
@@ -94,6 +106,8 @@ class BlikExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets consumer user agent field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function consumerUserAgent(?string $value): self
|
||||
{
|
||||
@@ -102,7 +116,7 @@ class BlikExperienceContextBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blik experience context object.
|
||||
* Initializes a new Blik Experience Context object.
|
||||
*/
|
||||
public function build(): BlikExperienceContext
|
||||
{
|
||||
|
||||
@@ -31,7 +31,9 @@ class BlikLevel0PaymentObjectBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blik level 0 payment object Builder object.
|
||||
* Initializes a new Blik Level 0 Payment Object Builder object.
|
||||
*
|
||||
* @param string $authCode
|
||||
*/
|
||||
public static function init(string $authCode): self
|
||||
{
|
||||
@@ -39,7 +41,7 @@ class BlikLevel0PaymentObjectBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blik level 0 payment object object.
|
||||
* Initializes a new Blik Level 0 Payment Object object.
|
||||
*/
|
||||
public function build(): BlikLevel0PaymentObject
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class BlikOneClickPaymentObjectBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blik one click payment object Builder object.
|
||||
* Initializes a new Blik One Click Payment Object Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class BlikOneClickPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets consumer reference field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function consumerReference(?string $value): self
|
||||
{
|
||||
@@ -48,7 +50,7 @@ class BlikOneClickPaymentObjectBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blik one click payment object object.
|
||||
* Initializes a new Blik One Click Payment Object object.
|
||||
*/
|
||||
public function build(): BlikOneClickPaymentObject
|
||||
{
|
||||
|
||||
@@ -31,7 +31,9 @@ class BlikOneClickPaymentRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blik one click payment request Builder object.
|
||||
* Initializes a new Blik One Click Payment Request Builder object.
|
||||
*
|
||||
* @param string $consumerReference
|
||||
*/
|
||||
public static function init(string $consumerReference): self
|
||||
{
|
||||
@@ -40,6 +42,8 @@ class BlikOneClickPaymentRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets auth code field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function authCode(?string $value): self
|
||||
{
|
||||
@@ -49,6 +53,8 @@ class BlikOneClickPaymentRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets alias label field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function aliasLabel(?string $value): self
|
||||
{
|
||||
@@ -58,6 +64,8 @@ class BlikOneClickPaymentRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets alias key field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function aliasKey(?string $value): self
|
||||
{
|
||||
@@ -66,7 +74,7 @@ class BlikOneClickPaymentRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blik one click payment request object.
|
||||
* Initializes a new Blik One Click Payment Request object.
|
||||
*/
|
||||
public function build(): BlikOneClickPaymentRequest
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ class BlikPaymentObjectBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blik payment object Builder object.
|
||||
* Initializes a new Blik Payment Object Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +41,8 @@ class BlikPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
@@ -50,6 +52,8 @@ class BlikPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets country code field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function countryCode(?string $value): self
|
||||
{
|
||||
@@ -59,6 +63,8 @@ class BlikPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets email field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function email(?string $value): self
|
||||
{
|
||||
@@ -68,6 +74,8 @@ class BlikPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets one click field.
|
||||
*
|
||||
* @param BlikOneClickPaymentObject|null $value
|
||||
*/
|
||||
public function oneClick(?BlikOneClickPaymentObject $value): self
|
||||
{
|
||||
@@ -76,7 +84,7 @@ class BlikPaymentObjectBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blik payment object object.
|
||||
* Initializes a new Blik Payment Object object.
|
||||
*/
|
||||
public function build(): BlikPaymentObject
|
||||
{
|
||||
|
||||
@@ -34,7 +34,10 @@ class BlikPaymentRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blik payment request Builder object.
|
||||
* Initializes a new Blik Payment Request Builder object.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $countryCode
|
||||
*/
|
||||
public static function init(string $name, string $countryCode): self
|
||||
{
|
||||
@@ -43,6 +46,8 @@ class BlikPaymentRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets email field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function email(?string $value): self
|
||||
{
|
||||
@@ -52,6 +57,8 @@ class BlikPaymentRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets experience context field.
|
||||
*
|
||||
* @param BlikExperienceContext|null $value
|
||||
*/
|
||||
public function experienceContext(?BlikExperienceContext $value): self
|
||||
{
|
||||
@@ -61,6 +68,8 @@ class BlikPaymentRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets level 0 field.
|
||||
*
|
||||
* @param BlikLevel0PaymentObject|null $value
|
||||
*/
|
||||
public function level0(?BlikLevel0PaymentObject $value): self
|
||||
{
|
||||
@@ -70,6 +79,8 @@ class BlikPaymentRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets one click field.
|
||||
*
|
||||
* @param BlikOneClickPaymentRequest|null $value
|
||||
*/
|
||||
public function oneClick(?BlikOneClickPaymentRequest $value): self
|
||||
{
|
||||
@@ -78,7 +89,7 @@ class BlikPaymentRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new blik payment request object.
|
||||
* Initializes a new Blik Payment Request object.
|
||||
*/
|
||||
public function build(): BlikPaymentRequest
|
||||
{
|
||||
|
||||
51
src/Models/Builders/CallbackConfigurationBuilder.php
Normal file
51
src/Models/Builders/CallbackConfigurationBuilder.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?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\CallbackConfiguration;
|
||||
|
||||
/**
|
||||
* Builder for model CallbackConfiguration
|
||||
*
|
||||
* @see CallbackConfiguration
|
||||
*/
|
||||
class CallbackConfigurationBuilder
|
||||
{
|
||||
/**
|
||||
* @var CallbackConfiguration
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CallbackConfiguration $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new Callback Configuration Builder object.
|
||||
*
|
||||
* @param string[] $callbackEvents
|
||||
* @param string $callbackUrl
|
||||
*/
|
||||
public static function init(array $callbackEvents, string $callbackUrl): self
|
||||
{
|
||||
return new self(new CallbackConfiguration($callbackEvents, $callbackUrl));
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new Callback Configuration object.
|
||||
*/
|
||||
public function build(): CallbackConfiguration
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ namespace PaypalServerSdkLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSdkLib\Models\CapturePaymentInstruction;
|
||||
use PaypalServerSdkLib\Models\PlatformFee;
|
||||
|
||||
/**
|
||||
* Builder for model CapturePaymentInstruction
|
||||
@@ -31,7 +32,7 @@ class CapturePaymentInstructionBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture payment instruction Builder object.
|
||||
* Initializes a new Capture Payment Instruction Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +41,8 @@ class CapturePaymentInstructionBuilder
|
||||
|
||||
/**
|
||||
* Sets platform fees field.
|
||||
*
|
||||
* @param PlatformFee[]|null $value
|
||||
*/
|
||||
public function platformFees(?array $value): self
|
||||
{
|
||||
@@ -49,6 +52,8 @@ class CapturePaymentInstructionBuilder
|
||||
|
||||
/**
|
||||
* Sets disbursement mode field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function disbursementMode(?string $value): self
|
||||
{
|
||||
@@ -58,6 +63,8 @@ class CapturePaymentInstructionBuilder
|
||||
|
||||
/**
|
||||
* Sets payee receivable fx rate id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function payeeReceivableFxRateId(?string $value): self
|
||||
{
|
||||
@@ -66,7 +73,7 @@ class CapturePaymentInstructionBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture payment instruction object.
|
||||
* Initializes a new Capture Payment Instruction object.
|
||||
*/
|
||||
public function build(): CapturePaymentInstruction
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ class CaptureRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture request Builder object.
|
||||
* Initializes a new Capture Request Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -42,6 +42,8 @@ class CaptureRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets invoice id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function invoiceId(?string $value): self
|
||||
{
|
||||
@@ -51,6 +53,8 @@ class CaptureRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets note to payer field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function noteToPayer(?string $value): self
|
||||
{
|
||||
@@ -60,6 +64,8 @@ class CaptureRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
@@ -69,6 +75,8 @@ class CaptureRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets final capture field.
|
||||
*
|
||||
* @param bool|null $value
|
||||
*/
|
||||
public function finalCapture(?bool $value): self
|
||||
{
|
||||
@@ -78,6 +86,8 @@ class CaptureRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets payment instruction field.
|
||||
*
|
||||
* @param CapturePaymentInstruction|null $value
|
||||
*/
|
||||
public function paymentInstruction(?CapturePaymentInstruction $value): self
|
||||
{
|
||||
@@ -87,6 +97,8 @@ class CaptureRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets soft descriptor field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function softDescriptor(?string $value): self
|
||||
{
|
||||
@@ -95,7 +107,7 @@ class CaptureRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture request object.
|
||||
* Initializes a new Capture Request object.
|
||||
*/
|
||||
public function build(): CaptureRequest
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class CaptureStatusDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture status details Builder object.
|
||||
* Initializes a new Capture Status Details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class CaptureStatusDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets reason field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function reason(?string $value): self
|
||||
{
|
||||
@@ -48,7 +50,7 @@ class CaptureStatusDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture status details object.
|
||||
* Initializes a new Capture Status Details object.
|
||||
*/
|
||||
public function build(): CaptureStatusDetails
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ class CaptureStatusWithDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture status with details Builder object.
|
||||
* Initializes a new Capture Status With Details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +41,8 @@ class CaptureStatusWithDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
@@ -50,6 +52,8 @@ class CaptureStatusWithDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets status details field.
|
||||
*
|
||||
* @param CaptureStatusDetails|null $value
|
||||
*/
|
||||
public function statusDetails(?CaptureStatusDetails $value): self
|
||||
{
|
||||
@@ -58,7 +62,7 @@ class CaptureStatusWithDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture status with details object.
|
||||
* Initializes a new Capture Status With Details object.
|
||||
*/
|
||||
public function build(): CaptureStatusWithDetails
|
||||
{
|
||||
|
||||
@@ -13,11 +13,12 @@ namespace PaypalServerSdkLib\Models\Builders;
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSdkLib\Models\CapturedPayment;
|
||||
use PaypalServerSdkLib\Models\CaptureStatusDetails;
|
||||
use PaypalServerSdkLib\Models\LinkDescription;
|
||||
use PaypalServerSdkLib\Models\Money;
|
||||
use PaypalServerSdkLib\Models\NetworkTransactionReference;
|
||||
use PaypalServerSdkLib\Models\Payee;
|
||||
use PaypalServerSdkLib\Models\PayeeBase;
|
||||
use PaypalServerSdkLib\Models\PaymentsProcessorResponse;
|
||||
use PaypalServerSdkLib\Models\PaymentSupplementaryData;
|
||||
use PaypalServerSdkLib\Models\ProcessorResponse;
|
||||
use PaypalServerSdkLib\Models\SellerProtection;
|
||||
use PaypalServerSdkLib\Models\SellerReceivableBreakdown;
|
||||
|
||||
@@ -39,7 +40,7 @@ class CapturedPaymentBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new captured payment Builder object.
|
||||
* Initializes a new Captured Payment Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -48,6 +49,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
@@ -57,6 +60,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets status details field.
|
||||
*
|
||||
* @param CaptureStatusDetails|null $value
|
||||
*/
|
||||
public function statusDetails(?CaptureStatusDetails $value): self
|
||||
{
|
||||
@@ -66,6 +71,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
@@ -75,6 +82,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
@@ -84,6 +93,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets invoice id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function invoiceId(?string $value): self
|
||||
{
|
||||
@@ -93,6 +104,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets custom id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function customId(?string $value): self
|
||||
{
|
||||
@@ -102,6 +115,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets network transaction reference field.
|
||||
*
|
||||
* @param NetworkTransactionReference|null $value
|
||||
*/
|
||||
public function networkTransactionReference(?NetworkTransactionReference $value): self
|
||||
{
|
||||
@@ -111,6 +126,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets seller protection field.
|
||||
*
|
||||
* @param SellerProtection|null $value
|
||||
*/
|
||||
public function sellerProtection(?SellerProtection $value): self
|
||||
{
|
||||
@@ -120,6 +137,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets final capture field.
|
||||
*
|
||||
* @param bool|null $value
|
||||
*/
|
||||
public function finalCapture(?bool $value): self
|
||||
{
|
||||
@@ -129,6 +148,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets seller receivable breakdown field.
|
||||
*
|
||||
* @param SellerReceivableBreakdown|null $value
|
||||
*/
|
||||
public function sellerReceivableBreakdown(?SellerReceivableBreakdown $value): self
|
||||
{
|
||||
@@ -138,6 +159,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets disbursement mode field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function disbursementMode(?string $value): self
|
||||
{
|
||||
@@ -147,6 +170,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*
|
||||
* @param LinkDescription[]|null $value
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
@@ -156,8 +181,10 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets processor response field.
|
||||
*
|
||||
* @param PaymentsProcessorResponse|null $value
|
||||
*/
|
||||
public function processorResponse(?ProcessorResponse $value): self
|
||||
public function processorResponse(?PaymentsProcessorResponse $value): self
|
||||
{
|
||||
$this->instance->setProcessorResponse($value);
|
||||
return $this;
|
||||
@@ -165,6 +192,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets create time field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function createTime(?string $value): self
|
||||
{
|
||||
@@ -174,6 +203,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets update time field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function updateTime(?string $value): self
|
||||
{
|
||||
@@ -183,6 +214,8 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets supplementary data field.
|
||||
*
|
||||
* @param PaymentSupplementaryData|null $value
|
||||
*/
|
||||
public function supplementaryData(?PaymentSupplementaryData $value): self
|
||||
{
|
||||
@@ -192,15 +225,17 @@ class CapturedPaymentBuilder
|
||||
|
||||
/**
|
||||
* Sets payee field.
|
||||
*
|
||||
* @param PayeeBase|null $value
|
||||
*/
|
||||
public function payee(?Payee $value): self
|
||||
public function payee(?PayeeBase $value): self
|
||||
{
|
||||
$this->instance->setPayee($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new captured payment object.
|
||||
* Initializes a new Captured Payment object.
|
||||
*/
|
||||
public function build(): CapturedPayment
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ class CardAttributesBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card attributes Builder object.
|
||||
* Initializes a new Card Attributes Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -43,6 +43,8 @@ class CardAttributesBuilder
|
||||
|
||||
/**
|
||||
* Sets customer field.
|
||||
*
|
||||
* @param CardCustomerInformation|null $value
|
||||
*/
|
||||
public function customer(?CardCustomerInformation $value): self
|
||||
{
|
||||
@@ -52,6 +54,8 @@ class CardAttributesBuilder
|
||||
|
||||
/**
|
||||
* Sets vault field.
|
||||
*
|
||||
* @param VaultInstructionBase|null $value
|
||||
*/
|
||||
public function vault(?VaultInstructionBase $value): self
|
||||
{
|
||||
@@ -61,6 +65,8 @@ class CardAttributesBuilder
|
||||
|
||||
/**
|
||||
* Sets verification field.
|
||||
*
|
||||
* @param CardVerification|null $value
|
||||
*/
|
||||
public function verification(?CardVerification $value): self
|
||||
{
|
||||
@@ -69,7 +75,7 @@ class CardAttributesBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card attributes object.
|
||||
* Initializes a new Card Attributes object.
|
||||
*/
|
||||
public function build(): CardAttributes
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ class CardAttributesResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card attributes response Builder object.
|
||||
* Initializes a new Card Attributes Response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +41,8 @@ class CardAttributesResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets vault field.
|
||||
*
|
||||
* @param CardVaultResponse|null $value
|
||||
*/
|
||||
public function vault(?CardVaultResponse $value): self
|
||||
{
|
||||
@@ -49,7 +51,7 @@ class CardAttributesResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card attributes response object.
|
||||
* Initializes a new Card Attributes Response object.
|
||||
*/
|
||||
public function build(): CardAttributesResponse
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace PaypalServerSdkLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSdkLib\Models\CardAuthenticationResponse;
|
||||
use PaypalServerSdkLib\Models\ThreeDSecureAuthenticationResponse;
|
||||
use PaypalServerSdkLib\Models\ThreeDSecureCardAuthenticationResponse;
|
||||
|
||||
/**
|
||||
* Builder for model CardAuthenticationResponse
|
||||
@@ -32,7 +32,7 @@ class CardAuthenticationResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card authentication response Builder object.
|
||||
* Initializes a new Card Authentication Response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,15 +41,17 @@ class CardAuthenticationResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets three d secure field.
|
||||
*
|
||||
* @param ThreeDSecureCardAuthenticationResponse|null $value
|
||||
*/
|
||||
public function threeDSecure(?ThreeDSecureAuthenticationResponse $value): self
|
||||
public function threeDSecure(?ThreeDSecureCardAuthenticationResponse $value): self
|
||||
{
|
||||
$this->instance->setThreeDSecure($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card authentication response object.
|
||||
* Initializes a new Card Authentication Response object.
|
||||
*/
|
||||
public function build(): CardAuthenticationResponse
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ class CardCustomerInformationBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card customer information Builder object.
|
||||
* Initializes a new Card Customer Information Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +41,8 @@ class CardCustomerInformationBuilder
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
@@ -50,6 +52,8 @@ class CardCustomerInformationBuilder
|
||||
|
||||
/**
|
||||
* Sets email address field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function emailAddress(?string $value): self
|
||||
{
|
||||
@@ -59,6 +63,8 @@ class CardCustomerInformationBuilder
|
||||
|
||||
/**
|
||||
* Sets phone field.
|
||||
*
|
||||
* @param PhoneWithType|null $value
|
||||
*/
|
||||
public function phone(?PhoneWithType $value): self
|
||||
{
|
||||
@@ -68,6 +74,8 @@ class CardCustomerInformationBuilder
|
||||
|
||||
/**
|
||||
* Sets merchant customer id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function merchantCustomerId(?string $value): self
|
||||
{
|
||||
@@ -76,7 +84,7 @@ class CardCustomerInformationBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card customer information object.
|
||||
* Initializes a new Card Customer Information object.
|
||||
*/
|
||||
public function build(): CardCustomerInformation
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class CardExperienceContextBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card experience context Builder object.
|
||||
* Initializes a new Card Experience Context Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class CardExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets return url field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function returnUrl(?string $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class CardExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets cancel url field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function cancelUrl(?string $value): self
|
||||
{
|
||||
@@ -57,7 +61,7 @@ class CardExperienceContextBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card experience context object.
|
||||
* Initializes a new Card Experience Context object.
|
||||
*/
|
||||
public function build(): CardExperienceContext
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class CardFromRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card from request Builder object.
|
||||
* Initializes a new Card From Request Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class CardFromRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class CardFromRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets last digits field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function lastDigits(?string $value): self
|
||||
{
|
||||
@@ -57,7 +61,7 @@ class CardFromRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card from request object.
|
||||
* Initializes a new Card From Request object.
|
||||
*/
|
||||
public function build(): CardFromRequest
|
||||
{
|
||||
|
||||
@@ -1,161 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
@@ -11,40 +11,42 @@ declare(strict_types=1);
|
||||
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\CardPaymentTokenEntity;
|
||||
use PaypalServerSdkLib\Models\CardResponseAddress;
|
||||
use PaypalServerSdkLib\Models\CardVerificationDetails;
|
||||
use PaypalServerSdkLib\Models\NetworkTransactionReferenceEntity;
|
||||
|
||||
/**
|
||||
* Builder for model CardResponseEntity
|
||||
* Builder for model CardPaymentTokenEntity
|
||||
*
|
||||
* @see CardResponseEntity
|
||||
* @see CardPaymentTokenEntity
|
||||
*/
|
||||
class CardResponseEntityBuilder
|
||||
class CardPaymentTokenEntityBuilder
|
||||
{
|
||||
/**
|
||||
* @var CardResponseEntity
|
||||
* @var CardPaymentTokenEntity
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CardResponseEntity $instance)
|
||||
private function __construct(CardPaymentTokenEntity $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card response entity Builder object.
|
||||
* Initializes a new Card Payment Token Entity Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CardResponseEntity());
|
||||
return new self(new CardPaymentTokenEntity());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
@@ -54,6 +56,8 @@ class CardResponseEntityBuilder
|
||||
|
||||
/**
|
||||
* Sets last digits field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function lastDigits(?string $value): self
|
||||
{
|
||||
@@ -63,6 +67,8 @@ class CardResponseEntityBuilder
|
||||
|
||||
/**
|
||||
* Sets brand field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function brand(?string $value): self
|
||||
{
|
||||
@@ -72,6 +78,8 @@ class CardResponseEntityBuilder
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
@@ -81,8 +89,10 @@ class CardResponseEntityBuilder
|
||||
|
||||
/**
|
||||
* Sets billing address field.
|
||||
*
|
||||
* @param CardResponseAddress|null $value
|
||||
*/
|
||||
public function billingAddress(?AddressDetails $value): self
|
||||
public function billingAddress(?CardResponseAddress $value): self
|
||||
{
|
||||
$this->instance->setBillingAddress($value);
|
||||
return $this;
|
||||
@@ -90,6 +100,8 @@ class CardResponseEntityBuilder
|
||||
|
||||
/**
|
||||
* Sets verification status field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function verificationStatus(?string $value): self
|
||||
{
|
||||
@@ -99,6 +111,8 @@ class CardResponseEntityBuilder
|
||||
|
||||
/**
|
||||
* Sets verification field.
|
||||
*
|
||||
* @param CardVerificationDetails|null $value
|
||||
*/
|
||||
public function verification(?CardVerificationDetails $value): self
|
||||
{
|
||||
@@ -108,6 +122,8 @@ class CardResponseEntityBuilder
|
||||
|
||||
/**
|
||||
* Sets network transaction reference field.
|
||||
*
|
||||
* @param NetworkTransactionReferenceEntity|null $value
|
||||
*/
|
||||
public function networkTransactionReference(?NetworkTransactionReferenceEntity $value): self
|
||||
{
|
||||
@@ -117,6 +133,8 @@ class CardResponseEntityBuilder
|
||||
|
||||
/**
|
||||
* Sets authentication result field.
|
||||
*
|
||||
* @param CardAuthenticationResponse|null $value
|
||||
*/
|
||||
public function authenticationResult(?CardAuthenticationResponse $value): self
|
||||
{
|
||||
@@ -126,6 +144,8 @@ class CardResponseEntityBuilder
|
||||
|
||||
/**
|
||||
* Sets bin details field.
|
||||
*
|
||||
* @param BinDetails|null $value
|
||||
*/
|
||||
public function binDetails(?BinDetails $value): self
|
||||
{
|
||||
@@ -135,6 +155,8 @@ class CardResponseEntityBuilder
|
||||
|
||||
/**
|
||||
* Sets type field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function type(?string $value): self
|
||||
{
|
||||
@@ -143,9 +165,9 @@ class CardResponseEntityBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card response entity object.
|
||||
* Initializes a new Card Payment Token Entity object.
|
||||
*/
|
||||
public function build(): CardResponseEntity
|
||||
public function build(): CardPaymentTokenEntity
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
@@ -36,7 +36,7 @@ class CardRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card request Builder object.
|
||||
* Initializes a new Card Request Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -45,6 +45,8 @@ class CardRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
@@ -54,6 +56,8 @@ class CardRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets number field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function number(?string $value): self
|
||||
{
|
||||
@@ -63,6 +67,8 @@ class CardRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
@@ -72,6 +78,8 @@ class CardRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets security code field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function securityCode(?string $value): self
|
||||
{
|
||||
@@ -81,6 +89,8 @@ class CardRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets billing address field.
|
||||
*
|
||||
* @param Address|null $value
|
||||
*/
|
||||
public function billingAddress(?Address $value): self
|
||||
{
|
||||
@@ -90,6 +100,8 @@ class CardRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets attributes field.
|
||||
*
|
||||
* @param CardAttributes|null $value
|
||||
*/
|
||||
public function attributes(?CardAttributes $value): self
|
||||
{
|
||||
@@ -99,6 +111,8 @@ class CardRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets vault id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function vaultId(?string $value): self
|
||||
{
|
||||
@@ -108,6 +122,8 @@ class CardRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets single use token field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function singleUseToken(?string $value): self
|
||||
{
|
||||
@@ -117,6 +133,8 @@ class CardRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets stored credential field.
|
||||
*
|
||||
* @param CardStoredCredential|null $value
|
||||
*/
|
||||
public function storedCredential(?CardStoredCredential $value): self
|
||||
{
|
||||
@@ -126,6 +144,8 @@ class CardRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets network token field.
|
||||
*
|
||||
* @param NetworkToken|null $value
|
||||
*/
|
||||
public function networkToken(?NetworkToken $value): self
|
||||
{
|
||||
@@ -135,6 +155,8 @@ class CardRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets experience context field.
|
||||
*
|
||||
* @param CardExperienceContext|null $value
|
||||
*/
|
||||
public function experienceContext(?CardExperienceContext $value): self
|
||||
{
|
||||
@@ -143,7 +165,7 @@ class CardRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card request object.
|
||||
* Initializes a new Card Request object.
|
||||
*/
|
||||
public function build(): CardRequest
|
||||
{
|
||||
|
||||
@@ -11,35 +11,39 @@ declare(strict_types=1);
|
||||
namespace PaypalServerSdkLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSdkLib\Models\PortablePostalAddressMediumGrained;
|
||||
use PaypalServerSdkLib\Models\CardResponseAddress;
|
||||
|
||||
/**
|
||||
* Builder for model PortablePostalAddressMediumGrained
|
||||
* Builder for model CardResponseAddress
|
||||
*
|
||||
* @see PortablePostalAddressMediumGrained
|
||||
* @see CardResponseAddress
|
||||
*/
|
||||
class PortablePostalAddressMediumGrainedBuilder
|
||||
class CardResponseAddressBuilder
|
||||
{
|
||||
/**
|
||||
* @var PortablePostalAddressMediumGrained
|
||||
* @var CardResponseAddress
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(PortablePostalAddressMediumGrained $instance)
|
||||
private function __construct(CardResponseAddress $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new portable postal address medium grained Builder object.
|
||||
* Initializes a new Card Response Address Builder object.
|
||||
*
|
||||
* @param string $countryCode
|
||||
*/
|
||||
public static function init(string $countryCode): self
|
||||
{
|
||||
return new self(new PortablePostalAddressMediumGrained($countryCode));
|
||||
return new self(new CardResponseAddress($countryCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets address line 1 field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function addressLine1(?string $value): self
|
||||
{
|
||||
@@ -49,6 +53,8 @@ class PortablePostalAddressMediumGrainedBuilder
|
||||
|
||||
/**
|
||||
* Sets address line 2 field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function addressLine2(?string $value): self
|
||||
{
|
||||
@@ -58,6 +64,8 @@ class PortablePostalAddressMediumGrainedBuilder
|
||||
|
||||
/**
|
||||
* Sets admin area 2 field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function adminArea2(?string $value): self
|
||||
{
|
||||
@@ -67,6 +75,8 @@ class PortablePostalAddressMediumGrainedBuilder
|
||||
|
||||
/**
|
||||
* Sets admin area 1 field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function adminArea1(?string $value): self
|
||||
{
|
||||
@@ -76,6 +86,8 @@ class PortablePostalAddressMediumGrainedBuilder
|
||||
|
||||
/**
|
||||
* Sets postal code field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function postalCode(?string $value): self
|
||||
{
|
||||
@@ -84,9 +96,20 @@ class PortablePostalAddressMediumGrainedBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new portable postal address medium grained object.
|
||||
* Sets id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function build(): PortablePostalAddressMediumGrained
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new Card Response Address object.
|
||||
*/
|
||||
public function build(): CardResponseAddress
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
@@ -16,6 +16,7 @@ use PaypalServerSdkLib\Models\BinDetails;
|
||||
use PaypalServerSdkLib\Models\CardAttributesResponse;
|
||||
use PaypalServerSdkLib\Models\CardFromRequest;
|
||||
use PaypalServerSdkLib\Models\CardResponse;
|
||||
use PaypalServerSdkLib\Models\CardStoredCredential;
|
||||
|
||||
/**
|
||||
* Builder for model CardResponse
|
||||
@@ -35,7 +36,7 @@ class CardResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card response Builder object.
|
||||
* Initializes a new Card Response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -44,6 +45,8 @@ class CardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
@@ -53,6 +56,8 @@ class CardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets last digits field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function lastDigits(?string $value): self
|
||||
{
|
||||
@@ -62,6 +67,8 @@ class CardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets brand field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function brand(?string $value): self
|
||||
{
|
||||
@@ -71,6 +78,8 @@ class CardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets available networks field.
|
||||
*
|
||||
* @param string[]|null $value
|
||||
*/
|
||||
public function availableNetworks(?array $value): self
|
||||
{
|
||||
@@ -80,6 +89,8 @@ class CardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets type field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function type(?string $value): self
|
||||
{
|
||||
@@ -89,6 +100,8 @@ class CardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets authentication result field.
|
||||
*
|
||||
* @param AuthenticationResponse|null $value
|
||||
*/
|
||||
public function authenticationResult(?AuthenticationResponse $value): self
|
||||
{
|
||||
@@ -98,6 +111,8 @@ class CardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets attributes field.
|
||||
*
|
||||
* @param CardAttributesResponse|null $value
|
||||
*/
|
||||
public function attributes(?CardAttributesResponse $value): self
|
||||
{
|
||||
@@ -107,6 +122,8 @@ class CardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets from request field.
|
||||
*
|
||||
* @param CardFromRequest|null $value
|
||||
*/
|
||||
public function fromRequest(?CardFromRequest $value): self
|
||||
{
|
||||
@@ -116,6 +133,8 @@ class CardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets expiry field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function expiry(?string $value): self
|
||||
{
|
||||
@@ -125,6 +144,8 @@ class CardResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets bin details field.
|
||||
*
|
||||
* @param BinDetails|null $value
|
||||
*/
|
||||
public function binDetails(?BinDetails $value): self
|
||||
{
|
||||
@@ -133,7 +154,18 @@ class CardResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card response object.
|
||||
* Sets stored credential field.
|
||||
*
|
||||
* @param CardStoredCredential|null $value
|
||||
*/
|
||||
public function storedCredential(?CardStoredCredential $value): self
|
||||
{
|
||||
$this->instance->setStoredCredential($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new Card Response object.
|
||||
*/
|
||||
public function build(): CardResponse
|
||||
{
|
||||
|
||||
@@ -32,7 +32,10 @@ class CardStoredCredentialBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card stored credential Builder object.
|
||||
* Initializes a new Card Stored Credential Builder object.
|
||||
*
|
||||
* @param string $paymentInitiator
|
||||
* @param string $paymentType
|
||||
*/
|
||||
public static function init(string $paymentInitiator, string $paymentType): self
|
||||
{
|
||||
@@ -41,6 +44,8 @@ class CardStoredCredentialBuilder
|
||||
|
||||
/**
|
||||
* Sets usage field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function usage(?string $value): self
|
||||
{
|
||||
@@ -50,6 +55,8 @@ class CardStoredCredentialBuilder
|
||||
|
||||
/**
|
||||
* Sets previous network transaction reference field.
|
||||
*
|
||||
* @param NetworkTransactionReference|null $value
|
||||
*/
|
||||
public function previousNetworkTransactionReference(?NetworkTransactionReference $value): self
|
||||
{
|
||||
@@ -58,7 +65,7 @@ class CardStoredCredentialBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card stored credential object.
|
||||
* Initializes a new Card Stored Credential object.
|
||||
*/
|
||||
public function build(): CardStoredCredential
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ class CardSupplementaryDataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card supplementary data Builder object.
|
||||
* Initializes a new Card Supplementary Data Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -42,6 +42,8 @@ class CardSupplementaryDataBuilder
|
||||
|
||||
/**
|
||||
* Sets level 2 field.
|
||||
*
|
||||
* @param Level2CardProcessingData|null $value
|
||||
*/
|
||||
public function level2(?Level2CardProcessingData $value): self
|
||||
{
|
||||
@@ -51,6 +53,8 @@ class CardSupplementaryDataBuilder
|
||||
|
||||
/**
|
||||
* Sets level 3 field.
|
||||
*
|
||||
* @param Level3CardProcessingData|null $value
|
||||
*/
|
||||
public function level3(?Level3CardProcessingData $value): self
|
||||
{
|
||||
@@ -59,7 +63,7 @@ class CardSupplementaryDataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card supplementary data object.
|
||||
* Initializes a new Card Supplementary Data object.
|
||||
*/
|
||||
public function build(): CardSupplementaryData
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace PaypalServerSdkLib\Models\Builders;
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSdkLib\Models\CardCustomerInformation;
|
||||
use PaypalServerSdkLib\Models\CardVaultResponse;
|
||||
use PaypalServerSdkLib\Models\LinkDescription;
|
||||
|
||||
/**
|
||||
* Builder for model CardVaultResponse
|
||||
@@ -32,7 +33,7 @@ class CardVaultResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card vault response Builder object.
|
||||
* Initializes a new Card Vault Response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +42,8 @@ class CardVaultResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
@@ -50,6 +53,8 @@ class CardVaultResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets status field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function status(?string $value): self
|
||||
{
|
||||
@@ -59,6 +64,8 @@ class CardVaultResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*
|
||||
* @param LinkDescription[]|null $value
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
@@ -68,6 +75,8 @@ class CardVaultResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets customer field.
|
||||
*
|
||||
* @param CardCustomerInformation|null $value
|
||||
*/
|
||||
public function customer(?CardCustomerInformation $value): self
|
||||
{
|
||||
@@ -76,7 +85,7 @@ class CardVaultResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card vault response object.
|
||||
* Initializes a new Card Vault Response object.
|
||||
*/
|
||||
public function build(): CardVaultResponse
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class CardVerificationBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card verification Builder object.
|
||||
* Initializes a new Card Verification Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class CardVerificationBuilder
|
||||
|
||||
/**
|
||||
* Sets method field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function method(?string $value): self
|
||||
{
|
||||
@@ -48,7 +50,7 @@ class CardVerificationBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card verification object.
|
||||
* Initializes a new Card Verification object.
|
||||
*/
|
||||
public function build(): CardVerification
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ class CardVerificationDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card verification details Builder object.
|
||||
* Initializes a new Card Verification Details Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -42,6 +42,8 @@ class CardVerificationDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets network transaction id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function networkTransactionId(?string $value): self
|
||||
{
|
||||
@@ -51,6 +53,8 @@ class CardVerificationDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets date field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function date(?string $value): self
|
||||
{
|
||||
@@ -60,6 +64,8 @@ class CardVerificationDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets network field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function network(?string $value): self
|
||||
{
|
||||
@@ -69,6 +75,8 @@ class CardVerificationDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets time field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function time(?string $value): self
|
||||
{
|
||||
@@ -78,6 +86,8 @@ class CardVerificationDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
@@ -87,6 +97,8 @@ class CardVerificationDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets processor response field.
|
||||
*
|
||||
* @param CardVerificationProcessorResponse|null $value
|
||||
*/
|
||||
public function processorResponse(?CardVerificationProcessorResponse $value): self
|
||||
{
|
||||
@@ -96,6 +108,8 @@ class CardVerificationDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets three d secure field.
|
||||
*
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function threeDSecure($value): self
|
||||
{
|
||||
@@ -104,7 +118,7 @@ class CardVerificationDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card verification details object.
|
||||
* Initializes a new Card Verification Details object.
|
||||
*/
|
||||
public function build(): CardVerificationDetails
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class CardVerificationProcessorResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card verification processor response Builder object.
|
||||
* Initializes a new Card Verification Processor Response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class CardVerificationProcessorResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets avs code field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function avsCode(?string $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class CardVerificationProcessorResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets cvv code field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function cvvCode(?string $value): self
|
||||
{
|
||||
@@ -57,7 +61,7 @@ class CardVerificationProcessorResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new card verification processor response object.
|
||||
* Initializes a new Card Verification Processor Response object.
|
||||
*/
|
||||
public function build(): CardVerificationProcessorResponse
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ class CobrandedCardBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new cobranded card Builder object.
|
||||
* Initializes a new Cobranded Card Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -42,6 +42,8 @@ class CobrandedCardBuilder
|
||||
|
||||
/**
|
||||
* Sets labels field.
|
||||
*
|
||||
* @param string[]|null $value
|
||||
*/
|
||||
public function labels(?array $value): self
|
||||
{
|
||||
@@ -51,6 +53,8 @@ class CobrandedCardBuilder
|
||||
|
||||
/**
|
||||
* Sets payee field.
|
||||
*
|
||||
* @param PayeeBase|null $value
|
||||
*/
|
||||
public function payee(?PayeeBase $value): self
|
||||
{
|
||||
@@ -60,6 +64,8 @@ class CobrandedCardBuilder
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*
|
||||
* @param Money|null $value
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
@@ -68,7 +74,7 @@ class CobrandedCardBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new cobranded card object.
|
||||
* Initializes a new Cobranded Card object.
|
||||
*/
|
||||
public function build(): CobrandedCard
|
||||
{
|
||||
|
||||
@@ -33,24 +33,19 @@ class ConfirmOrderRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new confirm order request Builder object.
|
||||
* Initializes a new Confirm Order Request Builder object.
|
||||
*
|
||||
* @param PaymentSource $paymentSource
|
||||
*/
|
||||
public static function init(PaymentSource $paymentSource): self
|
||||
{
|
||||
return new self(new ConfirmOrderRequest($paymentSource));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets processing instruction field.
|
||||
*/
|
||||
public function processingInstruction($value): self
|
||||
{
|
||||
$this->instance->setProcessingInstruction($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets application context field.
|
||||
*
|
||||
* @param OrderConfirmApplicationContext|null $value
|
||||
*/
|
||||
public function applicationContext(?OrderConfirmApplicationContext $value): self
|
||||
{
|
||||
@@ -59,7 +54,7 @@ class ConfirmOrderRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new confirm order request object.
|
||||
* Initializes a new Confirm Order Request object.
|
||||
*/
|
||||
public function build(): ConfirmOrderRequest
|
||||
{
|
||||
|
||||
@@ -11,35 +11,37 @@ declare(strict_types=1);
|
||||
namespace PaypalServerSdkLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSdkLib\Models\CustomerRequest;
|
||||
use PaypalServerSdkLib\Models\Customer;
|
||||
|
||||
/**
|
||||
* Builder for model CustomerRequest
|
||||
* Builder for model Customer
|
||||
*
|
||||
* @see CustomerRequest
|
||||
* @see Customer
|
||||
*/
|
||||
class CustomerRequestBuilder
|
||||
class CustomerBuilder
|
||||
{
|
||||
/**
|
||||
* @var CustomerRequest
|
||||
* @var Customer
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CustomerRequest $instance)
|
||||
private function __construct(Customer $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new customer request Builder object.
|
||||
* Initializes a new Customer Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CustomerRequest());
|
||||
return new self(new Customer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class CustomerRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets merchant customer id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function merchantCustomerId(?string $value): self
|
||||
{
|
||||
@@ -57,9 +61,9 @@ class CustomerRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new customer request object.
|
||||
* Initializes a new Customer object.
|
||||
*/
|
||||
public function build(): CustomerRequest
|
||||
public function build(): Customer
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
@@ -32,7 +32,7 @@ class CustomerInformationBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new customer information Builder object.
|
||||
* Initializes a new Customer Information Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +41,8 @@ class CustomerInformationBuilder
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
@@ -50,6 +52,8 @@ class CustomerInformationBuilder
|
||||
|
||||
/**
|
||||
* Sets email address field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function emailAddress(?string $value): self
|
||||
{
|
||||
@@ -59,6 +63,8 @@ class CustomerInformationBuilder
|
||||
|
||||
/**
|
||||
* Sets phone field.
|
||||
*
|
||||
* @param PhoneWithType|null $value
|
||||
*/
|
||||
public function phone(?PhoneWithType $value): self
|
||||
{
|
||||
@@ -67,7 +73,7 @@ class CustomerInformationBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new customer information object.
|
||||
* Initializes a new Customer Information object.
|
||||
*/
|
||||
public function build(): CustomerInformation
|
||||
{
|
||||
|
||||
70
src/Models/Builders/CustomerResponseBuilder.php
Normal file
70
src/Models/Builders/CustomerResponseBuilder.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\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSdkLib\Models\CustomerResponse;
|
||||
|
||||
/**
|
||||
* Builder for model CustomerResponse
|
||||
*
|
||||
* @see CustomerResponse
|
||||
*/
|
||||
class CustomerResponseBuilder
|
||||
{
|
||||
/**
|
||||
* @var CustomerResponse
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CustomerResponse $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new Customer Response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CustomerResponse());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function id(?string $value): self
|
||||
{
|
||||
$this->instance->setId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchant customer id field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function merchantCustomerId(?string $value): self
|
||||
{
|
||||
$this->instance->setMerchantCustomerId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new Customer Response object.
|
||||
*/
|
||||
public function build(): CustomerResponse
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,10 @@ declare(strict_types=1);
|
||||
namespace PaypalServerSdkLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSdkLib\Models\CustomerRequest;
|
||||
use PaypalServerSdkLib\Models\CustomerVaultPaymentTokensResponse;
|
||||
use PaypalServerSdkLib\Models\LinkDescription;
|
||||
use PaypalServerSdkLib\Models\PaymentTokenResponse;
|
||||
use PaypalServerSdkLib\Models\VaultResponseCustomer;
|
||||
|
||||
/**
|
||||
* Builder for model CustomerVaultPaymentTokensResponse
|
||||
@@ -32,7 +34,7 @@ class CustomerVaultPaymentTokensResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new customer vault payment tokens response Builder object.
|
||||
* Initializes a new Customer Vault Payment Tokens Response Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -41,6 +43,8 @@ class CustomerVaultPaymentTokensResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets total items field.
|
||||
*
|
||||
* @param int|null $value
|
||||
*/
|
||||
public function totalItems(?int $value): self
|
||||
{
|
||||
@@ -50,6 +54,8 @@ class CustomerVaultPaymentTokensResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets total pages field.
|
||||
*
|
||||
* @param int|null $value
|
||||
*/
|
||||
public function totalPages(?int $value): self
|
||||
{
|
||||
@@ -59,8 +65,10 @@ class CustomerVaultPaymentTokensResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets customer field.
|
||||
*
|
||||
* @param VaultResponseCustomer|null $value
|
||||
*/
|
||||
public function customer(?CustomerRequest $value): self
|
||||
public function customer(?VaultResponseCustomer $value): self
|
||||
{
|
||||
$this->instance->setCustomer($value);
|
||||
return $this;
|
||||
@@ -68,6 +76,8 @@ class CustomerVaultPaymentTokensResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets payment tokens field.
|
||||
*
|
||||
* @param PaymentTokenResponse[]|null $value
|
||||
*/
|
||||
public function paymentTokens(?array $value): self
|
||||
{
|
||||
@@ -77,6 +87,8 @@ class CustomerVaultPaymentTokensResponseBuilder
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*
|
||||
* @param LinkDescription[]|null $value
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
@@ -85,7 +97,7 @@ class CustomerVaultPaymentTokensResponseBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new customer vault payment tokens response object.
|
||||
* Initializes a new Customer Vault Payment Tokens Response object.
|
||||
*/
|
||||
public function build(): CustomerVaultPaymentTokensResponse
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class EpsPaymentObjectBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new eps payment object Builder object.
|
||||
* Initializes a new Eps Payment Object Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class EpsPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function name(?string $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class EpsPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets country code field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function countryCode(?string $value): self
|
||||
{
|
||||
@@ -58,6 +62,8 @@ class EpsPaymentObjectBuilder
|
||||
|
||||
/**
|
||||
* Sets bic field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function bic(?string $value): self
|
||||
{
|
||||
@@ -66,7 +72,7 @@ class EpsPaymentObjectBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new eps payment object object.
|
||||
* Initializes a new Eps Payment Object object.
|
||||
*/
|
||||
public function build(): EpsPaymentObject
|
||||
{
|
||||
|
||||
@@ -32,7 +32,10 @@ class EpsPaymentRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new eps payment request Builder object.
|
||||
* Initializes a new Eps Payment Request Builder object.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $countryCode
|
||||
*/
|
||||
public static function init(string $name, string $countryCode): self
|
||||
{
|
||||
@@ -41,6 +44,8 @@ class EpsPaymentRequestBuilder
|
||||
|
||||
/**
|
||||
* Sets experience context field.
|
||||
*
|
||||
* @param ExperienceContext|null $value
|
||||
*/
|
||||
public function experienceContext(?ExperienceContext $value): self
|
||||
{
|
||||
@@ -49,7 +54,7 @@ class EpsPaymentRequestBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new eps payment request object.
|
||||
* Initializes a new Eps Payment Request object.
|
||||
*/
|
||||
public function build(): EpsPaymentRequest
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace PaypalServerSdkLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PaypalServerSdkLib\Models\ErrorDetails;
|
||||
use PaypalServerSdkLib\Models\LinkDescription;
|
||||
|
||||
/**
|
||||
* Builder for model ErrorDetails
|
||||
@@ -31,7 +32,9 @@ class ErrorDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new error details Builder object.
|
||||
* Initializes a new Error Details Builder object.
|
||||
*
|
||||
* @param string $issue
|
||||
*/
|
||||
public static function init(string $issue): self
|
||||
{
|
||||
@@ -40,6 +43,8 @@ class ErrorDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets field field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function field(?string $value): self
|
||||
{
|
||||
@@ -49,6 +54,8 @@ class ErrorDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets value field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function value(?string $value): self
|
||||
{
|
||||
@@ -58,6 +65,8 @@ class ErrorDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets location field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function location(?string $value): self
|
||||
{
|
||||
@@ -67,6 +76,8 @@ class ErrorDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets links field.
|
||||
*
|
||||
* @param LinkDescription[]|null $value
|
||||
*/
|
||||
public function links(?array $value): self
|
||||
{
|
||||
@@ -76,6 +87,8 @@ class ErrorDetailsBuilder
|
||||
|
||||
/**
|
||||
* Sets description field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function description(?string $value): self
|
||||
{
|
||||
@@ -84,7 +97,7 @@ class ErrorDetailsBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new error details object.
|
||||
* Initializes a new Error Details object.
|
||||
*/
|
||||
public function build(): ErrorDetails
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class ExchangeRateBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new exchange rate Builder object.
|
||||
* Initializes a new Exchange Rate Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class ExchangeRateBuilder
|
||||
|
||||
/**
|
||||
* Sets source currency field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function sourceCurrency(?string $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class ExchangeRateBuilder
|
||||
|
||||
/**
|
||||
* Sets target currency field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function targetCurrency(?string $value): self
|
||||
{
|
||||
@@ -58,6 +62,8 @@ class ExchangeRateBuilder
|
||||
|
||||
/**
|
||||
* Sets value field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function value(?string $value): self
|
||||
{
|
||||
@@ -66,7 +72,7 @@ class ExchangeRateBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new exchange rate object.
|
||||
* Initializes a new Exchange Rate object.
|
||||
*/
|
||||
public function build(): ExchangeRate
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class ExperienceContextBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new experience context Builder object.
|
||||
* Initializes a new Experience Context Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
@@ -40,6 +40,8 @@ class ExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets brand name field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function brandName(?string $value): self
|
||||
{
|
||||
@@ -49,6 +51,8 @@ class ExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets locale field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function locale(?string $value): self
|
||||
{
|
||||
@@ -58,6 +62,8 @@ class ExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets shipping preference field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function shippingPreference(?string $value): self
|
||||
{
|
||||
@@ -67,6 +73,8 @@ class ExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets return url field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function returnUrl(?string $value): self
|
||||
{
|
||||
@@ -76,6 +84,8 @@ class ExperienceContextBuilder
|
||||
|
||||
/**
|
||||
* Sets cancel url field.
|
||||
*
|
||||
* @param string|null $value
|
||||
*/
|
||||
public function cancelUrl(?string $value): self
|
||||
{
|
||||
@@ -84,7 +94,7 @@ class ExperienceContextBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new experience context object.
|
||||
* Initializes a new Experience Context object.
|
||||
*/
|
||||
public function build(): ExperienceContext
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user