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;
|
||||
|
||||
/**
|
||||
@@ -22,6 +23,11 @@ class VaultPaypalWalletRequest implements \JsonSerializable
|
||||
*/
|
||||
private $description;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $usagePattern;
|
||||
|
||||
/**
|
||||
* @var VaultedDigitalWalletShippingDetails|null
|
||||
*/
|
||||
@@ -42,6 +48,11 @@ class VaultPaypalWalletRequest implements \JsonSerializable
|
||||
*/
|
||||
private $customerType;
|
||||
|
||||
/**
|
||||
* @var Plan|null
|
||||
*/
|
||||
private $billingPlan;
|
||||
|
||||
/**
|
||||
* @var VaultExperienceContext|null
|
||||
*/
|
||||
@@ -69,6 +80,26 @@ class VaultPaypalWalletRequest implements \JsonSerializable
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Usage Pattern.
|
||||
* Expected business/charge model for the billing agreement.
|
||||
*/
|
||||
public function getUsagePattern(): ?string
|
||||
{
|
||||
return $this->usagePattern;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Usage Pattern.
|
||||
* Expected business/charge model for the billing agreement.
|
||||
*
|
||||
* @maps usage_pattern
|
||||
*/
|
||||
public function setUsagePattern(?string $usagePattern): void
|
||||
{
|
||||
$this->usagePattern = $usagePattern;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Shipping.
|
||||
* The shipping details.
|
||||
@@ -161,6 +192,26 @@ class VaultPaypalWalletRequest implements \JsonSerializable
|
||||
$this->customerType = $customerType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Billing Plan.
|
||||
* The merchant level Recurring Billing plan metadata for the Billing Agreement.
|
||||
*/
|
||||
public function getBillingPlan(): ?Plan
|
||||
{
|
||||
return $this->billingPlan;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Billing Plan.
|
||||
* The merchant level Recurring Billing plan metadata for the Billing Agreement.
|
||||
*
|
||||
* @maps billing_plan
|
||||
*/
|
||||
public function setBillingPlan(?Plan $billingPlan): void
|
||||
{
|
||||
$this->billingPlan = $billingPlan;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Experience Context.
|
||||
* Customizes the Vault creation flow experience for your customers.
|
||||
@@ -181,6 +232,28 @@ class VaultPaypalWalletRequest implements \JsonSerializable
|
||||
$this->experienceContext = $experienceContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the VaultPaypalWalletRequest object to a human-readable string representation.
|
||||
*
|
||||
* @return string The string representation of the VaultPaypalWalletRequest object.
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return ApiHelper::stringify(
|
||||
'VaultPaypalWalletRequest',
|
||||
[
|
||||
'description' => $this->description,
|
||||
'usagePattern' => $this->usagePattern,
|
||||
'shipping' => $this->shipping,
|
||||
'permitMultiplePaymentTokens' => $this->permitMultiplePaymentTokens,
|
||||
'usageType' => $this->usageType,
|
||||
'customerType' => $this->customerType,
|
||||
'billingPlan' => $this->billingPlan,
|
||||
'experienceContext' => $this->experienceContext
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode this object to JSON
|
||||
*
|
||||
@@ -196,6 +269,9 @@ class VaultPaypalWalletRequest implements \JsonSerializable
|
||||
if (isset($this->description)) {
|
||||
$json['description'] = $this->description;
|
||||
}
|
||||
if (isset($this->usagePattern)) {
|
||||
$json['usage_pattern'] = $this->usagePattern;
|
||||
}
|
||||
if (isset($this->shipping)) {
|
||||
$json['shipping'] = $this->shipping;
|
||||
}
|
||||
@@ -208,6 +284,9 @@ class VaultPaypalWalletRequest implements \JsonSerializable
|
||||
if (isset($this->customerType)) {
|
||||
$json['customer_type'] = $this->customerType;
|
||||
}
|
||||
if (isset($this->billingPlan)) {
|
||||
$json['billing_plan'] = $this->billingPlan;
|
||||
}
|
||||
if (isset($this->experienceContext)) {
|
||||
$json['experience_context'] = $this->experienceContext;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user