forked from LiveCarta/PayPal-PHP-Server-SDK
Beta Release 0.5.0 (#3)
* Automated commit message * Automated commit message * Automated commit message * Automated commit message --------- Co-authored-by: PayPalServerSDKs <server-sdks@paypal.com>
This commit is contained in:
58
src/Models/Builders/AmountWithBreakdownBuilder.php
Normal file
58
src/Models/Builders/AmountWithBreakdownBuilder.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user