✏️ 编辑:Get_Gift_Card.php
路径:
/home/forge/woocommerce-square/includes/Gateway/API/Responses/Get_Gift_Card.php
大小:1.31 KB · 修改:2025-12-23 20:26:26 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php namespace WooCommerce\Square\Gateway\API\Responses; defined( 'ABSPATH' ) || exit; /** * Get Gift_Card response. * * @since 3.7.0 * * @method \Square\Models\CreateGiftCardResponse|array get_data() */ class Get_Gift_Card extends \WooCommerce\Square\Gateway\API\Response { /** * Gets the Square Gift Card object. * * @since 4.2.0 * * @return \Square\Models\GiftCard|null */ public function get_gift_card() { return ! $this->has_errors() && $this->get_data()->getGiftCard() ? $this->get_data()->getGiftCard() : null; } /** * Get the gift card ID. * * @since 4.2.0 * * @return string */ public function get_id() { return $this->get_gift_card() ? $this->get_gift_card()->getId() : null; } /** * Get the gift card state. * * @since 4.2.0 * * @return string */ public function get_state() { return $this->get_gift_card() ? $this->get_gift_card()->getState() : null; } /** * Get the gift card number. * * @since 4.2.0 * * @return string */ public function get_gan() { return $this->get_gift_card() ? $this->get_gift_card()->getGan() : null; } /** * Get the gift card amount. * * @since 4.2.0 * * @return string */ public function get_amount() { return $this->get_gift_card() ? $this->get_gift_card()->getBalanceMoney()->getAmount() : null; } }
💾 保存
取消
保存为 UTF-8,换行统一为 LF