forked from LiveCarta/PayPal-PHP-Server-SDK
Automated commit message
This commit is contained in:
104
src/Models/Builders/CaptureRequestBuilder.php
Normal file
104
src/Models/Builders/CaptureRequestBuilder.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* PayPalRESTAPIsLib
|
||||
*
|
||||
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
||||
*/
|
||||
|
||||
namespace PayPalRESTAPIsLib\Models\Builders;
|
||||
|
||||
use Core\Utils\CoreHelper;
|
||||
use PayPalRESTAPIsLib\Models\CapturePaymentInstruction;
|
||||
use PayPalRESTAPIsLib\Models\CaptureRequest;
|
||||
use PayPalRESTAPIsLib\Models\Money;
|
||||
|
||||
/**
|
||||
* Builder for model CaptureRequest
|
||||
*
|
||||
* @see CaptureRequest
|
||||
*/
|
||||
class CaptureRequestBuilder
|
||||
{
|
||||
/**
|
||||
* @var CaptureRequest
|
||||
*/
|
||||
private $instance;
|
||||
|
||||
private function __construct(CaptureRequest $instance)
|
||||
{
|
||||
$this->instance = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture request Builder object.
|
||||
*/
|
||||
public static function init(): self
|
||||
{
|
||||
return new self(new CaptureRequest());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets invoice id field.
|
||||
*/
|
||||
public function invoiceId(?string $value): self
|
||||
{
|
||||
$this->instance->setInvoiceId($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets note to payer field.
|
||||
*/
|
||||
public function noteToPayer(?string $value): self
|
||||
{
|
||||
$this->instance->setNoteToPayer($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets amount field.
|
||||
*/
|
||||
public function amount(?Money $value): self
|
||||
{
|
||||
$this->instance->setAmount($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets final capture field.
|
||||
*/
|
||||
public function finalCapture(?bool $value): self
|
||||
{
|
||||
$this->instance->setFinalCapture($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets payment instruction field.
|
||||
*/
|
||||
public function paymentInstruction(?CapturePaymentInstruction $value): self
|
||||
{
|
||||
$this->instance->setPaymentInstruction($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets soft descriptor field.
|
||||
*/
|
||||
public function softDescriptor(?string $value): self
|
||||
{
|
||||
$this->instance->setSoftDescriptor($value);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new capture request object.
|
||||
*/
|
||||
public function build(): CaptureRequest
|
||||
{
|
||||
return CoreHelper::clone($this->instance);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user