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>
59 lines
1.2 KiB
PHP
59 lines
1.2 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\AmountBreakdown;
|
|
use PaypalServerSDKLib\Models\AmountWithBreakdown;
|
|
|
|
/**
|
|
* Builder for model AmountWithBreakdown
|
|
*
|
|
* @see AmountWithBreakdown
|
|
*/
|
|
class AmountWithBreakdownBuilder
|
|
{
|
|
/**
|
|
* @var AmountWithBreakdown
|
|
*/
|
|
private $instance;
|
|
|
|
private function __construct(AmountWithBreakdown $instance)
|
|
{
|
|
$this->instance = $instance;
|
|
}
|
|
|
|
/**
|
|
* Initializes a new amount with breakdown Builder object.
|
|
*/
|
|
public static function init(string $currencyCode, string $value): self
|
|
{
|
|
return new self(new AmountWithBreakdown($currencyCode, $value));
|
|
}
|
|
|
|
/**
|
|
* Sets breakdown field.
|
|
*/
|
|
public function breakdown(?AmountBreakdown $value): self
|
|
{
|
|
$this->instance->setBreakdown($value);
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Initializes a new amount with breakdown object.
|
|
*/
|
|
public function build(): AmountWithBreakdown
|
|
{
|
|
return CoreHelper::clone($this->instance);
|
|
}
|
|
}
|