✏️ 编辑:V1MoneyBuilder.php
路径:
/home/forge/woocommerce-square/vendor/square/square/src/Models/Builders/V1MoneyBuilder.php
大小:1.25 KB · 修改:2025-12-23 20:26:26 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php declare(strict_types=1); namespace Square\Models\Builders; use Core\Utils\CoreHelper; use Square\Models\V1Money; /** * Builder for model V1Money * * @see V1Money */ class V1MoneyBuilder { /** * @var V1Money */ private $instance; private function __construct(V1Money $instance) { $this->instance = $instance; } /** * Initializes a new V1 Money Builder object. */ public static function init(): self { return new self(new V1Money()); } /** * Sets amount field. * * @param int|null $value */ public function amount(?int $value): self { $this->instance->setAmount($value); return $this; } /** * Unsets amount field. */ public function unsetAmount(): self { $this->instance->unsetAmount(); return $this; } /** * Sets currency code field. * * @param string|null $value */ public function currencyCode(?string $value): self { $this->instance->setCurrencyCode($value); return $this; } /** * Initializes a new V1 Money object. */ public function build(): V1Money { return CoreHelper::clone($this->instance); } }
💾 保存
取消
保存为 UTF-8,换行统一为 LF