Charge.php
3 years ago
Create_Customer.php
4 years ago
Create_Customer_Card.php
4 years ago
Create_Payment.php
3 years ago
Get_Customer.php
3 years ago
Get_Gift_Card.php
3 years ago
Refund.php
4 years ago
Create_Customer.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WooCommerce\Square\Gateway\API\Responses; |
| 4 | |
| 5 | use WooCommerce\Square\Framework\PaymentGateway\Api\Payment_Gateway_API_Customer_Response; |
| 6 | |
| 7 | defined( 'ABSPATH' ) || exit; |
| 8 | |
| 9 | /** |
| 10 | * Customer create response. |
| 11 | * |
| 12 | * @since 2.0.0 |
| 13 | * |
| 14 | * @method \Square\Models\CreateCustomerResponse get_data() |
| 15 | */ |
| 16 | class Create_Customer extends \WooCommerce\Square\Gateway\API\Response implements Payment_Gateway_API_Customer_Response { |
| 17 | /** |
| 18 | * Gets the new customer ID. |
| 19 | * |
| 20 | * @since 2.0.0 |
| 21 | * |
| 22 | * @return string |
| 23 | */ |
| 24 | public function get_customer_id() { |
| 25 | return $this->get_data() instanceof \Square\Models\CreateCustomerResponse ? $this->get_data()->getCustomer()->getId() : ''; |
| 26 | } |
| 27 | } |
| 28 |