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;
|
||||
|
||||
/**
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user