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;
|
||||
|
||||
/**
|
||||
@@ -27,6 +28,11 @@ class TrustlyPaymentObject implements \JsonSerializable
|
||||
*/
|
||||
private $countryCode;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $email;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
@@ -60,10 +66,9 @@ class TrustlyPaymentObject 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 +78,9 @@ class TrustlyPaymentObject 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
|
||||
*/
|
||||
@@ -85,6 +89,30 @@ class TrustlyPaymentObject implements \JsonSerializable
|
||||
$this->countryCode = $countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Email.
|
||||
* 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
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Email.
|
||||
* 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
|
||||
*/
|
||||
public function setEmail(?string $email): void
|
||||
{
|
||||
$this->email = $email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Bic.
|
||||
* The business identification code (BIC). In payments systems, a BIC is used to identify a specific
|
||||
@@ -127,6 +155,25 @@ class TrustlyPaymentObject implements \JsonSerializable
|
||||
$this->ibanLastChars = $ibanLastChars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the TrustlyPaymentObject object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the TrustlyPaymentObject object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'TrustlyPaymentObject',
|
||||
[
|
||||
'name' => $this->name,
|
||||
'countryCode' => $this->countryCode,
|
||||
'email' => $this->email,
|
||||
'bic' => $this->bic,
|
||||
'ibanLastChars' => $this->ibanLastChars
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -145,6 +192,9 @@ class TrustlyPaymentObject implements \JsonSerializable
|
||||
if (isset($this->countryCode)) {
|
||||
$json['country_code'] = $this->countryCode;
|
||||
}
|
||||
if (isset($this->email)) {
|
||||
$json['email'] = $this->email;
|
||||
}
|
||||
if (isset($this->bic)) {
|
||||
$json['bic'] = $this->bic;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user