forked from LiveCarta/PayPal-PHP-Server-SDK
* Automated commit message * Automated commit message * Automated commit message * Automated commit message --------- Co-authored-by: PayPalServerSDKs <server-sdks@paypal.com>
162 lines
3.4 KiB
PHP
162 lines
3.4 KiB
PHP
<?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);
|
|
}
|
|
}
|