Version Description
- 2019.09.03 =
- Fix - Add adjustments to Square order in the event of discrepancy with WooCommerce total
Download this release
Release Info
Developer | automattic |
Plugin | WooCommerce Square |
Version | 2.0.4 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 2.0.4
- i18n/languages/woocommerce-square.pot +1 -1
- includes/Gateway.php +19 -1
- includes/Gateway/API.php +29 -0
- includes/Gateway/API/Requests/Orders.php +110 -4
- includes/Lifecycle.php +4 -4
- includes/Plugin.php +1 -1
- readme.txt +4 -1
- vendor/autoload.php +1 -1
- vendor/composer/ClassLoader.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +3 -3
- vendor/composer/installed.json +6 -6
- vendor/square/connect/CHANGES.md +43 -3
- vendor/square/connect/README.md +120 -23
- vendor/square/connect/composer.json +1 -1
- vendor/square/connect/docs/Api/ApplePayApi.md +3 -3
- vendor/square/connect/docs/Api/CatalogApi.md +25 -25
- vendor/square/connect/docs/Api/CheckoutApi.md +2 -2
- vendor/square/connect/docs/Api/CustomersApi.md +18 -18
- vendor/square/connect/docs/Api/EmployeesApi.md +4 -4
- vendor/square/connect/docs/Api/InventoryApi.md +14 -14
- vendor/square/connect/docs/Api/LaborApi.md +28 -28
- vendor/square/connect/docs/Api/LocationsApi.md +2 -2
- vendor/square/connect/docs/Api/MobileAuthorizationApi.md +2 -2
- vendor/square/connect/docs/Api/OAuthApi.md +13 -12
- vendor/square/connect/docs/Api/OrdersApi.md +112 -8
- vendor/square/connect/docs/Api/PaymentsApi.md +316 -0
- vendor/square/connect/docs/Api/RefundsApi.md +167 -0
- vendor/square/connect/docs/Api/ReportingApi.md +6 -4
- vendor/square/connect/docs/Api/TransactionsApi.md +28 -21
- vendor/square/connect/docs/Api/V1EmployeesApi.md +32 -32
- vendor/square/connect/docs/Api/V1ItemsApi.md +80 -80
- vendor/square/connect/docs/Api/V1LocationsApi.md +4 -4
- vendor/square/connect/docs/Api/V1TransactionsApi.md +22 -22
- vendor/square/connect/docs/Model/BalancePaymentDetails.md +16 -0
- vendor/square/connect/docs/Model/BatchRetrieveCatalogObjectsRequest.md +1 -1
- vendor/square/connect/docs/Model/BatchRetrieveOrdersResponse.md +1 -2
- vendor/square/connect/docs/Model/CancelPaymentByIdempotencyKeyRequest.md +15 -0
- vendor/square/connect/docs/Model/CancelPaymentByIdempotencyKeyResponse.md +15 -0
- vendor/square/connect/docs/Model/CancelPaymentRequest.md +14 -0
- vendor/square/connect/docs/Model/CancelPaymentResponse.md +16 -0
- vendor/square/connect/docs/Model/CaptureTransactionResponse.md +1 -1
- vendor/square/connect/docs/Model/Card.md +1 -1
- vendor/square/connect/docs/Model/CardPaymentDetails.md +24 -0
- vendor/square/connect/docs/Model/CatalogInfoResponse.md +1 -0
- vendor/square/connect/docs/Model/CatalogItem.md +3 -3
- vendor/square/connect/docs/Model/CatalogItemOption.md +20 -0
- vendor/square/connect/docs/Model/CatalogItemOptionForItem.md +15 -0
- vendor/square/connect/docs/Model/CatalogItemOptionValue.md +20 -0
- vendor/square/connect/docs/Model/CatalogItemOptionValueForItemVariation.md +16 -0
- vendor/square/connect/docs/Model/CatalogItemProductType.md +1 -1
- vendor/square/connect/docs/Model/CatalogItemVariation.md +3 -1
- vendor/square/connect/docs/Model/CatalogMeasurementUnit.md +16 -0
- vendor/square/connect/docs/Model/CatalogObject.md +7 -1
- vendor/square/connect/docs/Model/CatalogObjectType.md +6 -0
- vendor/square/connect/docs/Model/CatalogPricingRule.md +24 -0
- vendor/square/connect/docs/Model/CatalogProductSet.md +21 -0
- vendor/square/connect/docs/Model/CatalogQuery.md +2 -0
- vendor/square/connect/docs/Model/CatalogQueryItemVariationsForItemOptionValues.md +15 -0
- vendor/square/connect/docs/Model/CatalogQueryItemsForItemOptions.md +15 -0
- vendor/square/connect/docs/Model/CatalogTimePeriod.md +15 -0
- vendor/square/connect/docs/Model/ChargeRequest.md +2 -1
- vendor/square/connect/docs/Model/ChargeResponse.md +1 -1
- vendor/square/connect/docs/Model/CompletePaymentRequest.md +14 -0
- vendor/square/connect/docs/Model/CompletePaymentResponse.md +16 -0
- vendor/square/connect/docs/Model/Coordinates.md +16 -0
- vendor/square/connect/docs/Model/CreateCustomerCardRequest.md +3 -2
- vendor/square/connect/docs/Model/CreateOrderRequest.md +1 -1
- vendor/square/connect/docs/Model/CreatePaymentRequest.md +30 -0
- vendor/square/connect/docs/Model/CreatePaymentResponse.md +16 -0
- vendor/square/connect/docs/Model/CreateRefundRequest.md +1 -1
- vendor/square/connect/docs/Model/CreateRefundResponse.md +1 -1
- vendor/square/connect/docs/Model/Error.md +3 -3
- vendor/square/connect/docs/Model/ErrorCode.md +29 -2
- vendor/square/connect/docs/Model/GetPaymentRefundRequest.md +14 -0
- vendor/square/connect/docs/Model/GetPaymentRefundResponse.md +16 -0
- vendor/square/connect/docs/Model/GetPaymentRequest.md +14 -0
- vendor/square/connect/docs/Model/GetPaymentResponse.md +16 -0
- vendor/square/connect/docs/Model/InventoryAdjustment.md +1 -1
- vendor/square/connect/docs/Model/InventoryCount.md +1 -1
- vendor/square/connect/docs/Model/InventoryPhysicalCount.md +1 -1
- vendor/square/connect/docs/Model/InventoryTransfer.md +1 -1
- vendor/square/connect/docs/Model/ListPaymentRefundsRequest.md +21 -0
- vendor/square/connect/docs/Model/ListPaymentRefundsResponse.md +17 -0
- vendor/square/connect/docs/Model/ListPaymentsRequest.md +22 -0
- vendor/square/connect/docs/Model/ListPaymentsResponse.md +17 -0
- vendor/square/connect/docs/Model/ListRefundsRequest.md +1 -1
- vendor/square/connect/docs/Model/ListRefundsResponse.md +1 -1
- vendor/square/connect/docs/Model/ListTransactionsRequest.md +1 -1
- vendor/square/connect/docs/Model/ListTransactionsResponse.md +1 -1
- vendor/square/connect/docs/Model/Location.md +8 -0
- vendor/square/connect/docs/Model/MeasurementUnit.md +2 -0
- vendor/square/connect/docs/Model/MeasurementUnitGeneric.md +15 -0
- vendor/square/connect/docs/Model/MeasurementUnitUnitType.md +20 -0
- vendor/square/connect/docs/Model/Money.md +3 -3
- vendor/square/connect/docs/Model/ObtainTokenRequest.md +3 -3
- vendor/square/connect/docs/Model/ObtainTokenResponse.md +2 -2
- vendor/square/connect/docs/Model/Order.md +8 -5
- vendor/square/connect/docs/Model/OrderEntry.md +1 -0
- vendor/square/connect/docs/Model/OrderFulfillment.md +3 -1
- vendor/square/connect/docs/Model/OrderFulfillmentPickupDetails.md +15 -15
- vendor/square/connect/docs/Model/OrderFulfillmentRecipient.md +6 -5
- vendor/square/connect/docs/Model/OrderFulfillmentShipmentDetails.md +29 -0
- vendor/square/connect/docs/Model/OrderFulfillmentState.md +1 -1
- vendor/square/connect/docs/Model/OrderFulfillmentType.md +1 -0
- vendor/square/connect/docs/Model/OrderLineItem.md +6 -4
- vendor/square/connect/docs/Model/OrderLineItemAppliedDiscount.md +17 -0
- vendor/square/connect/docs/Model/OrderLineItemAppliedTax.md +17 -0
- vendor/square/connect/docs/Model/OrderLineItemDiscount.md +5 -5
- vendor/square/connect/docs/Model/OrderLineItemModifier.md +1 -1
- vendor/square/connect/docs/Model/OrderLineItemTax.md +5 -5
- vendor/square/connect/docs/Model/OrderQuantityUnit.md +1 -1
- vendor/square/connect/docs/Model/OrderReturn.md +4 -3
- vendor/square/connect/docs/Model/OrderReturnDiscount.md +4 -4
- vendor/square/connect/docs/Model/OrderReturnLineItem.md +5 -3
- vendor/square/connect/docs/Model/OrderReturnLineItemModifier.md +1 -1
- vendor/square/connect/docs/Model/OrderReturnServiceCharge.md +27 -0
- vendor/square/connect/docs/Model/OrderReturnTax.md +4 -4
- vendor/square/connect/docs/Model/OrderRoundingAdjustment.md +1 -1
- vendor/square/connect/docs/Model/OrderServiceCharge.md +26 -0
- vendor/square/connect/docs/Model/OrderServiceChargeCalculationPhase.md +16 -0
- vendor/square/connect/docs/Model/PayOrderRequest.md +17 -0
- vendor/square/connect/docs/Model/PayOrderResponse.md +16 -0
- vendor/square/connect/docs/Model/Payment.md +35 -0
- vendor/square/connect/docs/Model/PaymentRefund.md +25 -0
- vendor/square/connect/docs/Model/ProcessingFee.md +17 -0
- vendor/square/connect/docs/Model/RefundPaymentRequest.md +19 -0
- vendor/square/connect/docs/Model/RefundPaymentResponse.md +16 -0
- vendor/square/connect/docs/Model/RenewTokenResponse.md +2 -2
- vendor/square/connect/docs/Model/RetrieveCatalogObjectRequest.md +1 -1
- vendor/square/connect/docs/Model/RetrieveLocationRequest.md +14 -0
- vendor/square/connect/docs/Model/RetrieveLocationResponse.md +16 -0
- vendor/square/connect/docs/Model/RetrieveTransactionResponse.md +1 -1
- vendor/square/connect/docs/Model/SearchCatalogObjectsRequest.md +1 -1
- vendor/square/connect/docs/Model/SearchOrdersCustomerFilter.md +1 -1
- vendor/square/connect/docs/Model/SearchOrdersDateTimeFilter.md +4 -4
- vendor/square/connect/docs/Model/SearchOrdersFilter.md +2 -2
- vendor/square/connect/docs/Model/SearchOrdersRequest.md +4 -4
- vendor/square/connect/docs/Model/SearchOrdersResponse.md +2 -3
- vendor/square/connect/docs/Model/SearchOrdersSort.md +3 -3
- vendor/square/connect/docs/Model/SearchOrdersSourceFilter.md +2 -2
- vendor/square/connect/docs/Model/StandardUnitDescription.md +17 -0
- vendor/square/connect/docs/Model/StandardUnitDescriptionGroup.md +16 -0
- vendor/square/connect/docs/Model/Tender.md +2 -1
- vendor/square/connect/docs/Model/UpdateOrderRequest.md +17 -0
- vendor/square/connect/docs/Model/UpdateOrderResponse.md +16 -0
- vendor/square/connect/docs/Model/V1CashDrawerShift.md +2 -2
- vendor/square/connect/docs/Model/V1Item.md +1 -1
- vendor/square/connect/docs/Model/VoidTransactionResponse.md +1 -1
- vendor/square/connect/docs/Model/WebhookEvents.md +15 -0
- vendor/square/connect/lib/Api/ApplePayApi.php +1 -1
- vendor/square/connect/lib/Api/CatalogApi.php +13 -13
- vendor/square/connect/lib/Api/CheckoutApi.php +1 -1
- vendor/square/connect/lib/Api/CustomersApi.php +10 -10
- vendor/square/connect/lib/Api/EmployeesApi.php +2 -2
- vendor/square/connect/lib/Api/InventoryApi.php +7 -7
- vendor/square/connect/lib/Api/LaborApi.php +14 -14
- vendor/square/connect/lib/Api/LocationsApi.php +1 -1
- vendor/square/connect/lib/Api/MobileAuthorizationApi.php +1 -1
- vendor/square/connect/lib/Api/OAuthApi.php +5 -3
- vendor/square/connect/lib/Api/OrdersApi.php +228 -3
- vendor/square/connect/lib/Api/PaymentsApi.php +664 -0
- vendor/square/connect/lib/Api/RefundsApi.php +374 -0
- vendor/square/connect/lib/Api/ReportingApi.php +6 -2
- vendor/square/connect/lib/Api/TransactionsApi.php +21 -7
- vendor/square/connect/lib/Api/V1EmployeesApi.php +16 -16
- vendor/square/connect/lib/Api/V1ItemsApi.php +40 -40
- vendor/square/connect/lib/Api/V1LocationsApi.php +2 -2
- vendor/square/connect/lib/Api/V1TransactionsApi.php +11 -11
- vendor/square/connect/lib/Configuration.php +2 -2
- vendor/square/connect/lib/Model/BalancePaymentDetails.php +179 -0
- vendor/square/connect/lib/Model/BatchRetrieveCatalogObjectsRequest.php +2 -2
- vendor/square/connect/lib/Model/BatchRetrieveOrdersResponse.php +6 -39
- vendor/square/connect/lib/Model/CancelPaymentByIdempotencyKeyRequest.php +146 -0
- vendor/square/connect/lib/Model/CancelPaymentByIdempotencyKeyResponse.php +146 -0
- vendor/square/connect/lib/Model/CancelPaymentRequest.php +117 -0
- vendor/square/connect/lib/Model/CancelPaymentResponse.php +179 -0
- vendor/square/connect/lib/Model/Card.php +2 -2
- vendor/square/connect/lib/Model/CardPaymentDetails.php +443 -0
- vendor/square/connect/lib/Model/CatalogInfoResponse.php +37 -4
- vendor/square/connect/lib/Model/CatalogItem.php +41 -41
- vendor/square/connect/lib/Model/CatalogItemOption.php +311 -0
- vendor/square/connect/lib/Model/CatalogItemOptionForItem.php +146 -0
- vendor/square/connect/lib/Model/CatalogItemOptionValue.php +311 -0
- vendor/square/connect/lib/Model/CatalogItemOptionValueForItemVariation.php +179 -0
- vendor/square/connect/lib/Model/CatalogItemVariation.php +70 -4
- vendor/square/connect/lib/Model/CatalogMeasurementUnit.php +179 -0
- vendor/square/connect/lib/Model/CatalogObject.php +202 -4
- vendor/square/connect/lib/Model/CatalogPricingRule.php +443 -0
- vendor/square/connect/lib/Model/CatalogProductSet.php +344 -0
- vendor/square/connect/lib/Model/CatalogQuery.php +70 -4
- vendor/square/connect/lib/Model/CatalogQueryItemVariationsForItemOptionValues.php +146 -0
- vendor/square/connect/lib/Model/CatalogQueryItemsForItemOptions.php +146 -0
- vendor/square/connect/lib/Model/CatalogTimePeriod.php +146 -0
- vendor/square/connect/lib/Model/ChargeRequest.php +37 -4
- vendor/square/connect/lib/Model/CompletePaymentRequest.php +117 -0
- vendor/square/connect/lib/Model/CompletePaymentResponse.php +179 -0
- vendor/square/connect/lib/Model/Coordinates.php +179 -0
- vendor/square/connect/lib/Model/CreateCustomerCardRequest.php +41 -8
- vendor/square/connect/lib/Model/CreateOrderRequest.php +2 -2
- vendor/square/connect/lib/Model/CreatePaymentRequest.php +641 -0
- vendor/square/connect/lib/Model/CreatePaymentResponse.php +179 -0
- vendor/square/connect/lib/Model/Error.php +6 -6
- vendor/square/connect/lib/Model/GetPaymentRefundRequest.php +117 -0
- vendor/square/connect/lib/Model/GetPaymentRefundResponse.php +179 -0
- vendor/square/connect/lib/Model/GetPaymentRequest.php +117 -0
- vendor/square/connect/lib/Model/GetPaymentResponse.php +179 -0
- vendor/square/connect/lib/Model/InventoryAdjustment.php +2 -2
- vendor/square/connect/lib/Model/InventoryCount.php +2 -2
- vendor/square/connect/lib/Model/InventoryPhysicalCount.php +2 -2
- vendor/square/connect/lib/Model/InventoryTransfer.php +2 -2
- vendor/square/connect/lib/Model/ListPaymentRefundsRequest.php +344 -0
- vendor/square/connect/lib/Model/ListPaymentRefundsResponse.php +212 -0
- vendor/square/connect/lib/Model/ListPaymentsRequest.php +377 -0
- vendor/square/connect/lib/Model/ListPaymentsResponse.php +212 -0
- vendor/square/connect/lib/Model/Location.php +268 -4
- vendor/square/connect/lib/Model/MeasurementUnit.php +70 -4
- vendor/square/connect/lib/Model/MeasurementUnitGeneric.php +117 -0
- vendor/square/connect/lib/Model/MeasurementUnitUnitType.php +117 -0
- vendor/square/connect/lib/Model/Money.php +4 -4
- vendor/square/connect/lib/Model/ObtainTokenResponse.php +4 -4
- vendor/square/connect/lib/Model/Order.php +113 -14
- vendor/square/connect/lib/Model/OrderEntry.php +33 -0
- vendor/square/connect/lib/Model/OrderFulfillment.php +72 -6
- vendor/square/connect/lib/Model/OrderFulfillmentPickupDetails.php +30 -30
- vendor/square/connect/lib/Model/OrderFulfillmentRecipient.php +45 -12
- vendor/square/connect/lib/Model/OrderFulfillmentShipmentDetails.php +608 -0
- vendor/square/connect/lib/Model/OrderLineItem.php +74 -8
- vendor/square/connect/lib/Model/OrderLineItemAppliedDiscount.php +212 -0
- vendor/square/connect/lib/Model/OrderLineItemAppliedTax.php +212 -0
- vendor/square/connect/lib/Model/OrderLineItemDiscount.php +8 -8
- vendor/square/connect/lib/Model/OrderLineItemModifier.php +2 -2
- vendor/square/connect/lib/Model/OrderLineItemTax.php +8 -8
- vendor/square/connect/lib/Model/OrderQuantityUnit.php +2 -2
- vendor/square/connect/lib/Model/OrderReturn.php +39 -6
- vendor/square/connect/lib/Model/OrderReturnDiscount.php +6 -6
- vendor/square/connect/lib/Model/OrderReturnLineItem.php +72 -6
- vendor/square/connect/lib/Model/OrderReturnLineItemModifier.php +2 -2
- vendor/square/connect/lib/Model/OrderReturnServiceCharge.php +542 -0
- vendor/square/connect/lib/Model/OrderReturnTax.php +6 -6
- vendor/square/connect/lib/Model/OrderRoundingAdjustment.php +2 -2
- vendor/square/connect/lib/Model/OrderServiceCharge.php +509 -0
- vendor/square/connect/lib/Model/OrderServiceChargeCalculationPhase.php +108 -0
i18n/languages/woocommerce-square.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
# This file is distributed under the GNU General Public License v3.0.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Square 2.0.
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://github.com/woocommerce/woocommerce-square/issues\n"
|
8 |
"POT-Creation-Date: 2019-08-19 13:09:58+00:00\n"
|
2 |
# This file is distributed under the GNU General Public License v3.0.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Square 2.0.4\n"
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://github.com/woocommerce/woocommerce-square/issues\n"
|
8 |
"POT-Creation-Date: 2019-08-19 13:09:58+00:00\n"
|
includes/Gateway.php
CHANGED
@@ -273,10 +273,28 @@ class Gateway extends Framework\SV_WC_Payment_Gateway_Direct {
|
|
273 |
|
274 |
try {
|
275 |
|
276 |
-
$
|
|
|
277 |
|
278 |
$order->square_order_id = $response->getId();
|
279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
// reset the payment total to the total calculated by Square to prevent errors
|
281 |
$order->payment_total = Framework\SV_WC_Helper::number_format( Money_Utility::cents_to_float( $response->getTotalMoney()->getAmount() ) );
|
282 |
|
273 |
|
274 |
try {
|
275 |
|
276 |
+
$location_id = $this->get_plugin()->get_settings_handler()->get_location_id();
|
277 |
+
$response = $this->get_api()->create_order( $location_id, $order );
|
278 |
|
279 |
$order->square_order_id = $response->getId();
|
280 |
|
281 |
+
// adjust order by difference between WooCommerce and Square order totals
|
282 |
+
$wc_total = Money_Utility::amount_to_cents( $order->get_total() );
|
283 |
+
$square_total = $response->getTotalMoney()->getAmount();
|
284 |
+
$delta_total = $wc_total - $square_total;
|
285 |
+
|
286 |
+
if ( abs( $delta_total ) > 0 ) {
|
287 |
+
$response = $this->get_api()->adjust_order( $location_id, $order, $response->getVersion(), $delta_total );
|
288 |
+
|
289 |
+
// since a downward adjustment causes (downward) tax recomputation, perform an additional (untaxed) upward adjustment if necessary
|
290 |
+
$square_total = $response->getTotalMoney()->getAmount();
|
291 |
+
$delta_total = $wc_total - $square_total;
|
292 |
+
|
293 |
+
if ( $delta_total > 0 ) {
|
294 |
+
$response = $this->get_api()->adjust_order( $location_id, $order, $response->getVersion(), $delta_total );
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
// reset the payment total to the total calculated by Square to prevent errors
|
299 |
$order->payment_total = Framework\SV_WC_Helper::number_format( Money_Utility::cents_to_float( $response->getTotalMoney()->getAmount() ) );
|
300 |
|
includes/Gateway/API.php
CHANGED
@@ -309,6 +309,35 @@ class API extends \WooCommerce\Square\API {
|
|
309 |
}
|
310 |
|
311 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
/**
|
313 |
* Gets an existing transaction.
|
314 |
*
|
309 |
}
|
310 |
|
311 |
|
312 |
+
/**
|
313 |
+
* Adjusts an existing Square order by amount.
|
314 |
+
*
|
315 |
+
* @since 2.0.4
|
316 |
+
*
|
317 |
+
* @param string $location_id location ID
|
318 |
+
* @param \WC_Order $order
|
319 |
+
* @param int $version Current 'version' value of Square order
|
320 |
+
* @param int $amount Amount of adjustment in smallest unit
|
321 |
+
* @return Order
|
322 |
+
* @throws Framework\SV_WC_API_Exception
|
323 |
+
*/
|
324 |
+
public function adjust_order( $location_id, \WC_Order $order, $version, $amount ) {
|
325 |
+
|
326 |
+
$request = new API\Requests\Orders( $this->client );
|
327 |
+
|
328 |
+
if ( $amount > 0 ) {
|
329 |
+
$request->add_line_item_order_data( $location_id, $order, $version, $amount );
|
330 |
+
} else {
|
331 |
+
$request->add_discount_order_data( $location_id, $order, $version, -1 * $amount );
|
332 |
+
}
|
333 |
+
$this->set_response_handler( \WooCommerce\Square\API\Response::class );
|
334 |
+
|
335 |
+
$response = $this->perform_request( $request );
|
336 |
+
|
337 |
+
return $response->get_data()->getOrder();
|
338 |
+
}
|
339 |
+
|
340 |
+
|
341 |
/**
|
342 |
* Gets an existing transaction.
|
343 |
*
|
includes/Gateway/API/Requests/Orders.php
CHANGED
@@ -70,10 +70,11 @@ class Orders extends API\Request {
|
|
70 |
$order_model->setReferenceId( $order->get_order_number() );
|
71 |
|
72 |
$line_items = array_merge( $this->get_product_line_items( $order ), $this->get_fee_line_items( $order ), $this->get_shipping_line_items( $order ) );
|
|
|
73 |
|
|
|
74 |
$order_model->setLineItems( $line_items );
|
75 |
-
|
76 |
-
$order_model->setTaxes( $this->get_order_taxes( $order ) );
|
77 |
|
78 |
if ( $order->get_discount_total() ) {
|
79 |
|
@@ -81,6 +82,7 @@ class Orders extends API\Request {
|
|
81 |
'name' => __( 'Discount', 'woocommerce-square' ),
|
82 |
'type' => 'FIXED_AMOUNT',
|
83 |
'amount_money' => Money_Utility::amount_to_money( $order->get_discount_total(), $order->get_currency() ),
|
|
|
84 |
] ) ] );
|
85 |
}
|
86 |
|
@@ -214,8 +216,10 @@ class Orders extends API\Request {
|
|
214 |
foreach ( $order->get_taxes() as $tax ) {
|
215 |
|
216 |
$tax_item = new SquareModel\OrderLineItemTax( [
|
217 |
-
'
|
218 |
-
'
|
|
|
|
|
219 |
] );
|
220 |
|
221 |
$pre_tax_total = (float) $order->get_total() - (float) $order->get_total_tax();
|
@@ -232,4 +236,106 @@ class Orders extends API\Request {
|
|
232 |
}
|
233 |
|
234 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
}
|
70 |
$order_model->setReferenceId( $order->get_order_number() );
|
71 |
|
72 |
$line_items = array_merge( $this->get_product_line_items( $order ), $this->get_fee_line_items( $order ), $this->get_shipping_line_items( $order ) );
|
73 |
+
$taxes = $this->get_order_taxes( $order );
|
74 |
|
75 |
+
$this->apply_taxes( $taxes, $line_items );
|
76 |
$order_model->setLineItems( $line_items );
|
77 |
+
$order_model->setTaxes( $taxes );
|
|
|
78 |
|
79 |
if ( $order->get_discount_total() ) {
|
80 |
|
82 |
'name' => __( 'Discount', 'woocommerce-square' ),
|
83 |
'type' => 'FIXED_AMOUNT',
|
84 |
'amount_money' => Money_Utility::amount_to_money( $order->get_discount_total(), $order->get_currency() ),
|
85 |
+
'scope' => 'ORDER',
|
86 |
] ) ] );
|
87 |
}
|
88 |
|
216 |
foreach ( $order->get_taxes() as $tax ) {
|
217 |
|
218 |
$tax_item = new SquareModel\OrderLineItemTax( [
|
219 |
+
'uid' => uniqid(),
|
220 |
+
'name' => $tax->get_name(),
|
221 |
+
'type' => 'ADDITIVE',
|
222 |
+
'scope' => 'LINE_ITEM',
|
223 |
] );
|
224 |
|
225 |
$pre_tax_total = (float) $order->get_total() - (float) $order->get_total_tax();
|
236 |
}
|
237 |
|
238 |
|
239 |
+
/**
|
240 |
+
* Applies taxes on each Square line item.
|
241 |
+
*
|
242 |
+
* @since 2.0.4
|
243 |
+
*
|
244 |
+
* @param SquareModel\OrderLineItemTax[] $taxes
|
245 |
+
* @param SquareModel\OrderLineItem[] $line_items
|
246 |
+
*/
|
247 |
+
protected function apply_taxes( $taxes, $line_items ) {
|
248 |
+
|
249 |
+
foreach ( $line_items as $line_item ) {
|
250 |
+
|
251 |
+
$applied_taxes = [];
|
252 |
+
|
253 |
+
foreach ( $taxes as $tax ) {
|
254 |
+
|
255 |
+
$applied_taxes[] = new SquareModel\OrderLineItemAppliedTax( [
|
256 |
+
'tax_uid' => $tax->getUid(),
|
257 |
+
] );
|
258 |
+
}
|
259 |
+
|
260 |
+
$line_item->setAppliedTaxes( $applied_taxes );
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
+
|
265 |
+
/**
|
266 |
+
* Sets the data for updating an order with a line item adjustment.
|
267 |
+
*
|
268 |
+
* @since 2.0.4
|
269 |
+
*
|
270 |
+
* @param string $location_id location ID
|
271 |
+
* @param \WC_Order $order order object
|
272 |
+
* @param int $version Current 'version' value of Square order
|
273 |
+
* @param int $amount Amount of line item in smallest unit
|
274 |
+
*/
|
275 |
+
public function add_line_item_order_data( $location_id, \WC_Order $order, $version, $amount ) {
|
276 |
+
|
277 |
+
$this->square_api_method = 'updateOrder';
|
278 |
+
$this->square_request = new SquareModel\UpdateOrderRequest();
|
279 |
+
|
280 |
+
$order_model = new SquareModel\Order();
|
281 |
+
$order_model->setVersion( $version );
|
282 |
+
|
283 |
+
$order_model->setLineItems( [ new SquareModel\OrderLineItem( [
|
284 |
+
'name' => __( 'Adjustment', 'woocommerce-square' ),
|
285 |
+
'quantity' => (string) 1,
|
286 |
+
'base_price_money' => new SquareModel\Money( [
|
287 |
+
'amount' => $amount,
|
288 |
+
'currency' => $order->get_currency(),
|
289 |
+
] ),
|
290 |
+
] ) ] );
|
291 |
+
|
292 |
+
$this->square_request->setIdempotencyKey( wc_square()->get_idempotency_key( $order->unique_transaction_ref ) . $version );
|
293 |
+
$this->square_request->setOrder( $order_model );
|
294 |
+
|
295 |
+
$this->square_api_args = [
|
296 |
+
$location_id,
|
297 |
+
$order->square_order_id,
|
298 |
+
$this->square_request,
|
299 |
+
];
|
300 |
+
}
|
301 |
+
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Sets the data for updating an order with a discount adjustment.
|
305 |
+
*
|
306 |
+
* @since 2.0.4
|
307 |
+
*
|
308 |
+
* @param string $location_id location ID
|
309 |
+
* @param \WC_Order $order order object
|
310 |
+
* @param int $version Current 'version' value of Square order
|
311 |
+
* @param int $amount Amount of discount in smallest unit
|
312 |
+
*/
|
313 |
+
public function add_discount_order_data( $location_id, \WC_Order $order, $version, $amount ) {
|
314 |
+
|
315 |
+
$this->square_api_method = 'updateOrder';
|
316 |
+
$this->square_request = new SquareModel\UpdateOrderRequest();
|
317 |
+
|
318 |
+
$order_model = new SquareModel\Order();
|
319 |
+
$order_model->setVersion( $version );
|
320 |
+
|
321 |
+
$order_model->setDiscounts( [ new SquareModel\OrderLineItemDiscount( [
|
322 |
+
'name' => __( 'Adjustment', 'woocommerce-square' ),
|
323 |
+
'type' => 'FIXED_AMOUNT',
|
324 |
+
'amount_money' => new SquareModel\Money( [
|
325 |
+
'amount' => $amount,
|
326 |
+
'currency' => $order->get_currency(),
|
327 |
+
] ),
|
328 |
+
'scope' => 'ORDER',
|
329 |
+
] ) ] );
|
330 |
+
|
331 |
+
$this->square_request->setIdempotencyKey( wc_square()->get_idempotency_key( $order->unique_transaction_ref ) . $version );
|
332 |
+
$this->square_request->setOrder( $order_model );
|
333 |
+
|
334 |
+
$this->square_api_args = [
|
335 |
+
$location_id,
|
336 |
+
$order->square_order_id,
|
337 |
+
$this->square_request,
|
338 |
+
];
|
339 |
+
}
|
340 |
+
|
341 |
}
|
includes/Lifecycle.php
CHANGED
@@ -52,7 +52,7 @@ class Lifecycle extends Framework\Plugin\Lifecycle {
|
|
52 |
// plugin upgrade path: maps automatically each semver to upgrade_to_x_y_z() protected method
|
53 |
$this->upgrade_versions = [
|
54 |
'2.0.0',
|
55 |
-
'2.0.
|
56 |
];
|
57 |
}
|
58 |
|
@@ -143,11 +143,11 @@ class Lifecycle extends Framework\Plugin\Lifecycle {
|
|
143 |
|
144 |
|
145 |
/**
|
146 |
-
* Upgrades to version 2.0.
|
147 |
*
|
148 |
-
* @since 2.0.
|
149 |
*/
|
150 |
-
protected function
|
151 |
|
152 |
$v1_settings = get_option( 'woocommerce_squareconnect_settings', [] );
|
153 |
$v2_settings = get_option( 'wc_square_settings', [] );
|
52 |
// plugin upgrade path: maps automatically each semver to upgrade_to_x_y_z() protected method
|
53 |
$this->upgrade_versions = [
|
54 |
'2.0.0',
|
55 |
+
'2.0.4',
|
56 |
];
|
57 |
}
|
58 |
|
143 |
|
144 |
|
145 |
/**
|
146 |
+
* Upgrades to version 2.0.4.
|
147 |
*
|
148 |
+
* @since 2.0.4
|
149 |
*/
|
150 |
+
protected function upgrade_to_2_0_4() {
|
151 |
|
152 |
$v1_settings = get_option( 'woocommerce_squareconnect_settings', [] );
|
153 |
$v2_settings = get_option( 'wc_square_settings', [] );
|
includes/Plugin.php
CHANGED
@@ -41,7 +41,7 @@ class Plugin extends Framework\SV_WC_Payment_Gateway_Plugin {
|
|
41 |
|
42 |
|
43 |
/** plugin version number */
|
44 |
-
const VERSION = '2.0.
|
45 |
|
46 |
/** plugin ID */
|
47 |
const PLUGIN_ID = 'square';
|
41 |
|
42 |
|
43 |
/** plugin version number */
|
44 |
+
const VERSION = '2.0.4';
|
45 |
|
46 |
/** plugin ID */
|
47 |
const PLUGIN_ID = 'square';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: credit card, square, woocommerce, inventory sync
|
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.2.0
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -72,6 +72,9 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
75 |
= 2.0.3 - 2019.08.19 =
|
76 |
* Tweak - Re-introduce the "inventory sync" toggle to allow syncing product data without affecting inventory
|
77 |
* Fix - Adjust v1 upgrades to properly toggle inventory sync when not enabled in v1
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.2.0
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 2.0.4
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
= 2.0.4 - 2019.09.03 =
|
76 |
+
* Fix - Add adjustments to Square order in the event of discrepancy with WooCommerce total
|
77 |
+
|
78 |
= 2.0.3 - 2019.08.19 =
|
79 |
* Tweak - Re-introduce the "inventory sync" toggle to allow syncing product data without affecting inventory
|
80 |
* Fix - Adjust v1 upgrades to properly toggle inventory sync when not enabled in v1
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit5fe3bee6c088a59752379ee4b9b38ccc::getLoader();
|
vendor/composer/ClassLoader.php
CHANGED
@@ -279,7 +279,7 @@ class ClassLoader
|
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
282 |
-
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
283 |
}
|
284 |
|
285 |
/**
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
282 |
+
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
283 |
}
|
284 |
|
285 |
/**
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitdca653ba0a294778f151c44f73d7ca89
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit5fe3bee6c088a59752379ee4b9b38ccc
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit5fe3bee6c088a59752379ee4b9b38ccc', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit5fe3bee6c088a59752379ee4b9b38ccc', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit5fe3bee6c088a59752379ee4b9b38ccc::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'S' =>
|
@@ -23,8 +23,8 @@ class ComposerStaticInitdca653ba0a294778f151c44f73d7ca89
|
|
23 |
public static function getInitializer(ClassLoader $loader)
|
24 |
{
|
25 |
return \Closure::bind(function () use ($loader) {
|
26 |
-
$loader->prefixLengthsPsr4 =
|
27 |
-
$loader->prefixDirsPsr4 =
|
28 |
|
29 |
}, null, ClassLoader::class);
|
30 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit5fe3bee6c088a59752379ee4b9b38ccc
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'S' =>
|
23 |
public static function getInitializer(ClassLoader $loader)
|
24 |
{
|
25 |
return \Closure::bind(function () use ($loader) {
|
26 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit5fe3bee6c088a59752379ee4b9b38ccc::$prefixLengthsPsr4;
|
27 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit5fe3bee6c088a59752379ee4b9b38ccc::$prefixDirsPsr4;
|
28 |
|
29 |
}, null, ClassLoader::class);
|
30 |
}
|
vendor/composer/installed.json
CHANGED
@@ -55,17 +55,17 @@
|
|
55 |
},
|
56 |
{
|
57 |
"name": "square/connect",
|
58 |
-
"version": "2.
|
59 |
-
"version_normalized": "2.
|
60 |
"source": {
|
61 |
"type": "git",
|
62 |
"url": "https://github.com/square/connect-php-sdk.git",
|
63 |
-
"reference": "
|
64 |
},
|
65 |
"dist": {
|
66 |
"type": "zip",
|
67 |
-
"url": "https://api.github.com/repos/square/connect-php-sdk/zipball/
|
68 |
-
"reference": "
|
69 |
"shasum": ""
|
70 |
},
|
71 |
"require": {
|
@@ -79,7 +79,7 @@
|
|
79 |
"satooshi/php-coveralls": "~0.6.1",
|
80 |
"squizlabs/php_codesniffer": "~2.0"
|
81 |
},
|
82 |
-
"time": "2019-
|
83 |
"type": "library",
|
84 |
"installation-source": "dist",
|
85 |
"autoload": {
|
55 |
},
|
56 |
{
|
57 |
"name": "square/connect",
|
58 |
+
"version": "2.20190814.2",
|
59 |
+
"version_normalized": "2.20190814.2.0",
|
60 |
"source": {
|
61 |
"type": "git",
|
62 |
"url": "https://github.com/square/connect-php-sdk.git",
|
63 |
+
"reference": "d778579a9f42c06d4eb68bcd78e7371f1b2f8f94"
|
64 |
},
|
65 |
"dist": {
|
66 |
"type": "zip",
|
67 |
+
"url": "https://api.github.com/repos/square/connect-php-sdk/zipball/d778579a9f42c06d4eb68bcd78e7371f1b2f8f94",
|
68 |
+
"reference": "d778579a9f42c06d4eb68bcd78e7371f1b2f8f94",
|
69 |
"shasum": ""
|
70 |
},
|
71 |
"require": {
|
79 |
"satooshi/php-coveralls": "~0.6.1",
|
80 |
"squizlabs/php_codesniffer": "~2.0"
|
81 |
},
|
82 |
+
"time": "2019-08-23T19:44:40+00:00",
|
83 |
"type": "library",
|
84 |
"installation-source": "dist",
|
85 |
"autoload": {
|
vendor/square/connect/CHANGES.md
CHANGED
@@ -1,5 +1,45 @@
|
|
1 |
# Change Log
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
## Version 2.20190508.0 (2019-05-08)
|
4 |
|
5 |
## Details
|
@@ -62,15 +102,15 @@
|
|
62 |
## New API: Labor API
|
63 |
|
64 |
The Labor API now includes functionality
|
65 |
-
that gives a Square account the ability to track and retrieve employee labor hours
|
66 |
-
including multiple hourly wage rates per employee, work shift break tracking, and
|
67 |
standardized break templates.
|
68 |
|
69 |
See the Connect v2 Technical Reference.
|
70 |
|
71 |
## New API: Employees API
|
72 |
|
73 |
-
The Employees API includes the ability to list employees for a Square
|
74 |
account and retrieve a single employee by ID.
|
75 |
|
76 |
See the Connect v2 Technical Reference.
|
1 |
# Change Log
|
2 |
|
3 |
+
## Version 2.20190814.2 (2019-08-23)
|
4 |
+
|
5 |
+
* **Bug fix**: Fixed path parameters for `UpdateOrder`
|
6 |
+
|
7 |
+
## Version 2.20190814.1 (2018-08-16)
|
8 |
+
|
9 |
+
* **Bug fix**: Removed a currently unsupported API object type
|
10 |
+
## Version 2.20190814.0 (2019-08-15)
|
11 |
+
|
12 |
+
* **New functionality**: All SDKs have been updated to support the Sandbox v2 BETA release
|
13 |
+
* **Deprecated functionality**: All Transactions API functionality is deprecated in favor of Payments API and Refunds API functionality.
|
14 |
+
* **New functionality**: All SDKs have been updated to support the Payments API GA.
|
15 |
+
* **New functionality**: All SDKs have been updated to support the Refunds API GA.
|
16 |
+
* **New functionality**: All SDKs have been updated to support Orders API updates:
|
17 |
+
* Pickup Fulfillments, SearchOrders, and ServiceCharges move from BETA to GA.
|
18 |
+
* New BETA endpoint: Orders.UpdateOrder — use the UpdateOrder endpoint to update existing orders.
|
19 |
+
* New BETA functionality: Create shipment-type fulfillments.
|
20 |
+
* **New functionality**: Locations.RetrieveLocation — use the RetrieveLocation endpoint to load details for a specific Location.
|
21 |
+
|
22 |
+
## Version 2.20190724.0 (2019-07-24)
|
23 |
+
|
24 |
+
* **BETA releases**:
|
25 |
+
* Catalog API: supports item options with datatypes and enums for item options and item option values.
|
26 |
+
|
27 |
+
## Version 2.20190710.0 (2019-07-10)
|
28 |
+
|
29 |
+
* **Retired functionality** — The `CatalogItem.image_url` field (deprecated under `Square-Version` YYYYMMDD) is retired and no longer included in Connect SDKs.
|
30 |
+
|
31 |
+
## Version 2.20190612.1 (2019-06-26)
|
32 |
+
|
33 |
+
* **Bug fix**: `Transaction.Charge` and `Customers.CreateCustomerCard` request objects — now include the `verification_token` required for [Strong Customer Authentication](https://developer.squareup.com/docs/sca-overview).
|
34 |
+
|
35 |
+
## Version 2.20190612.0 (2019-06-12)
|
36 |
+
|
37 |
+
* **BETA releases**:
|
38 |
+
* Orders API: supports service charges with a new field and datatype.
|
39 |
+
* Catalog API: supports measurement unites for item variation quantities with a new field and datatype.
|
40 |
+
* **New functionality**: `Order` entities — now include a `source` field that contains details on where the order originated.
|
41 |
+
* **Improved functionality**: ListLocations — Expanded business information available through the Locations API, including business hours, contact email, social media handles, and longitude/latitude for physical locations.
|
42 |
+
|
43 |
## Version 2.20190508.0 (2019-05-08)
|
44 |
|
45 |
## Details
|
102 |
## New API: Labor API
|
103 |
|
104 |
The Labor API now includes functionality
|
105 |
+
that gives a Square account the ability to track and retrieve employee labor hours
|
106 |
+
including multiple hourly wage rates per employee, work shift break tracking, and
|
107 |
standardized break templates.
|
108 |
|
109 |
See the Connect v2 Technical Reference.
|
110 |
|
111 |
## New API: Employees API
|
112 |
|
113 |
+
The Employees API includes the ability to list employees for a Square
|
114 |
account and retrieve a single employee by ID.
|
115 |
|
116 |
See the Connect v2 Technical Reference.
|
vendor/square/connect/README.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
==================
|
3 |
|
4 |
**If you have feedback about the new SDKs, or just want to talk to other Square Developers, request an invite to the new [slack community for Square Developers](https://squ.re/2JkDBcO)**
|
@@ -64,9 +71,12 @@ require 'vendor/autoload.php';
|
|
64 |
|
65 |
$access_token = 'YOUR_ACCESS_TOKEN';
|
66 |
# setup authorization
|
67 |
-
\SquareConnect\Configuration
|
|
|
|
|
|
|
68 |
# create an instance of the Location API
|
69 |
-
$locations_api = new \SquareConnect\Api\LocationsApi();
|
70 |
|
71 |
try {
|
72 |
$locations = $locations_api->listLocations();
|
@@ -86,37 +96,59 @@ try {
|
|
86 |
require 'vendor/autoload.php';
|
87 |
|
88 |
$access_token = 'YOUR_ACCESS_TOKEN';
|
|
|
89 |
# setup authorization
|
90 |
-
\SquareConnect\Configuration
|
91 |
-
|
92 |
-
$
|
|
|
|
|
|
|
|
|
93 |
$location_id = 'YOUR_LOCATION_ID'
|
94 |
$nonce = 'YOUR_NONCE'
|
95 |
|
96 |
-
$
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
|
|
|
|
|
|
|
|
110 |
|
111 |
try {
|
112 |
-
$result = $
|
113 |
print_r($result);
|
114 |
} catch (\SquareConnect\ApiException $e) {
|
115 |
-
echo "Exception when calling
|
116 |
var_dump($e->getResponseBody());
|
117 |
}
|
118 |
```
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
## Documentation for API Endpoints
|
122 |
|
@@ -175,7 +207,18 @@ Class | Method | HTTP request | Description
|
|
175 |
*OAuthApi* | [**revokeToken**](docs/Api/OAuthApi.md#revoketoken) | **POST** /oauth2/revoke | RevokeToken
|
176 |
*OrdersApi* | [**batchRetrieveOrders**](docs/Api/OrdersApi.md#batchretrieveorders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders
|
177 |
*OrdersApi* | [**createOrder**](docs/Api/OrdersApi.md#createorder) | **POST** /v2/locations/{location_id}/orders | CreateOrder
|
|
|
178 |
*OrdersApi* | [**searchOrders**](docs/Api/OrdersApi.md#searchorders) | **POST** /v2/orders/search | SearchOrders
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
*ReportingApi* | [**listAdditionalRecipientReceivableRefunds**](docs/Api/ReportingApi.md#listadditionalrecipientreceivablerefunds) | **GET** /v2/locations/{location_id}/additional-recipient-receivable-refunds | ListAdditionalRecipientReceivableRefunds
|
180 |
*ReportingApi* | [**listAdditionalRecipientReceivables**](docs/Api/ReportingApi.md#listadditionalrecipientreceivables) | **GET** /v2/locations/{location_id}/additional-recipient-receivables | ListAdditionalRecipientReceivables
|
181 |
*TransactionsApi* | [**captureTransaction**](docs/Api/TransactionsApi.md#capturetransaction) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/capture | CaptureTransaction
|
@@ -262,6 +305,7 @@ Class | Method | HTTP request | Description
|
|
262 |
- [AdditionalRecipientReceivable](docs/Model/AdditionalRecipientReceivable.md)
|
263 |
- [AdditionalRecipientReceivableRefund](docs/Model/AdditionalRecipientReceivableRefund.md)
|
264 |
- [Address](docs/Model/Address.md)
|
|
|
265 |
- [BatchChangeInventoryRequest](docs/Model/BatchChangeInventoryRequest.md)
|
266 |
- [BatchChangeInventoryResponse](docs/Model/BatchChangeInventoryResponse.md)
|
267 |
- [BatchDeleteCatalogObjectsRequest](docs/Model/BatchDeleteCatalogObjectsRequest.md)
|
@@ -279,10 +323,15 @@ Class | Method | HTTP request | Description
|
|
279 |
- [BreakType](docs/Model/BreakType.md)
|
280 |
- [BusinessHours](docs/Model/BusinessHours.md)
|
281 |
- [BusinessHoursPeriod](docs/Model/BusinessHoursPeriod.md)
|
|
|
|
|
|
|
|
|
282 |
- [CaptureTransactionRequest](docs/Model/CaptureTransactionRequest.md)
|
283 |
- [CaptureTransactionResponse](docs/Model/CaptureTransactionResponse.md)
|
284 |
- [Card](docs/Model/Card.md)
|
285 |
- [CardBrand](docs/Model/CardBrand.md)
|
|
|
286 |
- [CatalogCategory](docs/Model/CatalogCategory.md)
|
287 |
- [CatalogDiscount](docs/Model/CatalogDiscount.md)
|
288 |
- [CatalogDiscountType](docs/Model/CatalogDiscountType.md)
|
@@ -293,8 +342,13 @@ Class | Method | HTTP request | Description
|
|
293 |
- [CatalogInfoResponseLimits](docs/Model/CatalogInfoResponseLimits.md)
|
294 |
- [CatalogItem](docs/Model/CatalogItem.md)
|
295 |
- [CatalogItemModifierListInfo](docs/Model/CatalogItemModifierListInfo.md)
|
|
|
|
|
|
|
|
|
296 |
- [CatalogItemProductType](docs/Model/CatalogItemProductType.md)
|
297 |
- [CatalogItemVariation](docs/Model/CatalogItemVariation.md)
|
|
|
298 |
- [CatalogModifier](docs/Model/CatalogModifier.md)
|
299 |
- [CatalogModifierList](docs/Model/CatalogModifierList.md)
|
300 |
- [CatalogModifierListSelectionType](docs/Model/CatalogModifierListSelectionType.md)
|
@@ -302,9 +356,13 @@ Class | Method | HTTP request | Description
|
|
302 |
- [CatalogObject](docs/Model/CatalogObject.md)
|
303 |
- [CatalogObjectBatch](docs/Model/CatalogObjectBatch.md)
|
304 |
- [CatalogObjectType](docs/Model/CatalogObjectType.md)
|
|
|
305 |
- [CatalogPricingType](docs/Model/CatalogPricingType.md)
|
|
|
306 |
- [CatalogQuery](docs/Model/CatalogQuery.md)
|
307 |
- [CatalogQueryExact](docs/Model/CatalogQueryExact.md)
|
|
|
|
|
308 |
- [CatalogQueryItemsForModifierList](docs/Model/CatalogQueryItemsForModifierList.md)
|
309 |
- [CatalogQueryItemsForTax](docs/Model/CatalogQueryItemsForTax.md)
|
310 |
- [CatalogQueryPrefix](docs/Model/CatalogQueryPrefix.md)
|
@@ -312,11 +370,15 @@ Class | Method | HTTP request | Description
|
|
312 |
- [CatalogQuerySortedAttribute](docs/Model/CatalogQuerySortedAttribute.md)
|
313 |
- [CatalogQueryText](docs/Model/CatalogQueryText.md)
|
314 |
- [CatalogTax](docs/Model/CatalogTax.md)
|
|
|
315 |
- [CatalogV1Id](docs/Model/CatalogV1Id.md)
|
316 |
- [ChargeRequest](docs/Model/ChargeRequest.md)
|
317 |
- [ChargeRequestAdditionalRecipient](docs/Model/ChargeRequestAdditionalRecipient.md)
|
318 |
- [ChargeResponse](docs/Model/ChargeResponse.md)
|
319 |
- [Checkout](docs/Model/Checkout.md)
|
|
|
|
|
|
|
320 |
- [Country](docs/Model/Country.md)
|
321 |
- [CreateBreakTypeRequest](docs/Model/CreateBreakTypeRequest.md)
|
322 |
- [CreateBreakTypeResponse](docs/Model/CreateBreakTypeResponse.md)
|
@@ -334,6 +396,8 @@ Class | Method | HTTP request | Description
|
|
334 |
- [CreateOrderRequestModifier](docs/Model/CreateOrderRequestModifier.md)
|
335 |
- [CreateOrderRequestTax](docs/Model/CreateOrderRequestTax.md)
|
336 |
- [CreateOrderResponse](docs/Model/CreateOrderResponse.md)
|
|
|
|
|
337 |
- [CreateRefundRequest](docs/Model/CreateRefundRequest.md)
|
338 |
- [CreateRefundResponse](docs/Model/CreateRefundResponse.md)
|
339 |
- [CreateShiftRequest](docs/Model/CreateShiftRequest.md)
|
@@ -372,6 +436,10 @@ Class | Method | HTTP request | Description
|
|
372 |
- [GetBreakTypeResponse](docs/Model/GetBreakTypeResponse.md)
|
373 |
- [GetEmployeeWageRequest](docs/Model/GetEmployeeWageRequest.md)
|
374 |
- [GetEmployeeWageResponse](docs/Model/GetEmployeeWageResponse.md)
|
|
|
|
|
|
|
|
|
375 |
- [GetShiftRequest](docs/Model/GetShiftRequest.md)
|
376 |
- [GetShiftResponse](docs/Model/GetShiftResponse.md)
|
377 |
- [InventoryAdjustment](docs/Model/InventoryAdjustment.md)
|
@@ -399,6 +467,10 @@ Class | Method | HTTP request | Description
|
|
399 |
- [ListEmployeesResponse](docs/Model/ListEmployeesResponse.md)
|
400 |
- [ListLocationsRequest](docs/Model/ListLocationsRequest.md)
|
401 |
- [ListLocationsResponse](docs/Model/ListLocationsResponse.md)
|
|
|
|
|
|
|
|
|
402 |
- [ListRefundsRequest](docs/Model/ListRefundsRequest.md)
|
403 |
- [ListRefundsResponse](docs/Model/ListRefundsResponse.md)
|
404 |
- [ListTransactionsRequest](docs/Model/ListTransactionsRequest.md)
|
@@ -412,7 +484,9 @@ Class | Method | HTTP request | Description
|
|
412 |
- [MeasurementUnit](docs/Model/MeasurementUnit.md)
|
413 |
- [MeasurementUnitArea](docs/Model/MeasurementUnitArea.md)
|
414 |
- [MeasurementUnitCustom](docs/Model/MeasurementUnitCustom.md)
|
|
|
415 |
- [MeasurementUnitLength](docs/Model/MeasurementUnitLength.md)
|
|
|
416 |
- [MeasurementUnitVolume](docs/Model/MeasurementUnitVolume.md)
|
417 |
- [MeasurementUnitWeight](docs/Model/MeasurementUnitWeight.md)
|
418 |
- [ModelBreak](docs/Model/ModelBreak.md)
|
@@ -425,9 +499,12 @@ Class | Method | HTTP request | Description
|
|
425 |
- [OrderFulfillmentPickupDetails](docs/Model/OrderFulfillmentPickupDetails.md)
|
426 |
- [OrderFulfillmentPickupDetailsScheduleType](docs/Model/OrderFulfillmentPickupDetailsScheduleType.md)
|
427 |
- [OrderFulfillmentRecipient](docs/Model/OrderFulfillmentRecipient.md)
|
|
|
428 |
- [OrderFulfillmentState](docs/Model/OrderFulfillmentState.md)
|
429 |
- [OrderFulfillmentType](docs/Model/OrderFulfillmentType.md)
|
430 |
- [OrderLineItem](docs/Model/OrderLineItem.md)
|
|
|
|
|
431 |
- [OrderLineItemDiscount](docs/Model/OrderLineItemDiscount.md)
|
432 |
- [OrderLineItemDiscountScope](docs/Model/OrderLineItemDiscountScope.md)
|
433 |
- [OrderLineItemDiscountType](docs/Model/OrderLineItemDiscountType.md)
|
@@ -441,12 +518,22 @@ Class | Method | HTTP request | Description
|
|
441 |
- [OrderReturnDiscount](docs/Model/OrderReturnDiscount.md)
|
442 |
- [OrderReturnLineItem](docs/Model/OrderReturnLineItem.md)
|
443 |
- [OrderReturnLineItemModifier](docs/Model/OrderReturnLineItemModifier.md)
|
|
|
444 |
- [OrderReturnTax](docs/Model/OrderReturnTax.md)
|
445 |
- [OrderRoundingAdjustment](docs/Model/OrderRoundingAdjustment.md)
|
|
|
|
|
446 |
- [OrderSource](docs/Model/OrderSource.md)
|
447 |
- [OrderState](docs/Model/OrderState.md)
|
|
|
|
|
|
|
|
|
|
|
448 |
- [Product](docs/Model/Product.md)
|
449 |
- [Refund](docs/Model/Refund.md)
|
|
|
|
|
450 |
- [RefundStatus](docs/Model/RefundStatus.md)
|
451 |
- [RegisterDomainRequest](docs/Model/RegisterDomainRequest.md)
|
452 |
- [RegisterDomainResponse](docs/Model/RegisterDomainResponse.md)
|
@@ -467,6 +554,8 @@ Class | Method | HTTP request | Description
|
|
467 |
- [RetrieveInventoryCountResponse](docs/Model/RetrieveInventoryCountResponse.md)
|
468 |
- [RetrieveInventoryPhysicalCountRequest](docs/Model/RetrieveInventoryPhysicalCountRequest.md)
|
469 |
- [RetrieveInventoryPhysicalCountResponse](docs/Model/RetrieveInventoryPhysicalCountResponse.md)
|
|
|
|
|
470 |
- [RetrieveTransactionRequest](docs/Model/RetrieveTransactionRequest.md)
|
471 |
- [RetrieveTransactionResponse](docs/Model/RetrieveTransactionResponse.md)
|
472 |
- [RevokeTokenRequest](docs/Model/RevokeTokenRequest.md)
|
@@ -500,6 +589,8 @@ Class | Method | HTTP request | Description
|
|
500 |
- [ShiftWorkdayMatcher](docs/Model/ShiftWorkdayMatcher.md)
|
501 |
- [SortOrder](docs/Model/SortOrder.md)
|
502 |
- [SourceApplication](docs/Model/SourceApplication.md)
|
|
|
|
|
503 |
- [TaxCalculationPhase](docs/Model/TaxCalculationPhase.md)
|
504 |
- [TaxInclusionType](docs/Model/TaxInclusionType.md)
|
505 |
- [Tender](docs/Model/Tender.md)
|
@@ -519,6 +610,8 @@ Class | Method | HTTP request | Description
|
|
519 |
- [UpdateItemModifierListsResponse](docs/Model/UpdateItemModifierListsResponse.md)
|
520 |
- [UpdateItemTaxesRequest](docs/Model/UpdateItemTaxesRequest.md)
|
521 |
- [UpdateItemTaxesResponse](docs/Model/UpdateItemTaxesResponse.md)
|
|
|
|
|
522 |
- [UpdateShiftRequest](docs/Model/UpdateShiftRequest.md)
|
523 |
- [UpdateShiftResponse](docs/Model/UpdateShiftResponse.md)
|
524 |
- [UpdateWorkweekConfigRequest](docs/Model/UpdateWorkweekConfigRequest.md)
|
@@ -687,6 +780,7 @@ Class | Method | HTTP request | Description
|
|
687 |
- [V1VariationPricingType](docs/Model/V1VariationPricingType.md)
|
688 |
- [VoidTransactionRequest](docs/Model/VoidTransactionRequest.md)
|
689 |
- [VoidTransactionResponse](docs/Model/VoidTransactionResponse.md)
|
|
|
690 |
- [Weekday](docs/Model/Weekday.md)
|
691 |
- [WorkweekConfig](docs/Model/WorkweekConfig.md)
|
692 |
|
@@ -706,7 +800,7 @@ Class | Method | HTTP request | Description
|
|
706 |
- **EMPLOYEES_WRITE**: __HTTP Method__: `POST`, `PUT`, `DELETE` Grants write access to employee profile information. For example, to create and modify employee profiles.
|
707 |
- **INVENTORY_READ**: __HTTP Method__: `GET` Grants read access to inventory information. For example, to call the RetrieveInventoryCount endpoint.
|
708 |
- **INVENTORY_WRITE**: __HTTP Method__: `POST`, `PUT`, `DELETE` Grants write access to inventory information. For example, to call the BatchChangeInventory endpoint.
|
709 |
-
- **ITEMS_READ**: __HTTP Method__: `GET` Grants read access to
|
710 |
- **ITEMS_WRITE**: __HTTP Method__: `POST`, `PUT`, `DELETE` Grants write access to product catalog information. For example, to modify or add to a product catalog.
|
711 |
- **MERCHANT_PROFILE_READ**: __HTTP Method__: `GET` Grants read access to business and location information. For example, to obtain a location ID for subsequent activity.
|
712 |
- **ORDERS_READ**: __HTTP Method__: `GET` Grants read access to order information. For example, to call the BatchRetrieveOrders endpoint.
|
@@ -792,3 +886,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
792 |
See the License for the specific language governing permissions and
|
793 |
limitations under the License.
|
794 |
```
|
|
|
|
|
|
1 |
+
![Square logo]
|
2 |
+
|
3 |
+
# Square Connect PHP SDK
|
4 |
+
|
5 |
+
---
|
6 |
+
|
7 |
+
[![Build Status](https://travis-ci.org/square/connect-php-sdk.svg?branch=master)](https://travis-ci.org/square/connect-php-sdk)
|
8 |
+
[![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)
|
9 |
==================
|
10 |
|
11 |
**If you have feedback about the new SDKs, or just want to talk to other Square Developers, request an invite to the new [slack community for Square Developers](https://squ.re/2JkDBcO)**
|
71 |
|
72 |
$access_token = 'YOUR_ACCESS_TOKEN';
|
73 |
# setup authorization
|
74 |
+
$api_config = new \SquareConnect\Configuration();
|
75 |
+
$api_config->setHost("https://connect.squareup.com");
|
76 |
+
$api_config->setAccessToken($access_token);
|
77 |
+
$api_client = new \SquareConnect\ApiClient($api_config);
|
78 |
# create an instance of the Location API
|
79 |
+
$locations_api = new \SquareConnect\Api\LocationsApi($api_client);
|
80 |
|
81 |
try {
|
82 |
$locations = $locations_api->listLocations();
|
96 |
require 'vendor/autoload.php';
|
97 |
|
98 |
$access_token = 'YOUR_ACCESS_TOKEN';
|
99 |
+
|
100 |
# setup authorization
|
101 |
+
$api_config = new \SquareConnect\Configuration();
|
102 |
+
$api_config->setHost("https://connect.squareup.com");
|
103 |
+
$api_config->setAccessToken($access_token);
|
104 |
+
$api_client = new \SquareConnect\ApiClient($api_config);
|
105 |
+
|
106 |
+
# create an instance of the Payments API class
|
107 |
+
$payments_api = new \SquareConnect\Api\PaymentsApi($api_client);
|
108 |
$location_id = 'YOUR_LOCATION_ID'
|
109 |
$nonce = 'YOUR_NONCE'
|
110 |
|
111 |
+
$body = new \SquareConnect\Model\CreatePaymentRequest();
|
112 |
+
|
113 |
+
$amountMoney = new \SquareConnect\Model\Money();
|
114 |
+
|
115 |
+
# Monetary amounts are specified in the smallest unit of the applicable currency.
|
116 |
+
# This amount is in cents. It's also hard-coded for $1.00, which isn't very useful.
|
117 |
+
$amountMoney->setAmount(100);
|
118 |
+
$amountMoney->setCurrency("USD");
|
119 |
+
|
120 |
+
$body->setSourceId($nonce);
|
121 |
+
$body->setAmountMoney($amountMoney);
|
122 |
+
$body->setLocationId($location_id);
|
123 |
+
|
124 |
+
# Every payment you process with the SDK must have a unique idempotency key.
|
125 |
+
# If you're unsure whether a particular payment succeeded, you can reattempt
|
126 |
+
# it with the same idempotency key without worrying about double charging
|
127 |
+
# the buyer.
|
128 |
+
$body->setIdempotencyKey(uniqid());
|
129 |
|
130 |
try {
|
131 |
+
$result = $payments_api->createPayment($body);
|
132 |
print_r($result);
|
133 |
} catch (\SquareConnect\ApiException $e) {
|
134 |
+
echo "Exception when calling PaymentsApi->createPayment:";
|
135 |
var_dump($e->getResponseBody());
|
136 |
}
|
137 |
```
|
138 |
|
139 |
+
### How to configure sandbox environment
|
140 |
+
```php
|
141 |
+
require 'vendor/autoload.php';
|
142 |
+
|
143 |
+
$access_token = 'YOUR_SANDBOX_ACCESS_TOKEN';
|
144 |
+
# setup authorization
|
145 |
+
$api_config = new \SquareConnect\Configuration();
|
146 |
+
$api_config->setHost("https://connect.squareupsandbox.com");
|
147 |
+
$api_config->setAccessToken($access_token);
|
148 |
+
$api_client = new \SquareConnect\ApiClient($api_config);
|
149 |
+
# create an instance of the Location API
|
150 |
+
$locations_api = new \SquareConnect\Api\LocationsApi($api_client);
|
151 |
+
```
|
152 |
|
153 |
## Documentation for API Endpoints
|
154 |
|
207 |
*OAuthApi* | [**revokeToken**](docs/Api/OAuthApi.md#revoketoken) | **POST** /oauth2/revoke | RevokeToken
|
208 |
*OrdersApi* | [**batchRetrieveOrders**](docs/Api/OrdersApi.md#batchretrieveorders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders
|
209 |
*OrdersApi* | [**createOrder**](docs/Api/OrdersApi.md#createorder) | **POST** /v2/locations/{location_id}/orders | CreateOrder
|
210 |
+
*OrdersApi* | [**payOrder**](docs/Api/OrdersApi.md#payorder) | **POST** /v2/orders/{order_id}/pay | PayOrder
|
211 |
*OrdersApi* | [**searchOrders**](docs/Api/OrdersApi.md#searchorders) | **POST** /v2/orders/search | SearchOrders
|
212 |
+
*OrdersApi* | [**updateOrder**](docs/Api/OrdersApi.md#updateorder) | **PUT** /v2/locations/{location_id}/orders/{order_id} | UpdateOrder
|
213 |
+
*PaymentsApi* | [**cancelPayment**](docs/Api/PaymentsApi.md#cancelpayment) | **POST** /v2/payments/{payment_id}/cancel | CancelPayment
|
214 |
+
*PaymentsApi* | [**cancelPaymentByIdempotencyKey**](docs/Api/PaymentsApi.md#cancelpaymentbyidempotencykey) | **POST** /v2/payments/cancel | CancelPaymentByIdempotencyKey
|
215 |
+
*PaymentsApi* | [**completePayment**](docs/Api/PaymentsApi.md#completepayment) | **POST** /v2/payments/{payment_id}/complete | CompletePayment
|
216 |
+
*PaymentsApi* | [**createPayment**](docs/Api/PaymentsApi.md#createpayment) | **POST** /v2/payments | CreatePayment
|
217 |
+
*PaymentsApi* | [**getPayment**](docs/Api/PaymentsApi.md#getpayment) | **GET** /v2/payments/{payment_id} | GetPayment
|
218 |
+
*PaymentsApi* | [**listPayments**](docs/Api/PaymentsApi.md#listpayments) | **GET** /v2/payments | ListPayments
|
219 |
+
*RefundsApi* | [**getPaymentRefund**](docs/Api/RefundsApi.md#getpaymentrefund) | **GET** /v2/refunds/{refund_id} | GetPaymentRefund
|
220 |
+
*RefundsApi* | [**listPaymentRefunds**](docs/Api/RefundsApi.md#listpaymentrefunds) | **GET** /v2/refunds | ListPaymentRefunds
|
221 |
+
*RefundsApi* | [**refundPayment**](docs/Api/RefundsApi.md#refundpayment) | **POST** /v2/refunds | RefundPayment
|
222 |
*ReportingApi* | [**listAdditionalRecipientReceivableRefunds**](docs/Api/ReportingApi.md#listadditionalrecipientreceivablerefunds) | **GET** /v2/locations/{location_id}/additional-recipient-receivable-refunds | ListAdditionalRecipientReceivableRefunds
|
223 |
*ReportingApi* | [**listAdditionalRecipientReceivables**](docs/Api/ReportingApi.md#listadditionalrecipientreceivables) | **GET** /v2/locations/{location_id}/additional-recipient-receivables | ListAdditionalRecipientReceivables
|
224 |
*TransactionsApi* | [**captureTransaction**](docs/Api/TransactionsApi.md#capturetransaction) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/capture | CaptureTransaction
|
305 |
- [AdditionalRecipientReceivable](docs/Model/AdditionalRecipientReceivable.md)
|
306 |
- [AdditionalRecipientReceivableRefund](docs/Model/AdditionalRecipientReceivableRefund.md)
|
307 |
- [Address](docs/Model/Address.md)
|
308 |
+
- [BalancePaymentDetails](docs/Model/BalancePaymentDetails.md)
|
309 |
- [BatchChangeInventoryRequest](docs/Model/BatchChangeInventoryRequest.md)
|
310 |
- [BatchChangeInventoryResponse](docs/Model/BatchChangeInventoryResponse.md)
|
311 |
- [BatchDeleteCatalogObjectsRequest](docs/Model/BatchDeleteCatalogObjectsRequest.md)
|
323 |
- [BreakType](docs/Model/BreakType.md)
|
324 |
- [BusinessHours](docs/Model/BusinessHours.md)
|
325 |
- [BusinessHoursPeriod](docs/Model/BusinessHoursPeriod.md)
|
326 |
+
- [CancelPaymentByIdempotencyKeyRequest](docs/Model/CancelPaymentByIdempotencyKeyRequest.md)
|
327 |
+
- [CancelPaymentByIdempotencyKeyResponse](docs/Model/CancelPaymentByIdempotencyKeyResponse.md)
|
328 |
+
- [CancelPaymentRequest](docs/Model/CancelPaymentRequest.md)
|
329 |
+
- [CancelPaymentResponse](docs/Model/CancelPaymentResponse.md)
|
330 |
- [CaptureTransactionRequest](docs/Model/CaptureTransactionRequest.md)
|
331 |
- [CaptureTransactionResponse](docs/Model/CaptureTransactionResponse.md)
|
332 |
- [Card](docs/Model/Card.md)
|
333 |
- [CardBrand](docs/Model/CardBrand.md)
|
334 |
+
- [CardPaymentDetails](docs/Model/CardPaymentDetails.md)
|
335 |
- [CatalogCategory](docs/Model/CatalogCategory.md)
|
336 |
- [CatalogDiscount](docs/Model/CatalogDiscount.md)
|
337 |
- [CatalogDiscountType](docs/Model/CatalogDiscountType.md)
|
342 |
- [CatalogInfoResponseLimits](docs/Model/CatalogInfoResponseLimits.md)
|
343 |
- [CatalogItem](docs/Model/CatalogItem.md)
|
344 |
- [CatalogItemModifierListInfo](docs/Model/CatalogItemModifierListInfo.md)
|
345 |
+
- [CatalogItemOption](docs/Model/CatalogItemOption.md)
|
346 |
+
- [CatalogItemOptionForItem](docs/Model/CatalogItemOptionForItem.md)
|
347 |
+
- [CatalogItemOptionValue](docs/Model/CatalogItemOptionValue.md)
|
348 |
+
- [CatalogItemOptionValueForItemVariation](docs/Model/CatalogItemOptionValueForItemVariation.md)
|
349 |
- [CatalogItemProductType](docs/Model/CatalogItemProductType.md)
|
350 |
- [CatalogItemVariation](docs/Model/CatalogItemVariation.md)
|
351 |
+
- [CatalogMeasurementUnit](docs/Model/CatalogMeasurementUnit.md)
|
352 |
- [CatalogModifier](docs/Model/CatalogModifier.md)
|
353 |
- [CatalogModifierList](docs/Model/CatalogModifierList.md)
|
354 |
- [CatalogModifierListSelectionType](docs/Model/CatalogModifierListSelectionType.md)
|
356 |
- [CatalogObject](docs/Model/CatalogObject.md)
|
357 |
- [CatalogObjectBatch](docs/Model/CatalogObjectBatch.md)
|
358 |
- [CatalogObjectType](docs/Model/CatalogObjectType.md)
|
359 |
+
- [CatalogPricingRule](docs/Model/CatalogPricingRule.md)
|
360 |
- [CatalogPricingType](docs/Model/CatalogPricingType.md)
|
361 |
+
- [CatalogProductSet](docs/Model/CatalogProductSet.md)
|
362 |
- [CatalogQuery](docs/Model/CatalogQuery.md)
|
363 |
- [CatalogQueryExact](docs/Model/CatalogQueryExact.md)
|
364 |
+
- [CatalogQueryItemVariationsForItemOptionValues](docs/Model/CatalogQueryItemVariationsForItemOptionValues.md)
|
365 |
+
- [CatalogQueryItemsForItemOptions](docs/Model/CatalogQueryItemsForItemOptions.md)
|
366 |
- [CatalogQueryItemsForModifierList](docs/Model/CatalogQueryItemsForModifierList.md)
|
367 |
- [CatalogQueryItemsForTax](docs/Model/CatalogQueryItemsForTax.md)
|
368 |
- [CatalogQueryPrefix](docs/Model/CatalogQueryPrefix.md)
|
370 |
- [CatalogQuerySortedAttribute](docs/Model/CatalogQuerySortedAttribute.md)
|
371 |
- [CatalogQueryText](docs/Model/CatalogQueryText.md)
|
372 |
- [CatalogTax](docs/Model/CatalogTax.md)
|
373 |
+
- [CatalogTimePeriod](docs/Model/CatalogTimePeriod.md)
|
374 |
- [CatalogV1Id](docs/Model/CatalogV1Id.md)
|
375 |
- [ChargeRequest](docs/Model/ChargeRequest.md)
|
376 |
- [ChargeRequestAdditionalRecipient](docs/Model/ChargeRequestAdditionalRecipient.md)
|
377 |
- [ChargeResponse](docs/Model/ChargeResponse.md)
|
378 |
- [Checkout](docs/Model/Checkout.md)
|
379 |
+
- [CompletePaymentRequest](docs/Model/CompletePaymentRequest.md)
|
380 |
+
- [CompletePaymentResponse](docs/Model/CompletePaymentResponse.md)
|
381 |
+
- [Coordinates](docs/Model/Coordinates.md)
|
382 |
- [Country](docs/Model/Country.md)
|
383 |
- [CreateBreakTypeRequest](docs/Model/CreateBreakTypeRequest.md)
|
384 |
- [CreateBreakTypeResponse](docs/Model/CreateBreakTypeResponse.md)
|
396 |
- [CreateOrderRequestModifier](docs/Model/CreateOrderRequestModifier.md)
|
397 |
- [CreateOrderRequestTax](docs/Model/CreateOrderRequestTax.md)
|
398 |
- [CreateOrderResponse](docs/Model/CreateOrderResponse.md)
|
399 |
+
- [CreatePaymentRequest](docs/Model/CreatePaymentRequest.md)
|
400 |
+
- [CreatePaymentResponse](docs/Model/CreatePaymentResponse.md)
|
401 |
- [CreateRefundRequest](docs/Model/CreateRefundRequest.md)
|
402 |
- [CreateRefundResponse](docs/Model/CreateRefundResponse.md)
|
403 |
- [CreateShiftRequest](docs/Model/CreateShiftRequest.md)
|
436 |
- [GetBreakTypeResponse](docs/Model/GetBreakTypeResponse.md)
|
437 |
- [GetEmployeeWageRequest](docs/Model/GetEmployeeWageRequest.md)
|
438 |
- [GetEmployeeWageResponse](docs/Model/GetEmployeeWageResponse.md)
|
439 |
+
- [GetPaymentRefundRequest](docs/Model/GetPaymentRefundRequest.md)
|
440 |
+
- [GetPaymentRefundResponse](docs/Model/GetPaymentRefundResponse.md)
|
441 |
+
- [GetPaymentRequest](docs/Model/GetPaymentRequest.md)
|
442 |
+
- [GetPaymentResponse](docs/Model/GetPaymentResponse.md)
|
443 |
- [GetShiftRequest](docs/Model/GetShiftRequest.md)
|
444 |
- [GetShiftResponse](docs/Model/GetShiftResponse.md)
|
445 |
- [InventoryAdjustment](docs/Model/InventoryAdjustment.md)
|
467 |
- [ListEmployeesResponse](docs/Model/ListEmployeesResponse.md)
|
468 |
- [ListLocationsRequest](docs/Model/ListLocationsRequest.md)
|
469 |
- [ListLocationsResponse](docs/Model/ListLocationsResponse.md)
|
470 |
+
- [ListPaymentRefundsRequest](docs/Model/ListPaymentRefundsRequest.md)
|
471 |
+
- [ListPaymentRefundsResponse](docs/Model/ListPaymentRefundsResponse.md)
|
472 |
+
- [ListPaymentsRequest](docs/Model/ListPaymentsRequest.md)
|
473 |
+
- [ListPaymentsResponse](docs/Model/ListPaymentsResponse.md)
|
474 |
- [ListRefundsRequest](docs/Model/ListRefundsRequest.md)
|
475 |
- [ListRefundsResponse](docs/Model/ListRefundsResponse.md)
|
476 |
- [ListTransactionsRequest](docs/Model/ListTransactionsRequest.md)
|
484 |
- [MeasurementUnit](docs/Model/MeasurementUnit.md)
|
485 |
- [MeasurementUnitArea](docs/Model/MeasurementUnitArea.md)
|
486 |
- [MeasurementUnitCustom](docs/Model/MeasurementUnitCustom.md)
|
487 |
+
- [MeasurementUnitGeneric](docs/Model/MeasurementUnitGeneric.md)
|
488 |
- [MeasurementUnitLength](docs/Model/MeasurementUnitLength.md)
|
489 |
+
- [MeasurementUnitUnitType](docs/Model/MeasurementUnitUnitType.md)
|
490 |
- [MeasurementUnitVolume](docs/Model/MeasurementUnitVolume.md)
|
491 |
- [MeasurementUnitWeight](docs/Model/MeasurementUnitWeight.md)
|
492 |
- [ModelBreak](docs/Model/ModelBreak.md)
|
499 |
- [OrderFulfillmentPickupDetails](docs/Model/OrderFulfillmentPickupDetails.md)
|
500 |
- [OrderFulfillmentPickupDetailsScheduleType](docs/Model/OrderFulfillmentPickupDetailsScheduleType.md)
|
501 |
- [OrderFulfillmentRecipient](docs/Model/OrderFulfillmentRecipient.md)
|
502 |
+
- [OrderFulfillmentShipmentDetails](docs/Model/OrderFulfillmentShipmentDetails.md)
|
503 |
- [OrderFulfillmentState](docs/Model/OrderFulfillmentState.md)
|
504 |
- [OrderFulfillmentType](docs/Model/OrderFulfillmentType.md)
|
505 |
- [OrderLineItem](docs/Model/OrderLineItem.md)
|
506 |
+
- [OrderLineItemAppliedDiscount](docs/Model/OrderLineItemAppliedDiscount.md)
|
507 |
+
- [OrderLineItemAppliedTax](docs/Model/OrderLineItemAppliedTax.md)
|
508 |
- [OrderLineItemDiscount](docs/Model/OrderLineItemDiscount.md)
|
509 |
- [OrderLineItemDiscountScope](docs/Model/OrderLineItemDiscountScope.md)
|
510 |
- [OrderLineItemDiscountType](docs/Model/OrderLineItemDiscountType.md)
|
518 |
- [OrderReturnDiscount](docs/Model/OrderReturnDiscount.md)
|
519 |
- [OrderReturnLineItem](docs/Model/OrderReturnLineItem.md)
|
520 |
- [OrderReturnLineItemModifier](docs/Model/OrderReturnLineItemModifier.md)
|
521 |
+
- [OrderReturnServiceCharge](docs/Model/OrderReturnServiceCharge.md)
|
522 |
- [OrderReturnTax](docs/Model/OrderReturnTax.md)
|
523 |
- [OrderRoundingAdjustment](docs/Model/OrderRoundingAdjustment.md)
|
524 |
+
- [OrderServiceCharge](docs/Model/OrderServiceCharge.md)
|
525 |
+
- [OrderServiceChargeCalculationPhase](docs/Model/OrderServiceChargeCalculationPhase.md)
|
526 |
- [OrderSource](docs/Model/OrderSource.md)
|
527 |
- [OrderState](docs/Model/OrderState.md)
|
528 |
+
- [PayOrderRequest](docs/Model/PayOrderRequest.md)
|
529 |
+
- [PayOrderResponse](docs/Model/PayOrderResponse.md)
|
530 |
+
- [Payment](docs/Model/Payment.md)
|
531 |
+
- [PaymentRefund](docs/Model/PaymentRefund.md)
|
532 |
+
- [ProcessingFee](docs/Model/ProcessingFee.md)
|
533 |
- [Product](docs/Model/Product.md)
|
534 |
- [Refund](docs/Model/Refund.md)
|
535 |
+
- [RefundPaymentRequest](docs/Model/RefundPaymentRequest.md)
|
536 |
+
- [RefundPaymentResponse](docs/Model/RefundPaymentResponse.md)
|
537 |
- [RefundStatus](docs/Model/RefundStatus.md)
|
538 |
- [RegisterDomainRequest](docs/Model/RegisterDomainRequest.md)
|
539 |
- [RegisterDomainResponse](docs/Model/RegisterDomainResponse.md)
|
554 |
- [RetrieveInventoryCountResponse](docs/Model/RetrieveInventoryCountResponse.md)
|
555 |
- [RetrieveInventoryPhysicalCountRequest](docs/Model/RetrieveInventoryPhysicalCountRequest.md)
|
556 |
- [RetrieveInventoryPhysicalCountResponse](docs/Model/RetrieveInventoryPhysicalCountResponse.md)
|
557 |
+
- [RetrieveLocationRequest](docs/Model/RetrieveLocationRequest.md)
|
558 |
+
- [RetrieveLocationResponse](docs/Model/RetrieveLocationResponse.md)
|
559 |
- [RetrieveTransactionRequest](docs/Model/RetrieveTransactionRequest.md)
|
560 |
- [RetrieveTransactionResponse](docs/Model/RetrieveTransactionResponse.md)
|
561 |
- [RevokeTokenRequest](docs/Model/RevokeTokenRequest.md)
|
589 |
- [ShiftWorkdayMatcher](docs/Model/ShiftWorkdayMatcher.md)
|
590 |
- [SortOrder](docs/Model/SortOrder.md)
|
591 |
- [SourceApplication](docs/Model/SourceApplication.md)
|
592 |
+
- [StandardUnitDescription](docs/Model/StandardUnitDescription.md)
|
593 |
+
- [StandardUnitDescriptionGroup](docs/Model/StandardUnitDescriptionGroup.md)
|
594 |
- [TaxCalculationPhase](docs/Model/TaxCalculationPhase.md)
|
595 |
- [TaxInclusionType](docs/Model/TaxInclusionType.md)
|
596 |
- [Tender](docs/Model/Tender.md)
|
610 |
- [UpdateItemModifierListsResponse](docs/Model/UpdateItemModifierListsResponse.md)
|
611 |
- [UpdateItemTaxesRequest](docs/Model/UpdateItemTaxesRequest.md)
|
612 |
- [UpdateItemTaxesResponse](docs/Model/UpdateItemTaxesResponse.md)
|
613 |
+
- [UpdateOrderRequest](docs/Model/UpdateOrderRequest.md)
|
614 |
+
- [UpdateOrderResponse](docs/Model/UpdateOrderResponse.md)
|
615 |
- [UpdateShiftRequest](docs/Model/UpdateShiftRequest.md)
|
616 |
- [UpdateShiftResponse](docs/Model/UpdateShiftResponse.md)
|
617 |
- [UpdateWorkweekConfigRequest](docs/Model/UpdateWorkweekConfigRequest.md)
|
780 |
- [V1VariationPricingType](docs/Model/V1VariationPricingType.md)
|
781 |
- [VoidTransactionRequest](docs/Model/VoidTransactionRequest.md)
|
782 |
- [VoidTransactionResponse](docs/Model/VoidTransactionResponse.md)
|
783 |
+
- [WebhookEvents](docs/Model/WebhookEvents.md)
|
784 |
- [Weekday](docs/Model/Weekday.md)
|
785 |
- [WorkweekConfig](docs/Model/WorkweekConfig.md)
|
786 |
|
800 |
- **EMPLOYEES_WRITE**: __HTTP Method__: `POST`, `PUT`, `DELETE` Grants write access to employee profile information. For example, to create and modify employee profiles.
|
801 |
- **INVENTORY_READ**: __HTTP Method__: `GET` Grants read access to inventory information. For example, to call the RetrieveInventoryCount endpoint.
|
802 |
- **INVENTORY_WRITE**: __HTTP Method__: `POST`, `PUT`, `DELETE` Grants write access to inventory information. For example, to call the BatchChangeInventory endpoint.
|
803 |
+
- **ITEMS_READ**: __HTTP Method__: `GET` Grants read access to product catalog information. For example, to get an item or a list of items.
|
804 |
- **ITEMS_WRITE**: __HTTP Method__: `POST`, `PUT`, `DELETE` Grants write access to product catalog information. For example, to modify or add to a product catalog.
|
805 |
- **MERCHANT_PROFILE_READ**: __HTTP Method__: `GET` Grants read access to business and location information. For example, to obtain a location ID for subsequent activity.
|
806 |
- **ORDERS_READ**: __HTTP Method__: `GET` Grants read access to order information. For example, to call the BatchRetrieveOrders endpoint.
|
886 |
See the License for the specific language governing permissions and
|
887 |
limitations under the License.
|
888 |
```
|
889 |
+
|
890 |
+
[//]: # "Link anchor definitions"
|
891 |
+
[Square Logo]: https://docs.connect.squareup.com/images/github/github-square-logo.svg
|
vendor/square/connect/composer.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"name": "square/connect",
|
3 |
-
"version": "2.
|
4 |
"description": "PHP client library for the Square Connect v2 API",
|
5 |
"keywords": [
|
6 |
"swagger",
|
1 |
{
|
2 |
"name": "square/connect",
|
3 |
+
"version": "2.20190814.2",
|
4 |
"description": "PHP client library for the Square Connect v2 API",
|
5 |
"keywords": [
|
6 |
"swagger",
|
vendor/square/connect/docs/Api/ApplePayApi.md
CHANGED
@@ -12,7 +12,7 @@ Method | HTTP request | Description
|
|
12 |
|
13 |
RegisterDomain
|
14 |
|
15 |
-
Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](/
|
16 |
|
17 |
### Example
|
18 |
```php
|
@@ -22,11 +22,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
22 |
// Configure OAuth2 access token for authorization: oauth2
|
23 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
24 |
|
25 |
-
$
|
26 |
$body = new \SquareConnect\Model\RegisterDomainRequest(); // \SquareConnect\Model\RegisterDomainRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
27 |
|
28 |
try {
|
29 |
-
$result = $
|
30 |
print_r($result);
|
31 |
} catch (Exception $e) {
|
32 |
echo 'Exception when calling ApplePayApi->registerDomain: ', $e->getMessage(), PHP_EOL;
|
12 |
|
13 |
RegisterDomain
|
14 |
|
15 |
+
Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](/payment-form/add-digital-wallets/apple-pay) guide.
|
16 |
|
17 |
### Example
|
18 |
```php
|
22 |
// Configure OAuth2 access token for authorization: oauth2
|
23 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
24 |
|
25 |
+
$apiInstance = new SquareConnect\Api\ApplePayApi();
|
26 |
$body = new \SquareConnect\Model\RegisterDomainRequest(); // \SquareConnect\Model\RegisterDomainRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
27 |
|
28 |
try {
|
29 |
+
$result = $apiInstance->registerDomain($body);
|
30 |
print_r($result);
|
31 |
} catch (Exception $e) {
|
32 |
echo 'Exception when calling ApplePayApi->registerDomain: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/CatalogApi.md
CHANGED
@@ -32,11 +32,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
32 |
// Configure OAuth2 access token for authorization: oauth2
|
33 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
34 |
|
35 |
-
$
|
36 |
$body = new \SquareConnect\Model\BatchDeleteCatalogObjectsRequest(); // \SquareConnect\Model\BatchDeleteCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
37 |
|
38 |
try {
|
39 |
-
$result = $
|
40 |
print_r($result);
|
41 |
} catch (Exception $e) {
|
42 |
echo 'Exception when calling CatalogApi->batchDeleteCatalogObjects: ', $e->getMessage(), PHP_EOL;
|
@@ -80,11 +80,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
80 |
// Configure OAuth2 access token for authorization: oauth2
|
81 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
82 |
|
83 |
-
$
|
84 |
$body = new \SquareConnect\Model\BatchRetrieveCatalogObjectsRequest(); // \SquareConnect\Model\BatchRetrieveCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
85 |
|
86 |
try {
|
87 |
-
$result = $
|
88 |
print_r($result);
|
89 |
} catch (Exception $e) {
|
90 |
echo 'Exception when calling CatalogApi->batchRetrieveCatalogObjects: ', $e->getMessage(), PHP_EOL;
|
@@ -128,11 +128,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
128 |
// Configure OAuth2 access token for authorization: oauth2
|
129 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
130 |
|
131 |
-
$
|
132 |
$body = new \SquareConnect\Model\BatchUpsertCatalogObjectsRequest(); // \SquareConnect\Model\BatchUpsertCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
133 |
|
134 |
try {
|
135 |
-
$result = $
|
136 |
print_r($result);
|
137 |
} catch (Exception $e) {
|
138 |
echo 'Exception when calling CatalogApi->batchUpsertCatalogObjects: ', $e->getMessage(), PHP_EOL;
|
@@ -176,10 +176,10 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
176 |
// Configure OAuth2 access token for authorization: oauth2
|
177 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
178 |
|
179 |
-
$
|
180 |
|
181 |
try {
|
182 |
-
$result = $
|
183 |
print_r($result);
|
184 |
} catch (Exception $e) {
|
185 |
echo 'Exception when calling CatalogApi->catalogInfo: ', $e->getMessage(), PHP_EOL;
|
@@ -220,11 +220,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
220 |
// Configure OAuth2 access token for authorization: oauth2
|
221 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
222 |
|
223 |
-
$
|
224 |
$object_id = "object_id_example"; // string | The ID of the [CatalogObject](#type-catalogobject) to be deleted. When an object is deleted, other objects in the graph that depend on that object will be deleted as well (for example, deleting a [CatalogItem](#type-catalogitem) will delete its [CatalogItemVariation](#type-catalogitemvariation)s).
|
225 |
|
226 |
try {
|
227 |
-
$result = $
|
228 |
print_r($result);
|
229 |
} catch (Exception $e) {
|
230 |
echo 'Exception when calling CatalogApi->deleteCatalogObject: ', $e->getMessage(), PHP_EOL;
|
@@ -258,7 +258,7 @@ Name | Type | Description | Notes
|
|
258 |
|
259 |
ListCatalog
|
260 |
|
261 |
-
Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The types parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`.
|
262 |
|
263 |
### Example
|
264 |
```php
|
@@ -268,12 +268,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
268 |
// Configure OAuth2 access token for authorization: oauth2
|
269 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
270 |
|
271 |
-
$
|
272 |
$cursor = "cursor_example"; // string | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information.
|
273 |
$types = "types_example"; // string | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`.
|
274 |
|
275 |
try {
|
276 |
-
$result = $
|
277 |
print_r($result);
|
278 |
} catch (Exception $e) {
|
279 |
echo 'Exception when calling CatalogApi->listCatalog: ', $e->getMessage(), PHP_EOL;
|
@@ -318,12 +318,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
318 |
// Configure OAuth2 access token for authorization: oauth2
|
319 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
320 |
|
321 |
-
$
|
322 |
$object_id = "object_id_example"; // string | The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved.
|
323 |
-
$include_related_objects = true; // bool | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of
|
324 |
|
325 |
try {
|
326 |
-
$result = $
|
327 |
print_r($result);
|
328 |
} catch (Exception $e) {
|
329 |
echo 'Exception when calling CatalogApi->retrieveCatalogObject: ', $e->getMessage(), PHP_EOL;
|
@@ -336,7 +336,7 @@ try {
|
|
336 |
Name | Type | Description | Notes
|
337 |
------------- | ------------- | ------------- | -------------
|
338 |
**object_id** | **string**| The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. |
|
339 |
-
**include_related_objects** | **bool**| If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of
|
340 |
|
341 |
### Return type
|
342 |
|
@@ -368,11 +368,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
368 |
// Configure OAuth2 access token for authorization: oauth2
|
369 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
370 |
|
371 |
-
$
|
372 |
$body = new \SquareConnect\Model\SearchCatalogObjectsRequest(); // \SquareConnect\Model\SearchCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
373 |
|
374 |
try {
|
375 |
-
$result = $
|
376 |
print_r($result);
|
377 |
} catch (Exception $e) {
|
378 |
echo 'Exception when calling CatalogApi->searchCatalogObjects: ', $e->getMessage(), PHP_EOL;
|
@@ -416,11 +416,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
416 |
// Configure OAuth2 access token for authorization: oauth2
|
417 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
418 |
|
419 |
-
$
|
420 |
$body = new \SquareConnect\Model\UpdateItemModifierListsRequest(); // \SquareConnect\Model\UpdateItemModifierListsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
421 |
|
422 |
try {
|
423 |
-
$result = $
|
424 |
print_r($result);
|
425 |
} catch (Exception $e) {
|
426 |
echo 'Exception when calling CatalogApi->updateItemModifierLists: ', $e->getMessage(), PHP_EOL;
|
@@ -464,11 +464,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
464 |
// Configure OAuth2 access token for authorization: oauth2
|
465 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
466 |
|
467 |
-
$
|
468 |
$body = new \SquareConnect\Model\UpdateItemTaxesRequest(); // \SquareConnect\Model\UpdateItemTaxesRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
469 |
|
470 |
try {
|
471 |
-
$result = $
|
472 |
print_r($result);
|
473 |
} catch (Exception $e) {
|
474 |
echo 'Exception when calling CatalogApi->updateItemTaxes: ', $e->getMessage(), PHP_EOL;
|
@@ -512,11 +512,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
512 |
// Configure OAuth2 access token for authorization: oauth2
|
513 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
514 |
|
515 |
-
$
|
516 |
$body = new \SquareConnect\Model\UpsertCatalogObjectRequest(); // \SquareConnect\Model\UpsertCatalogObjectRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
517 |
|
518 |
try {
|
519 |
-
$result = $
|
520 |
print_r($result);
|
521 |
} catch (Exception $e) {
|
522 |
echo 'Exception when calling CatalogApi->upsertCatalogObject: ', $e->getMessage(), PHP_EOL;
|
32 |
// Configure OAuth2 access token for authorization: oauth2
|
33 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
34 |
|
35 |
+
$apiInstance = new SquareConnect\Api\CatalogApi();
|
36 |
$body = new \SquareConnect\Model\BatchDeleteCatalogObjectsRequest(); // \SquareConnect\Model\BatchDeleteCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
37 |
|
38 |
try {
|
39 |
+
$result = $apiInstance->batchDeleteCatalogObjects($body);
|
40 |
print_r($result);
|
41 |
} catch (Exception $e) {
|
42 |
echo 'Exception when calling CatalogApi->batchDeleteCatalogObjects: ', $e->getMessage(), PHP_EOL;
|
80 |
// Configure OAuth2 access token for authorization: oauth2
|
81 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
82 |
|
83 |
+
$apiInstance = new SquareConnect\Api\CatalogApi();
|
84 |
$body = new \SquareConnect\Model\BatchRetrieveCatalogObjectsRequest(); // \SquareConnect\Model\BatchRetrieveCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
85 |
|
86 |
try {
|
87 |
+
$result = $apiInstance->batchRetrieveCatalogObjects($body);
|
88 |
print_r($result);
|
89 |
} catch (Exception $e) {
|
90 |
echo 'Exception when calling CatalogApi->batchRetrieveCatalogObjects: ', $e->getMessage(), PHP_EOL;
|
128 |
// Configure OAuth2 access token for authorization: oauth2
|
129 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
130 |
|
131 |
+
$apiInstance = new SquareConnect\Api\CatalogApi();
|
132 |
$body = new \SquareConnect\Model\BatchUpsertCatalogObjectsRequest(); // \SquareConnect\Model\BatchUpsertCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
133 |
|
134 |
try {
|
135 |
+
$result = $apiInstance->batchUpsertCatalogObjects($body);
|
136 |
print_r($result);
|
137 |
} catch (Exception $e) {
|
138 |
echo 'Exception when calling CatalogApi->batchUpsertCatalogObjects: ', $e->getMessage(), PHP_EOL;
|
176 |
// Configure OAuth2 access token for authorization: oauth2
|
177 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
178 |
|
179 |
+
$apiInstance = new SquareConnect\Api\CatalogApi();
|
180 |
|
181 |
try {
|
182 |
+
$result = $apiInstance->catalogInfo();
|
183 |
print_r($result);
|
184 |
} catch (Exception $e) {
|
185 |
echo 'Exception when calling CatalogApi->catalogInfo: ', $e->getMessage(), PHP_EOL;
|
220 |
// Configure OAuth2 access token for authorization: oauth2
|
221 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
222 |
|
223 |
+
$apiInstance = new SquareConnect\Api\CatalogApi();
|
224 |
$object_id = "object_id_example"; // string | The ID of the [CatalogObject](#type-catalogobject) to be deleted. When an object is deleted, other objects in the graph that depend on that object will be deleted as well (for example, deleting a [CatalogItem](#type-catalogitem) will delete its [CatalogItemVariation](#type-catalogitemvariation)s).
|
225 |
|
226 |
try {
|
227 |
+
$result = $apiInstance->deleteCatalogObject($object_id);
|
228 |
print_r($result);
|
229 |
} catch (Exception $e) {
|
230 |
echo 'Exception when calling CatalogApi->deleteCatalogObject: ', $e->getMessage(), PHP_EOL;
|
258 |
|
259 |
ListCatalog
|
260 |
|
261 |
+
Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The `types` parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects` to `true`.
|
262 |
|
263 |
### Example
|
264 |
```php
|
268 |
// Configure OAuth2 access token for authorization: oauth2
|
269 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
270 |
|
271 |
+
$apiInstance = new SquareConnect\Api\CatalogApi();
|
272 |
$cursor = "cursor_example"; // string | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information.
|
273 |
$types = "types_example"; // string | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`.
|
274 |
|
275 |
try {
|
276 |
+
$result = $apiInstance->listCatalog($cursor, $types);
|
277 |
print_r($result);
|
278 |
} catch (Exception $e) {
|
279 |
echo 'Exception when calling CatalogApi->listCatalog: ', $e->getMessage(), PHP_EOL;
|
318 |
// Configure OAuth2 access token for authorization: oauth2
|
319 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
320 |
|
321 |
+
$apiInstance = new SquareConnect\Api\CatalogApi();
|
322 |
$object_id = "object_id_example"; // string | The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved.
|
323 |
+
$include_related_objects = true; // bool | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false`
|
324 |
|
325 |
try {
|
326 |
+
$result = $apiInstance->retrieveCatalogObject($object_id, $include_related_objects);
|
327 |
print_r($result);
|
328 |
} catch (Exception $e) {
|
329 |
echo 'Exception when calling CatalogApi->retrieveCatalogObject: ', $e->getMessage(), PHP_EOL;
|
336 |
Name | Type | Description | Notes
|
337 |
------------- | ------------- | ------------- | -------------
|
338 |
**object_id** | **string**| The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. |
|
339 |
+
**include_related_objects** | **bool**| If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` | [optional]
|
340 |
|
341 |
### Return type
|
342 |
|
368 |
// Configure OAuth2 access token for authorization: oauth2
|
369 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
370 |
|
371 |
+
$apiInstance = new SquareConnect\Api\CatalogApi();
|
372 |
$body = new \SquareConnect\Model\SearchCatalogObjectsRequest(); // \SquareConnect\Model\SearchCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
373 |
|
374 |
try {
|
375 |
+
$result = $apiInstance->searchCatalogObjects($body);
|
376 |
print_r($result);
|
377 |
} catch (Exception $e) {
|
378 |
echo 'Exception when calling CatalogApi->searchCatalogObjects: ', $e->getMessage(), PHP_EOL;
|
416 |
// Configure OAuth2 access token for authorization: oauth2
|
417 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
418 |
|
419 |
+
$apiInstance = new SquareConnect\Api\CatalogApi();
|
420 |
$body = new \SquareConnect\Model\UpdateItemModifierListsRequest(); // \SquareConnect\Model\UpdateItemModifierListsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
421 |
|
422 |
try {
|
423 |
+
$result = $apiInstance->updateItemModifierLists($body);
|
424 |
print_r($result);
|
425 |
} catch (Exception $e) {
|
426 |
echo 'Exception when calling CatalogApi->updateItemModifierLists: ', $e->getMessage(), PHP_EOL;
|
464 |
// Configure OAuth2 access token for authorization: oauth2
|
465 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
466 |
|
467 |
+
$apiInstance = new SquareConnect\Api\CatalogApi();
|
468 |
$body = new \SquareConnect\Model\UpdateItemTaxesRequest(); // \SquareConnect\Model\UpdateItemTaxesRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
469 |
|
470 |
try {
|
471 |
+
$result = $apiInstance->updateItemTaxes($body);
|
472 |
print_r($result);
|
473 |
} catch (Exception $e) {
|
474 |
echo 'Exception when calling CatalogApi->updateItemTaxes: ', $e->getMessage(), PHP_EOL;
|
512 |
// Configure OAuth2 access token for authorization: oauth2
|
513 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
514 |
|
515 |
+
$apiInstance = new SquareConnect\Api\CatalogApi();
|
516 |
$body = new \SquareConnect\Model\UpsertCatalogObjectRequest(); // \SquareConnect\Model\UpsertCatalogObjectRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
517 |
|
518 |
try {
|
519 |
+
$result = $apiInstance->upsertCatalogObject($body);
|
520 |
print_r($result);
|
521 |
} catch (Exception $e) {
|
522 |
echo 'Exception when calling CatalogApi->upsertCatalogObject: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/CheckoutApi.md
CHANGED
@@ -22,12 +22,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
22 |
// Configure OAuth2 access token for authorization: oauth2
|
23 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
24 |
|
25 |
-
$
|
26 |
$location_id = "location_id_example"; // string | The ID of the business location to associate the checkout with.
|
27 |
$body = new \SquareConnect\Model\CreateCheckoutRequest(); // \SquareConnect\Model\CreateCheckoutRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
28 |
|
29 |
try {
|
30 |
-
$result = $
|
31 |
print_r($result);
|
32 |
} catch (Exception $e) {
|
33 |
echo 'Exception when calling CheckoutApi->createCheckout: ', $e->getMessage(), PHP_EOL;
|
22 |
// Configure OAuth2 access token for authorization: oauth2
|
23 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
24 |
|
25 |
+
$apiInstance = new SquareConnect\Api\CheckoutApi();
|
26 |
$location_id = "location_id_example"; // string | The ID of the business location to associate the checkout with.
|
27 |
$body = new \SquareConnect\Model\CreateCheckoutRequest(); // \SquareConnect\Model\CreateCheckoutRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
28 |
|
29 |
try {
|
30 |
+
$result = $apiInstance->createCheckout($location_id, $body);
|
31 |
print_r($result);
|
32 |
} catch (Exception $e) {
|
33 |
echo 'Exception when calling CheckoutApi->createCheckout: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/CustomersApi.md
CHANGED
@@ -29,11 +29,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
29 |
// Configure OAuth2 access token for authorization: oauth2
|
30 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
31 |
|
32 |
-
$
|
33 |
$body = new \SquareConnect\Model\CreateCustomerRequest(); // \SquareConnect\Model\CreateCustomerRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
34 |
|
35 |
try {
|
36 |
-
$result = $
|
37 |
print_r($result);
|
38 |
} catch (Exception $e) {
|
39 |
echo 'Exception when calling CustomersApi->createCustomer: ', $e->getMessage(), PHP_EOL;
|
@@ -77,12 +77,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
77 |
// Configure OAuth2 access token for authorization: oauth2
|
78 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
79 |
|
80 |
-
$
|
81 |
-
$customer_id = "customer_id_example"; // string | The ID of the customer
|
82 |
$body = new \SquareConnect\Model\CreateCustomerCardRequest(); // \SquareConnect\Model\CreateCustomerCardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
83 |
|
84 |
try {
|
85 |
-
$result = $
|
86 |
print_r($result);
|
87 |
} catch (Exception $e) {
|
88 |
echo 'Exception when calling CustomersApi->createCustomerCard: ', $e->getMessage(), PHP_EOL;
|
@@ -94,7 +94,7 @@ try {
|
|
94 |
|
95 |
Name | Type | Description | Notes
|
96 |
------------- | ------------- | ------------- | -------------
|
97 |
-
**customer_id** | **string**| The ID of the customer
|
98 |
**body** | [**\SquareConnect\Model\CreateCustomerCardRequest**](../Model/CreateCustomerCardRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
99 |
|
100 |
### Return type
|
@@ -127,11 +127,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
127 |
// Configure OAuth2 access token for authorization: oauth2
|
128 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
129 |
|
130 |
-
$
|
131 |
$customer_id = "customer_id_example"; // string | The ID of the customer to delete.
|
132 |
|
133 |
try {
|
134 |
-
$result = $
|
135 |
print_r($result);
|
136 |
} catch (Exception $e) {
|
137 |
echo 'Exception when calling CustomersApi->deleteCustomer: ', $e->getMessage(), PHP_EOL;
|
@@ -175,12 +175,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
175 |
// Configure OAuth2 access token for authorization: oauth2
|
176 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
177 |
|
178 |
-
$
|
179 |
$customer_id = "customer_id_example"; // string | The ID of the customer that the card on file belongs to.
|
180 |
$card_id = "card_id_example"; // string | The ID of the card on file to delete.
|
181 |
|
182 |
try {
|
183 |
-
$result = $
|
184 |
print_r($result);
|
185 |
} catch (Exception $e) {
|
186 |
echo 'Exception when calling CustomersApi->deleteCustomerCard: ', $e->getMessage(), PHP_EOL;
|
@@ -225,13 +225,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
225 |
// Configure OAuth2 access token for authorization: oauth2
|
226 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
227 |
|
228 |
-
$
|
229 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information.
|
230 |
$sort_field = "sort_field_example"; // string | Indicates how Customers should be sorted. Default: `DEFAULT`.
|
231 |
$sort_order = "sort_order_example"; // string | Indicates whether Customers should be sorted in ascending (`ASC`) or descending (`DESC`) order. Default: `ASC`.
|
232 |
|
233 |
try {
|
234 |
-
$result = $
|
235 |
print_r($result);
|
236 |
} catch (Exception $e) {
|
237 |
echo 'Exception when calling CustomersApi->listCustomers: ', $e->getMessage(), PHP_EOL;
|
@@ -277,11 +277,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
277 |
// Configure OAuth2 access token for authorization: oauth2
|
278 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
279 |
|
280 |
-
$
|
281 |
$customer_id = "customer_id_example"; // string | The ID of the customer to retrieve.
|
282 |
|
283 |
try {
|
284 |
-
$result = $
|
285 |
print_r($result);
|
286 |
} catch (Exception $e) {
|
287 |
echo 'Exception when calling CustomersApi->retrieveCustomer: ', $e->getMessage(), PHP_EOL;
|
@@ -325,11 +325,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
325 |
// Configure OAuth2 access token for authorization: oauth2
|
326 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
327 |
|
328 |
-
$
|
329 |
$body = new \SquareConnect\Model\SearchCustomersRequest(); // \SquareConnect\Model\SearchCustomersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
330 |
|
331 |
try {
|
332 |
-
$result = $
|
333 |
print_r($result);
|
334 |
} catch (Exception $e) {
|
335 |
echo 'Exception when calling CustomersApi->searchCustomers: ', $e->getMessage(), PHP_EOL;
|
@@ -373,12 +373,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
373 |
// Configure OAuth2 access token for authorization: oauth2
|
374 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
375 |
|
376 |
-
$
|
377 |
$customer_id = "customer_id_example"; // string | The ID of the customer to update.
|
378 |
$body = new \SquareConnect\Model\UpdateCustomerRequest(); // \SquareConnect\Model\UpdateCustomerRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
379 |
|
380 |
try {
|
381 |
-
$result = $
|
382 |
print_r($result);
|
383 |
} catch (Exception $e) {
|
384 |
echo 'Exception when calling CustomersApi->updateCustomer: ', $e->getMessage(), PHP_EOL;
|
29 |
// Configure OAuth2 access token for authorization: oauth2
|
30 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
31 |
|
32 |
+
$apiInstance = new SquareConnect\Api\CustomersApi();
|
33 |
$body = new \SquareConnect\Model\CreateCustomerRequest(); // \SquareConnect\Model\CreateCustomerRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
34 |
|
35 |
try {
|
36 |
+
$result = $apiInstance->createCustomer($body);
|
37 |
print_r($result);
|
38 |
} catch (Exception $e) {
|
39 |
echo 'Exception when calling CustomersApi->createCustomer: ', $e->getMessage(), PHP_EOL;
|
77 |
// Configure OAuth2 access token for authorization: oauth2
|
78 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
79 |
|
80 |
+
$apiInstance = new SquareConnect\Api\CustomersApi();
|
81 |
+
$customer_id = "customer_id_example"; // string | The Square ID of the customer profile the card is linked to.
|
82 |
$body = new \SquareConnect\Model\CreateCustomerCardRequest(); // \SquareConnect\Model\CreateCustomerCardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
83 |
|
84 |
try {
|
85 |
+
$result = $apiInstance->createCustomerCard($customer_id, $body);
|
86 |
print_r($result);
|
87 |
} catch (Exception $e) {
|
88 |
echo 'Exception when calling CustomersApi->createCustomerCard: ', $e->getMessage(), PHP_EOL;
|
94 |
|
95 |
Name | Type | Description | Notes
|
96 |
------------- | ------------- | ------------- | -------------
|
97 |
+
**customer_id** | **string**| The Square ID of the customer profile the card is linked to. |
|
98 |
**body** | [**\SquareConnect\Model\CreateCustomerCardRequest**](../Model/CreateCustomerCardRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
99 |
|
100 |
### Return type
|
127 |
// Configure OAuth2 access token for authorization: oauth2
|
128 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
129 |
|
130 |
+
$apiInstance = new SquareConnect\Api\CustomersApi();
|
131 |
$customer_id = "customer_id_example"; // string | The ID of the customer to delete.
|
132 |
|
133 |
try {
|
134 |
+
$result = $apiInstance->deleteCustomer($customer_id);
|
135 |
print_r($result);
|
136 |
} catch (Exception $e) {
|
137 |
echo 'Exception when calling CustomersApi->deleteCustomer: ', $e->getMessage(), PHP_EOL;
|
175 |
// Configure OAuth2 access token for authorization: oauth2
|
176 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
177 |
|
178 |
+
$apiInstance = new SquareConnect\Api\CustomersApi();
|
179 |
$customer_id = "customer_id_example"; // string | The ID of the customer that the card on file belongs to.
|
180 |
$card_id = "card_id_example"; // string | The ID of the card on file to delete.
|
181 |
|
182 |
try {
|
183 |
+
$result = $apiInstance->deleteCustomerCard($customer_id, $card_id);
|
184 |
print_r($result);
|
185 |
} catch (Exception $e) {
|
186 |
echo 'Exception when calling CustomersApi->deleteCustomerCard: ', $e->getMessage(), PHP_EOL;
|
225 |
// Configure OAuth2 access token for authorization: oauth2
|
226 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
227 |
|
228 |
+
$apiInstance = new SquareConnect\Api\CustomersApi();
|
229 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information.
|
230 |
$sort_field = "sort_field_example"; // string | Indicates how Customers should be sorted. Default: `DEFAULT`.
|
231 |
$sort_order = "sort_order_example"; // string | Indicates whether Customers should be sorted in ascending (`ASC`) or descending (`DESC`) order. Default: `ASC`.
|
232 |
|
233 |
try {
|
234 |
+
$result = $apiInstance->listCustomers($cursor, $sort_field, $sort_order);
|
235 |
print_r($result);
|
236 |
} catch (Exception $e) {
|
237 |
echo 'Exception when calling CustomersApi->listCustomers: ', $e->getMessage(), PHP_EOL;
|
277 |
// Configure OAuth2 access token for authorization: oauth2
|
278 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
279 |
|
280 |
+
$apiInstance = new SquareConnect\Api\CustomersApi();
|
281 |
$customer_id = "customer_id_example"; // string | The ID of the customer to retrieve.
|
282 |
|
283 |
try {
|
284 |
+
$result = $apiInstance->retrieveCustomer($customer_id);
|
285 |
print_r($result);
|
286 |
} catch (Exception $e) {
|
287 |
echo 'Exception when calling CustomersApi->retrieveCustomer: ', $e->getMessage(), PHP_EOL;
|
325 |
// Configure OAuth2 access token for authorization: oauth2
|
326 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
327 |
|
328 |
+
$apiInstance = new SquareConnect\Api\CustomersApi();
|
329 |
$body = new \SquareConnect\Model\SearchCustomersRequest(); // \SquareConnect\Model\SearchCustomersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
330 |
|
331 |
try {
|
332 |
+
$result = $apiInstance->searchCustomers($body);
|
333 |
print_r($result);
|
334 |
} catch (Exception $e) {
|
335 |
echo 'Exception when calling CustomersApi->searchCustomers: ', $e->getMessage(), PHP_EOL;
|
373 |
// Configure OAuth2 access token for authorization: oauth2
|
374 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
375 |
|
376 |
+
$apiInstance = new SquareConnect\Api\CustomersApi();
|
377 |
$customer_id = "customer_id_example"; // string | The ID of the customer to update.
|
378 |
$body = new \SquareConnect\Model\UpdateCustomerRequest(); // \SquareConnect\Model\UpdateCustomerRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
379 |
|
380 |
try {
|
381 |
+
$result = $apiInstance->updateCustomer($customer_id, $body);
|
382 |
print_r($result);
|
383 |
} catch (Exception $e) {
|
384 |
echo 'Exception when calling CustomersApi->updateCustomer: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/EmployeesApi.md
CHANGED
@@ -23,14 +23,14 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
23 |
// Configure OAuth2 access token for authorization: oauth2
|
24 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
25 |
|
26 |
-
$
|
27 |
$location_id = "location_id_example"; // string | Filter employees returned to only those that are associated with the specified location.
|
28 |
$status = "status_example"; // string | Specifies the EmployeeStatus to filter the employee by.
|
29 |
$limit = 56; // int | The number of employees to be returned on each page.
|
30 |
$cursor = "cursor_example"; // string | The token required to retrieve the specified page of results.
|
31 |
|
32 |
try {
|
33 |
-
$result = $
|
34 |
print_r($result);
|
35 |
} catch (Exception $e) {
|
36 |
echo 'Exception when calling EmployeesApi->listEmployees: ', $e->getMessage(), PHP_EOL;
|
@@ -77,11 +77,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
77 |
// Configure OAuth2 access token for authorization: oauth2
|
78 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
79 |
|
80 |
-
$
|
81 |
$id = "id_example"; // string | UUID for the employee that was requested.
|
82 |
|
83 |
try {
|
84 |
-
$result = $
|
85 |
print_r($result);
|
86 |
} catch (Exception $e) {
|
87 |
echo 'Exception when calling EmployeesApi->retrieveEmployee: ', $e->getMessage(), PHP_EOL;
|
23 |
// Configure OAuth2 access token for authorization: oauth2
|
24 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
25 |
|
26 |
+
$apiInstance = new SquareConnect\Api\EmployeesApi();
|
27 |
$location_id = "location_id_example"; // string | Filter employees returned to only those that are associated with the specified location.
|
28 |
$status = "status_example"; // string | Specifies the EmployeeStatus to filter the employee by.
|
29 |
$limit = 56; // int | The number of employees to be returned on each page.
|
30 |
$cursor = "cursor_example"; // string | The token required to retrieve the specified page of results.
|
31 |
|
32 |
try {
|
33 |
+
$result = $apiInstance->listEmployees($location_id, $status, $limit, $cursor);
|
34 |
print_r($result);
|
35 |
} catch (Exception $e) {
|
36 |
echo 'Exception when calling EmployeesApi->listEmployees: ', $e->getMessage(), PHP_EOL;
|
77 |
// Configure OAuth2 access token for authorization: oauth2
|
78 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
79 |
|
80 |
+
$apiInstance = new SquareConnect\Api\EmployeesApi();
|
81 |
$id = "id_example"; // string | UUID for the employee that was requested.
|
82 |
|
83 |
try {
|
84 |
+
$result = $apiInstance->retrieveEmployee($id);
|
85 |
print_r($result);
|
86 |
} catch (Exception $e) {
|
87 |
echo 'Exception when calling EmployeesApi->retrieveEmployee: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/InventoryApi.md
CHANGED
@@ -28,11 +28,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
28 |
// Configure OAuth2 access token for authorization: oauth2
|
29 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
30 |
|
31 |
-
$
|
32 |
$body = new \SquareConnect\Model\BatchChangeInventoryRequest(); // \SquareConnect\Model\BatchChangeInventoryRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
33 |
|
34 |
try {
|
35 |
-
$result = $
|
36 |
print_r($result);
|
37 |
} catch (Exception $e) {
|
38 |
echo 'Exception when calling InventoryApi->batchChangeInventory: ', $e->getMessage(), PHP_EOL;
|
@@ -76,11 +76,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
76 |
// Configure OAuth2 access token for authorization: oauth2
|
77 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
78 |
|
79 |
-
$
|
80 |
$body = new \SquareConnect\Model\BatchRetrieveInventoryChangesRequest(); // \SquareConnect\Model\BatchRetrieveInventoryChangesRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
81 |
|
82 |
try {
|
83 |
-
$result = $
|
84 |
print_r($result);
|
85 |
} catch (Exception $e) {
|
86 |
echo 'Exception when calling InventoryApi->batchRetrieveInventoryChanges: ', $e->getMessage(), PHP_EOL;
|
@@ -124,11 +124,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
124 |
// Configure OAuth2 access token for authorization: oauth2
|
125 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
126 |
|
127 |
-
$
|
128 |
$body = new \SquareConnect\Model\BatchRetrieveInventoryCountsRequest(); // \SquareConnect\Model\BatchRetrieveInventoryCountsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
129 |
|
130 |
try {
|
131 |
-
$result = $
|
132 |
print_r($result);
|
133 |
} catch (Exception $e) {
|
134 |
echo 'Exception when calling InventoryApi->batchRetrieveInventoryCounts: ', $e->getMessage(), PHP_EOL;
|
@@ -172,11 +172,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
172 |
// Configure OAuth2 access token for authorization: oauth2
|
173 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
174 |
|
175 |
-
$
|
176 |
$adjustment_id = "adjustment_id_example"; // string | ID of the [InventoryAdjustment](#type-inventoryadjustment) to retrieve.
|
177 |
|
178 |
try {
|
179 |
-
$result = $
|
180 |
print_r($result);
|
181 |
} catch (Exception $e) {
|
182 |
echo 'Exception when calling InventoryApi->retrieveInventoryAdjustment: ', $e->getMessage(), PHP_EOL;
|
@@ -220,13 +220,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
220 |
// Configure OAuth2 access token for authorization: oauth2
|
221 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
222 |
|
223 |
-
$
|
224 |
$catalog_object_id = "catalog_object_id_example"; // string | ID of the [CatalogObject](#type-catalogobject) to retrieve.
|
225 |
$location_ids = "location_ids_example"; // string | The [Location](#type-location) IDs to look up as a comma-separated list. An empty list queries all locations.
|
226 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information.
|
227 |
|
228 |
try {
|
229 |
-
$result = $
|
230 |
print_r($result);
|
231 |
} catch (Exception $e) {
|
232 |
echo 'Exception when calling InventoryApi->retrieveInventoryChanges: ', $e->getMessage(), PHP_EOL;
|
@@ -272,13 +272,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
272 |
// Configure OAuth2 access token for authorization: oauth2
|
273 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
274 |
|
275 |
-
$
|
276 |
$catalog_object_id = "catalog_object_id_example"; // string | ID of the [CatalogObject](#type-catalogobject) to retrieve.
|
277 |
$location_ids = "location_ids_example"; // string | The [Location](#type-location) IDs to look up as a comma-separated list. An empty list queries all locations.
|
278 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information.
|
279 |
|
280 |
try {
|
281 |
-
$result = $
|
282 |
print_r($result);
|
283 |
} catch (Exception $e) {
|
284 |
echo 'Exception when calling InventoryApi->retrieveInventoryCount: ', $e->getMessage(), PHP_EOL;
|
@@ -324,11 +324,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
324 |
// Configure OAuth2 access token for authorization: oauth2
|
325 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
326 |
|
327 |
-
$
|
328 |
$physical_count_id = "physical_count_id_example"; // string | ID of the [InventoryPhysicalCount](#type-inventoryphysicalcount) to retrieve.
|
329 |
|
330 |
try {
|
331 |
-
$result = $
|
332 |
print_r($result);
|
333 |
} catch (Exception $e) {
|
334 |
echo 'Exception when calling InventoryApi->retrieveInventoryPhysicalCount: ', $e->getMessage(), PHP_EOL;
|
28 |
// Configure OAuth2 access token for authorization: oauth2
|
29 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
30 |
|
31 |
+
$apiInstance = new SquareConnect\Api\InventoryApi();
|
32 |
$body = new \SquareConnect\Model\BatchChangeInventoryRequest(); // \SquareConnect\Model\BatchChangeInventoryRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
33 |
|
34 |
try {
|
35 |
+
$result = $apiInstance->batchChangeInventory($body);
|
36 |
print_r($result);
|
37 |
} catch (Exception $e) {
|
38 |
echo 'Exception when calling InventoryApi->batchChangeInventory: ', $e->getMessage(), PHP_EOL;
|
76 |
// Configure OAuth2 access token for authorization: oauth2
|
77 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
78 |
|
79 |
+
$apiInstance = new SquareConnect\Api\InventoryApi();
|
80 |
$body = new \SquareConnect\Model\BatchRetrieveInventoryChangesRequest(); // \SquareConnect\Model\BatchRetrieveInventoryChangesRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
81 |
|
82 |
try {
|
83 |
+
$result = $apiInstance->batchRetrieveInventoryChanges($body);
|
84 |
print_r($result);
|
85 |
} catch (Exception $e) {
|
86 |
echo 'Exception when calling InventoryApi->batchRetrieveInventoryChanges: ', $e->getMessage(), PHP_EOL;
|
124 |
// Configure OAuth2 access token for authorization: oauth2
|
125 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
126 |
|
127 |
+
$apiInstance = new SquareConnect\Api\InventoryApi();
|
128 |
$body = new \SquareConnect\Model\BatchRetrieveInventoryCountsRequest(); // \SquareConnect\Model\BatchRetrieveInventoryCountsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
129 |
|
130 |
try {
|
131 |
+
$result = $apiInstance->batchRetrieveInventoryCounts($body);
|
132 |
print_r($result);
|
133 |
} catch (Exception $e) {
|
134 |
echo 'Exception when calling InventoryApi->batchRetrieveInventoryCounts: ', $e->getMessage(), PHP_EOL;
|
172 |
// Configure OAuth2 access token for authorization: oauth2
|
173 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
174 |
|
175 |
+
$apiInstance = new SquareConnect\Api\InventoryApi();
|
176 |
$adjustment_id = "adjustment_id_example"; // string | ID of the [InventoryAdjustment](#type-inventoryadjustment) to retrieve.
|
177 |
|
178 |
try {
|
179 |
+
$result = $apiInstance->retrieveInventoryAdjustment($adjustment_id);
|
180 |
print_r($result);
|
181 |
} catch (Exception $e) {
|
182 |
echo 'Exception when calling InventoryApi->retrieveInventoryAdjustment: ', $e->getMessage(), PHP_EOL;
|
220 |
// Configure OAuth2 access token for authorization: oauth2
|
221 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
222 |
|
223 |
+
$apiInstance = new SquareConnect\Api\InventoryApi();
|
224 |
$catalog_object_id = "catalog_object_id_example"; // string | ID of the [CatalogObject](#type-catalogobject) to retrieve.
|
225 |
$location_ids = "location_ids_example"; // string | The [Location](#type-location) IDs to look up as a comma-separated list. An empty list queries all locations.
|
226 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information.
|
227 |
|
228 |
try {
|
229 |
+
$result = $apiInstance->retrieveInventoryChanges($catalog_object_id, $location_ids, $cursor);
|
230 |
print_r($result);
|
231 |
} catch (Exception $e) {
|
232 |
echo 'Exception when calling InventoryApi->retrieveInventoryChanges: ', $e->getMessage(), PHP_EOL;
|
272 |
// Configure OAuth2 access token for authorization: oauth2
|
273 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
274 |
|
275 |
+
$apiInstance = new SquareConnect\Api\InventoryApi();
|
276 |
$catalog_object_id = "catalog_object_id_example"; // string | ID of the [CatalogObject](#type-catalogobject) to retrieve.
|
277 |
$location_ids = "location_ids_example"; // string | The [Location](#type-location) IDs to look up as a comma-separated list. An empty list queries all locations.
|
278 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information.
|
279 |
|
280 |
try {
|
281 |
+
$result = $apiInstance->retrieveInventoryCount($catalog_object_id, $location_ids, $cursor);
|
282 |
print_r($result);
|
283 |
} catch (Exception $e) {
|
284 |
echo 'Exception when calling InventoryApi->retrieveInventoryCount: ', $e->getMessage(), PHP_EOL;
|
324 |
// Configure OAuth2 access token for authorization: oauth2
|
325 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
326 |
|
327 |
+
$apiInstance = new SquareConnect\Api\InventoryApi();
|
328 |
$physical_count_id = "physical_count_id_example"; // string | ID of the [InventoryPhysicalCount](#type-inventoryphysicalcount) to retrieve.
|
329 |
|
330 |
try {
|
331 |
+
$result = $apiInstance->retrieveInventoryPhysicalCount($physical_count_id);
|
332 |
print_r($result);
|
333 |
} catch (Exception $e) {
|
334 |
echo 'Exception when calling InventoryApi->retrieveInventoryPhysicalCount: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/LaborApi.md
CHANGED
@@ -35,11 +35,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
35 |
// Configure OAuth2 access token for authorization: oauth2
|
36 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
37 |
|
38 |
-
$
|
39 |
$body = new \SquareConnect\Model\CreateBreakTypeRequest(); // \SquareConnect\Model\CreateBreakTypeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
40 |
|
41 |
try {
|
42 |
-
$result = $
|
43 |
print_r($result);
|
44 |
} catch (Exception $e) {
|
45 |
echo 'Exception when calling LaborApi->createBreakType: ', $e->getMessage(), PHP_EOL;
|
@@ -83,11 +83,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
83 |
// Configure OAuth2 access token for authorization: oauth2
|
84 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
85 |
|
86 |
-
$
|
87 |
$body = new \SquareConnect\Model\CreateShiftRequest(); // \SquareConnect\Model\CreateShiftRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
88 |
|
89 |
try {
|
90 |
-
$result = $
|
91 |
print_r($result);
|
92 |
} catch (Exception $e) {
|
93 |
echo 'Exception when calling LaborApi->createShift: ', $e->getMessage(), PHP_EOL;
|
@@ -131,11 +131,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
131 |
// Configure OAuth2 access token for authorization: oauth2
|
132 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
133 |
|
134 |
-
$
|
135 |
$id = "id_example"; // string | UUID for the `BreakType` being deleted.
|
136 |
|
137 |
try {
|
138 |
-
$result = $
|
139 |
print_r($result);
|
140 |
} catch (Exception $e) {
|
141 |
echo 'Exception when calling LaborApi->deleteBreakType: ', $e->getMessage(), PHP_EOL;
|
@@ -179,11 +179,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
179 |
// Configure OAuth2 access token for authorization: oauth2
|
180 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
181 |
|
182 |
-
$
|
183 |
$id = "id_example"; // string | UUID for the `Shift` being deleted.
|
184 |
|
185 |
try {
|
186 |
-
$result = $
|
187 |
print_r($result);
|
188 |
} catch (Exception $e) {
|
189 |
echo 'Exception when calling LaborApi->deleteShift: ', $e->getMessage(), PHP_EOL;
|
@@ -227,11 +227,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
227 |
// Configure OAuth2 access token for authorization: oauth2
|
228 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
229 |
|
230 |
-
$
|
231 |
$id = "id_example"; // string | UUID for the `BreakType` being retrieved.
|
232 |
|
233 |
try {
|
234 |
-
$result = $
|
235 |
print_r($result);
|
236 |
} catch (Exception $e) {
|
237 |
echo 'Exception when calling LaborApi->getBreakType: ', $e->getMessage(), PHP_EOL;
|
@@ -275,11 +275,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
275 |
// Configure OAuth2 access token for authorization: oauth2
|
276 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
277 |
|
278 |
-
$
|
279 |
$id = "id_example"; // string | UUID for the `EmployeeWage` being retrieved.
|
280 |
|
281 |
try {
|
282 |
-
$result = $
|
283 |
print_r($result);
|
284 |
} catch (Exception $e) {
|
285 |
echo 'Exception when calling LaborApi->getEmployeeWage: ', $e->getMessage(), PHP_EOL;
|
@@ -323,11 +323,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
323 |
// Configure OAuth2 access token for authorization: oauth2
|
324 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
325 |
|
326 |
-
$
|
327 |
$id = "id_example"; // string | UUID for the `Shift` being retrieved.
|
328 |
|
329 |
try {
|
330 |
-
$result = $
|
331 |
print_r($result);
|
332 |
} catch (Exception $e) {
|
333 |
echo 'Exception when calling LaborApi->getShift: ', $e->getMessage(), PHP_EOL;
|
@@ -371,13 +371,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
371 |
// Configure OAuth2 access token for authorization: oauth2
|
372 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
373 |
|
374 |
-
$
|
375 |
$location_id = "location_id_example"; // string | Filter Break Types returned to only those that are associated with the specified location.
|
376 |
$limit = 56; // int | Maximum number of Break Types to return per page. Can range between 1 and 200. The default is the maximum at 200.
|
377 |
$cursor = "cursor_example"; // string | Pointer to the next page of Break Type results to fetch.
|
378 |
|
379 |
try {
|
380 |
-
$result = $
|
381 |
print_r($result);
|
382 |
} catch (Exception $e) {
|
383 |
echo 'Exception when calling LaborApi->listBreakTypes: ', $e->getMessage(), PHP_EOL;
|
@@ -423,13 +423,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
423 |
// Configure OAuth2 access token for authorization: oauth2
|
424 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
425 |
|
426 |
-
$
|
427 |
$employee_id = "employee_id_example"; // string | Filter wages returned to only those that are associated with the specified employee.
|
428 |
$limit = 56; // int | Maximum number of Employee Wages to return per page. Can range between 1 and 200. The default is the maximum at 200.
|
429 |
$cursor = "cursor_example"; // string | Pointer to the next page of Employee Wage results to fetch.
|
430 |
|
431 |
try {
|
432 |
-
$result = $
|
433 |
print_r($result);
|
434 |
} catch (Exception $e) {
|
435 |
echo 'Exception when calling LaborApi->listEmployeeWages: ', $e->getMessage(), PHP_EOL;
|
@@ -475,12 +475,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
475 |
// Configure OAuth2 access token for authorization: oauth2
|
476 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
477 |
|
478 |
-
$
|
479 |
$limit = 56; // int | Maximum number of Workweek Configs to return per page.
|
480 |
$cursor = "cursor_example"; // string | Pointer to the next page of Workweek Config results to fetch.
|
481 |
|
482 |
try {
|
483 |
-
$result = $
|
484 |
print_r($result);
|
485 |
} catch (Exception $e) {
|
486 |
echo 'Exception when calling LaborApi->listWorkweekConfigs: ', $e->getMessage(), PHP_EOL;
|
@@ -525,11 +525,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
525 |
// Configure OAuth2 access token for authorization: oauth2
|
526 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
527 |
|
528 |
-
$
|
529 |
$body = new \SquareConnect\Model\SearchShiftsRequest(); // \SquareConnect\Model\SearchShiftsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
530 |
|
531 |
try {
|
532 |
-
$result = $
|
533 |
print_r($result);
|
534 |
} catch (Exception $e) {
|
535 |
echo 'Exception when calling LaborApi->searchShifts: ', $e->getMessage(), PHP_EOL;
|
@@ -573,12 +573,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
573 |
// Configure OAuth2 access token for authorization: oauth2
|
574 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
575 |
|
576 |
-
$
|
577 |
$id = "id_example"; // string | UUID for the `BreakType` being updated.
|
578 |
$body = new \SquareConnect\Model\UpdateBreakTypeRequest(); // \SquareConnect\Model\UpdateBreakTypeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
579 |
|
580 |
try {
|
581 |
-
$result = $
|
582 |
print_r($result);
|
583 |
} catch (Exception $e) {
|
584 |
echo 'Exception when calling LaborApi->updateBreakType: ', $e->getMessage(), PHP_EOL;
|
@@ -623,12 +623,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
623 |
// Configure OAuth2 access token for authorization: oauth2
|
624 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
625 |
|
626 |
-
$
|
627 |
$id = "id_example"; // string | ID of the object being updated.
|
628 |
$body = new \SquareConnect\Model\UpdateShiftRequest(); // \SquareConnect\Model\UpdateShiftRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
629 |
|
630 |
try {
|
631 |
-
$result = $
|
632 |
print_r($result);
|
633 |
} catch (Exception $e) {
|
634 |
echo 'Exception when calling LaborApi->updateShift: ', $e->getMessage(), PHP_EOL;
|
@@ -673,12 +673,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
673 |
// Configure OAuth2 access token for authorization: oauth2
|
674 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
675 |
|
676 |
-
$
|
677 |
$id = "id_example"; // string | UUID for the `WorkweekConfig` object being updated.
|
678 |
$body = new \SquareConnect\Model\UpdateWorkweekConfigRequest(); // \SquareConnect\Model\UpdateWorkweekConfigRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
679 |
|
680 |
try {
|
681 |
-
$result = $
|
682 |
print_r($result);
|
683 |
} catch (Exception $e) {
|
684 |
echo 'Exception when calling LaborApi->updateWorkweekConfig: ', $e->getMessage(), PHP_EOL;
|
35 |
// Configure OAuth2 access token for authorization: oauth2
|
36 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
37 |
|
38 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
39 |
$body = new \SquareConnect\Model\CreateBreakTypeRequest(); // \SquareConnect\Model\CreateBreakTypeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
40 |
|
41 |
try {
|
42 |
+
$result = $apiInstance->createBreakType($body);
|
43 |
print_r($result);
|
44 |
} catch (Exception $e) {
|
45 |
echo 'Exception when calling LaborApi->createBreakType: ', $e->getMessage(), PHP_EOL;
|
83 |
// Configure OAuth2 access token for authorization: oauth2
|
84 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
85 |
|
86 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
87 |
$body = new \SquareConnect\Model\CreateShiftRequest(); // \SquareConnect\Model\CreateShiftRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
88 |
|
89 |
try {
|
90 |
+
$result = $apiInstance->createShift($body);
|
91 |
print_r($result);
|
92 |
} catch (Exception $e) {
|
93 |
echo 'Exception when calling LaborApi->createShift: ', $e->getMessage(), PHP_EOL;
|
131 |
// Configure OAuth2 access token for authorization: oauth2
|
132 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
133 |
|
134 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
135 |
$id = "id_example"; // string | UUID for the `BreakType` being deleted.
|
136 |
|
137 |
try {
|
138 |
+
$result = $apiInstance->deleteBreakType($id);
|
139 |
print_r($result);
|
140 |
} catch (Exception $e) {
|
141 |
echo 'Exception when calling LaborApi->deleteBreakType: ', $e->getMessage(), PHP_EOL;
|
179 |
// Configure OAuth2 access token for authorization: oauth2
|
180 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
181 |
|
182 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
183 |
$id = "id_example"; // string | UUID for the `Shift` being deleted.
|
184 |
|
185 |
try {
|
186 |
+
$result = $apiInstance->deleteShift($id);
|
187 |
print_r($result);
|
188 |
} catch (Exception $e) {
|
189 |
echo 'Exception when calling LaborApi->deleteShift: ', $e->getMessage(), PHP_EOL;
|
227 |
// Configure OAuth2 access token for authorization: oauth2
|
228 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
229 |
|
230 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
231 |
$id = "id_example"; // string | UUID for the `BreakType` being retrieved.
|
232 |
|
233 |
try {
|
234 |
+
$result = $apiInstance->getBreakType($id);
|
235 |
print_r($result);
|
236 |
} catch (Exception $e) {
|
237 |
echo 'Exception when calling LaborApi->getBreakType: ', $e->getMessage(), PHP_EOL;
|
275 |
// Configure OAuth2 access token for authorization: oauth2
|
276 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
277 |
|
278 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
279 |
$id = "id_example"; // string | UUID for the `EmployeeWage` being retrieved.
|
280 |
|
281 |
try {
|
282 |
+
$result = $apiInstance->getEmployeeWage($id);
|
283 |
print_r($result);
|
284 |
} catch (Exception $e) {
|
285 |
echo 'Exception when calling LaborApi->getEmployeeWage: ', $e->getMessage(), PHP_EOL;
|
323 |
// Configure OAuth2 access token for authorization: oauth2
|
324 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
325 |
|
326 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
327 |
$id = "id_example"; // string | UUID for the `Shift` being retrieved.
|
328 |
|
329 |
try {
|
330 |
+
$result = $apiInstance->getShift($id);
|
331 |
print_r($result);
|
332 |
} catch (Exception $e) {
|
333 |
echo 'Exception when calling LaborApi->getShift: ', $e->getMessage(), PHP_EOL;
|
371 |
// Configure OAuth2 access token for authorization: oauth2
|
372 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
373 |
|
374 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
375 |
$location_id = "location_id_example"; // string | Filter Break Types returned to only those that are associated with the specified location.
|
376 |
$limit = 56; // int | Maximum number of Break Types to return per page. Can range between 1 and 200. The default is the maximum at 200.
|
377 |
$cursor = "cursor_example"; // string | Pointer to the next page of Break Type results to fetch.
|
378 |
|
379 |
try {
|
380 |
+
$result = $apiInstance->listBreakTypes($location_id, $limit, $cursor);
|
381 |
print_r($result);
|
382 |
} catch (Exception $e) {
|
383 |
echo 'Exception when calling LaborApi->listBreakTypes: ', $e->getMessage(), PHP_EOL;
|
423 |
// Configure OAuth2 access token for authorization: oauth2
|
424 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
425 |
|
426 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
427 |
$employee_id = "employee_id_example"; // string | Filter wages returned to only those that are associated with the specified employee.
|
428 |
$limit = 56; // int | Maximum number of Employee Wages to return per page. Can range between 1 and 200. The default is the maximum at 200.
|
429 |
$cursor = "cursor_example"; // string | Pointer to the next page of Employee Wage results to fetch.
|
430 |
|
431 |
try {
|
432 |
+
$result = $apiInstance->listEmployeeWages($employee_id, $limit, $cursor);
|
433 |
print_r($result);
|
434 |
} catch (Exception $e) {
|
435 |
echo 'Exception when calling LaborApi->listEmployeeWages: ', $e->getMessage(), PHP_EOL;
|
475 |
// Configure OAuth2 access token for authorization: oauth2
|
476 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
477 |
|
478 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
479 |
$limit = 56; // int | Maximum number of Workweek Configs to return per page.
|
480 |
$cursor = "cursor_example"; // string | Pointer to the next page of Workweek Config results to fetch.
|
481 |
|
482 |
try {
|
483 |
+
$result = $apiInstance->listWorkweekConfigs($limit, $cursor);
|
484 |
print_r($result);
|
485 |
} catch (Exception $e) {
|
486 |
echo 'Exception when calling LaborApi->listWorkweekConfigs: ', $e->getMessage(), PHP_EOL;
|
525 |
// Configure OAuth2 access token for authorization: oauth2
|
526 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
527 |
|
528 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
529 |
$body = new \SquareConnect\Model\SearchShiftsRequest(); // \SquareConnect\Model\SearchShiftsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
530 |
|
531 |
try {
|
532 |
+
$result = $apiInstance->searchShifts($body);
|
533 |
print_r($result);
|
534 |
} catch (Exception $e) {
|
535 |
echo 'Exception when calling LaborApi->searchShifts: ', $e->getMessage(), PHP_EOL;
|
573 |
// Configure OAuth2 access token for authorization: oauth2
|
574 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
575 |
|
576 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
577 |
$id = "id_example"; // string | UUID for the `BreakType` being updated.
|
578 |
$body = new \SquareConnect\Model\UpdateBreakTypeRequest(); // \SquareConnect\Model\UpdateBreakTypeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
579 |
|
580 |
try {
|
581 |
+
$result = $apiInstance->updateBreakType($id, $body);
|
582 |
print_r($result);
|
583 |
} catch (Exception $e) {
|
584 |
echo 'Exception when calling LaborApi->updateBreakType: ', $e->getMessage(), PHP_EOL;
|
623 |
// Configure OAuth2 access token for authorization: oauth2
|
624 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
625 |
|
626 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
627 |
$id = "id_example"; // string | ID of the object being updated.
|
628 |
$body = new \SquareConnect\Model\UpdateShiftRequest(); // \SquareConnect\Model\UpdateShiftRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
629 |
|
630 |
try {
|
631 |
+
$result = $apiInstance->updateShift($id, $body);
|
632 |
print_r($result);
|
633 |
} catch (Exception $e) {
|
634 |
echo 'Exception when calling LaborApi->updateShift: ', $e->getMessage(), PHP_EOL;
|
673 |
// Configure OAuth2 access token for authorization: oauth2
|
674 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
675 |
|
676 |
+
$apiInstance = new SquareConnect\Api\LaborApi();
|
677 |
$id = "id_example"; // string | UUID for the `WorkweekConfig` object being updated.
|
678 |
$body = new \SquareConnect\Model\UpdateWorkweekConfigRequest(); // \SquareConnect\Model\UpdateWorkweekConfigRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
679 |
|
680 |
try {
|
681 |
+
$result = $apiInstance->updateWorkweekConfig($id, $body);
|
682 |
print_r($result);
|
683 |
} catch (Exception $e) {
|
684 |
echo 'Exception when calling LaborApi->updateWorkweekConfig: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/LocationsApi.md
CHANGED
@@ -22,10 +22,10 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
22 |
// Configure OAuth2 access token for authorization: oauth2
|
23 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
24 |
|
25 |
-
$
|
26 |
|
27 |
try {
|
28 |
-
$result = $
|
29 |
print_r($result);
|
30 |
} catch (Exception $e) {
|
31 |
echo 'Exception when calling LocationsApi->listLocations: ', $e->getMessage(), PHP_EOL;
|
22 |
// Configure OAuth2 access token for authorization: oauth2
|
23 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
24 |
|
25 |
+
$apiInstance = new SquareConnect\Api\LocationsApi();
|
26 |
|
27 |
try {
|
28 |
+
$result = $apiInstance->listLocations();
|
29 |
print_r($result);
|
30 |
} catch (Exception $e) {
|
31 |
echo 'Exception when calling LocationsApi->listLocations: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/MobileAuthorizationApi.md
CHANGED
@@ -22,11 +22,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
22 |
// Configure OAuth2 access token for authorization: oauth2
|
23 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
24 |
|
25 |
-
$
|
26 |
$body = new \SquareConnect\Model\CreateMobileAuthorizationCodeRequest(); // \SquareConnect\Model\CreateMobileAuthorizationCodeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
27 |
|
28 |
try {
|
29 |
-
$result = $
|
30 |
print_r($result);
|
31 |
} catch (Exception $e) {
|
32 |
echo 'Exception when calling MobileAuthorizationApi->createMobileAuthorizationCode: ', $e->getMessage(), PHP_EOL;
|
22 |
// Configure OAuth2 access token for authorization: oauth2
|
23 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
24 |
|
25 |
+
$apiInstance = new SquareConnect\Api\MobileAuthorizationApi();
|
26 |
$body = new \SquareConnect\Model\CreateMobileAuthorizationCodeRequest(); // \SquareConnect\Model\CreateMobileAuthorizationCodeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
27 |
|
28 |
try {
|
29 |
+
$result = $apiInstance->createMobileAuthorizationCode($body);
|
30 |
print_r($result);
|
31 |
} catch (Exception $e) {
|
32 |
echo 'Exception when calling MobileAuthorizationApi->createMobileAuthorizationCode: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/OAuthApi.md
CHANGED
@@ -14,18 +14,18 @@ Method | HTTP request | Description
|
|
14 |
|
15 |
ObtainToken
|
16 |
|
17 |
-
Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response.
|
18 |
|
19 |
### Example
|
20 |
```php
|
21 |
<?php
|
22 |
require_once(__DIR__ . '/vendor/autoload.php');
|
23 |
|
24 |
-
$
|
25 |
$body = new \SquareConnect\Model\ObtainTokenRequest(); // \SquareConnect\Model\ObtainTokenRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
26 |
|
27 |
try {
|
28 |
-
$result = $
|
29 |
print_r($result);
|
30 |
} catch (Exception $e) {
|
31 |
echo 'Exception when calling OAuthApi->obtainToken: ', $e->getMessage(), PHP_EOL;
|
@@ -55,11 +55,12 @@ No authorization required
|
|
55 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
56 |
|
57 |
# **renewToken**
|
|
|
58 |
> \SquareConnect\Model\RenewTokenResponse renewToken($client_id, $body)
|
59 |
|
60 |
RenewToken
|
61 |
|
62 |
-
`RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](/
|
63 |
|
64 |
### Example
|
65 |
```php
|
@@ -67,16 +68,16 @@ RenewToken
|
|
67 |
require_once(__DIR__ . '/vendor/autoload.php');
|
68 |
|
69 |
// Configure API key authorization: oauth2ClientSecret
|
70 |
-
SquareConnect\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
|
71 |
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
72 |
-
// SquareConnect\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
|
73 |
|
74 |
-
$
|
75 |
$client_id = "client_id_example"; // string | Your application's ID, available from the [application dashboard](https://connect.squareup.com/apps).
|
76 |
$body = new \SquareConnect\Model\RenewTokenRequest(); // \SquareConnect\Model\RenewTokenRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
77 |
|
78 |
try {
|
79 |
-
$result = $
|
80 |
print_r($result);
|
81 |
} catch (Exception $e) {
|
82 |
echo 'Exception when calling OAuthApi->renewToken: ', $e->getMessage(), PHP_EOL;
|
@@ -119,15 +120,15 @@ Revokes an access token generated with the OAuth flow. If an account has more t
|
|
119 |
require_once(__DIR__ . '/vendor/autoload.php');
|
120 |
|
121 |
// Configure API key authorization: oauth2ClientSecret
|
122 |
-
SquareConnect\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
|
123 |
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
124 |
-
// SquareConnect\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
|
125 |
|
126 |
-
$
|
127 |
$body = new \SquareConnect\Model\RevokeTokenRequest(); // \SquareConnect\Model\RevokeTokenRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
128 |
|
129 |
try {
|
130 |
-
$result = $
|
131 |
print_r($result);
|
132 |
} catch (Exception $e) {
|
133 |
echo 'Exception when calling OAuthApi->revokeToken: ', $e->getMessage(), PHP_EOL;
|
14 |
|
15 |
ObtainToken
|
16 |
|
17 |
+
Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response. __OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens__.
|
18 |
|
19 |
### Example
|
20 |
```php
|
21 |
<?php
|
22 |
require_once(__DIR__ . '/vendor/autoload.php');
|
23 |
|
24 |
+
$apiInstance = new SquareConnect\Api\OAuthApi();
|
25 |
$body = new \SquareConnect\Model\ObtainTokenRequest(); // \SquareConnect\Model\ObtainTokenRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
26 |
|
27 |
try {
|
28 |
+
$result = $apiInstance->obtainToken($body);
|
29 |
print_r($result);
|
30 |
} catch (Exception $e) {
|
31 |
echo 'Exception when calling OAuthApi->obtainToken: ', $e->getMessage(), PHP_EOL;
|
55 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
56 |
|
57 |
# **renewToken**
|
58 |
+
**Note: This endpoint is deprecated.**
|
59 |
> \SquareConnect\Model\RenewTokenResponse renewToken($client_id, $body)
|
60 |
|
61 |
RenewToken
|
62 |
|
63 |
+
`RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](https://developer.squareup.com/docs/oauth-api/cookbook/renew-oauth-tokens). Renews an OAuth access token before it expires. OAuth access tokens besides your application's personal access token expire after __30 days__. You can also renew expired tokens within __15 days__ of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated user must re-complete the OAuth flow from the beginning. __Important:__ The `Authorization` header for this endpoint must have the following format: ``` Authorization: Client APPLICATION_SECRET ``` Replace `APPLICATION_SECRET` with the application secret on the Credentials page in the [application dashboard](https://connect.squareup.com/apps).
|
64 |
|
65 |
### Example
|
66 |
```php
|
68 |
require_once(__DIR__ . '/vendor/autoload.php');
|
69 |
|
70 |
// Configure API key authorization: oauth2ClientSecret
|
71 |
+
$config = SquareConnect\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
|
72 |
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
73 |
+
// $config = SquareConnect\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
|
74 |
|
75 |
+
$apiInstance = new SquareConnect\Api\OAuthApi();
|
76 |
$client_id = "client_id_example"; // string | Your application's ID, available from the [application dashboard](https://connect.squareup.com/apps).
|
77 |
$body = new \SquareConnect\Model\RenewTokenRequest(); // \SquareConnect\Model\RenewTokenRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
78 |
|
79 |
try {
|
80 |
+
$result = $apiInstance->renewToken($client_id, $body);
|
81 |
print_r($result);
|
82 |
} catch (Exception $e) {
|
83 |
echo 'Exception when calling OAuthApi->renewToken: ', $e->getMessage(), PHP_EOL;
|
120 |
require_once(__DIR__ . '/vendor/autoload.php');
|
121 |
|
122 |
// Configure API key authorization: oauth2ClientSecret
|
123 |
+
$config = SquareConnect\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
|
124 |
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
125 |
+
// $config = SquareConnect\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
|
126 |
|
127 |
+
$apiInstance = new SquareConnect\Api\OAuthApi();
|
128 |
$body = new \SquareConnect\Model\RevokeTokenRequest(); // \SquareConnect\Model\RevokeTokenRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
129 |
|
130 |
try {
|
131 |
+
$result = $apiInstance->revokeToken($body);
|
132 |
print_r($result);
|
133 |
} catch (Exception $e) {
|
134 |
echo 'Exception when calling OAuthApi->revokeToken: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/OrdersApi.md
CHANGED
@@ -6,7 +6,9 @@ Method | HTTP request | Description
|
|
6 |
------------- | ------------- | -------------
|
7 |
[**batchRetrieveOrders**](OrdersApi.md#batchRetrieveOrders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders
|
8 |
[**createOrder**](OrdersApi.md#createOrder) | **POST** /v2/locations/{location_id}/orders | CreateOrder
|
|
|
9 |
[**searchOrders**](OrdersApi.md#searchOrders) | **POST** /v2/orders/search | SearchOrders
|
|
|
10 |
|
11 |
|
12 |
# **batchRetrieveOrders**
|
@@ -24,12 +26,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
24 |
// Configure OAuth2 access token for authorization: oauth2
|
25 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
26 |
|
27 |
-
$
|
28 |
$location_id = "location_id_example"; // string | The ID of the orders' associated location.
|
29 |
$body = new \SquareConnect\Model\BatchRetrieveOrdersRequest(); // \SquareConnect\Model\BatchRetrieveOrdersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
30 |
|
31 |
try {
|
32 |
-
$result = $
|
33 |
print_r($result);
|
34 |
} catch (Exception $e) {
|
35 |
echo 'Exception when calling OrdersApi->batchRetrieveOrders: ', $e->getMessage(), PHP_EOL;
|
@@ -64,7 +66,7 @@ Name | Type | Description | Notes
|
|
64 |
|
65 |
CreateOrder
|
66 |
|
67 |
-
Creates
|
68 |
|
69 |
### Example
|
70 |
```php
|
@@ -74,12 +76,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
74 |
// Configure OAuth2 access token for authorization: oauth2
|
75 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
76 |
|
77 |
-
$
|
78 |
$location_id = "location_id_example"; // string | The ID of the business location to associate the order with.
|
79 |
$body = new \SquareConnect\Model\CreateOrderRequest(); // \SquareConnect\Model\CreateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
80 |
|
81 |
try {
|
82 |
-
$result = $
|
83 |
print_r($result);
|
84 |
} catch (Exception $e) {
|
85 |
echo 'Exception when calling OrdersApi->createOrder: ', $e->getMessage(), PHP_EOL;
|
@@ -109,12 +111,62 @@ Name | Type | Description | Notes
|
|
109 |
|
110 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
# **searchOrders**
|
113 |
> \SquareConnect\Model\SearchOrdersResponse searchOrders($body)
|
114 |
|
115 |
SearchOrders
|
116 |
|
117 |
-
Search all
|
118 |
|
119 |
### Example
|
120 |
```php
|
@@ -124,11 +176,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
124 |
// Configure OAuth2 access token for authorization: oauth2
|
125 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
126 |
|
127 |
-
$
|
128 |
$body = new \SquareConnect\Model\SearchOrdersRequest(); // \SquareConnect\Model\SearchOrdersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
129 |
|
130 |
try {
|
131 |
-
$result = $
|
132 |
print_r($result);
|
133 |
} catch (Exception $e) {
|
134 |
echo 'Exception when calling OrdersApi->searchOrders: ', $e->getMessage(), PHP_EOL;
|
@@ -157,3 +209,55 @@ Name | Type | Description | Notes
|
|
157 |
|
158 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
------------- | ------------- | -------------
|
7 |
[**batchRetrieveOrders**](OrdersApi.md#batchRetrieveOrders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders
|
8 |
[**createOrder**](OrdersApi.md#createOrder) | **POST** /v2/locations/{location_id}/orders | CreateOrder
|
9 |
+
[**payOrder**](OrdersApi.md#payOrder) | **POST** /v2/orders/{order_id}/pay | PayOrder
|
10 |
[**searchOrders**](OrdersApi.md#searchOrders) | **POST** /v2/orders/search | SearchOrders
|
11 |
+
[**updateOrder**](OrdersApi.md#updateOrder) | **PUT** /v2/locations/{location_id}/orders/{order_id} | UpdateOrder
|
12 |
|
13 |
|
14 |
# **batchRetrieveOrders**
|
26 |
// Configure OAuth2 access token for authorization: oauth2
|
27 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
28 |
|
29 |
+
$apiInstance = new SquareConnect\Api\OrdersApi();
|
30 |
$location_id = "location_id_example"; // string | The ID of the orders' associated location.
|
31 |
$body = new \SquareConnect\Model\BatchRetrieveOrdersRequest(); // \SquareConnect\Model\BatchRetrieveOrdersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
32 |
|
33 |
try {
|
34 |
+
$result = $apiInstance->batchRetrieveOrders($location_id, $body);
|
35 |
print_r($result);
|
36 |
} catch (Exception $e) {
|
37 |
echo 'Exception when calling OrdersApi->batchRetrieveOrders: ', $e->getMessage(), PHP_EOL;
|
66 |
|
67 |
CreateOrder
|
68 |
|
69 |
+
Creates a new [Order](#type-order) which can include information on products for purchase and settings to apply to the purchase. To pay for a created order, please refer to the [Pay for Orders](/orders-api/pay-for-orders) guide. You can modify open orders using the [UpdateOrder](#endpoint-orders-updateorder) endpoint. To learn more about the Orders API, see the [Orders API Overview](/orders-api/what-it-does).
|
70 |
|
71 |
### Example
|
72 |
```php
|
76 |
// Configure OAuth2 access token for authorization: oauth2
|
77 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
78 |
|
79 |
+
$apiInstance = new SquareConnect\Api\OrdersApi();
|
80 |
$location_id = "location_id_example"; // string | The ID of the business location to associate the order with.
|
81 |
$body = new \SquareConnect\Model\CreateOrderRequest(); // \SquareConnect\Model\CreateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
82 |
|
83 |
try {
|
84 |
+
$result = $apiInstance->createOrder($location_id, $body);
|
85 |
print_r($result);
|
86 |
} catch (Exception $e) {
|
87 |
echo 'Exception when calling OrdersApi->createOrder: ', $e->getMessage(), PHP_EOL;
|
111 |
|
112 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
113 |
|
114 |
+
# **payOrder**
|
115 |
+
> \SquareConnect\Model\PayOrderResponse payOrder($order_id, $body)
|
116 |
+
|
117 |
+
PayOrder
|
118 |
+
|
119 |
+
Pay for an [order](#type-order) using one or more approved [payments](#type-payment), or settle an order with a total of `0`. The total of the `payment_ids` listed in the request must be equal to the order total. Orders with a total amount of `0` can be marked as paid by specifying an empty array of `payment_ids` in the request. To be used with PayOrder, a payment must: - Reference the order by specifying the `order_id` when [creating the payment](#endpoint-payments-createpayment). Any approved payments that reference the same `order_id` not specified in the `payment_ids` will be canceled. - Be approved with [delayed capture](/payments-api/take-payments#delayed-capture). Using a delayed capture payment with PayOrder will complete the approved payment. Learn how to [pay for orders with a single payment using the Payments API](/orders-api/pay-for-orders).
|
120 |
+
|
121 |
+
### Example
|
122 |
+
```php
|
123 |
+
<?php
|
124 |
+
require_once(__DIR__ . '/vendor/autoload.php');
|
125 |
+
|
126 |
+
// Configure OAuth2 access token for authorization: oauth2
|
127 |
+
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
128 |
+
|
129 |
+
$apiInstance = new SquareConnect\Api\OrdersApi();
|
130 |
+
$order_id = "order_id_example"; // string | The ID of the order being paid.
|
131 |
+
$body = new \SquareConnect\Model\PayOrderRequest(); // \SquareConnect\Model\PayOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
132 |
+
|
133 |
+
try {
|
134 |
+
$result = $apiInstance->payOrder($order_id, $body);
|
135 |
+
print_r($result);
|
136 |
+
} catch (Exception $e) {
|
137 |
+
echo 'Exception when calling OrdersApi->payOrder: ', $e->getMessage(), PHP_EOL;
|
138 |
+
}
|
139 |
+
?>
|
140 |
+
```
|
141 |
+
|
142 |
+
### Parameters
|
143 |
+
|
144 |
+
Name | Type | Description | Notes
|
145 |
+
------------- | ------------- | ------------- | -------------
|
146 |
+
**order_id** | **string**| The ID of the order being paid. |
|
147 |
+
**body** | [**\SquareConnect\Model\PayOrderRequest**](../Model/PayOrderRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
148 |
+
|
149 |
+
### Return type
|
150 |
+
|
151 |
+
[**\SquareConnect\Model\PayOrderResponse**](../Model/PayOrderResponse.md)
|
152 |
+
|
153 |
+
### Authorization
|
154 |
+
|
155 |
+
[oauth2](../../README.md#oauth2)
|
156 |
+
|
157 |
+
### HTTP request headers
|
158 |
+
|
159 |
+
- **Content-Type**: application/json
|
160 |
+
- **Accept**: application/json
|
161 |
+
|
162 |
+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
163 |
+
|
164 |
# **searchOrders**
|
165 |
> \SquareConnect\Model\SearchOrdersResponse searchOrders($body)
|
166 |
|
167 |
SearchOrders
|
168 |
|
169 |
+
Search all orders for one or more locations. Orders include all sales, returns, and exchanges regardless of how or when they entered the Square Ecosystem (e.g. Point of Sale, Invoices, Connect APIs, etc). SearchOrders requests need to specify which locations to search and define a [`SearchOrdersQuery`](#type-searchordersquery) object which controls how to sort or filter the results. Your SearchOrdersQuery can: Set filter criteria. Set sort order. Determine whether to return results as complete Order objects, or as [OrderEntry](#type-orderentry) objects. Note that details for orders processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline orders have a `created_at` value that reflects the time the order was created, not the time it was subsequently transmitted to Square.
|
170 |
|
171 |
### Example
|
172 |
```php
|
176 |
// Configure OAuth2 access token for authorization: oauth2
|
177 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
178 |
|
179 |
+
$apiInstance = new SquareConnect\Api\OrdersApi();
|
180 |
$body = new \SquareConnect\Model\SearchOrdersRequest(); // \SquareConnect\Model\SearchOrdersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
181 |
|
182 |
try {
|
183 |
+
$result = $apiInstance->searchOrders($body);
|
184 |
print_r($result);
|
185 |
} catch (Exception $e) {
|
186 |
echo 'Exception when calling OrdersApi->searchOrders: ', $e->getMessage(), PHP_EOL;
|
209 |
|
210 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
211 |
|
212 |
+
# **updateOrder**
|
213 |
+
> \SquareConnect\Model\UpdateOrderResponse updateOrder($location_id, $order_id, $body)
|
214 |
+
|
215 |
+
UpdateOrder
|
216 |
+
|
217 |
+
Updates an open [Order](#type-order) by adding, replacing, or deleting fields. Orders with a `COMPLETED` or `CANCELED` state cannot be updated. An UpdateOrder request requires the following: - The `order_id` in the endpoint path, identifying the order to update. - The latest `version` of the order to update. - The [sparse order](/orders-api/manage-orders#sparse-order-objects) containing only the fields to update and the version the update is being applied to. - If deleting fields, the [dot notation paths](/orders-api/manage-orders#on-dot-notation) identifying fields to clear. To pay for an order, please refer to the [Pay for Orders](/orders-api/pay-for-orders) guide. To learn more about the Orders API, see the [Orders API Overview](/orders-api/what-it-does).
|
218 |
+
|
219 |
+
### Example
|
220 |
+
```php
|
221 |
+
<?php
|
222 |
+
require_once(__DIR__ . '/vendor/autoload.php');
|
223 |
+
|
224 |
+
// Configure OAuth2 access token for authorization: oauth2
|
225 |
+
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
226 |
+
|
227 |
+
$apiInstance = new SquareConnect\Api\OrdersApi();
|
228 |
+
$location_id = "location_id_example"; // string | The ID of the order's associated location.
|
229 |
+
$order_id = "order_id_example"; // string | The ID of the order to update.
|
230 |
+
$body = new \SquareConnect\Model\UpdateOrderRequest(); // \SquareConnect\Model\UpdateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
231 |
+
|
232 |
+
try {
|
233 |
+
$result = $apiInstance->updateOrder($location_id, $order_id, $body);
|
234 |
+
print_r($result);
|
235 |
+
} catch (Exception $e) {
|
236 |
+
echo 'Exception when calling OrdersApi->updateOrder: ', $e->getMessage(), PHP_EOL;
|
237 |
+
}
|
238 |
+
?>
|
239 |
+
```
|
240 |
+
|
241 |
+
### Parameters
|
242 |
+
|
243 |
+
Name | Type | Description | Notes
|
244 |
+
------------- | ------------- | ------------- | -------------
|
245 |
+
**location_id** | **string**| The ID of the order's associated location. |
|
246 |
+
**order_id** | **string**| The ID of the order to update. |
|
247 |
+
**body** | [**\SquareConnect\Model\UpdateOrderRequest**](../Model/UpdateOrderRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
248 |
+
|
249 |
+
### Return type
|
250 |
+
|
251 |
+
[**\SquareConnect\Model\UpdateOrderResponse**](../Model/UpdateOrderResponse.md)
|
252 |
+
|
253 |
+
### Authorization
|
254 |
+
|
255 |
+
[oauth2](../../README.md#oauth2)
|
256 |
+
|
257 |
+
### HTTP request headers
|
258 |
+
|
259 |
+
- **Content-Type**: application/json
|
260 |
+
- **Accept**: application/json
|
261 |
+
|
262 |
+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
263 |
+
|
vendor/square/connect/docs/Api/PaymentsApi.md
ADDED
@@ -0,0 +1,316 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# SquareConnect\PaymentsApi
|
2 |
+
|
3 |
+
All URIs are relative to *https://connect.squareup.com*
|
4 |
+
|
5 |
+
Method | HTTP request | Description
|
6 |
+
------------- | ------------- | -------------
|
7 |
+
[**cancelPayment**](PaymentsApi.md#cancelPayment) | **POST** /v2/payments/{payment_id}/cancel | CancelPayment
|
8 |
+
[**cancelPaymentByIdempotencyKey**](PaymentsApi.md#cancelPaymentByIdempotencyKey) | **POST** /v2/payments/cancel | CancelPaymentByIdempotencyKey
|
9 |
+
[**completePayment**](PaymentsApi.md#completePayment) | **POST** /v2/payments/{payment_id}/complete | CompletePayment
|
10 |
+
[**createPayment**](PaymentsApi.md#createPayment) | **POST** /v2/payments | CreatePayment
|
11 |
+
[**getPayment**](PaymentsApi.md#getPayment) | **GET** /v2/payments/{payment_id} | GetPayment
|
12 |
+
[**listPayments**](PaymentsApi.md#listPayments) | **GET** /v2/payments | ListPayments
|
13 |
+
|
14 |
+
|
15 |
+
# **cancelPayment**
|
16 |
+
> \SquareConnect\Model\CancelPaymentResponse cancelPayment($payment_id)
|
17 |
+
|
18 |
+
CancelPayment
|
19 |
+
|
20 |
+
Cancels a payment. If you set `autocomplete` to false when creating a payment, you can cancel the payment using this endpoint. For more information, see [Delayed Payments](/payments-api/take-payments#delayed-payments).
|
21 |
+
|
22 |
+
### Example
|
23 |
+
```php
|
24 |
+
<?php
|
25 |
+
require_once(__DIR__ . '/vendor/autoload.php');
|
26 |
+
|
27 |
+
// Configure OAuth2 access token for authorization: oauth2
|
28 |
+
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
29 |
+
|
30 |
+
$apiInstance = new SquareConnect\Api\PaymentsApi();
|
31 |
+
$payment_id = "payment_id_example"; // string | `payment_id` identifying the payment to be canceled.
|
32 |
+
|
33 |
+
try {
|
34 |
+
$result = $apiInstance->cancelPayment($payment_id);
|
35 |
+
print_r($result);
|
36 |
+
} catch (Exception $e) {
|
37 |
+
echo 'Exception when calling PaymentsApi->cancelPayment: ', $e->getMessage(), PHP_EOL;
|
38 |
+
}
|
39 |
+
?>
|
40 |
+
```
|
41 |
+
|
42 |
+
### Parameters
|
43 |
+
|
44 |
+
Name | Type | Description | Notes
|
45 |
+
------------- | ------------- | ------------- | -------------
|
46 |
+
**payment_id** | **string**| `payment_id` identifying the payment to be canceled. |
|
47 |
+
|
48 |
+
### Return type
|
49 |
+
|
50 |
+
[**\SquareConnect\Model\CancelPaymentResponse**](../Model/CancelPaymentResponse.md)
|
51 |
+
|
52 |
+
### Authorization
|
53 |
+
|
54 |
+
[oauth2](../../README.md#oauth2)
|
55 |
+
|
56 |
+
### HTTP request headers
|
57 |
+
|
58 |
+
- **Content-Type**: application/json
|
59 |
+
- **Accept**: application/json
|
60 |
+
|
61 |
+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
62 |
+
|
63 |
+
# **cancelPaymentByIdempotencyKey**
|
64 |
+
> \SquareConnect\Model\CancelPaymentByIdempotencyKeyResponse cancelPaymentByIdempotencyKey($body)
|
65 |
+
|
66 |
+
CancelPaymentByIdempotencyKey
|
67 |
+
|
68 |
+
Cancels a payment identified by the idenpotency key that is specified the request. Use this method when status of a CreatePayment request is unknown. For example, after you send a CreatePayment request a network error occurs and you don't get a response. In this case, you can direct Square to cancel the payment using this endpoint. In the request, you provide the same idempotency key that you provided in your CreatePayment request you want to cancel. After cancelling the payment, you can submit your CreatePayment request again. Note that if no payment with the specified idempotency key is found, no action is taken, the end point returns successfully.
|
69 |
+
|
70 |
+
### Example
|
71 |
+
```php
|
72 |
+
<?php
|
73 |
+
require_once(__DIR__ . '/vendor/autoload.php');
|
74 |
+
|
75 |
+
// Configure OAuth2 access token for authorization: oauth2
|
76 |
+
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
77 |
+
|
78 |
+
$apiInstance = new SquareConnect\Api\PaymentsApi();
|
79 |
+
$body = new \SquareConnect\Model\CancelPaymentByIdempotencyKeyRequest(); // \SquareConnect\Model\CancelPaymentByIdempotencyKeyRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
80 |
+
|
81 |
+
try {
|
82 |
+
$result = $apiInstance->cancelPaymentByIdempotencyKey($body);
|
83 |
+
print_r($result);
|
84 |
+
} catch (Exception $e) {
|
85 |
+
echo 'Exception when calling PaymentsApi->cancelPaymentByIdempotencyKey: ', $e->getMessage(), PHP_EOL;
|
86 |
+
}
|
87 |
+
?>
|
88 |
+
```
|
89 |
+
|
90 |
+
### Parameters
|
91 |
+
|
92 |
+
Name | Type | Description | Notes
|
93 |
+
------------- | ------------- | ------------- | -------------
|
94 |
+
**body** | [**\SquareConnect\Model\CancelPaymentByIdempotencyKeyRequest**](../Model/CancelPaymentByIdempotencyKeyRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
95 |
+
|
96 |
+
### Return type
|
97 |
+
|
98 |
+
[**\SquareConnect\Model\CancelPaymentByIdempotencyKeyResponse**](../Model/CancelPaymentByIdempotencyKeyResponse.md)
|
99 |
+
|
100 |
+
### Authorization
|
101 |
+
|
102 |
+
[oauth2](../../README.md#oauth2)
|
103 |
+
|
104 |
+
### HTTP request headers
|
105 |
+
|
106 |
+
- **Content-Type**: application/json
|
107 |
+
- **Accept**: application/json
|
108 |
+
|
109 |
+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
110 |
+
|
111 |
+
# **completePayment**
|
112 |
+
> \SquareConnect\Model\CompletePaymentResponse completePayment($payment_id)
|
113 |
+
|
114 |
+
CompletePayment
|
115 |
+
|
116 |
+
Completes a payment. By default, payments are set to complete immediately after they are created. If you set autocomplete to false when creating a payment, you can complete the payment using this endpoint. For more information, see [Delayed Payments](/payments-api/take-payments#delayed-payments).
|
117 |
+
|
118 |
+
### Example
|
119 |
+
```php
|
120 |
+
<?php
|
121 |
+
require_once(__DIR__ . '/vendor/autoload.php');
|
122 |
+
|
123 |
+
// Configure OAuth2 access token for authorization: oauth2
|
124 |
+
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
125 |
+
|
126 |
+
$apiInstance = new SquareConnect\Api\PaymentsApi();
|
127 |
+
$payment_id = "payment_id_example"; // string | Unique ID identifying the payment to be completed.
|
128 |
+
|
129 |
+
try {
|
130 |
+
$result = $apiInstance->completePayment($payment_id);
|
131 |
+
print_r($result);
|
132 |
+
} catch (Exception $e) {
|
133 |
+
echo 'Exception when calling PaymentsApi->completePayment: ', $e->getMessage(), PHP_EOL;
|
134 |
+
}
|
135 |
+
?>
|
136 |
+
```
|
137 |
+
|
138 |
+
### Parameters
|
139 |
+
|
140 |
+
Name | Type | Description | Notes
|
141 |
+
------------- | ------------- | ------------- | -------------
|
142 |
+
**payment_id** | **string**| Unique ID identifying the payment to be completed. |
|
143 |
+
|
144 |
+
### Return type
|
145 |
+
|
146 |
+
[**\SquareConnect\Model\CompletePaymentResponse**](../Model/CompletePaymentResponse.md)
|
147 |
+
|
148 |
+
### Authorization
|
149 |
+
|
150 |
+
[oauth2](../../README.md#oauth2)
|
151 |
+
|
152 |
+
### HTTP request headers
|
153 |
+
|
154 |
+
- **Content-Type**: application/json
|
155 |
+
- **Accept**: application/json
|
156 |
+
|
157 |
+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
158 |
+
|
159 |
+
# **createPayment**
|
160 |
+
> \SquareConnect\Model\CreatePaymentResponse createPayment($body)
|
161 |
+
|
162 |
+
CreatePayment
|
163 |
+
|
164 |
+
Charges a payment source, for example, a card represented by customer's card on file or a card nonce. In addition to the payment source, the request must also include the amount to accept for the payment. There are several optional parameters that you can include in the request. For example, tip money, whether to autocomplete the payment, or a reference ID to correlate this payment with another system. For more information about these payment options, see [Take Payments](/payments-api/take-payments). The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees.
|
165 |
+
|
166 |
+
### Example
|
167 |
+
```php
|
168 |
+
<?php
|
169 |
+
require_once(__DIR__ . '/vendor/autoload.php');
|
170 |
+
|
171 |
+
// Configure OAuth2 access token for authorization: oauth2
|
172 |
+
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
173 |
+
|
174 |
+
$apiInstance = new SquareConnect\Api\PaymentsApi();
|
175 |
+
$body = new \SquareConnect\Model\CreatePaymentRequest(); // \SquareConnect\Model\CreatePaymentRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
176 |
+
|
177 |
+
try {
|
178 |
+
$result = $apiInstance->createPayment($body);
|
179 |
+
print_r($result);
|
180 |
+
} catch (Exception $e) {
|
181 |
+
echo 'Exception when calling PaymentsApi->createPayment: ', $e->getMessage(), PHP_EOL;
|
182 |
+
}
|
183 |
+
?>
|
184 |
+
```
|
185 |
+
|
186 |
+
### Parameters
|
187 |
+
|
188 |
+
Name | Type | Description | Notes
|
189 |
+
------------- | ------------- | ------------- | -------------
|
190 |
+
**body** | [**\SquareConnect\Model\CreatePaymentRequest**](../Model/CreatePaymentRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
191 |
+
|
192 |
+
### Return type
|
193 |
+
|
194 |
+
[**\SquareConnect\Model\CreatePaymentResponse**](../Model/CreatePaymentResponse.md)
|
195 |
+
|
196 |
+
### Authorization
|
197 |
+
|
198 |
+
[oauth2](../../README.md#oauth2)
|
199 |
+
|
200 |
+
### HTTP request headers
|
201 |
+
|
202 |
+
- **Content-Type**: application/json
|
203 |
+
- **Accept**: application/json
|
204 |
+
|
205 |
+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
206 |
+
|
207 |
+
# **getPayment**
|
208 |
+
> \SquareConnect\Model\GetPaymentResponse getPayment($payment_id)
|
209 |
+
|
210 |
+
GetPayment
|
211 |
+
|
212 |
+
Retrieves details for a specific Payment.
|
213 |
+
|
214 |
+
### Example
|
215 |
+
```php
|
216 |
+
<?php
|
217 |
+
require_once(__DIR__ . '/vendor/autoload.php');
|
218 |
+
|
219 |
+
// Configure OAuth2 access token for authorization: oauth2
|
220 |
+
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
221 |
+
|
222 |
+
$apiInstance = new SquareConnect\Api\PaymentsApi();
|
223 |
+
$payment_id = "payment_id_example"; // string | Unique ID for the desired `Payment`.
|
224 |
+
|
225 |
+
try {
|
226 |
+
$result = $apiInstance->getPayment($payment_id);
|
227 |
+
print_r($result);
|
228 |
+
} catch (Exception $e) {
|
229 |
+
echo 'Exception when calling PaymentsApi->getPayment: ', $e->getMessage(), PHP_EOL;
|
230 |
+
}
|
231 |
+
?>
|
232 |
+
```
|
233 |
+
|
234 |
+
### Parameters
|
235 |
+
|
236 |
+
Name | Type | Description | Notes
|
237 |
+
------------- | ------------- | ------------- | -------------
|
238 |
+
**payment_id** | **string**| Unique ID for the desired `Payment`. |
|
239 |
+
|
240 |
+
### Return type
|
241 |
+
|
242 |
+
[**\SquareConnect\Model\GetPaymentResponse**](../Model/GetPaymentResponse.md)
|
243 |
+
|
244 |
+
### Authorization
|
245 |
+
|
246 |
+
[oauth2](../../README.md#oauth2)
|
247 |
+
|
248 |
+
### HTTP request headers
|
249 |
+
|
250 |
+
- **Content-Type**: application/json
|
251 |
+
- **Accept**: application/json
|
252 |
+
|
253 |
+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
254 |
+
|
255 |
+
# **listPayments**
|
256 |
+
> \SquareConnect\Model\ListPaymentsResponse listPayments($begin_time, $end_time, $sort_order, $cursor, $location_id, $total, $last_4, $card_brand)
|
257 |
+
|
258 |
+
ListPayments
|
259 |
+
|
260 |
+
Retrieves a list of payments taken by the account making the request. Max results per page: 100
|
261 |
+
|
262 |
+
### Example
|
263 |
+
```php
|
264 |
+
<?php
|
265 |
+
require_once(__DIR__ . '/vendor/autoload.php');
|
266 |
+
|
267 |
+
// Configure OAuth2 access token for authorization: oauth2
|
268 |
+
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
269 |
+
|
270 |
+
$apiInstance = new SquareConnect\Api\PaymentsApi();
|
271 |
+
$begin_time = "begin_time_example"; // string | Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year.
|
272 |
+
$end_time = "end_time_example"; // string | Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time.
|
273 |
+
$sort_order = "sort_order_example"; // string | The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default).
|
274 |
+
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information.
|
275 |
+
$location_id = "location_id_example"; // string | ID of location associated with payment
|
276 |
+
$total = 789; // int | The exact amount in the total_money for a `Payment`.
|
277 |
+
$last_4 = "last_4_example"; // string | The last 4 digits of `Payment` card.
|
278 |
+
$card_brand = "card_brand_example"; // string | The brand of `Payment` card. For example, `VISA`
|
279 |
+
|
280 |
+
try {
|
281 |
+
$result = $apiInstance->listPayments($begin_time, $end_time, $sort_order, $cursor, $location_id, $total, $last_4, $card_brand);
|
282 |
+
print_r($result);
|
283 |
+
} catch (Exception $e) {
|
284 |
+
echo 'Exception when calling PaymentsApi->listPayments: ', $e->getMessage(), PHP_EOL;
|
285 |
+
}
|
286 |
+
?>
|
287 |
+
```
|
288 |
+
|
289 |
+
### Parameters
|
290 |
+
|
291 |
+
Name | Type | Description | Notes
|
292 |
+
------------- | ------------- | ------------- | -------------
|
293 |
+
**begin_time** | **string**| Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. | [optional]
|
294 |
+
**end_time** | **string**| Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. | [optional]
|
295 |
+
**sort_order** | **string**| The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). | [optional]
|
296 |
+
**cursor** | **string**| A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
297 |
+
**location_id** | **string**| ID of location associated with payment | [optional]
|
298 |
+
**total** | **int**| The exact amount in the total_money for a `Payment`. | [optional]
|
299 |
+
**last_4** | **string**| The last 4 digits of `Payment` card. | [optional]
|
300 |
+
**card_brand** | **string**| The brand of `Payment` card. For example, `VISA` | [optional]
|
301 |
+
|
302 |
+
### Return type
|
303 |
+
|
304 |
+
[**\SquareConnect\Model\ListPaymentsResponse**](../Model/ListPaymentsResponse.md)
|
305 |
+
|
306 |
+
### Authorization
|
307 |
+
|
308 |
+
[oauth2](../../README.md#oauth2)
|
309 |
+
|
310 |
+
### HTTP request headers
|
311 |
+
|
312 |
+
- **Content-Type**: application/json
|
313 |
+
- **Accept**: application/json
|
314 |
+
|
315 |
+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
316 |
+
|
vendor/square/connect/docs/Api/RefundsApi.md
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# SquareConnect\RefundsApi
|
2 |
+
|
3 |
+
All URIs are relative to *https://connect.squareup.com*
|
4 |
+
|
5 |
+
Method | HTTP request | Description
|
6 |
+
------------- | ------------- | -------------
|
7 |
+
[**getPaymentRefund**](RefundsApi.md#getPaymentRefund) | **GET** /v2/refunds/{refund_id} | GetPaymentRefund
|
8 |
+
[**listPaymentRefunds**](RefundsApi.md#listPaymentRefunds) | **GET** /v2/refunds | ListPaymentRefunds
|
9 |
+
[**refundPayment**](RefundsApi.md#refundPayment) | **POST** /v2/refunds | RefundPayment
|
10 |
+
|
11 |
+
|
12 |
+
# **getPaymentRefund**
|
13 |
+
> \SquareConnect\Model\GetPaymentRefundResponse getPaymentRefund($refund_id)
|
14 |
+
|
15 |
+
GetPaymentRefund
|
16 |
+
|
17 |
+
Retrieves a specific `Refund` using the `refund_id`.
|
18 |
+
|
19 |
+
### Example
|
20 |
+
```php
|
21 |
+
<?php
|
22 |
+
require_once(__DIR__ . '/vendor/autoload.php');
|
23 |
+
|
24 |
+
// Configure OAuth2 access token for authorization: oauth2
|
25 |
+
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
26 |
+
|
27 |
+
$apiInstance = new SquareConnect\Api\RefundsApi();
|
28 |
+
$refund_id = "refund_id_example"; // string | Unique ID for the desired `PaymentRefund`.
|
29 |
+
|
30 |
+
try {
|
31 |
+
$result = $apiInstance->getPaymentRefund($refund_id);
|
32 |
+
print_r($result);
|
33 |
+
} catch (Exception $e) {
|
34 |
+
echo 'Exception when calling RefundsApi->getPaymentRefund: ', $e->getMessage(), PHP_EOL;
|
35 |
+
}
|
36 |
+
?>
|
37 |
+
```
|
38 |
+
|
39 |
+
### Parameters
|
40 |
+
|
41 |
+
Name | Type | Description | Notes
|
42 |
+
------------- | ------------- | ------------- | -------------
|
43 |
+
**refund_id** | **string**| Unique ID for the desired `PaymentRefund`. |
|
44 |
+
|
45 |
+
### Return type
|
46 |
+
|
47 |
+
[**\SquareConnect\Model\GetPaymentRefundResponse**](../Model/GetPaymentRefundResponse.md)
|
48 |
+
|
49 |
+
### Authorization
|
50 |
+
|
51 |
+
[oauth2](../../README.md#oauth2)
|
52 |
+
|
53 |
+
### HTTP request headers
|
54 |
+
|
55 |
+
- **Content-Type**: application/json
|
56 |
+
- **Accept**: application/json
|
57 |
+
|
58 |
+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
59 |
+
|
60 |
+
# **listPaymentRefunds**
|
61 |
+
> \SquareConnect\Model\ListPaymentRefundsResponse listPaymentRefunds($begin_time, $end_time, $sort_order, $cursor, $location_id, $status, $source_type)
|
62 |
+
|
63 |
+
ListPaymentRefunds
|
64 |
+
|
65 |
+
Retrieves a list of refunds for the account making the request. Max results per page: 100
|
66 |
+
|
67 |
+
### Example
|
68 |
+
```php
|
69 |
+
<?php
|
70 |
+
require_once(__DIR__ . '/vendor/autoload.php');
|
71 |
+
|
72 |
+
// Configure OAuth2 access token for authorization: oauth2
|
73 |
+
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
74 |
+
|
75 |
+
$apiInstance = new SquareConnect\Api\RefundsApi();
|
76 |
+
$begin_time = "begin_time_example"; // string | Timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year.
|
77 |
+
$end_time = "end_time_example"; // string | Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time.
|
78 |
+
$sort_order = "sort_order_example"; // string | The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default).
|
79 |
+
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information.
|
80 |
+
$location_id = "location_id_example"; // string | ID of location associated with payment.
|
81 |
+
$status = "status_example"; // string | If provided, only refunds with the given status are returned. For a list of refund status values, see [PaymentRefund](#type-paymentrefund). Default: If omitted refunds are returned regardless of status.
|
82 |
+
$source_type = "source_type_example"; // string | If provided, only refunds with the given source type are returned. - `CARD` - List refunds only for payments where card was specified as payment source. Default: If omitted refunds are returned regardless of source type.
|
83 |
+
|
84 |
+
try {
|
85 |
+
$result = $apiInstance->listPaymentRefunds($begin_time, $end_time, $sort_order, $cursor, $location_id, $status, $source_type);
|
86 |
+
print_r($result);
|
87 |
+
} catch (Exception $e) {
|
88 |
+
echo 'Exception when calling RefundsApi->listPaymentRefunds: ', $e->getMessage(), PHP_EOL;
|
89 |
+
}
|
90 |
+
?>
|
91 |
+
```
|
92 |
+
|
93 |
+
### Parameters
|
94 |
+
|
95 |
+
Name | Type | Description | Notes
|
96 |
+
------------- | ------------- | ------------- | -------------
|
97 |
+
**begin_time** | **string**| Timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year. | [optional]
|
98 |
+
**end_time** | **string**| Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. | [optional]
|
99 |
+
**sort_order** | **string**| The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). | [optional]
|
100 |
+
**cursor** | **string**| A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
101 |
+
**location_id** | **string**| ID of location associated with payment. | [optional]
|
102 |
+
**status** | **string**| If provided, only refunds with the given status are returned. For a list of refund status values, see [PaymentRefund](#type-paymentrefund). Default: If omitted refunds are returned regardless of status. | [optional]
|
103 |
+
**source_type** | **string**| If provided, only refunds with the given source type are returned. - `CARD` - List refunds only for payments where card was specified as payment source. Default: If omitted refunds are returned regardless of source type. | [optional]
|
104 |
+
|
105 |
+
### Return type
|
106 |
+
|
107 |
+
[**\SquareConnect\Model\ListPaymentRefundsResponse**](../Model/ListPaymentRefundsResponse.md)
|
108 |
+
|
109 |
+
### Authorization
|
110 |
+
|
111 |
+
[oauth2](../../README.md#oauth2)
|
112 |
+
|
113 |
+
### HTTP request headers
|
114 |
+
|
115 |
+
- **Content-Type**: application/json
|
116 |
+
- **Accept**: application/json
|
117 |
+
|
118 |
+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
119 |
+
|
120 |
+
# **refundPayment**
|
121 |
+
> \SquareConnect\Model\RefundPaymentResponse refundPayment($body)
|
122 |
+
|
123 |
+
RefundPayment
|
124 |
+
|
125 |
+
Refunds a payment. You can refund the entire payment amount or a portion of it. For more information, see [Payments and Refunds Overview](/payments-api/overview).
|
126 |
+
|
127 |
+
### Example
|
128 |
+
```php
|
129 |
+
<?php
|
130 |
+
require_once(__DIR__ . '/vendor/autoload.php');
|
131 |
+
|
132 |
+
// Configure OAuth2 access token for authorization: oauth2
|
133 |
+
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
134 |
+
|
135 |
+
$apiInstance = new SquareConnect\Api\RefundsApi();
|
136 |
+
$body = new \SquareConnect\Model\RefundPaymentRequest(); // \SquareConnect\Model\RefundPaymentRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
137 |
+
|
138 |
+
try {
|
139 |
+
$result = $apiInstance->refundPayment($body);
|
140 |
+
print_r($result);
|
141 |
+
} catch (Exception $e) {
|
142 |
+
echo 'Exception when calling RefundsApi->refundPayment: ', $e->getMessage(), PHP_EOL;
|
143 |
+
}
|
144 |
+
?>
|
145 |
+
```
|
146 |
+
|
147 |
+
### Parameters
|
148 |
+
|
149 |
+
Name | Type | Description | Notes
|
150 |
+
------------- | ------------- | ------------- | -------------
|
151 |
+
**body** | [**\SquareConnect\Model\RefundPaymentRequest**](../Model/RefundPaymentRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
152 |
+
|
153 |
+
### Return type
|
154 |
+
|
155 |
+
[**\SquareConnect\Model\RefundPaymentResponse**](../Model/RefundPaymentResponse.md)
|
156 |
+
|
157 |
+
### Authorization
|
158 |
+
|
159 |
+
[oauth2](../../README.md#oauth2)
|
160 |
+
|
161 |
+
### HTTP request headers
|
162 |
+
|
163 |
+
- **Content-Type**: application/json
|
164 |
+
- **Accept**: application/json
|
165 |
+
|
166 |
+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
167 |
+
|
vendor/square/connect/docs/Api/ReportingApi.md
CHANGED
@@ -9,6 +9,7 @@ Method | HTTP request | Description
|
|
9 |
|
10 |
|
11 |
# **listAdditionalRecipientReceivableRefunds**
|
|
|
12 |
> \SquareConnect\Model\ListAdditionalRecipientReceivableRefundsResponse listAdditionalRecipientReceivableRefunds($location_id, $begin_time, $end_time, $sort_order, $cursor)
|
13 |
|
14 |
ListAdditionalRecipientReceivableRefunds
|
@@ -23,7 +24,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
23 |
// Configure OAuth2 access token for authorization: oauth2
|
24 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
25 |
|
26 |
-
$
|
27 |
$location_id = "location_id_example"; // string | The ID of the location to list AdditionalRecipientReceivableRefunds for.
|
28 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
|
29 |
$end_time = "end_time_example"; // string | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.
|
@@ -31,7 +32,7 @@ $sort_order = "sort_order_example"; // string | The order in which results are l
|
|
31 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information.
|
32 |
|
33 |
try {
|
34 |
-
$result = $
|
35 |
print_r($result);
|
36 |
} catch (Exception $e) {
|
37 |
echo 'Exception when calling ReportingApi->listAdditionalRecipientReceivableRefunds: ', $e->getMessage(), PHP_EOL;
|
@@ -65,6 +66,7 @@ Name | Type | Description | Notes
|
|
65 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
66 |
|
67 |
# **listAdditionalRecipientReceivables**
|
|
|
68 |
> \SquareConnect\Model\ListAdditionalRecipientReceivablesResponse listAdditionalRecipientReceivables($location_id, $begin_time, $end_time, $sort_order, $cursor)
|
69 |
|
70 |
ListAdditionalRecipientReceivables
|
@@ -79,7 +81,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
79 |
// Configure OAuth2 access token for authorization: oauth2
|
80 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
81 |
|
82 |
-
$
|
83 |
$location_id = "location_id_example"; // string | The ID of the location to list AdditionalRecipientReceivables for.
|
84 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
|
85 |
$end_time = "end_time_example"; // string | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.
|
@@ -87,7 +89,7 @@ $sort_order = "sort_order_example"; // string | The order in which results are l
|
|
87 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information.
|
88 |
|
89 |
try {
|
90 |
-
$result = $
|
91 |
print_r($result);
|
92 |
} catch (Exception $e) {
|
93 |
echo 'Exception when calling ReportingApi->listAdditionalRecipientReceivables: ', $e->getMessage(), PHP_EOL;
|
9 |
|
10 |
|
11 |
# **listAdditionalRecipientReceivableRefunds**
|
12 |
+
**Note: This endpoint is deprecated.**
|
13 |
> \SquareConnect\Model\ListAdditionalRecipientReceivableRefundsResponse listAdditionalRecipientReceivableRefunds($location_id, $begin_time, $end_time, $sort_order, $cursor)
|
14 |
|
15 |
ListAdditionalRecipientReceivableRefunds
|
24 |
// Configure OAuth2 access token for authorization: oauth2
|
25 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
26 |
|
27 |
+
$apiInstance = new SquareConnect\Api\ReportingApi();
|
28 |
$location_id = "location_id_example"; // string | The ID of the location to list AdditionalRecipientReceivableRefunds for.
|
29 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
|
30 |
$end_time = "end_time_example"; // string | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.
|
32 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information.
|
33 |
|
34 |
try {
|
35 |
+
$result = $apiInstance->listAdditionalRecipientReceivableRefunds($location_id, $begin_time, $end_time, $sort_order, $cursor);
|
36 |
print_r($result);
|
37 |
} catch (Exception $e) {
|
38 |
echo 'Exception when calling ReportingApi->listAdditionalRecipientReceivableRefunds: ', $e->getMessage(), PHP_EOL;
|
66 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
67 |
|
68 |
# **listAdditionalRecipientReceivables**
|
69 |
+
**Note: This endpoint is deprecated.**
|
70 |
> \SquareConnect\Model\ListAdditionalRecipientReceivablesResponse listAdditionalRecipientReceivables($location_id, $begin_time, $end_time, $sort_order, $cursor)
|
71 |
|
72 |
ListAdditionalRecipientReceivables
|
81 |
// Configure OAuth2 access token for authorization: oauth2
|
82 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
83 |
|
84 |
+
$apiInstance = new SquareConnect\Api\ReportingApi();
|
85 |
$location_id = "location_id_example"; // string | The ID of the location to list AdditionalRecipientReceivables for.
|
86 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
|
87 |
$end_time = "end_time_example"; // string | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.
|
89 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information.
|
90 |
|
91 |
try {
|
92 |
+
$result = $apiInstance->listAdditionalRecipientReceivables($location_id, $begin_time, $end_time, $sort_order, $cursor);
|
93 |
print_r($result);
|
94 |
} catch (Exception $e) {
|
95 |
echo 'Exception when calling ReportingApi->listAdditionalRecipientReceivables: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/TransactionsApi.md
CHANGED
@@ -14,11 +14,12 @@ Method | HTTP request | Description
|
|
14 |
|
15 |
|
16 |
# **captureTransaction**
|
|
|
17 |
> \SquareConnect\Model\CaptureTransactionResponse captureTransaction($location_id, $transaction_id)
|
18 |
|
19 |
CaptureTransaction
|
20 |
|
21 |
-
Captures a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See [
|
22 |
|
23 |
### Example
|
24 |
```php
|
@@ -28,12 +29,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
28 |
// Configure OAuth2 access token for authorization: oauth2
|
29 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
30 |
|
31 |
-
$
|
32 |
$location_id = "location_id_example"; // string |
|
33 |
$transaction_id = "transaction_id_example"; // string |
|
34 |
|
35 |
try {
|
36 |
-
$result = $
|
37 |
print_r($result);
|
38 |
} catch (Exception $e) {
|
39 |
echo 'Exception when calling TransactionsApi->captureTransaction: ', $e->getMessage(), PHP_EOL;
|
@@ -64,11 +65,12 @@ Name | Type | Description | Notes
|
|
64 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
65 |
|
66 |
# **charge**
|
|
|
67 |
> \SquareConnect\Model\ChargeResponse charge($location_id, $body)
|
68 |
|
69 |
Charge
|
70 |
|
71 |
-
Charges a card represented by a card nonce or a customer's card on file. Your request to this endpoint must include _either_: - A value for the `card_nonce` parameter (to charge a card nonce generated with the `SqPaymentForm`) - Values for the `customer_card_id` and `customer_id` parameters (to charge a customer's card on file) When this response is returned, the amount of Square's processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call [RetrieveTransaction](#endpoint-transactions-retrievetransaction). See the `processing_fee_money` field of each [Tender included](#type-tender) in the transaction.
|
72 |
|
73 |
### Example
|
74 |
```php
|
@@ -78,12 +80,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
78 |
// Configure OAuth2 access token for authorization: oauth2
|
79 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
80 |
|
81 |
-
$
|
82 |
$location_id = "location_id_example"; // string | The ID of the location to associate the created transaction with.
|
83 |
$body = new \SquareConnect\Model\ChargeRequest(); // \SquareConnect\Model\ChargeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
84 |
|
85 |
try {
|
86 |
-
$result = $
|
87 |
print_r($result);
|
88 |
} catch (Exception $e) {
|
89 |
echo 'Exception when calling TransactionsApi->charge: ', $e->getMessage(), PHP_EOL;
|
@@ -114,11 +116,12 @@ Name | Type | Description | Notes
|
|
114 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
115 |
|
116 |
# **createRefund**
|
|
|
117 |
> \SquareConnect\Model\CreateRefundResponse createRefund($location_id, $transaction_id, $body)
|
118 |
|
119 |
CreateRefund
|
120 |
|
121 |
-
Initiates a refund for a previously charged tender. You must issue a refund within 120 days of the associated payment. See [this article](https://squareup.com/help/us/en/article/5060) for more information on refund behavior. NOTE: Card-present transactions with Interac credit cards **cannot be refunded using the Connect API**. Interac transactions must refunded in-person (e.g., dipping the card using POS app).
|
122 |
|
123 |
### Example
|
124 |
```php
|
@@ -128,13 +131,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
128 |
// Configure OAuth2 access token for authorization: oauth2
|
129 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
130 |
|
131 |
-
$
|
132 |
$location_id = "location_id_example"; // string | The ID of the original transaction's associated location.
|
133 |
$transaction_id = "transaction_id_example"; // string | The ID of the original transaction that includes the tender to refund.
|
134 |
$body = new \SquareConnect\Model\CreateRefundRequest(); // \SquareConnect\Model\CreateRefundRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
135 |
|
136 |
try {
|
137 |
-
$result = $
|
138 |
print_r($result);
|
139 |
} catch (Exception $e) {
|
140 |
echo 'Exception when calling TransactionsApi->createRefund: ', $e->getMessage(), PHP_EOL;
|
@@ -166,11 +169,12 @@ Name | Type | Description | Notes
|
|
166 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
167 |
|
168 |
# **listRefunds**
|
|
|
169 |
> \SquareConnect\Model\ListRefundsResponse listRefunds($location_id, $begin_time, $end_time, $sort_order, $cursor)
|
170 |
|
171 |
ListRefunds
|
172 |
|
173 |
-
Lists refunds for one of a business's locations. In addition to full or partial tender refunds processed through Square APIs, refunds may result from itemized returns or exchanges through Square's Point of Sale applications. Refunds with a `status` of `PENDING` are not currently included in this endpoint's response. Max results per [page](#paginatingresults): 50
|
174 |
|
175 |
### Example
|
176 |
```php
|
@@ -180,7 +184,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
180 |
// Configure OAuth2 access token for authorization: oauth2
|
181 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
182 |
|
183 |
-
$
|
184 |
$location_id = "location_id_example"; // string | The ID of the location to list refunds for.
|
185 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
|
186 |
$end_time = "end_time_example"; // string | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.
|
@@ -188,7 +192,7 @@ $sort_order = "sort_order_example"; // string | The order in which results are l
|
|
188 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information.
|
189 |
|
190 |
try {
|
191 |
-
$result = $
|
192 |
print_r($result);
|
193 |
} catch (Exception $e) {
|
194 |
echo 'Exception when calling TransactionsApi->listRefunds: ', $e->getMessage(), PHP_EOL;
|
@@ -222,11 +226,12 @@ Name | Type | Description | Notes
|
|
222 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
223 |
|
224 |
# **listTransactions**
|
|
|
225 |
> \SquareConnect\Model\ListTransactionsResponse listTransactions($location_id, $begin_time, $end_time, $sort_order, $cursor)
|
226 |
|
227 |
ListTransactions
|
228 |
|
229 |
-
Lists transactions for a particular location. Transactions include payment information from sales and exchanges and refund information from returns and exchanges. Max results per [page](#paginatingresults): 50
|
230 |
|
231 |
### Example
|
232 |
```php
|
@@ -236,7 +241,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
236 |
// Configure OAuth2 access token for authorization: oauth2
|
237 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
238 |
|
239 |
-
$
|
240 |
$location_id = "location_id_example"; // string | The ID of the location to list transactions for.
|
241 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
|
242 |
$end_time = "end_time_example"; // string | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.
|
@@ -244,7 +249,7 @@ $sort_order = "sort_order_example"; // string | The order in which results are l
|
|
244 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information.
|
245 |
|
246 |
try {
|
247 |
-
$result = $
|
248 |
print_r($result);
|
249 |
} catch (Exception $e) {
|
250 |
echo 'Exception when calling TransactionsApi->listTransactions: ', $e->getMessage(), PHP_EOL;
|
@@ -278,11 +283,12 @@ Name | Type | Description | Notes
|
|
278 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
279 |
|
280 |
# **retrieveTransaction**
|
|
|
281 |
> \SquareConnect\Model\RetrieveTransactionResponse retrieveTransaction($location_id, $transaction_id)
|
282 |
|
283 |
RetrieveTransaction
|
284 |
|
285 |
-
Retrieves details for a single transaction.
|
286 |
|
287 |
### Example
|
288 |
```php
|
@@ -292,12 +298,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
292 |
// Configure OAuth2 access token for authorization: oauth2
|
293 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
294 |
|
295 |
-
$
|
296 |
$location_id = "location_id_example"; // string | The ID of the transaction's associated location.
|
297 |
$transaction_id = "transaction_id_example"; // string | The ID of the transaction to retrieve.
|
298 |
|
299 |
try {
|
300 |
-
$result = $
|
301 |
print_r($result);
|
302 |
} catch (Exception $e) {
|
303 |
echo 'Exception when calling TransactionsApi->retrieveTransaction: ', $e->getMessage(), PHP_EOL;
|
@@ -328,11 +334,12 @@ Name | Type | Description | Notes
|
|
328 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
329 |
|
330 |
# **voidTransaction**
|
|
|
331 |
> \SquareConnect\Model\VoidTransactionResponse voidTransaction($location_id, $transaction_id)
|
332 |
|
333 |
VoidTransaction
|
334 |
|
335 |
-
Cancels a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See [
|
336 |
|
337 |
### Example
|
338 |
```php
|
@@ -342,12 +349,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
342 |
// Configure OAuth2 access token for authorization: oauth2
|
343 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
344 |
|
345 |
-
$
|
346 |
$location_id = "location_id_example"; // string |
|
347 |
$transaction_id = "transaction_id_example"; // string |
|
348 |
|
349 |
try {
|
350 |
-
$result = $
|
351 |
print_r($result);
|
352 |
} catch (Exception $e) {
|
353 |
echo 'Exception when calling TransactionsApi->voidTransaction: ', $e->getMessage(), PHP_EOL;
|
14 |
|
15 |
|
16 |
# **captureTransaction**
|
17 |
+
**Note: This endpoint is deprecated.**
|
18 |
> \SquareConnect\Model\CaptureTransactionResponse captureTransaction($location_id, $transaction_id)
|
19 |
|
20 |
CaptureTransaction
|
21 |
|
22 |
+
Captures a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See the [Delay Capture of Funds](/transactions-api/cookbook/delay-capture) recipe for more information.
|
23 |
|
24 |
### Example
|
25 |
```php
|
29 |
// Configure OAuth2 access token for authorization: oauth2
|
30 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
31 |
|
32 |
+
$apiInstance = new SquareConnect\Api\TransactionsApi();
|
33 |
$location_id = "location_id_example"; // string |
|
34 |
$transaction_id = "transaction_id_example"; // string |
|
35 |
|
36 |
try {
|
37 |
+
$result = $apiInstance->captureTransaction($location_id, $transaction_id);
|
38 |
print_r($result);
|
39 |
} catch (Exception $e) {
|
40 |
echo 'Exception when calling TransactionsApi->captureTransaction: ', $e->getMessage(), PHP_EOL;
|
65 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
66 |
|
67 |
# **charge**
|
68 |
+
**Note: This endpoint is deprecated.**
|
69 |
> \SquareConnect\Model\ChargeResponse charge($location_id, $body)
|
70 |
|
71 |
Charge
|
72 |
|
73 |
+
Charges a card represented by a card nonce or a customer's card on file. Deprecated - recommend using [CreatePayment](#endpoint-payments-createpayment) Your request to this endpoint must include _either_: - A value for the `card_nonce` parameter (to charge a card nonce generated with the `SqPaymentForm`) - Values for the `customer_card_id` and `customer_id` parameters (to charge a customer's card on file) When this response is returned, the amount of Square's processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call [RetrieveTransaction](#endpoint-transactions-retrievetransaction). See the `processing_fee_money` field of each [Tender included](#type-tender) in the transaction.
|
74 |
|
75 |
### Example
|
76 |
```php
|
80 |
// Configure OAuth2 access token for authorization: oauth2
|
81 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
82 |
|
83 |
+
$apiInstance = new SquareConnect\Api\TransactionsApi();
|
84 |
$location_id = "location_id_example"; // string | The ID of the location to associate the created transaction with.
|
85 |
$body = new \SquareConnect\Model\ChargeRequest(); // \SquareConnect\Model\ChargeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
86 |
|
87 |
try {
|
88 |
+
$result = $apiInstance->charge($location_id, $body);
|
89 |
print_r($result);
|
90 |
} catch (Exception $e) {
|
91 |
echo 'Exception when calling TransactionsApi->charge: ', $e->getMessage(), PHP_EOL;
|
116 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
117 |
|
118 |
# **createRefund**
|
119 |
+
**Note: This endpoint is deprecated.**
|
120 |
> \SquareConnect\Model\CreateRefundResponse createRefund($location_id, $transaction_id, $body)
|
121 |
|
122 |
CreateRefund
|
123 |
|
124 |
+
Initiates a refund for a previously charged tender. Deprecated - recommend using [RefundPayment](#endpoint-refunds-refundpayment) You must issue a refund within 120 days of the associated payment. See [this article](https://squareup.com/help/us/en/article/5060) for more information on refund behavior. NOTE: Card-present transactions with Interac credit cards **cannot be refunded using the Connect API**. Interac transactions must refunded in-person (e.g., dipping the card using POS app).
|
125 |
|
126 |
### Example
|
127 |
```php
|
131 |
// Configure OAuth2 access token for authorization: oauth2
|
132 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
133 |
|
134 |
+
$apiInstance = new SquareConnect\Api\TransactionsApi();
|
135 |
$location_id = "location_id_example"; // string | The ID of the original transaction's associated location.
|
136 |
$transaction_id = "transaction_id_example"; // string | The ID of the original transaction that includes the tender to refund.
|
137 |
$body = new \SquareConnect\Model\CreateRefundRequest(); // \SquareConnect\Model\CreateRefundRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
138 |
|
139 |
try {
|
140 |
+
$result = $apiInstance->createRefund($location_id, $transaction_id, $body);
|
141 |
print_r($result);
|
142 |
} catch (Exception $e) {
|
143 |
echo 'Exception when calling TransactionsApi->createRefund: ', $e->getMessage(), PHP_EOL;
|
169 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
170 |
|
171 |
# **listRefunds**
|
172 |
+
**Note: This endpoint is deprecated.**
|
173 |
> \SquareConnect\Model\ListRefundsResponse listRefunds($location_id, $begin_time, $end_time, $sort_order, $cursor)
|
174 |
|
175 |
ListRefunds
|
176 |
|
177 |
+
Lists refunds for one of a business's locations. Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders) In addition to full or partial tender refunds processed through Square APIs, refunds may result from itemized returns or exchanges through Square's Point of Sale applications. Refunds with a `status` of `PENDING` are not currently included in this endpoint's response. Max results per [page](#paginatingresults): 50
|
178 |
|
179 |
### Example
|
180 |
```php
|
184 |
// Configure OAuth2 access token for authorization: oauth2
|
185 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
186 |
|
187 |
+
$apiInstance = new SquareConnect\Api\TransactionsApi();
|
188 |
$location_id = "location_id_example"; // string | The ID of the location to list refunds for.
|
189 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
|
190 |
$end_time = "end_time_example"; // string | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.
|
192 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information.
|
193 |
|
194 |
try {
|
195 |
+
$result = $apiInstance->listRefunds($location_id, $begin_time, $end_time, $sort_order, $cursor);
|
196 |
print_r($result);
|
197 |
} catch (Exception $e) {
|
198 |
echo 'Exception when calling TransactionsApi->listRefunds: ', $e->getMessage(), PHP_EOL;
|
226 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
227 |
|
228 |
# **listTransactions**
|
229 |
+
**Note: This endpoint is deprecated.**
|
230 |
> \SquareConnect\Model\ListTransactionsResponse listTransactions($location_id, $begin_time, $end_time, $sort_order, $cursor)
|
231 |
|
232 |
ListTransactions
|
233 |
|
234 |
+
Lists transactions for a particular location. Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders) Transactions include payment information from sales and exchanges and refund information from returns and exchanges. Max results per [page](#paginatingresults): 50
|
235 |
|
236 |
### Example
|
237 |
```php
|
241 |
// Configure OAuth2 access token for authorization: oauth2
|
242 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
243 |
|
244 |
+
$apiInstance = new SquareConnect\Api\TransactionsApi();
|
245 |
$location_id = "location_id_example"; // string | The ID of the location to list transactions for.
|
246 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
|
247 |
$end_time = "end_time_example"; // string | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.
|
249 |
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information.
|
250 |
|
251 |
try {
|
252 |
+
$result = $apiInstance->listTransactions($location_id, $begin_time, $end_time, $sort_order, $cursor);
|
253 |
print_r($result);
|
254 |
} catch (Exception $e) {
|
255 |
echo 'Exception when calling TransactionsApi->listTransactions: ', $e->getMessage(), PHP_EOL;
|
283 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
284 |
|
285 |
# **retrieveTransaction**
|
286 |
+
**Note: This endpoint is deprecated.**
|
287 |
> \SquareConnect\Model\RetrieveTransactionResponse retrieveTransaction($location_id, $transaction_id)
|
288 |
|
289 |
RetrieveTransaction
|
290 |
|
291 |
+
Retrieves details for a single transaction. Deprecated - recommend using [BatchRetrieveOrders](#endpoint-batchretrieveorders)
|
292 |
|
293 |
### Example
|
294 |
```php
|
298 |
// Configure OAuth2 access token for authorization: oauth2
|
299 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
300 |
|
301 |
+
$apiInstance = new SquareConnect\Api\TransactionsApi();
|
302 |
$location_id = "location_id_example"; // string | The ID of the transaction's associated location.
|
303 |
$transaction_id = "transaction_id_example"; // string | The ID of the transaction to retrieve.
|
304 |
|
305 |
try {
|
306 |
+
$result = $apiInstance->retrieveTransaction($location_id, $transaction_id);
|
307 |
print_r($result);
|
308 |
} catch (Exception $e) {
|
309 |
echo 'Exception when calling TransactionsApi->retrieveTransaction: ', $e->getMessage(), PHP_EOL;
|
334 |
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
335 |
|
336 |
# **voidTransaction**
|
337 |
+
**Note: This endpoint is deprecated.**
|
338 |
> \SquareConnect\Model\VoidTransactionResponse voidTransaction($location_id, $transaction_id)
|
339 |
|
340 |
VoidTransaction
|
341 |
|
342 |
+
Cancels a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See the [Delay Capture of Funds](/transactions-api/cookbook/delay-capture) recipe for more information.
|
343 |
|
344 |
### Example
|
345 |
```php
|
349 |
// Configure OAuth2 access token for authorization: oauth2
|
350 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
351 |
|
352 |
+
$apiInstance = new SquareConnect\Api\TransactionsApi();
|
353 |
$location_id = "location_id_example"; // string |
|
354 |
$transaction_id = "transaction_id_example"; // string |
|
355 |
|
356 |
try {
|
357 |
+
$result = $apiInstance->voidTransaction($location_id, $transaction_id);
|
358 |
print_r($result);
|
359 |
} catch (Exception $e) {
|
360 |
echo 'Exception when calling TransactionsApi->voidTransaction: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/V1EmployeesApi.md
CHANGED
@@ -37,11 +37,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
37 |
// Configure OAuth2 access token for authorization: oauth2
|
38 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
39 |
|
40 |
-
$
|
41 |
$body = new \SquareConnect\Model\V1Employee(); // \SquareConnect\Model\V1Employee | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
42 |
|
43 |
try {
|
44 |
-
$result = $
|
45 |
print_r($result);
|
46 |
} catch (Exception $e) {
|
47 |
echo 'Exception when calling V1EmployeesApi->createEmployee: ', $e->getMessage(), PHP_EOL;
|
@@ -85,11 +85,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
85 |
// Configure OAuth2 access token for authorization: oauth2
|
86 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
87 |
|
88 |
-
$
|
89 |
$employee_role = new \SquareConnect\Model\V1EmployeeRole(); // \SquareConnect\Model\V1EmployeeRole | An EmployeeRole object with a name and permissions, and an optional owner flag.
|
90 |
|
91 |
try {
|
92 |
-
$result = $
|
93 |
print_r($result);
|
94 |
} catch (Exception $e) {
|
95 |
echo 'Exception when calling V1EmployeesApi->createEmployeeRole: ', $e->getMessage(), PHP_EOL;
|
@@ -133,11 +133,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
133 |
// Configure OAuth2 access token for authorization: oauth2
|
134 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
135 |
|
136 |
-
$
|
137 |
$body = new \SquareConnect\Model\V1Timecard(); // \SquareConnect\Model\V1Timecard | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
138 |
|
139 |
try {
|
140 |
-
$result = $
|
141 |
print_r($result);
|
142 |
} catch (Exception $e) {
|
143 |
echo 'Exception when calling V1EmployeesApi->createTimecard: ', $e->getMessage(), PHP_EOL;
|
@@ -181,11 +181,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
181 |
// Configure OAuth2 access token for authorization: oauth2
|
182 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
183 |
|
184 |
-
$
|
185 |
$timecard_id = "timecard_id_example"; // string | The ID of the timecard to delete.
|
186 |
|
187 |
try {
|
188 |
-
$result = $
|
189 |
print_r($result);
|
190 |
} catch (Exception $e) {
|
191 |
echo 'Exception when calling V1EmployeesApi->deleteTimecard: ', $e->getMessage(), PHP_EOL;
|
@@ -229,14 +229,14 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
229 |
// Configure OAuth2 access token for authorization: oauth2
|
230 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
231 |
|
232 |
-
$
|
233 |
$location_id = "location_id_example"; // string | The ID of the location to list cash drawer shifts for.
|
234 |
$order = "order_example"; // string | The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC
|
235 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days.
|
236 |
$end_time = "end_time_example"; // string | The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time.
|
237 |
|
238 |
try {
|
239 |
-
$result = $
|
240 |
print_r($result);
|
241 |
} catch (Exception $e) {
|
242 |
echo 'Exception when calling V1EmployeesApi->listCashDrawerShifts: ', $e->getMessage(), PHP_EOL;
|
@@ -283,13 +283,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
283 |
// Configure OAuth2 access token for authorization: oauth2
|
284 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
285 |
|
286 |
-
$
|
287 |
$order = "order_example"; // string | The order in which employees are listed in the response, based on their created_at field.Default value: ASC
|
288 |
$limit = 56; // int | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
289 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
290 |
|
291 |
try {
|
292 |
-
$result = $
|
293 |
print_r($result);
|
294 |
} catch (Exception $e) {
|
295 |
echo 'Exception when calling V1EmployeesApi->listEmployeeRoles: ', $e->getMessage(), PHP_EOL;
|
@@ -335,7 +335,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
335 |
// Configure OAuth2 access token for authorization: oauth2
|
336 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
337 |
|
338 |
-
$
|
339 |
$order = "order_example"; // string | The order in which employees are listed in the response, based on their created_at field. Default value: ASC
|
340 |
$begin_updated_at = "begin_updated_at_example"; // string | If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format
|
341 |
$end_updated_at = "end_updated_at_example"; // string | If filtering results by there updated_at field, the end of the requested reporting period, in ISO 8601 format.
|
@@ -347,7 +347,7 @@ $limit = 56; // int | The maximum integer number of employee entities to return
|
|
347 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
348 |
|
349 |
try {
|
350 |
-
$result = $
|
351 |
print_r($result);
|
352 |
} catch (Exception $e) {
|
353 |
echo 'Exception when calling V1EmployeesApi->listEmployees: ', $e->getMessage(), PHP_EOL;
|
@@ -399,11 +399,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
399 |
// Configure OAuth2 access token for authorization: oauth2
|
400 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
401 |
|
402 |
-
$
|
403 |
$timecard_id = "timecard_id_example"; // string | The ID of the timecard to list events for.
|
404 |
|
405 |
try {
|
406 |
-
$result = $
|
407 |
print_r($result);
|
408 |
} catch (Exception $e) {
|
409 |
echo 'Exception when calling V1EmployeesApi->listTimecardEvents: ', $e->getMessage(), PHP_EOL;
|
@@ -447,7 +447,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
447 |
// Configure OAuth2 access token for authorization: oauth2
|
448 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
449 |
|
450 |
-
$
|
451 |
$order = "order_example"; // string | The order in which timecards are listed in the response, based on their created_at field.
|
452 |
$employee_id = "employee_id_example"; // string | If provided, the endpoint returns only timecards for the employee with the specified ID.
|
453 |
$begin_clockin_time = "begin_clockin_time_example"; // string | If filtering results by their clockin_time field, the beginning of the requested reporting period, in ISO 8601 format.
|
@@ -461,7 +461,7 @@ $limit = 56; // int | The maximum integer number of employee entities to return
|
|
461 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
462 |
|
463 |
try {
|
464 |
-
$result = $
|
465 |
print_r($result);
|
466 |
} catch (Exception $e) {
|
467 |
echo 'Exception when calling V1EmployeesApi->listTimecards: ', $e->getMessage(), PHP_EOL;
|
@@ -515,12 +515,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
515 |
// Configure OAuth2 access token for authorization: oauth2
|
516 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
517 |
|
518 |
-
$
|
519 |
$location_id = "location_id_example"; // string | The ID of the location to list cash drawer shifts for.
|
520 |
$shift_id = "shift_id_example"; // string | The shift's ID.
|
521 |
|
522 |
try {
|
523 |
-
$result = $
|
524 |
print_r($result);
|
525 |
} catch (Exception $e) {
|
526 |
echo 'Exception when calling V1EmployeesApi->retrieveCashDrawerShift: ', $e->getMessage(), PHP_EOL;
|
@@ -565,11 +565,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
565 |
// Configure OAuth2 access token for authorization: oauth2
|
566 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
567 |
|
568 |
-
$
|
569 |
$employee_id = "employee_id_example"; // string | The employee's ID.
|
570 |
|
571 |
try {
|
572 |
-
$result = $
|
573 |
print_r($result);
|
574 |
} catch (Exception $e) {
|
575 |
echo 'Exception when calling V1EmployeesApi->retrieveEmployee: ', $e->getMessage(), PHP_EOL;
|
@@ -613,11 +613,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
613 |
// Configure OAuth2 access token for authorization: oauth2
|
614 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
615 |
|
616 |
-
$
|
617 |
$role_id = "role_id_example"; // string | The role's ID.
|
618 |
|
619 |
try {
|
620 |
-
$result = $
|
621 |
print_r($result);
|
622 |
} catch (Exception $e) {
|
623 |
echo 'Exception when calling V1EmployeesApi->retrieveEmployeeRole: ', $e->getMessage(), PHP_EOL;
|
@@ -661,11 +661,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
661 |
// Configure OAuth2 access token for authorization: oauth2
|
662 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
663 |
|
664 |
-
$
|
665 |
$timecard_id = "timecard_id_example"; // string | The timecard's ID.
|
666 |
|
667 |
try {
|
668 |
-
$result = $
|
669 |
print_r($result);
|
670 |
} catch (Exception $e) {
|
671 |
echo 'Exception when calling V1EmployeesApi->retrieveTimecard: ', $e->getMessage(), PHP_EOL;
|
@@ -709,12 +709,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
709 |
// Configure OAuth2 access token for authorization: oauth2
|
710 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
711 |
|
712 |
-
$
|
713 |
$employee_id = "employee_id_example"; // string | The ID of the role to modify.
|
714 |
$body = new \SquareConnect\Model\V1Employee(); // \SquareConnect\Model\V1Employee | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
715 |
|
716 |
try {
|
717 |
-
$result = $
|
718 |
print_r($result);
|
719 |
} catch (Exception $e) {
|
720 |
echo 'Exception when calling V1EmployeesApi->updateEmployee: ', $e->getMessage(), PHP_EOL;
|
@@ -759,12 +759,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
759 |
// Configure OAuth2 access token for authorization: oauth2
|
760 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
761 |
|
762 |
-
$
|
763 |
$role_id = "role_id_example"; // string | The ID of the role to modify.
|
764 |
$body = new \SquareConnect\Model\V1EmployeeRole(); // \SquareConnect\Model\V1EmployeeRole | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
765 |
|
766 |
try {
|
767 |
-
$result = $
|
768 |
print_r($result);
|
769 |
} catch (Exception $e) {
|
770 |
echo 'Exception when calling V1EmployeesApi->updateEmployeeRole: ', $e->getMessage(), PHP_EOL;
|
@@ -809,12 +809,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
809 |
// Configure OAuth2 access token for authorization: oauth2
|
810 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
811 |
|
812 |
-
$
|
813 |
$timecard_id = "timecard_id_example"; // string | TThe ID of the timecard to modify.
|
814 |
$body = new \SquareConnect\Model\V1Timecard(); // \SquareConnect\Model\V1Timecard | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
815 |
|
816 |
try {
|
817 |
-
$result = $
|
818 |
print_r($result);
|
819 |
} catch (Exception $e) {
|
820 |
echo 'Exception when calling V1EmployeesApi->updateTimecard: ', $e->getMessage(), PHP_EOL;
|
37 |
// Configure OAuth2 access token for authorization: oauth2
|
38 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
39 |
|
40 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
41 |
$body = new \SquareConnect\Model\V1Employee(); // \SquareConnect\Model\V1Employee | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
42 |
|
43 |
try {
|
44 |
+
$result = $apiInstance->createEmployee($body);
|
45 |
print_r($result);
|
46 |
} catch (Exception $e) {
|
47 |
echo 'Exception when calling V1EmployeesApi->createEmployee: ', $e->getMessage(), PHP_EOL;
|
85 |
// Configure OAuth2 access token for authorization: oauth2
|
86 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
87 |
|
88 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
89 |
$employee_role = new \SquareConnect\Model\V1EmployeeRole(); // \SquareConnect\Model\V1EmployeeRole | An EmployeeRole object with a name and permissions, and an optional owner flag.
|
90 |
|
91 |
try {
|
92 |
+
$result = $apiInstance->createEmployeeRole($employee_role);
|
93 |
print_r($result);
|
94 |
} catch (Exception $e) {
|
95 |
echo 'Exception when calling V1EmployeesApi->createEmployeeRole: ', $e->getMessage(), PHP_EOL;
|
133 |
// Configure OAuth2 access token for authorization: oauth2
|
134 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
135 |
|
136 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
137 |
$body = new \SquareConnect\Model\V1Timecard(); // \SquareConnect\Model\V1Timecard | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
138 |
|
139 |
try {
|
140 |
+
$result = $apiInstance->createTimecard($body);
|
141 |
print_r($result);
|
142 |
} catch (Exception $e) {
|
143 |
echo 'Exception when calling V1EmployeesApi->createTimecard: ', $e->getMessage(), PHP_EOL;
|
181 |
// Configure OAuth2 access token for authorization: oauth2
|
182 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
183 |
|
184 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
185 |
$timecard_id = "timecard_id_example"; // string | The ID of the timecard to delete.
|
186 |
|
187 |
try {
|
188 |
+
$result = $apiInstance->deleteTimecard($timecard_id);
|
189 |
print_r($result);
|
190 |
} catch (Exception $e) {
|
191 |
echo 'Exception when calling V1EmployeesApi->deleteTimecard: ', $e->getMessage(), PHP_EOL;
|
229 |
// Configure OAuth2 access token for authorization: oauth2
|
230 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
231 |
|
232 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
233 |
$location_id = "location_id_example"; // string | The ID of the location to list cash drawer shifts for.
|
234 |
$order = "order_example"; // string | The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC
|
235 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days.
|
236 |
$end_time = "end_time_example"; // string | The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time.
|
237 |
|
238 |
try {
|
239 |
+
$result = $apiInstance->listCashDrawerShifts($location_id, $order, $begin_time, $end_time);
|
240 |
print_r($result);
|
241 |
} catch (Exception $e) {
|
242 |
echo 'Exception when calling V1EmployeesApi->listCashDrawerShifts: ', $e->getMessage(), PHP_EOL;
|
283 |
// Configure OAuth2 access token for authorization: oauth2
|
284 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
285 |
|
286 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
287 |
$order = "order_example"; // string | The order in which employees are listed in the response, based on their created_at field.Default value: ASC
|
288 |
$limit = 56; // int | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
289 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
290 |
|
291 |
try {
|
292 |
+
$result = $apiInstance->listEmployeeRoles($order, $limit, $batch_token);
|
293 |
print_r($result);
|
294 |
} catch (Exception $e) {
|
295 |
echo 'Exception when calling V1EmployeesApi->listEmployeeRoles: ', $e->getMessage(), PHP_EOL;
|
335 |
// Configure OAuth2 access token for authorization: oauth2
|
336 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
337 |
|
338 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
339 |
$order = "order_example"; // string | The order in which employees are listed in the response, based on their created_at field. Default value: ASC
|
340 |
$begin_updated_at = "begin_updated_at_example"; // string | If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format
|
341 |
$end_updated_at = "end_updated_at_example"; // string | If filtering results by there updated_at field, the end of the requested reporting period, in ISO 8601 format.
|
347 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
348 |
|
349 |
try {
|
350 |
+
$result = $apiInstance->listEmployees($order, $begin_updated_at, $end_updated_at, $begin_created_at, $end_created_at, $status, $external_id, $limit, $batch_token);
|
351 |
print_r($result);
|
352 |
} catch (Exception $e) {
|
353 |
echo 'Exception when calling V1EmployeesApi->listEmployees: ', $e->getMessage(), PHP_EOL;
|
399 |
// Configure OAuth2 access token for authorization: oauth2
|
400 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
401 |
|
402 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
403 |
$timecard_id = "timecard_id_example"; // string | The ID of the timecard to list events for.
|
404 |
|
405 |
try {
|
406 |
+
$result = $apiInstance->listTimecardEvents($timecard_id);
|
407 |
print_r($result);
|
408 |
} catch (Exception $e) {
|
409 |
echo 'Exception when calling V1EmployeesApi->listTimecardEvents: ', $e->getMessage(), PHP_EOL;
|
447 |
// Configure OAuth2 access token for authorization: oauth2
|
448 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
449 |
|
450 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
451 |
$order = "order_example"; // string | The order in which timecards are listed in the response, based on their created_at field.
|
452 |
$employee_id = "employee_id_example"; // string | If provided, the endpoint returns only timecards for the employee with the specified ID.
|
453 |
$begin_clockin_time = "begin_clockin_time_example"; // string | If filtering results by their clockin_time field, the beginning of the requested reporting period, in ISO 8601 format.
|
461 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
462 |
|
463 |
try {
|
464 |
+
$result = $apiInstance->listTimecards($order, $employee_id, $begin_clockin_time, $end_clockin_time, $begin_clockout_time, $end_clockout_time, $begin_updated_at, $end_updated_at, $deleted, $limit, $batch_token);
|
465 |
print_r($result);
|
466 |
} catch (Exception $e) {
|
467 |
echo 'Exception when calling V1EmployeesApi->listTimecards: ', $e->getMessage(), PHP_EOL;
|
515 |
// Configure OAuth2 access token for authorization: oauth2
|
516 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
517 |
|
518 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
519 |
$location_id = "location_id_example"; // string | The ID of the location to list cash drawer shifts for.
|
520 |
$shift_id = "shift_id_example"; // string | The shift's ID.
|
521 |
|
522 |
try {
|
523 |
+
$result = $apiInstance->retrieveCashDrawerShift($location_id, $shift_id);
|
524 |
print_r($result);
|
525 |
} catch (Exception $e) {
|
526 |
echo 'Exception when calling V1EmployeesApi->retrieveCashDrawerShift: ', $e->getMessage(), PHP_EOL;
|
565 |
// Configure OAuth2 access token for authorization: oauth2
|
566 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
567 |
|
568 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
569 |
$employee_id = "employee_id_example"; // string | The employee's ID.
|
570 |
|
571 |
try {
|
572 |
+
$result = $apiInstance->retrieveEmployee($employee_id);
|
573 |
print_r($result);
|
574 |
} catch (Exception $e) {
|
575 |
echo 'Exception when calling V1EmployeesApi->retrieveEmployee: ', $e->getMessage(), PHP_EOL;
|
613 |
// Configure OAuth2 access token for authorization: oauth2
|
614 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
615 |
|
616 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
617 |
$role_id = "role_id_example"; // string | The role's ID.
|
618 |
|
619 |
try {
|
620 |
+
$result = $apiInstance->retrieveEmployeeRole($role_id);
|
621 |
print_r($result);
|
622 |
} catch (Exception $e) {
|
623 |
echo 'Exception when calling V1EmployeesApi->retrieveEmployeeRole: ', $e->getMessage(), PHP_EOL;
|
661 |
// Configure OAuth2 access token for authorization: oauth2
|
662 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
663 |
|
664 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
665 |
$timecard_id = "timecard_id_example"; // string | The timecard's ID.
|
666 |
|
667 |
try {
|
668 |
+
$result = $apiInstance->retrieveTimecard($timecard_id);
|
669 |
print_r($result);
|
670 |
} catch (Exception $e) {
|
671 |
echo 'Exception when calling V1EmployeesApi->retrieveTimecard: ', $e->getMessage(), PHP_EOL;
|
709 |
// Configure OAuth2 access token for authorization: oauth2
|
710 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
711 |
|
712 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
713 |
$employee_id = "employee_id_example"; // string | The ID of the role to modify.
|
714 |
$body = new \SquareConnect\Model\V1Employee(); // \SquareConnect\Model\V1Employee | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
715 |
|
716 |
try {
|
717 |
+
$result = $apiInstance->updateEmployee($employee_id, $body);
|
718 |
print_r($result);
|
719 |
} catch (Exception $e) {
|
720 |
echo 'Exception when calling V1EmployeesApi->updateEmployee: ', $e->getMessage(), PHP_EOL;
|
759 |
// Configure OAuth2 access token for authorization: oauth2
|
760 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
761 |
|
762 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
763 |
$role_id = "role_id_example"; // string | The ID of the role to modify.
|
764 |
$body = new \SquareConnect\Model\V1EmployeeRole(); // \SquareConnect\Model\V1EmployeeRole | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
765 |
|
766 |
try {
|
767 |
+
$result = $apiInstance->updateEmployeeRole($role_id, $body);
|
768 |
print_r($result);
|
769 |
} catch (Exception $e) {
|
770 |
echo 'Exception when calling V1EmployeesApi->updateEmployeeRole: ', $e->getMessage(), PHP_EOL;
|
809 |
// Configure OAuth2 access token for authorization: oauth2
|
810 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
811 |
|
812 |
+
$apiInstance = new SquareConnect\Api\V1EmployeesApi();
|
813 |
$timecard_id = "timecard_id_example"; // string | TThe ID of the timecard to modify.
|
814 |
$body = new \SquareConnect\Model\V1Timecard(); // \SquareConnect\Model\V1Timecard | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
815 |
|
816 |
try {
|
817 |
+
$result = $apiInstance->updateTimecard($timecard_id, $body);
|
818 |
print_r($result);
|
819 |
} catch (Exception $e) {
|
820 |
echo 'Exception when calling V1EmployeesApi->updateTimecard: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/V1ItemsApi.md
CHANGED
@@ -61,13 +61,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
61 |
// Configure OAuth2 access token for authorization: oauth2
|
62 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
63 |
|
64 |
-
$
|
65 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
66 |
$variation_id = "variation_id_example"; // string | The ID of the variation to adjust inventory information for.
|
67 |
$body = new \SquareConnect\Model\V1AdjustInventoryRequest(); // \SquareConnect\Model\V1AdjustInventoryRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
68 |
|
69 |
try {
|
70 |
-
$result = $
|
71 |
print_r($result);
|
72 |
} catch (Exception $e) {
|
73 |
echo 'Exception when calling V1ItemsApi->adjustInventory: ', $e->getMessage(), PHP_EOL;
|
@@ -113,13 +113,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
113 |
// Configure OAuth2 access token for authorization: oauth2
|
114 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
115 |
|
116 |
-
$
|
117 |
$location_id = "location_id_example"; // string | The ID of the fee's associated location.
|
118 |
$item_id = "item_id_example"; // string | The ID of the item to add the fee to.
|
119 |
$fee_id = "fee_id_example"; // string | The ID of the fee to apply.
|
120 |
|
121 |
try {
|
122 |
-
$result = $
|
123 |
print_r($result);
|
124 |
} catch (Exception $e) {
|
125 |
echo 'Exception when calling V1ItemsApi->applyFee: ', $e->getMessage(), PHP_EOL;
|
@@ -165,13 +165,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
165 |
// Configure OAuth2 access token for authorization: oauth2
|
166 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
167 |
|
168 |
-
$
|
169 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
170 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to apply.
|
171 |
$item_id = "item_id_example"; // string | The ID of the item to add the modifier list to.
|
172 |
|
173 |
try {
|
174 |
-
$result = $
|
175 |
print_r($result);
|
176 |
} catch (Exception $e) {
|
177 |
echo 'Exception when calling V1ItemsApi->applyModifierList: ', $e->getMessage(), PHP_EOL;
|
@@ -217,12 +217,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
217 |
// Configure OAuth2 access token for authorization: oauth2
|
218 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
219 |
|
220 |
-
$
|
221 |
$location_id = "location_id_example"; // string | The ID of the location to create an item for.
|
222 |
$body = new \SquareConnect\Model\V1Category(); // \SquareConnect\Model\V1Category | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
223 |
|
224 |
try {
|
225 |
-
$result = $
|
226 |
print_r($result);
|
227 |
} catch (Exception $e) {
|
228 |
echo 'Exception when calling V1ItemsApi->createCategory: ', $e->getMessage(), PHP_EOL;
|
@@ -267,12 +267,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
267 |
// Configure OAuth2 access token for authorization: oauth2
|
268 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
269 |
|
270 |
-
$
|
271 |
$location_id = "location_id_example"; // string | The ID of the location to create an item for.
|
272 |
$body = new \SquareConnect\Model\V1Discount(); // \SquareConnect\Model\V1Discount | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
273 |
|
274 |
try {
|
275 |
-
$result = $
|
276 |
print_r($result);
|
277 |
} catch (Exception $e) {
|
278 |
echo 'Exception when calling V1ItemsApi->createDiscount: ', $e->getMessage(), PHP_EOL;
|
@@ -317,12 +317,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
317 |
// Configure OAuth2 access token for authorization: oauth2
|
318 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
319 |
|
320 |
-
$
|
321 |
$location_id = "location_id_example"; // string | The ID of the location to create a fee for.
|
322 |
$body = new \SquareConnect\Model\V1Fee(); // \SquareConnect\Model\V1Fee | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
323 |
|
324 |
try {
|
325 |
-
$result = $
|
326 |
print_r($result);
|
327 |
} catch (Exception $e) {
|
328 |
echo 'Exception when calling V1ItemsApi->createFee: ', $e->getMessage(), PHP_EOL;
|
@@ -367,12 +367,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
367 |
// Configure OAuth2 access token for authorization: oauth2
|
368 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
369 |
|
370 |
-
$
|
371 |
$location_id = "location_id_example"; // string | The ID of the location to create an item for.
|
372 |
$body = new \SquareConnect\Model\V1Item(); // \SquareConnect\Model\V1Item | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
373 |
|
374 |
try {
|
375 |
-
$result = $
|
376 |
print_r($result);
|
377 |
} catch (Exception $e) {
|
378 |
echo 'Exception when calling V1ItemsApi->createItem: ', $e->getMessage(), PHP_EOL;
|
@@ -417,12 +417,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
417 |
// Configure OAuth2 access token for authorization: oauth2
|
418 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
419 |
|
420 |
-
$
|
421 |
$location_id = "location_id_example"; // string | The ID of the location to create a modifier list for.
|
422 |
$body = new \SquareConnect\Model\V1ModifierList(); // \SquareConnect\Model\V1ModifierList | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
423 |
|
424 |
try {
|
425 |
-
$result = $
|
426 |
print_r($result);
|
427 |
} catch (Exception $e) {
|
428 |
echo 'Exception when calling V1ItemsApi->createModifierList: ', $e->getMessage(), PHP_EOL;
|
@@ -467,13 +467,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
467 |
// Configure OAuth2 access token for authorization: oauth2
|
468 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
469 |
|
470 |
-
$
|
471 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
472 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to edit.
|
473 |
$body = new \SquareConnect\Model\V1ModifierOption(); // \SquareConnect\Model\V1ModifierOption | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
474 |
|
475 |
try {
|
476 |
-
$result = $
|
477 |
print_r($result);
|
478 |
} catch (Exception $e) {
|
479 |
echo 'Exception when calling V1ItemsApi->createModifierOption: ', $e->getMessage(), PHP_EOL;
|
@@ -519,12 +519,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
519 |
// Configure OAuth2 access token for authorization: oauth2
|
520 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
521 |
|
522 |
-
$
|
523 |
$location_id = "location_id_example"; // string | The ID of the location to create an item for.
|
524 |
$body = new \SquareConnect\Model\V1Page(); // \SquareConnect\Model\V1Page | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
525 |
|
526 |
try {
|
527 |
-
$result = $
|
528 |
print_r($result);
|
529 |
} catch (Exception $e) {
|
530 |
echo 'Exception when calling V1ItemsApi->createPage: ', $e->getMessage(), PHP_EOL;
|
@@ -569,13 +569,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
569 |
// Configure OAuth2 access token for authorization: oauth2
|
570 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
571 |
|
572 |
-
$
|
573 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
574 |
$item_id = "item_id_example"; // string | The item's ID.
|
575 |
$body = new \SquareConnect\Model\V1Variation(); // \SquareConnect\Model\V1Variation | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
576 |
|
577 |
try {
|
578 |
-
$result = $
|
579 |
print_r($result);
|
580 |
} catch (Exception $e) {
|
581 |
echo 'Exception when calling V1ItemsApi->createVariation: ', $e->getMessage(), PHP_EOL;
|
@@ -621,12 +621,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
621 |
// Configure OAuth2 access token for authorization: oauth2
|
622 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
623 |
|
624 |
-
$
|
625 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
626 |
$category_id = "category_id_example"; // string | The ID of the category to delete.
|
627 |
|
628 |
try {
|
629 |
-
$result = $
|
630 |
print_r($result);
|
631 |
} catch (Exception $e) {
|
632 |
echo 'Exception when calling V1ItemsApi->deleteCategory: ', $e->getMessage(), PHP_EOL;
|
@@ -671,12 +671,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
671 |
// Configure OAuth2 access token for authorization: oauth2
|
672 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
673 |
|
674 |
-
$
|
675 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
676 |
$discount_id = "discount_id_example"; // string | The ID of the discount to delete.
|
677 |
|
678 |
try {
|
679 |
-
$result = $
|
680 |
print_r($result);
|
681 |
} catch (Exception $e) {
|
682 |
echo 'Exception when calling V1ItemsApi->deleteDiscount: ', $e->getMessage(), PHP_EOL;
|
@@ -721,12 +721,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
721 |
// Configure OAuth2 access token for authorization: oauth2
|
722 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
723 |
|
724 |
-
$
|
725 |
$location_id = "location_id_example"; // string | The ID of the fee's associated location.
|
726 |
$fee_id = "fee_id_example"; // string | The ID of the fee to delete.
|
727 |
|
728 |
try {
|
729 |
-
$result = $
|
730 |
print_r($result);
|
731 |
} catch (Exception $e) {
|
732 |
echo 'Exception when calling V1ItemsApi->deleteFee: ', $e->getMessage(), PHP_EOL;
|
@@ -771,12 +771,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
771 |
// Configure OAuth2 access token for authorization: oauth2
|
772 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
773 |
|
774 |
-
$
|
775 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
776 |
$item_id = "item_id_example"; // string | The ID of the item to modify.
|
777 |
|
778 |
try {
|
779 |
-
$result = $
|
780 |
print_r($result);
|
781 |
} catch (Exception $e) {
|
782 |
echo 'Exception when calling V1ItemsApi->deleteItem: ', $e->getMessage(), PHP_EOL;
|
@@ -821,12 +821,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
821 |
// Configure OAuth2 access token for authorization: oauth2
|
822 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
823 |
|
824 |
-
$
|
825 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
826 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to delete.
|
827 |
|
828 |
try {
|
829 |
-
$result = $
|
830 |
print_r($result);
|
831 |
} catch (Exception $e) {
|
832 |
echo 'Exception when calling V1ItemsApi->deleteModifierList: ', $e->getMessage(), PHP_EOL;
|
@@ -871,13 +871,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
871 |
// Configure OAuth2 access token for authorization: oauth2
|
872 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
873 |
|
874 |
-
$
|
875 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
876 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to delete.
|
877 |
$modifier_option_id = "modifier_option_id_example"; // string | The ID of the modifier list to edit.
|
878 |
|
879 |
try {
|
880 |
-
$result = $
|
881 |
print_r($result);
|
882 |
} catch (Exception $e) {
|
883 |
echo 'Exception when calling V1ItemsApi->deleteModifierOption: ', $e->getMessage(), PHP_EOL;
|
@@ -923,12 +923,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
923 |
// Configure OAuth2 access token for authorization: oauth2
|
924 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
925 |
|
926 |
-
$
|
927 |
$location_id = "location_id_example"; // string | The ID of the Favorites page's associated location.
|
928 |
$page_id = "page_id_example"; // string | The ID of the page to delete.
|
929 |
|
930 |
try {
|
931 |
-
$result = $
|
932 |
print_r($result);
|
933 |
} catch (Exception $e) {
|
934 |
echo 'Exception when calling V1ItemsApi->deletePage: ', $e->getMessage(), PHP_EOL;
|
@@ -973,14 +973,14 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
973 |
// Configure OAuth2 access token for authorization: oauth2
|
974 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
975 |
|
976 |
-
$
|
977 |
$location_id = "location_id_example"; // string | The ID of the Favorites page's associated location.
|
978 |
$page_id = "page_id_example"; // string | The ID of the page to delete.
|
979 |
$row = "row_example"; // string | The row of the cell to clear. Always an integer between 0 and 4, inclusive. Row 0 is the top row.
|
980 |
$column = "column_example"; // string | The column of the cell to clear. Always an integer between 0 and 4, inclusive. Column 0 is the leftmost column.
|
981 |
|
982 |
try {
|
983 |
-
$result = $
|
984 |
print_r($result);
|
985 |
} catch (Exception $e) {
|
986 |
echo 'Exception when calling V1ItemsApi->deletePageCell: ', $e->getMessage(), PHP_EOL;
|
@@ -1027,13 +1027,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1027 |
// Configure OAuth2 access token for authorization: oauth2
|
1028 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1029 |
|
1030 |
-
$
|
1031 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1032 |
$item_id = "item_id_example"; // string | The ID of the item to delete.
|
1033 |
$variation_id = "variation_id_example"; // string | The ID of the variation to delete.
|
1034 |
|
1035 |
try {
|
1036 |
-
$result = $
|
1037 |
print_r($result);
|
1038 |
} catch (Exception $e) {
|
1039 |
echo 'Exception when calling V1ItemsApi->deleteVariation: ', $e->getMessage(), PHP_EOL;
|
@@ -1079,11 +1079,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1079 |
// Configure OAuth2 access token for authorization: oauth2
|
1080 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1081 |
|
1082 |
-
$
|
1083 |
$location_id = "location_id_example"; // string | The ID of the location to list categories for.
|
1084 |
|
1085 |
try {
|
1086 |
-
$result = $
|
1087 |
print_r($result);
|
1088 |
} catch (Exception $e) {
|
1089 |
echo 'Exception when calling V1ItemsApi->listCategories: ', $e->getMessage(), PHP_EOL;
|
@@ -1127,11 +1127,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1127 |
// Configure OAuth2 access token for authorization: oauth2
|
1128 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1129 |
|
1130 |
-
$
|
1131 |
$location_id = "location_id_example"; // string | The ID of the location to list categories for.
|
1132 |
|
1133 |
try {
|
1134 |
-
$result = $
|
1135 |
print_r($result);
|
1136 |
} catch (Exception $e) {
|
1137 |
echo 'Exception when calling V1ItemsApi->listDiscounts: ', $e->getMessage(), PHP_EOL;
|
@@ -1175,11 +1175,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1175 |
// Configure OAuth2 access token for authorization: oauth2
|
1176 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1177 |
|
1178 |
-
$
|
1179 |
$location_id = "location_id_example"; // string | The ID of the location to list fees for.
|
1180 |
|
1181 |
try {
|
1182 |
-
$result = $
|
1183 |
print_r($result);
|
1184 |
} catch (Exception $e) {
|
1185 |
echo 'Exception when calling V1ItemsApi->listFees: ', $e->getMessage(), PHP_EOL;
|
@@ -1223,13 +1223,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1223 |
// Configure OAuth2 access token for authorization: oauth2
|
1224 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1225 |
|
1226 |
-
$
|
1227 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1228 |
$limit = 56; // int | The maximum number of inventory entries to return in a single response. This value cannot exceed 1000.
|
1229 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
1230 |
|
1231 |
try {
|
1232 |
-
$result = $
|
1233 |
print_r($result);
|
1234 |
} catch (Exception $e) {
|
1235 |
echo 'Exception when calling V1ItemsApi->listInventory: ', $e->getMessage(), PHP_EOL;
|
@@ -1275,12 +1275,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1275 |
// Configure OAuth2 access token for authorization: oauth2
|
1276 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1277 |
|
1278 |
-
$
|
1279 |
$location_id = "location_id_example"; // string | The ID of the location to list items for.
|
1280 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
1281 |
|
1282 |
try {
|
1283 |
-
$result = $
|
1284 |
print_r($result);
|
1285 |
} catch (Exception $e) {
|
1286 |
echo 'Exception when calling V1ItemsApi->listItems: ', $e->getMessage(), PHP_EOL;
|
@@ -1325,11 +1325,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1325 |
// Configure OAuth2 access token for authorization: oauth2
|
1326 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1327 |
|
1328 |
-
$
|
1329 |
$location_id = "location_id_example"; // string | The ID of the location to list modifier lists for.
|
1330 |
|
1331 |
try {
|
1332 |
-
$result = $
|
1333 |
print_r($result);
|
1334 |
} catch (Exception $e) {
|
1335 |
echo 'Exception when calling V1ItemsApi->listModifierLists: ', $e->getMessage(), PHP_EOL;
|
@@ -1373,11 +1373,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1373 |
// Configure OAuth2 access token for authorization: oauth2
|
1374 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1375 |
|
1376 |
-
$
|
1377 |
$location_id = "location_id_example"; // string | The ID of the location to list Favorites pages for.
|
1378 |
|
1379 |
try {
|
1380 |
-
$result = $
|
1381 |
print_r($result);
|
1382 |
} catch (Exception $e) {
|
1383 |
echo 'Exception when calling V1ItemsApi->listPages: ', $e->getMessage(), PHP_EOL;
|
@@ -1421,13 +1421,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1421 |
// Configure OAuth2 access token for authorization: oauth2
|
1422 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1423 |
|
1424 |
-
$
|
1425 |
$location_id = "location_id_example"; // string | The ID of the fee's associated location.
|
1426 |
$item_id = "item_id_example"; // string | The ID of the item to add the fee to.
|
1427 |
$fee_id = "fee_id_example"; // string | The ID of the fee to apply.
|
1428 |
|
1429 |
try {
|
1430 |
-
$result = $
|
1431 |
print_r($result);
|
1432 |
} catch (Exception $e) {
|
1433 |
echo 'Exception when calling V1ItemsApi->removeFee: ', $e->getMessage(), PHP_EOL;
|
@@ -1473,13 +1473,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1473 |
// Configure OAuth2 access token for authorization: oauth2
|
1474 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1475 |
|
1476 |
-
$
|
1477 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1478 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to remove.
|
1479 |
$item_id = "item_id_example"; // string | The ID of the item to remove the modifier list from.
|
1480 |
|
1481 |
try {
|
1482 |
-
$result = $
|
1483 |
print_r($result);
|
1484 |
} catch (Exception $e) {
|
1485 |
echo 'Exception when calling V1ItemsApi->removeModifierList: ', $e->getMessage(), PHP_EOL;
|
@@ -1525,12 +1525,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1525 |
// Configure OAuth2 access token for authorization: oauth2
|
1526 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1527 |
|
1528 |
-
$
|
1529 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1530 |
$item_id = "item_id_example"; // string | The item's ID.
|
1531 |
|
1532 |
try {
|
1533 |
-
$result = $
|
1534 |
print_r($result);
|
1535 |
} catch (Exception $e) {
|
1536 |
echo 'Exception when calling V1ItemsApi->retrieveItem: ', $e->getMessage(), PHP_EOL;
|
@@ -1575,12 +1575,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1575 |
// Configure OAuth2 access token for authorization: oauth2
|
1576 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1577 |
|
1578 |
-
$
|
1579 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1580 |
$modifier_list_id = "modifier_list_id_example"; // string | The modifier list's ID.
|
1581 |
|
1582 |
try {
|
1583 |
-
$result = $
|
1584 |
print_r($result);
|
1585 |
} catch (Exception $e) {
|
1586 |
echo 'Exception when calling V1ItemsApi->retrieveModifierList: ', $e->getMessage(), PHP_EOL;
|
@@ -1625,13 +1625,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1625 |
// Configure OAuth2 access token for authorization: oauth2
|
1626 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1627 |
|
1628 |
-
$
|
1629 |
$location_id = "location_id_example"; // string | The ID of the category's associated location.
|
1630 |
$category_id = "category_id_example"; // string | The ID of the category to edit.
|
1631 |
$body = new \SquareConnect\Model\V1Category(); // \SquareConnect\Model\V1Category | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1632 |
|
1633 |
try {
|
1634 |
-
$result = $
|
1635 |
print_r($result);
|
1636 |
} catch (Exception $e) {
|
1637 |
echo 'Exception when calling V1ItemsApi->updateCategory: ', $e->getMessage(), PHP_EOL;
|
@@ -1677,13 +1677,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1677 |
// Configure OAuth2 access token for authorization: oauth2
|
1678 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1679 |
|
1680 |
-
$
|
1681 |
$location_id = "location_id_example"; // string | The ID of the category's associated location.
|
1682 |
$discount_id = "discount_id_example"; // string | The ID of the discount to edit.
|
1683 |
$body = new \SquareConnect\Model\V1Discount(); // \SquareConnect\Model\V1Discount | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1684 |
|
1685 |
try {
|
1686 |
-
$result = $
|
1687 |
print_r($result);
|
1688 |
} catch (Exception $e) {
|
1689 |
echo 'Exception when calling V1ItemsApi->updateDiscount: ', $e->getMessage(), PHP_EOL;
|
@@ -1729,13 +1729,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1729 |
// Configure OAuth2 access token for authorization: oauth2
|
1730 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1731 |
|
1732 |
-
$
|
1733 |
$location_id = "location_id_example"; // string | The ID of the fee's associated location.
|
1734 |
$fee_id = "fee_id_example"; // string | The ID of the fee to edit.
|
1735 |
$body = new \SquareConnect\Model\V1Fee(); // \SquareConnect\Model\V1Fee | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1736 |
|
1737 |
try {
|
1738 |
-
$result = $
|
1739 |
print_r($result);
|
1740 |
} catch (Exception $e) {
|
1741 |
echo 'Exception when calling V1ItemsApi->updateFee: ', $e->getMessage(), PHP_EOL;
|
@@ -1781,13 +1781,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1781 |
// Configure OAuth2 access token for authorization: oauth2
|
1782 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1783 |
|
1784 |
-
$
|
1785 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1786 |
$item_id = "item_id_example"; // string | The ID of the item to modify.
|
1787 |
$body = new \SquareConnect\Model\V1Item(); // \SquareConnect\Model\V1Item | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1788 |
|
1789 |
try {
|
1790 |
-
$result = $
|
1791 |
print_r($result);
|
1792 |
} catch (Exception $e) {
|
1793 |
echo 'Exception when calling V1ItemsApi->updateItem: ', $e->getMessage(), PHP_EOL;
|
@@ -1833,13 +1833,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1833 |
// Configure OAuth2 access token for authorization: oauth2
|
1834 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1835 |
|
1836 |
-
$
|
1837 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1838 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to edit.
|
1839 |
$body = new \SquareConnect\Model\V1UpdateModifierListRequest(); // \SquareConnect\Model\V1UpdateModifierListRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1840 |
|
1841 |
try {
|
1842 |
-
$result = $
|
1843 |
print_r($result);
|
1844 |
} catch (Exception $e) {
|
1845 |
echo 'Exception when calling V1ItemsApi->updateModifierList: ', $e->getMessage(), PHP_EOL;
|
@@ -1885,14 +1885,14 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1885 |
// Configure OAuth2 access token for authorization: oauth2
|
1886 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1887 |
|
1888 |
-
$
|
1889 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1890 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to edit.
|
1891 |
$modifier_option_id = "modifier_option_id_example"; // string | The ID of the modifier list to edit.
|
1892 |
$body = new \SquareConnect\Model\V1ModifierOption(); // \SquareConnect\Model\V1ModifierOption | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1893 |
|
1894 |
try {
|
1895 |
-
$result = $
|
1896 |
print_r($result);
|
1897 |
} catch (Exception $e) {
|
1898 |
echo 'Exception when calling V1ItemsApi->updateModifierOption: ', $e->getMessage(), PHP_EOL;
|
@@ -1939,13 +1939,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1939 |
// Configure OAuth2 access token for authorization: oauth2
|
1940 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1941 |
|
1942 |
-
$
|
1943 |
$location_id = "location_id_example"; // string | The ID of the Favorites page's associated location
|
1944 |
$page_id = "page_id_example"; // string | The ID of the page to modify.
|
1945 |
$body = new \SquareConnect\Model\V1Page(); // \SquareConnect\Model\V1Page | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1946 |
|
1947 |
try {
|
1948 |
-
$result = $
|
1949 |
print_r($result);
|
1950 |
} catch (Exception $e) {
|
1951 |
echo 'Exception when calling V1ItemsApi->updatePage: ', $e->getMessage(), PHP_EOL;
|
@@ -1991,13 +1991,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
1991 |
// Configure OAuth2 access token for authorization: oauth2
|
1992 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1993 |
|
1994 |
-
$
|
1995 |
$location_id = "location_id_example"; // string | The ID of the Favorites page's associated location.
|
1996 |
$page_id = "page_id_example"; // string | The ID of the page the cell belongs to.
|
1997 |
$body = new \SquareConnect\Model\V1PageCell(); // \SquareConnect\Model\V1PageCell | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1998 |
|
1999 |
try {
|
2000 |
-
$result = $
|
2001 |
print_r($result);
|
2002 |
} catch (Exception $e) {
|
2003 |
echo 'Exception when calling V1ItemsApi->updatePageCell: ', $e->getMessage(), PHP_EOL;
|
@@ -2043,14 +2043,14 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
2043 |
// Configure OAuth2 access token for authorization: oauth2
|
2044 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
2045 |
|
2046 |
-
$
|
2047 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
2048 |
$item_id = "item_id_example"; // string | The ID of the item to modify.
|
2049 |
$variation_id = "variation_id_example"; // string | The ID of the variation to modify.
|
2050 |
$body = new \SquareConnect\Model\V1Variation(); // \SquareConnect\Model\V1Variation | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
2051 |
|
2052 |
try {
|
2053 |
-
$result = $
|
2054 |
print_r($result);
|
2055 |
} catch (Exception $e) {
|
2056 |
echo 'Exception when calling V1ItemsApi->updateVariation: ', $e->getMessage(), PHP_EOL;
|
61 |
// Configure OAuth2 access token for authorization: oauth2
|
62 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
63 |
|
64 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
65 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
66 |
$variation_id = "variation_id_example"; // string | The ID of the variation to adjust inventory information for.
|
67 |
$body = new \SquareConnect\Model\V1AdjustInventoryRequest(); // \SquareConnect\Model\V1AdjustInventoryRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
68 |
|
69 |
try {
|
70 |
+
$result = $apiInstance->adjustInventory($location_id, $variation_id, $body);
|
71 |
print_r($result);
|
72 |
} catch (Exception $e) {
|
73 |
echo 'Exception when calling V1ItemsApi->adjustInventory: ', $e->getMessage(), PHP_EOL;
|
113 |
// Configure OAuth2 access token for authorization: oauth2
|
114 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
115 |
|
116 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
117 |
$location_id = "location_id_example"; // string | The ID of the fee's associated location.
|
118 |
$item_id = "item_id_example"; // string | The ID of the item to add the fee to.
|
119 |
$fee_id = "fee_id_example"; // string | The ID of the fee to apply.
|
120 |
|
121 |
try {
|
122 |
+
$result = $apiInstance->applyFee($location_id, $item_id, $fee_id);
|
123 |
print_r($result);
|
124 |
} catch (Exception $e) {
|
125 |
echo 'Exception when calling V1ItemsApi->applyFee: ', $e->getMessage(), PHP_EOL;
|
165 |
// Configure OAuth2 access token for authorization: oauth2
|
166 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
167 |
|
168 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
169 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
170 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to apply.
|
171 |
$item_id = "item_id_example"; // string | The ID of the item to add the modifier list to.
|
172 |
|
173 |
try {
|
174 |
+
$result = $apiInstance->applyModifierList($location_id, $modifier_list_id, $item_id);
|
175 |
print_r($result);
|
176 |
} catch (Exception $e) {
|
177 |
echo 'Exception when calling V1ItemsApi->applyModifierList: ', $e->getMessage(), PHP_EOL;
|
217 |
// Configure OAuth2 access token for authorization: oauth2
|
218 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
219 |
|
220 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
221 |
$location_id = "location_id_example"; // string | The ID of the location to create an item for.
|
222 |
$body = new \SquareConnect\Model\V1Category(); // \SquareConnect\Model\V1Category | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
223 |
|
224 |
try {
|
225 |
+
$result = $apiInstance->createCategory($location_id, $body);
|
226 |
print_r($result);
|
227 |
} catch (Exception $e) {
|
228 |
echo 'Exception when calling V1ItemsApi->createCategory: ', $e->getMessage(), PHP_EOL;
|
267 |
// Configure OAuth2 access token for authorization: oauth2
|
268 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
269 |
|
270 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
271 |
$location_id = "location_id_example"; // string | The ID of the location to create an item for.
|
272 |
$body = new \SquareConnect\Model\V1Discount(); // \SquareConnect\Model\V1Discount | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
273 |
|
274 |
try {
|
275 |
+
$result = $apiInstance->createDiscount($location_id, $body);
|
276 |
print_r($result);
|
277 |
} catch (Exception $e) {
|
278 |
echo 'Exception when calling V1ItemsApi->createDiscount: ', $e->getMessage(), PHP_EOL;
|
317 |
// Configure OAuth2 access token for authorization: oauth2
|
318 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
319 |
|
320 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
321 |
$location_id = "location_id_example"; // string | The ID of the location to create a fee for.
|
322 |
$body = new \SquareConnect\Model\V1Fee(); // \SquareConnect\Model\V1Fee | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
323 |
|
324 |
try {
|
325 |
+
$result = $apiInstance->createFee($location_id, $body);
|
326 |
print_r($result);
|
327 |
} catch (Exception $e) {
|
328 |
echo 'Exception when calling V1ItemsApi->createFee: ', $e->getMessage(), PHP_EOL;
|
367 |
// Configure OAuth2 access token for authorization: oauth2
|
368 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
369 |
|
370 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
371 |
$location_id = "location_id_example"; // string | The ID of the location to create an item for.
|
372 |
$body = new \SquareConnect\Model\V1Item(); // \SquareConnect\Model\V1Item | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
373 |
|
374 |
try {
|
375 |
+
$result = $apiInstance->createItem($location_id, $body);
|
376 |
print_r($result);
|
377 |
} catch (Exception $e) {
|
378 |
echo 'Exception when calling V1ItemsApi->createItem: ', $e->getMessage(), PHP_EOL;
|
417 |
// Configure OAuth2 access token for authorization: oauth2
|
418 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
419 |
|
420 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
421 |
$location_id = "location_id_example"; // string | The ID of the location to create a modifier list for.
|
422 |
$body = new \SquareConnect\Model\V1ModifierList(); // \SquareConnect\Model\V1ModifierList | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
423 |
|
424 |
try {
|
425 |
+
$result = $apiInstance->createModifierList($location_id, $body);
|
426 |
print_r($result);
|
427 |
} catch (Exception $e) {
|
428 |
echo 'Exception when calling V1ItemsApi->createModifierList: ', $e->getMessage(), PHP_EOL;
|
467 |
// Configure OAuth2 access token for authorization: oauth2
|
468 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
469 |
|
470 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
471 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
472 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to edit.
|
473 |
$body = new \SquareConnect\Model\V1ModifierOption(); // \SquareConnect\Model\V1ModifierOption | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
474 |
|
475 |
try {
|
476 |
+
$result = $apiInstance->createModifierOption($location_id, $modifier_list_id, $body);
|
477 |
print_r($result);
|
478 |
} catch (Exception $e) {
|
479 |
echo 'Exception when calling V1ItemsApi->createModifierOption: ', $e->getMessage(), PHP_EOL;
|
519 |
// Configure OAuth2 access token for authorization: oauth2
|
520 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
521 |
|
522 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
523 |
$location_id = "location_id_example"; // string | The ID of the location to create an item for.
|
524 |
$body = new \SquareConnect\Model\V1Page(); // \SquareConnect\Model\V1Page | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
525 |
|
526 |
try {
|
527 |
+
$result = $apiInstance->createPage($location_id, $body);
|
528 |
print_r($result);
|
529 |
} catch (Exception $e) {
|
530 |
echo 'Exception when calling V1ItemsApi->createPage: ', $e->getMessage(), PHP_EOL;
|
569 |
// Configure OAuth2 access token for authorization: oauth2
|
570 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
571 |
|
572 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
573 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
574 |
$item_id = "item_id_example"; // string | The item's ID.
|
575 |
$body = new \SquareConnect\Model\V1Variation(); // \SquareConnect\Model\V1Variation | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
576 |
|
577 |
try {
|
578 |
+
$result = $apiInstance->createVariation($location_id, $item_id, $body);
|
579 |
print_r($result);
|
580 |
} catch (Exception $e) {
|
581 |
echo 'Exception when calling V1ItemsApi->createVariation: ', $e->getMessage(), PHP_EOL;
|
621 |
// Configure OAuth2 access token for authorization: oauth2
|
622 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
623 |
|
624 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
625 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
626 |
$category_id = "category_id_example"; // string | The ID of the category to delete.
|
627 |
|
628 |
try {
|
629 |
+
$result = $apiInstance->deleteCategory($location_id, $category_id);
|
630 |
print_r($result);
|
631 |
} catch (Exception $e) {
|
632 |
echo 'Exception when calling V1ItemsApi->deleteCategory: ', $e->getMessage(), PHP_EOL;
|
671 |
// Configure OAuth2 access token for authorization: oauth2
|
672 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
673 |
|
674 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
675 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
676 |
$discount_id = "discount_id_example"; // string | The ID of the discount to delete.
|
677 |
|
678 |
try {
|
679 |
+
$result = $apiInstance->deleteDiscount($location_id, $discount_id);
|
680 |
print_r($result);
|
681 |
} catch (Exception $e) {
|
682 |
echo 'Exception when calling V1ItemsApi->deleteDiscount: ', $e->getMessage(), PHP_EOL;
|
721 |
// Configure OAuth2 access token for authorization: oauth2
|
722 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
723 |
|
724 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
725 |
$location_id = "location_id_example"; // string | The ID of the fee's associated location.
|
726 |
$fee_id = "fee_id_example"; // string | The ID of the fee to delete.
|
727 |
|
728 |
try {
|
729 |
+
$result = $apiInstance->deleteFee($location_id, $fee_id);
|
730 |
print_r($result);
|
731 |
} catch (Exception $e) {
|
732 |
echo 'Exception when calling V1ItemsApi->deleteFee: ', $e->getMessage(), PHP_EOL;
|
771 |
// Configure OAuth2 access token for authorization: oauth2
|
772 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
773 |
|
774 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
775 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
776 |
$item_id = "item_id_example"; // string | The ID of the item to modify.
|
777 |
|
778 |
try {
|
779 |
+
$result = $apiInstance->deleteItem($location_id, $item_id);
|
780 |
print_r($result);
|
781 |
} catch (Exception $e) {
|
782 |
echo 'Exception when calling V1ItemsApi->deleteItem: ', $e->getMessage(), PHP_EOL;
|
821 |
// Configure OAuth2 access token for authorization: oauth2
|
822 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
823 |
|
824 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
825 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
826 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to delete.
|
827 |
|
828 |
try {
|
829 |
+
$result = $apiInstance->deleteModifierList($location_id, $modifier_list_id);
|
830 |
print_r($result);
|
831 |
} catch (Exception $e) {
|
832 |
echo 'Exception when calling V1ItemsApi->deleteModifierList: ', $e->getMessage(), PHP_EOL;
|
871 |
// Configure OAuth2 access token for authorization: oauth2
|
872 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
873 |
|
874 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
875 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
876 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to delete.
|
877 |
$modifier_option_id = "modifier_option_id_example"; // string | The ID of the modifier list to edit.
|
878 |
|
879 |
try {
|
880 |
+
$result = $apiInstance->deleteModifierOption($location_id, $modifier_list_id, $modifier_option_id);
|
881 |
print_r($result);
|
882 |
} catch (Exception $e) {
|
883 |
echo 'Exception when calling V1ItemsApi->deleteModifierOption: ', $e->getMessage(), PHP_EOL;
|
923 |
// Configure OAuth2 access token for authorization: oauth2
|
924 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
925 |
|
926 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
927 |
$location_id = "location_id_example"; // string | The ID of the Favorites page's associated location.
|
928 |
$page_id = "page_id_example"; // string | The ID of the page to delete.
|
929 |
|
930 |
try {
|
931 |
+
$result = $apiInstance->deletePage($location_id, $page_id);
|
932 |
print_r($result);
|
933 |
} catch (Exception $e) {
|
934 |
echo 'Exception when calling V1ItemsApi->deletePage: ', $e->getMessage(), PHP_EOL;
|
973 |
// Configure OAuth2 access token for authorization: oauth2
|
974 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
975 |
|
976 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
977 |
$location_id = "location_id_example"; // string | The ID of the Favorites page's associated location.
|
978 |
$page_id = "page_id_example"; // string | The ID of the page to delete.
|
979 |
$row = "row_example"; // string | The row of the cell to clear. Always an integer between 0 and 4, inclusive. Row 0 is the top row.
|
980 |
$column = "column_example"; // string | The column of the cell to clear. Always an integer between 0 and 4, inclusive. Column 0 is the leftmost column.
|
981 |
|
982 |
try {
|
983 |
+
$result = $apiInstance->deletePageCell($location_id, $page_id, $row, $column);
|
984 |
print_r($result);
|
985 |
} catch (Exception $e) {
|
986 |
echo 'Exception when calling V1ItemsApi->deletePageCell: ', $e->getMessage(), PHP_EOL;
|
1027 |
// Configure OAuth2 access token for authorization: oauth2
|
1028 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1029 |
|
1030 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1031 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1032 |
$item_id = "item_id_example"; // string | The ID of the item to delete.
|
1033 |
$variation_id = "variation_id_example"; // string | The ID of the variation to delete.
|
1034 |
|
1035 |
try {
|
1036 |
+
$result = $apiInstance->deleteVariation($location_id, $item_id, $variation_id);
|
1037 |
print_r($result);
|
1038 |
} catch (Exception $e) {
|
1039 |
echo 'Exception when calling V1ItemsApi->deleteVariation: ', $e->getMessage(), PHP_EOL;
|
1079 |
// Configure OAuth2 access token for authorization: oauth2
|
1080 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1081 |
|
1082 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1083 |
$location_id = "location_id_example"; // string | The ID of the location to list categories for.
|
1084 |
|
1085 |
try {
|
1086 |
+
$result = $apiInstance->listCategories($location_id);
|
1087 |
print_r($result);
|
1088 |
} catch (Exception $e) {
|
1089 |
echo 'Exception when calling V1ItemsApi->listCategories: ', $e->getMessage(), PHP_EOL;
|
1127 |
// Configure OAuth2 access token for authorization: oauth2
|
1128 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1129 |
|
1130 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1131 |
$location_id = "location_id_example"; // string | The ID of the location to list categories for.
|
1132 |
|
1133 |
try {
|
1134 |
+
$result = $apiInstance->listDiscounts($location_id);
|
1135 |
print_r($result);
|
1136 |
} catch (Exception $e) {
|
1137 |
echo 'Exception when calling V1ItemsApi->listDiscounts: ', $e->getMessage(), PHP_EOL;
|
1175 |
// Configure OAuth2 access token for authorization: oauth2
|
1176 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1177 |
|
1178 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1179 |
$location_id = "location_id_example"; // string | The ID of the location to list fees for.
|
1180 |
|
1181 |
try {
|
1182 |
+
$result = $apiInstance->listFees($location_id);
|
1183 |
print_r($result);
|
1184 |
} catch (Exception $e) {
|
1185 |
echo 'Exception when calling V1ItemsApi->listFees: ', $e->getMessage(), PHP_EOL;
|
1223 |
// Configure OAuth2 access token for authorization: oauth2
|
1224 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1225 |
|
1226 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1227 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1228 |
$limit = 56; // int | The maximum number of inventory entries to return in a single response. This value cannot exceed 1000.
|
1229 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
1230 |
|
1231 |
try {
|
1232 |
+
$result = $apiInstance->listInventory($location_id, $limit, $batch_token);
|
1233 |
print_r($result);
|
1234 |
} catch (Exception $e) {
|
1235 |
echo 'Exception when calling V1ItemsApi->listInventory: ', $e->getMessage(), PHP_EOL;
|
1275 |
// Configure OAuth2 access token for authorization: oauth2
|
1276 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1277 |
|
1278 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1279 |
$location_id = "location_id_example"; // string | The ID of the location to list items for.
|
1280 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
1281 |
|
1282 |
try {
|
1283 |
+
$result = $apiInstance->listItems($location_id, $batch_token);
|
1284 |
print_r($result);
|
1285 |
} catch (Exception $e) {
|
1286 |
echo 'Exception when calling V1ItemsApi->listItems: ', $e->getMessage(), PHP_EOL;
|
1325 |
// Configure OAuth2 access token for authorization: oauth2
|
1326 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1327 |
|
1328 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1329 |
$location_id = "location_id_example"; // string | The ID of the location to list modifier lists for.
|
1330 |
|
1331 |
try {
|
1332 |
+
$result = $apiInstance->listModifierLists($location_id);
|
1333 |
print_r($result);
|
1334 |
} catch (Exception $e) {
|
1335 |
echo 'Exception when calling V1ItemsApi->listModifierLists: ', $e->getMessage(), PHP_EOL;
|
1373 |
// Configure OAuth2 access token for authorization: oauth2
|
1374 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1375 |
|
1376 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1377 |
$location_id = "location_id_example"; // string | The ID of the location to list Favorites pages for.
|
1378 |
|
1379 |
try {
|
1380 |
+
$result = $apiInstance->listPages($location_id);
|
1381 |
print_r($result);
|
1382 |
} catch (Exception $e) {
|
1383 |
echo 'Exception when calling V1ItemsApi->listPages: ', $e->getMessage(), PHP_EOL;
|
1421 |
// Configure OAuth2 access token for authorization: oauth2
|
1422 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1423 |
|
1424 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1425 |
$location_id = "location_id_example"; // string | The ID of the fee's associated location.
|
1426 |
$item_id = "item_id_example"; // string | The ID of the item to add the fee to.
|
1427 |
$fee_id = "fee_id_example"; // string | The ID of the fee to apply.
|
1428 |
|
1429 |
try {
|
1430 |
+
$result = $apiInstance->removeFee($location_id, $item_id, $fee_id);
|
1431 |
print_r($result);
|
1432 |
} catch (Exception $e) {
|
1433 |
echo 'Exception when calling V1ItemsApi->removeFee: ', $e->getMessage(), PHP_EOL;
|
1473 |
// Configure OAuth2 access token for authorization: oauth2
|
1474 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1475 |
|
1476 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1477 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1478 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to remove.
|
1479 |
$item_id = "item_id_example"; // string | The ID of the item to remove the modifier list from.
|
1480 |
|
1481 |
try {
|
1482 |
+
$result = $apiInstance->removeModifierList($location_id, $modifier_list_id, $item_id);
|
1483 |
print_r($result);
|
1484 |
} catch (Exception $e) {
|
1485 |
echo 'Exception when calling V1ItemsApi->removeModifierList: ', $e->getMessage(), PHP_EOL;
|
1525 |
// Configure OAuth2 access token for authorization: oauth2
|
1526 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1527 |
|
1528 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1529 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1530 |
$item_id = "item_id_example"; // string | The item's ID.
|
1531 |
|
1532 |
try {
|
1533 |
+
$result = $apiInstance->retrieveItem($location_id, $item_id);
|
1534 |
print_r($result);
|
1535 |
} catch (Exception $e) {
|
1536 |
echo 'Exception when calling V1ItemsApi->retrieveItem: ', $e->getMessage(), PHP_EOL;
|
1575 |
// Configure OAuth2 access token for authorization: oauth2
|
1576 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1577 |
|
1578 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1579 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1580 |
$modifier_list_id = "modifier_list_id_example"; // string | The modifier list's ID.
|
1581 |
|
1582 |
try {
|
1583 |
+
$result = $apiInstance->retrieveModifierList($location_id, $modifier_list_id);
|
1584 |
print_r($result);
|
1585 |
} catch (Exception $e) {
|
1586 |
echo 'Exception when calling V1ItemsApi->retrieveModifierList: ', $e->getMessage(), PHP_EOL;
|
1625 |
// Configure OAuth2 access token for authorization: oauth2
|
1626 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1627 |
|
1628 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1629 |
$location_id = "location_id_example"; // string | The ID of the category's associated location.
|
1630 |
$category_id = "category_id_example"; // string | The ID of the category to edit.
|
1631 |
$body = new \SquareConnect\Model\V1Category(); // \SquareConnect\Model\V1Category | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1632 |
|
1633 |
try {
|
1634 |
+
$result = $apiInstance->updateCategory($location_id, $category_id, $body);
|
1635 |
print_r($result);
|
1636 |
} catch (Exception $e) {
|
1637 |
echo 'Exception when calling V1ItemsApi->updateCategory: ', $e->getMessage(), PHP_EOL;
|
1677 |
// Configure OAuth2 access token for authorization: oauth2
|
1678 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1679 |
|
1680 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1681 |
$location_id = "location_id_example"; // string | The ID of the category's associated location.
|
1682 |
$discount_id = "discount_id_example"; // string | The ID of the discount to edit.
|
1683 |
$body = new \SquareConnect\Model\V1Discount(); // \SquareConnect\Model\V1Discount | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1684 |
|
1685 |
try {
|
1686 |
+
$result = $apiInstance->updateDiscount($location_id, $discount_id, $body);
|
1687 |
print_r($result);
|
1688 |
} catch (Exception $e) {
|
1689 |
echo 'Exception when calling V1ItemsApi->updateDiscount: ', $e->getMessage(), PHP_EOL;
|
1729 |
// Configure OAuth2 access token for authorization: oauth2
|
1730 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1731 |
|
1732 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1733 |
$location_id = "location_id_example"; // string | The ID of the fee's associated location.
|
1734 |
$fee_id = "fee_id_example"; // string | The ID of the fee to edit.
|
1735 |
$body = new \SquareConnect\Model\V1Fee(); // \SquareConnect\Model\V1Fee | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1736 |
|
1737 |
try {
|
1738 |
+
$result = $apiInstance->updateFee($location_id, $fee_id, $body);
|
1739 |
print_r($result);
|
1740 |
} catch (Exception $e) {
|
1741 |
echo 'Exception when calling V1ItemsApi->updateFee: ', $e->getMessage(), PHP_EOL;
|
1781 |
// Configure OAuth2 access token for authorization: oauth2
|
1782 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1783 |
|
1784 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1785 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1786 |
$item_id = "item_id_example"; // string | The ID of the item to modify.
|
1787 |
$body = new \SquareConnect\Model\V1Item(); // \SquareConnect\Model\V1Item | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1788 |
|
1789 |
try {
|
1790 |
+
$result = $apiInstance->updateItem($location_id, $item_id, $body);
|
1791 |
print_r($result);
|
1792 |
} catch (Exception $e) {
|
1793 |
echo 'Exception when calling V1ItemsApi->updateItem: ', $e->getMessage(), PHP_EOL;
|
1833 |
// Configure OAuth2 access token for authorization: oauth2
|
1834 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1835 |
|
1836 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1837 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1838 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to edit.
|
1839 |
$body = new \SquareConnect\Model\V1UpdateModifierListRequest(); // \SquareConnect\Model\V1UpdateModifierListRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1840 |
|
1841 |
try {
|
1842 |
+
$result = $apiInstance->updateModifierList($location_id, $modifier_list_id, $body);
|
1843 |
print_r($result);
|
1844 |
} catch (Exception $e) {
|
1845 |
echo 'Exception when calling V1ItemsApi->updateModifierList: ', $e->getMessage(), PHP_EOL;
|
1885 |
// Configure OAuth2 access token for authorization: oauth2
|
1886 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1887 |
|
1888 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1889 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
1890 |
$modifier_list_id = "modifier_list_id_example"; // string | The ID of the modifier list to edit.
|
1891 |
$modifier_option_id = "modifier_option_id_example"; // string | The ID of the modifier list to edit.
|
1892 |
$body = new \SquareConnect\Model\V1ModifierOption(); // \SquareConnect\Model\V1ModifierOption | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1893 |
|
1894 |
try {
|
1895 |
+
$result = $apiInstance->updateModifierOption($location_id, $modifier_list_id, $modifier_option_id, $body);
|
1896 |
print_r($result);
|
1897 |
} catch (Exception $e) {
|
1898 |
echo 'Exception when calling V1ItemsApi->updateModifierOption: ', $e->getMessage(), PHP_EOL;
|
1939 |
// Configure OAuth2 access token for authorization: oauth2
|
1940 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1941 |
|
1942 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1943 |
$location_id = "location_id_example"; // string | The ID of the Favorites page's associated location
|
1944 |
$page_id = "page_id_example"; // string | The ID of the page to modify.
|
1945 |
$body = new \SquareConnect\Model\V1Page(); // \SquareConnect\Model\V1Page | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1946 |
|
1947 |
try {
|
1948 |
+
$result = $apiInstance->updatePage($location_id, $page_id, $body);
|
1949 |
print_r($result);
|
1950 |
} catch (Exception $e) {
|
1951 |
echo 'Exception when calling V1ItemsApi->updatePage: ', $e->getMessage(), PHP_EOL;
|
1991 |
// Configure OAuth2 access token for authorization: oauth2
|
1992 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
1993 |
|
1994 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
1995 |
$location_id = "location_id_example"; // string | The ID of the Favorites page's associated location.
|
1996 |
$page_id = "page_id_example"; // string | The ID of the page the cell belongs to.
|
1997 |
$body = new \SquareConnect\Model\V1PageCell(); // \SquareConnect\Model\V1PageCell | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
1998 |
|
1999 |
try {
|
2000 |
+
$result = $apiInstance->updatePageCell($location_id, $page_id, $body);
|
2001 |
print_r($result);
|
2002 |
} catch (Exception $e) {
|
2003 |
echo 'Exception when calling V1ItemsApi->updatePageCell: ', $e->getMessage(), PHP_EOL;
|
2043 |
// Configure OAuth2 access token for authorization: oauth2
|
2044 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
2045 |
|
2046 |
+
$apiInstance = new SquareConnect\Api\V1ItemsApi();
|
2047 |
$location_id = "location_id_example"; // string | The ID of the item's associated location.
|
2048 |
$item_id = "item_id_example"; // string | The ID of the item to modify.
|
2049 |
$variation_id = "variation_id_example"; // string | The ID of the variation to modify.
|
2050 |
$body = new \SquareConnect\Model\V1Variation(); // \SquareConnect\Model\V1Variation | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
2051 |
|
2052 |
try {
|
2053 |
+
$result = $apiInstance->updateVariation($location_id, $item_id, $variation_id, $body);
|
2054 |
print_r($result);
|
2055 |
} catch (Exception $e) {
|
2056 |
echo 'Exception when calling V1ItemsApi->updateVariation: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/V1LocationsApi.md
CHANGED
@@ -23,10 +23,10 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
23 |
// Configure OAuth2 access token for authorization: oauth2
|
24 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
25 |
|
26 |
-
$
|
27 |
|
28 |
try {
|
29 |
-
$result = $
|
30 |
print_r($result);
|
31 |
} catch (Exception $e) {
|
32 |
echo 'Exception when calling V1LocationsApi->listLocations: ', $e->getMessage(), PHP_EOL;
|
@@ -67,10 +67,10 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
67 |
// Configure OAuth2 access token for authorization: oauth2
|
68 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
69 |
|
70 |
-
$
|
71 |
|
72 |
try {
|
73 |
-
$result = $
|
74 |
print_r($result);
|
75 |
} catch (Exception $e) {
|
76 |
echo 'Exception when calling V1LocationsApi->retrieveBusiness: ', $e->getMessage(), PHP_EOL;
|
23 |
// Configure OAuth2 access token for authorization: oauth2
|
24 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
25 |
|
26 |
+
$apiInstance = new SquareConnect\Api\V1LocationsApi();
|
27 |
|
28 |
try {
|
29 |
+
$result = $apiInstance->listLocations();
|
30 |
print_r($result);
|
31 |
} catch (Exception $e) {
|
32 |
echo 'Exception when calling V1LocationsApi->listLocations: ', $e->getMessage(), PHP_EOL;
|
67 |
// Configure OAuth2 access token for authorization: oauth2
|
68 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
69 |
|
70 |
+
$apiInstance = new SquareConnect\Api\V1LocationsApi();
|
71 |
|
72 |
try {
|
73 |
+
$result = $apiInstance->retrieveBusiness();
|
74 |
print_r($result);
|
75 |
} catch (Exception $e) {
|
76 |
echo 'Exception when calling V1LocationsApi->retrieveBusiness: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Api/V1TransactionsApi.md
CHANGED
@@ -32,12 +32,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
32 |
// Configure OAuth2 access token for authorization: oauth2
|
33 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
34 |
|
35 |
-
$
|
36 |
$location_id = "location_id_example"; // string | The ID of the original payment's associated location.
|
37 |
$body = new \SquareConnect\Model\V1CreateRefundRequest(); // \SquareConnect\Model\V1CreateRefundRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
38 |
|
39 |
try {
|
40 |
-
$result = $
|
41 |
print_r($result);
|
42 |
} catch (Exception $e) {
|
43 |
echo 'Exception when calling V1TransactionsApi->createRefund: ', $e->getMessage(), PHP_EOL;
|
@@ -82,11 +82,11 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
82 |
// Configure OAuth2 access token for authorization: oauth2
|
83 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
84 |
|
85 |
-
$
|
86 |
$location_id = "location_id_example"; // string | The ID of the location to list bank accounts for.
|
87 |
|
88 |
try {
|
89 |
-
$result = $
|
90 |
print_r($result);
|
91 |
} catch (Exception $e) {
|
92 |
echo 'Exception when calling V1TransactionsApi->listBankAccounts: ', $e->getMessage(), PHP_EOL;
|
@@ -130,14 +130,14 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
130 |
// Configure OAuth2 access token for authorization: oauth2
|
131 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
132 |
|
133 |
-
$
|
134 |
$location_id = "location_id_example"; // string | The ID of the location to list online store orders for.
|
135 |
$order = "order_example"; // string | TThe order in which payments are listed in the response.
|
136 |
$limit = 56; // int | The maximum number of payments to return in a single response. This value cannot exceed 200.
|
137 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
138 |
|
139 |
try {
|
140 |
-
$result = $
|
141 |
print_r($result);
|
142 |
} catch (Exception $e) {
|
143 |
echo 'Exception when calling V1TransactionsApi->listOrders: ', $e->getMessage(), PHP_EOL;
|
@@ -184,7 +184,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
184 |
// Configure OAuth2 access token for authorization: oauth2
|
185 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
186 |
|
187 |
-
$
|
188 |
$location_id = "location_id_example"; // string | The ID of the location to list payments for. If you specify me, this endpoint returns payments aggregated from all of the business's locations.
|
189 |
$order = "order_example"; // string | The order in which payments are listed in the response.
|
190 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
@@ -194,7 +194,7 @@ $batch_token = "batch_token_example"; // string | A pagination cursor to retriev
|
|
194 |
$include_partial = true; // bool | Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed.
|
195 |
|
196 |
try {
|
197 |
-
$result = $
|
198 |
print_r($result);
|
199 |
} catch (Exception $e) {
|
200 |
echo 'Exception when calling V1TransactionsApi->listPayments: ', $e->getMessage(), PHP_EOL;
|
@@ -244,7 +244,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
244 |
// Configure OAuth2 access token for authorization: oauth2
|
245 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
246 |
|
247 |
-
$
|
248 |
$location_id = "location_id_example"; // string | The ID of the location to list refunds for.
|
249 |
$order = "order_example"; // string | TThe order in which payments are listed in the response.
|
250 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
@@ -253,7 +253,7 @@ $limit = 56; // int | The approximate number of refunds to return in a single re
|
|
253 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
254 |
|
255 |
try {
|
256 |
-
$result = $
|
257 |
print_r($result);
|
258 |
} catch (Exception $e) {
|
259 |
echo 'Exception when calling V1TransactionsApi->listRefunds: ', $e->getMessage(), PHP_EOL;
|
@@ -302,7 +302,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
302 |
// Configure OAuth2 access token for authorization: oauth2
|
303 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
304 |
|
305 |
-
$
|
306 |
$location_id = "location_id_example"; // string | The ID of the location to list settlements for. If you specify me, this endpoint returns payments aggregated from all of the business's locations.
|
307 |
$order = "order_example"; // string | TThe order in which payments are listed in the response.
|
308 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
@@ -312,7 +312,7 @@ $status = "status_example"; // string | Provide this parameter to retrieve only
|
|
312 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
313 |
|
314 |
try {
|
315 |
-
$result = $
|
316 |
print_r($result);
|
317 |
} catch (Exception $e) {
|
318 |
echo 'Exception when calling V1TransactionsApi->listSettlements: ', $e->getMessage(), PHP_EOL;
|
@@ -362,12 +362,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
362 |
// Configure OAuth2 access token for authorization: oauth2
|
363 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
364 |
|
365 |
-
$
|
366 |
$location_id = "location_id_example"; // string | The ID of the bank account's associated location.
|
367 |
$bank_account_id = "bank_account_id_example"; // string | The bank account's Square-issued ID. You obtain this value from Settlement objects returned.
|
368 |
|
369 |
try {
|
370 |
-
$result = $
|
371 |
print_r($result);
|
372 |
} catch (Exception $e) {
|
373 |
echo 'Exception when calling V1TransactionsApi->retrieveBankAccount: ', $e->getMessage(), PHP_EOL;
|
@@ -412,12 +412,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
412 |
// Configure OAuth2 access token for authorization: oauth2
|
413 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
414 |
|
415 |
-
$
|
416 |
$location_id = "location_id_example"; // string | The ID of the order's associated location.
|
417 |
$order_id = "order_id_example"; // string | The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint
|
418 |
|
419 |
try {
|
420 |
-
$result = $
|
421 |
print_r($result);
|
422 |
} catch (Exception $e) {
|
423 |
echo 'Exception when calling V1TransactionsApi->retrieveOrder: ', $e->getMessage(), PHP_EOL;
|
@@ -462,12 +462,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
462 |
// Configure OAuth2 access token for authorization: oauth2
|
463 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
464 |
|
465 |
-
$
|
466 |
$location_id = "location_id_example"; // string | The ID of the payment's associated location.
|
467 |
$payment_id = "payment_id_example"; // string | The Square-issued payment ID. payment_id comes from Payment objects returned by the List Payments endpoint, Settlement objects returned by the List Settlements endpoint, or Refund objects returned by the List Refunds endpoint.
|
468 |
|
469 |
try {
|
470 |
-
$result = $
|
471 |
print_r($result);
|
472 |
} catch (Exception $e) {
|
473 |
echo 'Exception when calling V1TransactionsApi->retrievePayment: ', $e->getMessage(), PHP_EOL;
|
@@ -512,12 +512,12 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
512 |
// Configure OAuth2 access token for authorization: oauth2
|
513 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
514 |
|
515 |
-
$
|
516 |
$location_id = "location_id_example"; // string | The ID of the settlements's associated location.
|
517 |
$settlement_id = "settlement_id_example"; // string | The settlement's Square-issued ID. You obtain this value from Settlement objects returned by the List Settlements endpoint.
|
518 |
|
519 |
try {
|
520 |
-
$result = $
|
521 |
print_r($result);
|
522 |
} catch (Exception $e) {
|
523 |
echo 'Exception when calling V1TransactionsApi->retrieveSettlement: ', $e->getMessage(), PHP_EOL;
|
@@ -562,13 +562,13 @@ require_once(__DIR__ . '/vendor/autoload.php');
|
|
562 |
// Configure OAuth2 access token for authorization: oauth2
|
563 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
564 |
|
565 |
-
$
|
566 |
$location_id = "location_id_example"; // string | The ID of the order's associated location.
|
567 |
$order_id = "order_id_example"; // string | The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint
|
568 |
$body = new \SquareConnect\Model\V1UpdateOrderRequest(); // \SquareConnect\Model\V1UpdateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
569 |
|
570 |
try {
|
571 |
-
$result = $
|
572 |
print_r($result);
|
573 |
} catch (Exception $e) {
|
574 |
echo 'Exception when calling V1TransactionsApi->updateOrder: ', $e->getMessage(), PHP_EOL;
|
32 |
// Configure OAuth2 access token for authorization: oauth2
|
33 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
34 |
|
35 |
+
$apiInstance = new SquareConnect\Api\V1TransactionsApi();
|
36 |
$location_id = "location_id_example"; // string | The ID of the original payment's associated location.
|
37 |
$body = new \SquareConnect\Model\V1CreateRefundRequest(); // \SquareConnect\Model\V1CreateRefundRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
38 |
|
39 |
try {
|
40 |
+
$result = $apiInstance->createRefund($location_id, $body);
|
41 |
print_r($result);
|
42 |
} catch (Exception $e) {
|
43 |
echo 'Exception when calling V1TransactionsApi->createRefund: ', $e->getMessage(), PHP_EOL;
|
82 |
// Configure OAuth2 access token for authorization: oauth2
|
83 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
84 |
|
85 |
+
$apiInstance = new SquareConnect\Api\V1TransactionsApi();
|
86 |
$location_id = "location_id_example"; // string | The ID of the location to list bank accounts for.
|
87 |
|
88 |
try {
|
89 |
+
$result = $apiInstance->listBankAccounts($location_id);
|
90 |
print_r($result);
|
91 |
} catch (Exception $e) {
|
92 |
echo 'Exception when calling V1TransactionsApi->listBankAccounts: ', $e->getMessage(), PHP_EOL;
|
130 |
// Configure OAuth2 access token for authorization: oauth2
|
131 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
132 |
|
133 |
+
$apiInstance = new SquareConnect\Api\V1TransactionsApi();
|
134 |
$location_id = "location_id_example"; // string | The ID of the location to list online store orders for.
|
135 |
$order = "order_example"; // string | TThe order in which payments are listed in the response.
|
136 |
$limit = 56; // int | The maximum number of payments to return in a single response. This value cannot exceed 200.
|
137 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
138 |
|
139 |
try {
|
140 |
+
$result = $apiInstance->listOrders($location_id, $order, $limit, $batch_token);
|
141 |
print_r($result);
|
142 |
} catch (Exception $e) {
|
143 |
echo 'Exception when calling V1TransactionsApi->listOrders: ', $e->getMessage(), PHP_EOL;
|
184 |
// Configure OAuth2 access token for authorization: oauth2
|
185 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
186 |
|
187 |
+
$apiInstance = new SquareConnect\Api\V1TransactionsApi();
|
188 |
$location_id = "location_id_example"; // string | The ID of the location to list payments for. If you specify me, this endpoint returns payments aggregated from all of the business's locations.
|
189 |
$order = "order_example"; // string | The order in which payments are listed in the response.
|
190 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
194 |
$include_partial = true; // bool | Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed.
|
195 |
|
196 |
try {
|
197 |
+
$result = $apiInstance->listPayments($location_id, $order, $begin_time, $end_time, $limit, $batch_token, $include_partial);
|
198 |
print_r($result);
|
199 |
} catch (Exception $e) {
|
200 |
echo 'Exception when calling V1TransactionsApi->listPayments: ', $e->getMessage(), PHP_EOL;
|
244 |
// Configure OAuth2 access token for authorization: oauth2
|
245 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
246 |
|
247 |
+
$apiInstance = new SquareConnect\Api\V1TransactionsApi();
|
248 |
$location_id = "location_id_example"; // string | The ID of the location to list refunds for.
|
249 |
$order = "order_example"; // string | TThe order in which payments are listed in the response.
|
250 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
253 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
254 |
|
255 |
try {
|
256 |
+
$result = $apiInstance->listRefunds($location_id, $order, $begin_time, $end_time, $limit, $batch_token);
|
257 |
print_r($result);
|
258 |
} catch (Exception $e) {
|
259 |
echo 'Exception when calling V1TransactionsApi->listRefunds: ', $e->getMessage(), PHP_EOL;
|
302 |
// Configure OAuth2 access token for authorization: oauth2
|
303 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
304 |
|
305 |
+
$apiInstance = new SquareConnect\Api\V1TransactionsApi();
|
306 |
$location_id = "location_id_example"; // string | The ID of the location to list settlements for. If you specify me, this endpoint returns payments aggregated from all of the business's locations.
|
307 |
$order = "order_example"; // string | TThe order in which payments are listed in the response.
|
308 |
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
312 |
$batch_token = "batch_token_example"; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
313 |
|
314 |
try {
|
315 |
+
$result = $apiInstance->listSettlements($location_id, $order, $begin_time, $end_time, $limit, $status, $batch_token);
|
316 |
print_r($result);
|
317 |
} catch (Exception $e) {
|
318 |
echo 'Exception when calling V1TransactionsApi->listSettlements: ', $e->getMessage(), PHP_EOL;
|
362 |
// Configure OAuth2 access token for authorization: oauth2
|
363 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
364 |
|
365 |
+
$apiInstance = new SquareConnect\Api\V1TransactionsApi();
|
366 |
$location_id = "location_id_example"; // string | The ID of the bank account's associated location.
|
367 |
$bank_account_id = "bank_account_id_example"; // string | The bank account's Square-issued ID. You obtain this value from Settlement objects returned.
|
368 |
|
369 |
try {
|
370 |
+
$result = $apiInstance->retrieveBankAccount($location_id, $bank_account_id);
|
371 |
print_r($result);
|
372 |
} catch (Exception $e) {
|
373 |
echo 'Exception when calling V1TransactionsApi->retrieveBankAccount: ', $e->getMessage(), PHP_EOL;
|
412 |
// Configure OAuth2 access token for authorization: oauth2
|
413 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
414 |
|
415 |
+
$apiInstance = new SquareConnect\Api\V1TransactionsApi();
|
416 |
$location_id = "location_id_example"; // string | The ID of the order's associated location.
|
417 |
$order_id = "order_id_example"; // string | The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint
|
418 |
|
419 |
try {
|
420 |
+
$result = $apiInstance->retrieveOrder($location_id, $order_id);
|
421 |
print_r($result);
|
422 |
} catch (Exception $e) {
|
423 |
echo 'Exception when calling V1TransactionsApi->retrieveOrder: ', $e->getMessage(), PHP_EOL;
|
462 |
// Configure OAuth2 access token for authorization: oauth2
|
463 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
464 |
|
465 |
+
$apiInstance = new SquareConnect\Api\V1TransactionsApi();
|
466 |
$location_id = "location_id_example"; // string | The ID of the payment's associated location.
|
467 |
$payment_id = "payment_id_example"; // string | The Square-issued payment ID. payment_id comes from Payment objects returned by the List Payments endpoint, Settlement objects returned by the List Settlements endpoint, or Refund objects returned by the List Refunds endpoint.
|
468 |
|
469 |
try {
|
470 |
+
$result = $apiInstance->retrievePayment($location_id, $payment_id);
|
471 |
print_r($result);
|
472 |
} catch (Exception $e) {
|
473 |
echo 'Exception when calling V1TransactionsApi->retrievePayment: ', $e->getMessage(), PHP_EOL;
|
512 |
// Configure OAuth2 access token for authorization: oauth2
|
513 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
514 |
|
515 |
+
$apiInstance = new SquareConnect\Api\V1TransactionsApi();
|
516 |
$location_id = "location_id_example"; // string | The ID of the settlements's associated location.
|
517 |
$settlement_id = "settlement_id_example"; // string | The settlement's Square-issued ID. You obtain this value from Settlement objects returned by the List Settlements endpoint.
|
518 |
|
519 |
try {
|
520 |
+
$result = $apiInstance->retrieveSettlement($location_id, $settlement_id);
|
521 |
print_r($result);
|
522 |
} catch (Exception $e) {
|
523 |
echo 'Exception when calling V1TransactionsApi->retrieveSettlement: ', $e->getMessage(), PHP_EOL;
|
562 |
// Configure OAuth2 access token for authorization: oauth2
|
563 |
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
564 |
|
565 |
+
$apiInstance = new SquareConnect\Api\V1TransactionsApi();
|
566 |
$location_id = "location_id_example"; // string | The ID of the order's associated location.
|
567 |
$order_id = "order_id_example"; // string | The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint
|
568 |
$body = new \SquareConnect\Model\V1UpdateOrderRequest(); // \SquareConnect\Model\V1UpdateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
569 |
|
570 |
try {
|
571 |
+
$result = $apiInstance->updateOrder($location_id, $order_id, $body);
|
572 |
print_r($result);
|
573 |
} catch (Exception $e) {
|
574 |
echo 'Exception when calling V1TransactionsApi->updateOrder: ', $e->getMessage(), PHP_EOL;
|
vendor/square/connect/docs/Model/BalancePaymentDetails.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# BalancePaymentDetails
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Reflects the current status of a balance payment.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**account_id** | getAccountId() | setAccountId($value) | **string** | ID for the account used to fund the payment. | [optional]
|
11 |
+
**status** | getStatus() | setStatus($value) | **string** | The balance payment’s current state. Can be `COMPLETED` or `FAILED`. | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/BatchRetrieveCatalogObjectsRequest.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
**object_ids** | getObjectIds() | setObjectIds($value) | **string[]** | The IDs of the [CatalogObject](#type-catalogobject)s to be retrieved. |
|
11 |
-
**include_related_objects** | getIncludeRelatedObjects() | setIncludeRelatedObjects($value) | **bool** | If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem),
|
12 |
|
13 |
Note: All properties are protected and only accessed via getters and setters.
|
14 |
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
**object_ids** | getObjectIds() | setObjectIds($value) | **string[]** | The IDs of the [CatalogObject](#type-catalogobject)s to be retrieved. |
|
11 |
+
**include_related_objects** | getIncludeRelatedObjects() | setIncludeRelatedObjects($value) | **bool** | If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. | [optional]
|
12 |
|
13 |
Note: All properties are protected and only accessed via getters and setters.
|
14 |
|
vendor/square/connect/docs/Model/BatchRetrieveOrdersResponse.md
CHANGED
@@ -7,9 +7,8 @@ Defines the fields that are included in the response body of a request to the Ba
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**orders** | getOrders() | setOrders($value) | [**\SquareConnect\Model\Order[]**](Order.md) | The requested orders. This will omit any requested orders that do not exist
|
11 |
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Any errors that occurred during the request. | [optional]
|
12 |
-
**unconvertible_transaction_ids** | getUnconvertibleTransactionIds() | setUnconvertibleTransactionIds($value) | **string[]** | List of transaction ids within the requested set of ids that encountered transformation issues when being converted to an Order. | [optional]
|
13 |
|
14 |
Note: All properties are protected and only accessed via getters and setters.
|
15 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**orders** | getOrders() | setOrders($value) | [**\SquareConnect\Model\Order[]**](Order.md) | The requested orders. This will omit any requested orders that do not exist. | [optional]
|
11 |
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Any errors that occurred during the request. | [optional]
|
|
|
12 |
|
13 |
Note: All properties are protected and only accessed via getters and setters.
|
14 |
|
vendor/square/connect/docs/Model/CancelPaymentByIdempotencyKeyRequest.md
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CancelPaymentByIdempotencyKeyRequest
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Specifies idempotency key of a payment to cancel.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**idempotency_key** | getIdempotencyKey() | setIdempotencyKey($value) | **string** | `idempotency_key` identifying the payment to be canceled. |
|
11 |
+
|
12 |
+
Note: All properties are protected and only accessed via getters and setters.
|
13 |
+
|
14 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
15 |
+
|
vendor/square/connect/docs/Model/CancelPaymentByIdempotencyKeyResponse.md
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CancelPaymentByIdempotencyKeyResponse
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Return value from the [CancelPaymentByIdempotencyKey](#endpoint-payments-cancelpaymentbyidempotencykey) endpoint. On success, `errors` will be empty.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Any errors that occurred during the request. | [optional]
|
11 |
+
|
12 |
+
Note: All properties are protected and only accessed via getters and setters.
|
13 |
+
|
14 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
15 |
+
|
vendor/square/connect/docs/Model/CancelPaymentRequest.md
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CancelPaymentRequest
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Cancels a payment before it has been completed. Note: only payments created with `autocomplete` set to false can be canceled.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
|
11 |
+
Note: All properties are protected and only accessed via getters and setters.
|
12 |
+
|
13 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
14 |
+
|
vendor/square/connect/docs/Model/CancelPaymentResponse.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CancelPaymentResponse
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Return value from the [CancelPayment](#endpoint-payments-cancelpayment) endpoint.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Information on errors encountered during the request. | [optional]
|
11 |
+
**payment** | getPayment() | setPayment($value) | [**\SquareConnect\Model\Payment**](Payment.md) | The successfully canceled `Payment` object. | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/CaptureTransactionResponse.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Defines the fields that are included in the response body of a request to the CaptureTransaction endpoint.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Defines the fields that are included in the response body of a request to the [CaptureTransaction](#endpoint-capturetransaction) endpoint.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
vendor/square/connect/docs/Model/Card.md
CHANGED
@@ -14,7 +14,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
14 |
**exp_year** | getExpYear() | setExpYear($value) | **int** | The four-digit year of the card's expiration date. | [optional]
|
15 |
**cardholder_name** | getCardholderName() | setCardholderName($value) | **string** | The name of the cardholder. | [optional]
|
16 |
**billing_address** | getBillingAddress() | setBillingAddress($value) | [**\SquareConnect\Model\Address**](Address.md) | The billing address for this card. | [optional]
|
17 |
-
**fingerprint** | getFingerprint() | setFingerprint($value) | **string** |
|
18 |
|
19 |
Note: All properties are protected and only accessed via getters and setters.
|
20 |
|
14 |
**exp_year** | getExpYear() | setExpYear($value) | **int** | The four-digit year of the card's expiration date. | [optional]
|
15 |
**cardholder_name** | getCardholderName() | setCardholderName($value) | **string** | The name of the cardholder. | [optional]
|
16 |
**billing_address** | getBillingAddress() | setBillingAddress($value) | [**\SquareConnect\Model\Address**](Address.md) | The billing address for this card. | [optional]
|
17 |
+
**fingerprint** | getFingerprint() | setFingerprint($value) | **string** | A unique, Square-assigned ID that identifies the card across multiple locations and applications for a single Square account. | [optional]
|
18 |
|
19 |
Note: All properties are protected and only accessed via getters and setters.
|
20 |
|
vendor/square/connect/docs/Model/CardPaymentDetails.md
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CardPaymentDetails
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Reflects the current status of a card payment.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**status** | getStatus() | setStatus($value) | **string** | The card payment's current state. It can be one of: `AUTHORIZED`, `CAPTURED`, `VOIDED`, `FAILED`. | [optional]
|
11 |
+
**card** | getCard() | setCard($value) | [**\SquareConnect\Model\Card**](Card.md) | The credit card's non-confidential details. | [optional]
|
12 |
+
**entry_method** | getEntryMethod() | setEntryMethod($value) | **string** | The method used to enter the card's details for the payment. Can be `KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`. | [optional]
|
13 |
+
**cvv_status** | getCvvStatus() | setCvvStatus($value) | **string** | Status code returned from the Card Verification Value (CVV) check. | [optional]
|
14 |
+
**avs_status** | getAvsStatus() | setAvsStatus($value) | **string** | Status code returned from the Address Verification System (AVS) check. | [optional]
|
15 |
+
**auth_result_code** | getAuthResultCode() | setAuthResultCode($value) | **string** | Status code returned by the card issuer that describes the payment's authorization status. | [optional]
|
16 |
+
**application_identifier** | getApplicationIdentifier() | setApplicationIdentifier($value) | **string** | For EMV payments, identifies the EMV application used for the payment | [optional]
|
17 |
+
**application_name** | getApplicationName() | setApplicationName($value) | **string** | For EMV payments, the human-readable name of the EMV application used for the payment. | [optional]
|
18 |
+
**application_cryptogram** | getApplicationCryptogram() | setApplicationCryptogram($value) | **string** | For EMV payments, the cryptogram generated for the payment. | [optional]
|
19 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Information on errors encountered during the request. | [optional]
|
20 |
+
|
21 |
+
Note: All properties are protected and only accessed via getters and setters.
|
22 |
+
|
23 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
24 |
+
|
vendor/square/connect/docs/Model/CatalogInfoResponse.md
CHANGED
@@ -9,6 +9,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | The set of [Error](#type-error)s encountered. | [optional]
|
11 |
**limits** | getLimits() | setLimits($value) | [**\SquareConnect\Model\CatalogInfoResponseLimits**](CatalogInfoResponseLimits.md) | | [optional]
|
|
|
12 |
|
13 |
Note: All properties are protected and only accessed via getters and setters.
|
14 |
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | The set of [Error](#type-error)s encountered. | [optional]
|
11 |
**limits** | getLimits() | setLimits($value) | [**\SquareConnect\Model\CatalogInfoResponseLimits**](CatalogInfoResponseLimits.md) | | [optional]
|
12 |
+
**standard_unit_description_group** | getStandardUnitDescriptionGroup() | setStandardUnitDescriptionGroup($value) | [**\SquareConnect\Model\StandardUnitDescriptionGroup**](StandardUnitDescriptionGroup.md) | Names and abbreviations for standard units. | [optional]
|
13 |
|
14 |
Note: All properties are protected and only accessed via getters and setters.
|
15 |
|
vendor/square/connect/docs/Model/CatalogItem.md
CHANGED
@@ -17,10 +17,10 @@ Name | Getter | Setter | Type | Description | Notes
|
|
17 |
**category_id** | getCategoryId() | setCategoryId($value) | **string** | The ID of the item's category, if any. | [optional]
|
18 |
**tax_ids** | getTaxIds() | setTaxIds($value) | **string[]** | A set of IDs indicating the [CatalogTax](#type-catalogtax)es that are enabled for this item. When updating an item, any taxes listed here will be added to the item. [CatalogTax](#type-catalogtax)es may also be added to or deleted from an item using `UpdateItemTaxes`. | [optional]
|
19 |
**modifier_list_info** | getModifierListInfo() | setModifierListInfo($value) | [**\SquareConnect\Model\CatalogItemModifierListInfo[]**](CatalogItemModifierListInfo.md) | A set of [CatalogItemModifierListInfo](#type-catalogitemmodifierlistinfo) objects representing the modifier lists that apply to this item, along with the overrides and min and max limits that are specific to this item. [CatalogModifierList](#type-catalogmodifierlist)s may also be added to or deleted from an item using `UpdateItemModifierLists`. | [optional]
|
20 |
-
**
|
21 |
-
**
|
22 |
-
**product_type** | getProductType() | setProductType($value) | **string** | The product type of the item. May not be changed once an item has been created. Only items of product type `REGULAR` may be created by this API; items with other product types are read-only. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values | [optional]
|
23 |
**skip_modifier_screen** | getSkipModifierScreen() | setSkipModifierScreen($value) | **bool** | If `false`, the Square Point of Sale app will present the [CatalogItem](#type-catalogitem)'s details screen immediately, allowing the merchant to choose [CatalogModifier](#type-catalogmodifier)s before adding the item to the cart. This is the default behavior. If `true`, the Square Point of Sale app will immediately add the item to the cart with the pre-selected modifiers, and merchants can edit modifiers by drilling down onto the item's details. Third-party clients are encouraged to implement similar behaviors. | [optional]
|
|
|
24 |
|
25 |
Note: All properties are protected and only accessed via getters and setters.
|
26 |
|
17 |
**category_id** | getCategoryId() | setCategoryId($value) | **string** | The ID of the item's category, if any. | [optional]
|
18 |
**tax_ids** | getTaxIds() | setTaxIds($value) | **string[]** | A set of IDs indicating the [CatalogTax](#type-catalogtax)es that are enabled for this item. When updating an item, any taxes listed here will be added to the item. [CatalogTax](#type-catalogtax)es may also be added to or deleted from an item using `UpdateItemTaxes`. | [optional]
|
19 |
**modifier_list_info** | getModifierListInfo() | setModifierListInfo($value) | [**\SquareConnect\Model\CatalogItemModifierListInfo[]**](CatalogItemModifierListInfo.md) | A set of [CatalogItemModifierListInfo](#type-catalogitemmodifierlistinfo) objects representing the modifier lists that apply to this item, along with the overrides and min and max limits that are specific to this item. [CatalogModifierList](#type-catalogmodifierlist)s may also be added to or deleted from an item using `UpdateItemModifierLists`. | [optional]
|
20 |
+
**variations** | getVariations() | setVariations($value) | [**\SquareConnect\Model\CatalogObject[]**](CatalogObject.md) | A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. Maximum: 250 item variations | [optional]
|
21 |
+
**product_type** | getProductType() | setProductType($value) | **string** | The product type of the item. May not be changed once an item has been created. Only items of product type `REGULAR` or `APPOINTMENTS_SERVICE` may be created by this API; items with other product types are read-only. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values | [optional]
|
|
|
22 |
**skip_modifier_screen** | getSkipModifierScreen() | setSkipModifierScreen($value) | **bool** | If `false`, the Square Point of Sale app will present the [CatalogItem](#type-catalogitem)'s details screen immediately, allowing the merchant to choose [CatalogModifier](#type-catalogmodifier)s before adding the item to the cart. This is the default behavior. If `true`, the Square Point of Sale app will immediately add the item to the cart with the pre-selected modifiers, and merchants can edit modifiers by drilling down onto the item's details. Third-party clients are encouraged to implement similar behaviors. | [optional]
|
23 |
+
**item_options** | getItemOptions() | setItemOptions($value) | [**\SquareConnect\Model\CatalogItemOptionForItem[]**](CatalogItemOptionForItem.md) | List of item options IDs for this item. Used to manage and group item variations in a specified order. Maximum: 6 item options. | [optional]
|
24 |
|
25 |
Note: All properties are protected and only accessed via getters and setters.
|
26 |
|
vendor/square/connect/docs/Model/CatalogItemOption.md
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CatalogItemOption
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
A group of variations for a [CatalogItem](#type-catalogitem)'s.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**name** | getName() | setName($value) | **string** | The item option's display name for the seller. Must be unique across all item options. Searchable. | [optional]
|
11 |
+
**display_name** | getDisplayName() | setDisplayName($value) | **string** | The item option's display name for the customer. Searchable. | [optional]
|
12 |
+
**description** | getDescription() | setDescription($value) | **string** | The item option's human-readable description. Displays for in the Square Point of Sale app for the seller and in the Online Store or on receipts for the buyer. | [optional]
|
13 |
+
**show_colors** | getShowColors() | setShowColors($value) | **bool** | If true, display colors for entries in `values` when present. | [optional]
|
14 |
+
**values** | getValues() | setValues($value) | [**\SquareConnect\Model\CatalogObject[]**](CatalogObject.md) | A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemOptionValue](#type-catalogitemoptionvalue)s for this item. | [optional]
|
15 |
+
**item_count** | getItemCount() | setItemCount($value) | **int** | The number of [CatalogItem](#type-catalogitem)s currently associated with this item option. Present only if the `include_counts` was specified in the request. Any count over 100 will be returned as `100`. | [optional]
|
16 |
+
|
17 |
+
Note: All properties are protected and only accessed via getters and setters.
|
18 |
+
|
19 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
20 |
+
|
vendor/square/connect/docs/Model/CatalogItemOptionForItem.md
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CatalogItemOptionForItem
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
A list of item option values that can be assigned to item variations. For example, a t-shirt item may offer a color option or a size option.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**item_option_id** | getItemOptionId() | setItemOptionId($value) | **string** | The unique id of the item option, used to form the dimensions of the item option matrix in a specified order. | [optional]
|
11 |
+
|
12 |
+
Note: All properties are protected and only accessed via getters and setters.
|
13 |
+
|
14 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
15 |
+
|
vendor/square/connect/docs/Model/CatalogItemOptionValue.md
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CatalogItemOptionValue
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
An enumerated value that can link a [CatalogItemVariation(#type-catalogitemvariation) to an item option as one of its item option values.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**item_option_id** | getItemOptionId() | setItemOptionId($value) | **string** | Unique ID of the associated item option. | [optional]
|
11 |
+
**name** | getName() | setName($value) | **string** | Name of this item option value. Searchable. | [optional]
|
12 |
+
**description** | getDescription() | setDescription($value) | **string** | The option value's human-readable description. | [optional]
|
13 |
+
**color** | getColor() | setColor($value) | **string** | The HTML color for this value in the format #FFRRGGBB or #RRGGBB (e.g., \"#ff8d4e85\"). Only displayed if parent Item Option's `show_colors` flag is enabled. value. | [optional]
|
14 |
+
**ordinal** | getOrdinal() | setOrdinal($value) | **int** | Determines where this option value appears in a list of option values. | [optional]
|
15 |
+
**item_variation_count** | getItemVariationCount() | setItemVariationCount($value) | **int** | The number of [CatalogItemVariation(#type-catalogitemvariation)s that currently make use of this Item Option value. Present only if `retrieve_counts` was specified on the request used to retrieve the parent Item Option of this value. Maximum: 100 counts. | [optional]
|
16 |
+
|
17 |
+
Note: All properties are protected and only accessed via getters and setters.
|
18 |
+
|
19 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
20 |
+
|
vendor/square/connect/docs/Model/CatalogItemOptionValueForItemVariation.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CatalogItemOptionValueForItemVariation
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
A [CatalogItemOptionValue](#type-catalogitemoptionvalue) links an item variation to an item option as an item option value. For example, a t-shirt item may offer a color option and a size option. An item option value would represent each variation of t-shirt: For example, “Color:Red, Size:Small” or “Color:Blue, Size:Medium”.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**item_option_id** | getItemOptionId() | setItemOptionId($value) | **string** | The unique id of an item option. | [optional]
|
11 |
+
**item_option_value_id** | getItemOptionValueId() | setItemOptionValueId($value) | **string** | The unique id of the selected value for the item option. | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/CatalogItemProductType.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
The type of a [CatalogItem](#type-catalogitem). Connect V2 only allows the creation of `REGULAR` items.
|
6 |
|
7 |
## Properties
|
8 |
Name | Type
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
The type of a [CatalogItem](#type-catalogitem). Connect V2 only allows the creation of `REGULAR` or `APPOINTMENTS_SERVICE` items.
|
6 |
|
7 |
## Properties
|
8 |
Name | Type
|
vendor/square/connect/docs/Model/CatalogItemVariation.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
An item variation (i.e., product) in the Catalog object model.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
@@ -20,6 +20,8 @@ Name | Getter | Setter | Type | Description | Notes
|
|
20 |
**inventory_alert_threshold** | getInventoryAlertThreshold() | setInventoryAlertThreshold($value) | **int** | If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type` is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard. This value is always an integer. | [optional]
|
21 |
**user_data** | getUserData() | setUserData($value) | **string** | Arbitrary user metadata to associate with the item variation. Cannot exceed 255 characters. Searchable. | [optional]
|
22 |
**service_duration** | getServiceDuration() | setServiceDuration($value) | **int** | If the [CatalogItem](#type-catalogitem) that owns this item variation is of type `APPOINTMENTS_SERVICE`, then this is the duration of the service in milliseconds. For example, a 30 minute appointment would have the value `1800000`, which is equal to 30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second). | [optional]
|
|
|
|
|
23 |
|
24 |
Note: All properties are protected and only accessed via getters and setters.
|
25 |
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
An item variation (i.e., product) in the Catalog object model. Each item may have a maximum of 250 item variations.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
20 |
**inventory_alert_threshold** | getInventoryAlertThreshold() | setInventoryAlertThreshold($value) | **int** | If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type` is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard. This value is always an integer. | [optional]
|
21 |
**user_data** | getUserData() | setUserData($value) | **string** | Arbitrary user metadata to associate with the item variation. Cannot exceed 255 characters. Searchable. | [optional]
|
22 |
**service_duration** | getServiceDuration() | setServiceDuration($value) | **int** | If the [CatalogItem](#type-catalogitem) that owns this item variation is of type `APPOINTMENTS_SERVICE`, then this is the duration of the service in milliseconds. For example, a 30 minute appointment would have the value `1800000`, which is equal to 30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second). | [optional]
|
23 |
+
**item_option_values** | getItemOptionValues() | setItemOptionValues($value) | [**\SquareConnect\Model\CatalogItemOptionValueForItemVariation[]**](CatalogItemOptionValueForItemVariation.md) | List of item option values associated with this item variation. Listed in the same order as the item options of the parent item. | [optional]
|
24 |
+
**measurement_unit_id** | getMeasurementUnitId() | setMeasurementUnitId($value) | **string** | ID of the ‘CatalogMeasurementUnit’ that is used to measure the quantity sold of this item variation. If left unset, the item will be sold in whole quantities. | [optional]
|
25 |
|
26 |
Note: All properties are protected and only accessed via getters and setters.
|
27 |
|
vendor/square/connect/docs/Model/CatalogMeasurementUnit.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CatalogMeasurementUnit
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**measurement_unit** | getMeasurementUnit() | setMeasurementUnit($value) | [**\SquareConnect\Model\MeasurementUnit**](MeasurementUnit.md) | Indicates the unit used to measure the quantity of a catalog item variation. | [optional]
|
11 |
+
**precision** | getPrecision() | setPrecision($value) | **int** | Represents the maximum number of positions allowed after the decimal in quantities measured with this unit. For example, if the precision is 2, then an itemization’s quantity can be 0.01, 0.12, etc. Min: 0 Max: 5 Default: 3 | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/CatalogObject.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Catalog
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
@@ -24,7 +24,13 @@ Name | Getter | Setter | Type | Description | Notes
|
|
24 |
**discount_data** | getDiscountData() | setDiscountData($value) | [**\SquareConnect\Model\CatalogDiscount**](CatalogDiscount.md) | Structured data for a [CatalogDiscount](#type-catalogdiscount), set for CatalogObjects of type `DISCOUNT`. | [optional]
|
25 |
**modifier_list_data** | getModifierListData() | setModifierListData($value) | [**\SquareConnect\Model\CatalogModifierList**](CatalogModifierList.md) | Structured data for a [CatalogModifierList](#type-catalogmodifierlist), set for CatalogObjects of type `MODIFIER_LIST`. | [optional]
|
26 |
**modifier_data** | getModifierData() | setModifierData($value) | [**\SquareConnect\Model\CatalogModifier**](CatalogModifier.md) | Structured data for a [CatalogModifier](#type-catalogmodifier), set for CatalogObjects of type `MODIFIER`. | [optional]
|
|
|
|
|
|
|
27 |
**image_data** | getImageData() | setImageData($value) | [**\SquareConnect\Model\CatalogImage**](CatalogImage.md) | Structured data for a [CatalogImage](#type-catalogimage), set for CatalogObjects of type `IMAGE`. | [optional]
|
|
|
|
|
|
|
28 |
|
29 |
Note: All properties are protected and only accessed via getters and setters.
|
30 |
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
24 |
**discount_data** | getDiscountData() | setDiscountData($value) | [**\SquareConnect\Model\CatalogDiscount**](CatalogDiscount.md) | Structured data for a [CatalogDiscount](#type-catalogdiscount), set for CatalogObjects of type `DISCOUNT`. | [optional]
|
25 |
**modifier_list_data** | getModifierListData() | setModifierListData($value) | [**\SquareConnect\Model\CatalogModifierList**](CatalogModifierList.md) | Structured data for a [CatalogModifierList](#type-catalogmodifierlist), set for CatalogObjects of type `MODIFIER_LIST`. | [optional]
|
26 |
**modifier_data** | getModifierData() | setModifierData($value) | [**\SquareConnect\Model\CatalogModifier**](CatalogModifier.md) | Structured data for a [CatalogModifier](#type-catalogmodifier), set for CatalogObjects of type `MODIFIER`. | [optional]
|
27 |
+
**time_period_data** | getTimePeriodData() | setTimePeriodData($value) | [**\SquareConnect\Model\CatalogTimePeriod**](CatalogTimePeriod.md) | Structured data for a [CatalogTimePeriod](#type-catalogtimeperiod), set for CatalogObjects of type `TIME_PERIOD`. | [optional]
|
28 |
+
**product_set_data** | getProductSetData() | setProductSetData($value) | [**\SquareConnect\Model\CatalogProductSet**](CatalogProductSet.md) | Structured data for a [CatalogProductSet](#type-catalogproductset), set for CatalogObjects of type `PRODUCT_SET`. | [optional]
|
29 |
+
**pricing_rule_data** | getPricingRuleData() | setPricingRuleData($value) | [**\SquareConnect\Model\CatalogPricingRule**](CatalogPricingRule.md) | Structured data for a [CatalogPricingRule](#type-catalogpricingrule), set for CatalogObjects of type `PRICING_RULE`. | [optional]
|
30 |
**image_data** | getImageData() | setImageData($value) | [**\SquareConnect\Model\CatalogImage**](CatalogImage.md) | Structured data for a [CatalogImage](#type-catalogimage), set for CatalogObjects of type `IMAGE`. | [optional]
|
31 |
+
**measurement_unit_data** | getMeasurementUnitData() | setMeasurementUnitData($value) | [**\SquareConnect\Model\CatalogMeasurementUnit**](CatalogMeasurementUnit.md) | Structured data for a [CatalogMeasurementUnit](#type-catalogmeasurementunit), set for CatalogObjects of type `MEASUREMENT_UNIT`. | [optional]
|
32 |
+
**item_option_data** | getItemOptionData() | setItemOptionData($value) | [**\SquareConnect\Model\CatalogItemOption**](CatalogItemOption.md) | Structured data for a [CatalogItemOption](#type-catalogitemoption), set for CatalogObjects of type `ITEM_OPTION`. | [optional]
|
33 |
+
**item_option_value_data** | getItemOptionValueData() | setItemOptionValueData($value) | [**\SquareConnect\Model\CatalogItemOptionValue**](CatalogItemOptionValue.md) | Structured data for a [CatalogItemOptionValue](#type-catalogitemoptionvalue), set for CatalogObjects of type `ITEM_OPTION_VAL`. | [optional]
|
34 |
|
35 |
Note: All properties are protected and only accessed via getters and setters.
|
36 |
|
vendor/square/connect/docs/Model/CatalogObjectType.md
CHANGED
@@ -15,6 +15,12 @@ Name | Type
|
|
15 |
**DISCOUNT** | string
|
16 |
**MODIFIER_LIST** | string
|
17 |
**MODIFIER** | string
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
Note: All properties are protected and only accessed via getters and setters.
|
20 |
|
15 |
**DISCOUNT** | string
|
16 |
**MODIFIER_LIST** | string
|
17 |
**MODIFIER** | string
|
18 |
+
**PRICING_RULE** | string
|
19 |
+
**PRODUCT_SET** | string
|
20 |
+
**TIME_PERIOD** | string
|
21 |
+
**MEASUREMENT_UNIT** | string
|
22 |
+
**ITEM_OPTION** | string
|
23 |
+
**ITEM_OPTION_VAL** | string
|
24 |
|
25 |
Note: All properties are protected and only accessed via getters and setters.
|
26 |
|
vendor/square/connect/docs/Model/CatalogPricingRule.md
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CatalogPricingRule
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Defines how prices are modified or set for items that match the pricing rule during the active time period.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**name** | getName() | setName($value) | **string** | User-defined name for the pricing rule. For example, \"Buy one get one free\" or \"10% off\". | [optional]
|
11 |
+
**time_period_ids** | getTimePeriodIds() | setTimePeriodIds($value) | **string[]** | Unique ID for the [CatalogTimePeriod](#type-catalogtimeperiod)s when this pricing rule is in effect. If left unset, the pricing rule is always in effect. | [optional]
|
12 |
+
**discount_id** | getDiscountId() | setDiscountId($value) | **string** | Unique ID for the [CatalogDiscount](#type-catalogdiscount) to take off the price of all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. | [optional]
|
13 |
+
**match_products_id** | getMatchProductsId() | setMatchProductsId($value) | **string** | Unique ID for the [CatalogProductSet](#type-catalogproductset) that will be matched by this rule. A match rule matches within the entire cart. | [optional]
|
14 |
+
**apply_products_id** | getApplyProductsId() | setApplyProductsId($value) | **string** | The [CatalogProductSet](#type-catalogproductset) to apply the pricing rule to within the set of matched products specified by `match_products_id`. An apply rule can only match once within the set of matched products. If left unset, the pricing rule will be applied to all products within the set of matched products. | [optional]
|
15 |
+
**exclude_products_id** | getExcludeProductsId() | setExcludeProductsId($value) | **string** | Identifies the [CatalogProductSet](#type-catalogproductset) to exclude from this pricing rule. An exclude rule matches within the subset of the cart that fits the match rules (the match set). An exclude rule can only match once in the match set. If not supplied, the pricing will be applied to all products in the match set. Other products retain their base price, or a price generated by other rules. | [optional]
|
16 |
+
**valid_from_date** | getValidFromDate() | setValidFromDate($value) | **string** | Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD). | [optional]
|
17 |
+
**valid_from_local_time** | getValidFromLocalTime() | setValidFromLocalTime($value) | **string** | Represents the local time the pricing rule should be valid from. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. | [optional]
|
18 |
+
**valid_until_date** | getValidUntilDate() | setValidUntilDate($value) | **string** | Represents the date the pricing rule will become inactive. Represented in RFC3339 full-date format (YYYY-MM-DD). | [optional]
|
19 |
+
**valid_until_local_time** | getValidUntilLocalTime() | setValidUntilLocalTime($value) | **string** | Represents the local time at which the pricing rule will become inactive. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. | [optional]
|
20 |
+
|
21 |
+
Note: All properties are protected and only accessed via getters and setters.
|
22 |
+
|
23 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
24 |
+
|
vendor/square/connect/docs/Model/CatalogProductSet.md
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CatalogProductSet
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Represents a collection of catalog objects for the purpose of applying a [PricingRule](#type-pricingrule). Including a catalog object will include all of its subtypes. For example, including a category in a product set will include all of its items and associated item variations in the product set. Including an item in a product set will also include its item variations.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**name** | getName() | setName($value) | **string** | User-defined name for the product set. For example, \"Clearance Items\" or \"Winter Sale Items\". | [optional]
|
11 |
+
**product_ids_any** | getProductIdsAny() | setProductIdsAny($value) | **string[]** | Unique IDs for any [CatalogObjects](#type-catalogobject)s to include in this product set. Any number of these catalog objects can be in an order for a pricing rule to apply. This can be used with `product_ids_all` in a parent [CatalogProductSet](#type-catalogproductset) to match groups of products for a bulk discount, such as a discount for an entree and side combo. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs. | [optional]
|
12 |
+
**product_ids_all** | getProductIdsAll() | setProductIdsAll($value) | **string[]** | Unique IDs for [CatalogObjects](#type-catalogobject) to include in this product set. All objects in this set must be included in an order for a pricing rule to apply. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs. | [optional]
|
13 |
+
**quantity_exact** | getQuantityExact() | setQuantityExact($value) | **int** | If set, there must be exactly this many items from `products_any` or `products_all` in the cart for the discount to apply. Cannot be combined with either `quantity_min` or `quantity_max`. | [optional]
|
14 |
+
**quantity_min** | getQuantityMin() | setQuantityMin($value) | **int** | If set, there must be at least this many items from `products_any` or `products_all` in a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if `quantity_exact`, `quantity_min` and `quantity_max` are all unspecified. | [optional]
|
15 |
+
**quantity_max** | getQuantityMax() | setQuantityMax($value) | **int** | If set, the pricing rule will apply to a maximum of this many items from `products_any` or `products_all`. | [optional]
|
16 |
+
**all_products** | getAllProducts() | setAllProducts($value) | **bool** | If set to `true`, the product set will include every item in the catalog. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. | [optional]
|
17 |
+
|
18 |
+
Note: All properties are protected and only accessed via getters and setters.
|
19 |
+
|
20 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
21 |
+
|
vendor/square/connect/docs/Model/CatalogQuery.md
CHANGED
@@ -14,6 +14,8 @@ Name | Getter | Setter | Type | Description | Notes
|
|
14 |
**text_query** | getTextQuery() | setTextQuery($value) | [**\SquareConnect\Model\CatalogQueryText**](CatalogQueryText.md) | A query that returns only objects whose searchable attributes contain all of the given keywords as prefixes. For example, if a [CatalogItem](#type-catalogitem) contains attributes `{\"name\": \"t-shirt\"}` and `{\"description\": \"Small, Purple\"}`, it will be matched by the query `{\"keywords\": [\"shirt\", \"sma\", \"purp\"]}`. | [optional]
|
15 |
**items_for_tax_query** | getItemsForTaxQuery() | setItemsForTaxQuery($value) | [**\SquareConnect\Model\CatalogQueryItemsForTax**](CatalogQueryItemsForTax.md) | A query that returns all [CatalogItem](#type-catalogitem)s that have any of the given [CatalogTax](#type-catalogtax)es enabled. | [optional]
|
16 |
**items_for_modifier_list_query** | getItemsForModifierListQuery() | setItemsForModifierListQuery($value) | [**\SquareConnect\Model\CatalogQueryItemsForModifierList**](CatalogQueryItemsForModifierList.md) | A query that returns all [CatalogItem](#type-catalogitem)s that have any of the given [CatalogModifierList](#type-catalogmodifierlist)s enabled. | [optional]
|
|
|
|
|
17 |
|
18 |
Note: All properties are protected and only accessed via getters and setters.
|
19 |
|
14 |
**text_query** | getTextQuery() | setTextQuery($value) | [**\SquareConnect\Model\CatalogQueryText**](CatalogQueryText.md) | A query that returns only objects whose searchable attributes contain all of the given keywords as prefixes. For example, if a [CatalogItem](#type-catalogitem) contains attributes `{\"name\": \"t-shirt\"}` and `{\"description\": \"Small, Purple\"}`, it will be matched by the query `{\"keywords\": [\"shirt\", \"sma\", \"purp\"]}`. | [optional]
|
15 |
**items_for_tax_query** | getItemsForTaxQuery() | setItemsForTaxQuery($value) | [**\SquareConnect\Model\CatalogQueryItemsForTax**](CatalogQueryItemsForTax.md) | A query that returns all [CatalogItem](#type-catalogitem)s that have any of the given [CatalogTax](#type-catalogtax)es enabled. | [optional]
|
16 |
**items_for_modifier_list_query** | getItemsForModifierListQuery() | setItemsForModifierListQuery($value) | [**\SquareConnect\Model\CatalogQueryItemsForModifierList**](CatalogQueryItemsForModifierList.md) | A query that returns all [CatalogItem](#type-catalogitem)s that have any of the given [CatalogModifierList](#type-catalogmodifierlist)s enabled. | [optional]
|
17 |
+
**items_for_item_options_query** | getItemsForItemOptionsQuery() | setItemsForItemOptionsQuery($value) | [**\SquareConnect\Model\CatalogQueryItemsForItemOptions**](CatalogQueryItemsForItemOptions.md) | A query that returns all [CatalogItem](#type-catalogitem)s that have all of the given [CatalogItemOption](#type-catalogitemoption)s. | [optional]
|
18 |
+
**item_variations_for_item_option_values_query** | getItemVariationsForItemOptionValuesQuery() | setItemVariationsForItemOptionValuesQuery($value) | [**\SquareConnect\Model\CatalogQueryItemVariationsForItemOptionValues**](CatalogQueryItemVariationsForItemOptionValues.md) | A query that returns all [CatalogItemVariation](#type-catalogitemvariations)s that have all of the given [CatalogItemOption](#type-catalogitemoption) values. | [optional]
|
19 |
|
20 |
Note: All properties are protected and only accessed via getters and setters.
|
21 |
|
vendor/square/connect/docs/Model/CatalogQueryItemVariationsForItemOptionValues.md
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CatalogQueryItemVariationsForItemOptionValues
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**item_option_value_ids** | getItemOptionValueIds() | setItemOptionValueIds($value) | **string[]** | A set of [CatalogItemOptionValue](#type-catalogitemoptionvalue) IDs to be used to find associated [CatalogItemVariation](#type-catalogitemvariation)s. All ItemVariations that contain all of the given Item Option Values (in any order) will be returned. | [optional]
|
11 |
+
|
12 |
+
Note: All properties are protected and only accessed via getters and setters.
|
13 |
+
|
14 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
15 |
+
|
vendor/square/connect/docs/Model/CatalogQueryItemsForItemOptions.md
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CatalogQueryItemsForItemOptions
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**item_option_ids** | getItemOptionIds() | setItemOptionIds($value) | **string[]** | A set of [CatalogItemOption](#type-catalogitemoption) IDs to be used to find associated [CatalogItem](#type-catalogitem)s. All Items that contain all of the given Item Options (in any order) will be returned. | [optional]
|
11 |
+
|
12 |
+
Note: All properties are protected and only accessed via getters and setters.
|
13 |
+
|
14 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
15 |
+
|
vendor/square/connect/docs/Model/CatalogTimePeriod.md
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CatalogTimePeriod
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Represents a time period - either a single period or a repeating period.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**event** | getEvent() | setEvent($value) | **string** | An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. | [optional]
|
11 |
+
|
12 |
+
Note: All properties are protected and only accessed via getters and setters.
|
13 |
+
|
14 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
15 |
+
|
vendor/square/connect/docs/Model/ChargeRequest.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Defines the parameters that can be included in the body of a request to the Charge endpoint.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
@@ -20,6 +20,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
20 |
**buyer_email_address** | getBuyerEmailAddress() | setBuyerEmailAddress($value) | **string** | The buyer's email address, if available. | [optional]
|
21 |
**order_id** | getOrderId() | setOrderId($value) | **string** | The ID of the order to associate with this transaction. If you provide this value, the `amount_money` value of your request must __exactly match__ the value of the order's `total_money` field. | [optional]
|
22 |
**additional_recipients** | getAdditionalRecipients() | setAdditionalRecipients($value) | [**\SquareConnect\Model\AdditionalRecipient[]**](AdditionalRecipient.md) | The basic primitive of multi-party transaction. The value is optional. The transaction facilitated by you can be split from here. If you provide this value, the `amount_money` value in your additional_recipients must not be more than 90% of the `amount_money` value in the charge request. The `location_id` must be the valid location of the app owner merchant. This field requires the `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission. This field is currently not supported in sandbox. | [optional]
|
|
|
23 |
|
24 |
Note: All properties are protected and only accessed via getters and setters.
|
25 |
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Defines the parameters that can be included in the body of a request to the [Charge](#endpoint-charge) endpoint. Deprecated - recommend using [CreatePayment](#endpoint-payments-createpayment)
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
20 |
**buyer_email_address** | getBuyerEmailAddress() | setBuyerEmailAddress($value) | **string** | The buyer's email address, if available. | [optional]
|
21 |
**order_id** | getOrderId() | setOrderId($value) | **string** | The ID of the order to associate with this transaction. If you provide this value, the `amount_money` value of your request must __exactly match__ the value of the order's `total_money` field. | [optional]
|
22 |
**additional_recipients** | getAdditionalRecipients() | setAdditionalRecipients($value) | [**\SquareConnect\Model\AdditionalRecipient[]**](AdditionalRecipient.md) | The basic primitive of multi-party transaction. The value is optional. The transaction facilitated by you can be split from here. If you provide this value, the `amount_money` value in your additional_recipients must not be more than 90% of the `amount_money` value in the charge request. The `location_id` must be the valid location of the app owner merchant. This field requires the `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission. This field is currently not supported in sandbox. | [optional]
|
23 |
+
**verification_token** | getVerificationToken() | setVerificationToken($value) | **string** | An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. | [optional]
|
24 |
|
25 |
Note: All properties are protected and only accessed via getters and setters.
|
26 |
|
vendor/square/connect/docs/Model/ChargeResponse.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Defines the fields that are included in the response body of a request to the Charge endpoint. One of `errors` or `transaction` is present in a given response (never both).
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Defines the fields that are included in the response body of a request to the [Charge](#endpoint-charge) endpoint. One of `errors` or `transaction` is present in a given response (never both).
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
vendor/square/connect/docs/Model/CompletePaymentRequest.md
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CompletePaymentRequest
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Completes a payment. By default, payments are set to autocomplete immediately after they are created. To complete payments manually, set `autocomplete` to false.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
|
11 |
+
Note: All properties are protected and only accessed via getters and setters.
|
12 |
+
|
13 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
14 |
+
|
vendor/square/connect/docs/Model/CompletePaymentResponse.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CompletePaymentResponse
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Return value from a [CompletePayment](#endpoint-payments-completepayment) call.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Information on errors encountered during the request | [optional]
|
11 |
+
**payment** | getPayment() | setPayment($value) | [**\SquareConnect\Model\Payment**](Payment.md) | The successfully completed `Payment`. | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/Coordinates.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Coordinates
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Latitude and longitude coordinates.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**latitude** | getLatitude() | setLatitude($value) | **float** | The coordinate's latitude expressed in degrees. | [optional]
|
11 |
+
**longitude** | getLongitude() | setLongitude($value) | **float** | The coordinate's longitude expressed in degrees. | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/CreateCustomerCardRequest.md
CHANGED
@@ -7,9 +7,10 @@ Defines the fields that are included in the request body of a request to the Cre
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**card_nonce** | getCardNonce() | setCardNonce($value) | **string** | A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/
|
11 |
**billing_address** | getBillingAddress() | setBillingAddress($value) | [**\SquareConnect\Model\Address**](Address.md) | Address information for the card on file. Only the `postal_code` field is required for payments in the US and Canada. | [optional]
|
12 |
-
**cardholder_name** | getCardholderName() | setCardholderName($value) | **string** | The
|
|
|
13 |
|
14 |
Note: All properties are protected and only accessed via getters and setters.
|
15 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**card_nonce** | getCardNonce() | setCardNonce($value) | **string** | A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/payment-form/payment-form-walkthrough) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card. |
|
11 |
**billing_address** | getBillingAddress() | setBillingAddress($value) | [**\SquareConnect\Model\Address**](Address.md) | Address information for the card on file. Only the `postal_code` field is required for payments in the US and Canada. | [optional]
|
12 |
+
**cardholder_name** | getCardholderName() | setCardholderName($value) | **string** | The full name printed on the credit card. | [optional]
|
13 |
+
**verification_token** | getVerificationToken() | setVerificationToken($value) | **string** | An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. | [optional]
|
14 |
|
15 |
Note: All properties are protected and only accessed via getters and setters.
|
16 |
|
vendor/square/connect/docs/Model/CreateOrderRequest.md
CHANGED
@@ -9,7 +9,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
**order** | getOrder() | setOrder($value) | [**\SquareConnect\Model\Order**](Order.md) | The order to create. If this field is set, then the only other top-level field that can be set is the idempotency_key. | [optional]
|
11 |
**idempotency_key** | getIdempotencyKey() | setIdempotencyKey($value) | **string** | A value you specify that uniquely identifies this order among orders you've created. If you're unsure whether a particular order was created successfully, you can reattempt it with the same idempotency key without worrying about creating duplicate orders. See [Idempotency](/basics/api101/idempotency) for more information. | [optional]
|
12 |
-
**reference_id** | getReferenceId() | setReferenceId($value) | **string** | __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters.
|
13 |
**line_items** | getLineItems() | setLineItems($value) | [**\SquareConnect\Model\CreateOrderRequestLineItem[]**](CreateOrderRequestLineItem.md) | __Deprecated__: Please set the line_items on the nested [order](#type-order) field instead. The line items to associate with this order. Each line item represents a different product to include in a purchase. | [optional]
|
14 |
**taxes** | getTaxes() | setTaxes($value) | [**\SquareConnect\Model\CreateOrderRequestTax[]**](CreateOrderRequestTax.md) | __Deprecated__: Please set the taxes on the nested [order](#type-order) field instead. The taxes to include on the order. | [optional]
|
15 |
**discounts** | getDiscounts() | setDiscounts($value) | [**\SquareConnect\Model\CreateOrderRequestDiscount[]**](CreateOrderRequestDiscount.md) | __Deprecated__: Please set the discounts on the nested [order](#type-order) field instead. The discounts to include on the order. | [optional]
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
**order** | getOrder() | setOrder($value) | [**\SquareConnect\Model\Order**](Order.md) | The order to create. If this field is set, then the only other top-level field that can be set is the idempotency_key. | [optional]
|
11 |
**idempotency_key** | getIdempotencyKey() | setIdempotencyKey($value) | **string** | A value you specify that uniquely identifies this order among orders you've created. If you're unsure whether a particular order was created successfully, you can reattempt it with the same idempotency key without worrying about creating duplicate orders. See [Idempotency](/basics/api101/idempotency) for more information. | [optional]
|
12 |
+
**reference_id** | getReferenceId() | setReferenceId($value) | **string** | __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. | [optional]
|
13 |
**line_items** | getLineItems() | setLineItems($value) | [**\SquareConnect\Model\CreateOrderRequestLineItem[]**](CreateOrderRequestLineItem.md) | __Deprecated__: Please set the line_items on the nested [order](#type-order) field instead. The line items to associate with this order. Each line item represents a different product to include in a purchase. | [optional]
|
14 |
**taxes** | getTaxes() | setTaxes($value) | [**\SquareConnect\Model\CreateOrderRequestTax[]**](CreateOrderRequestTax.md) | __Deprecated__: Please set the taxes on the nested [order](#type-order) field instead. The taxes to include on the order. | [optional]
|
15 |
**discounts** | getDiscounts() | setDiscounts($value) | [**\SquareConnect\Model\CreateOrderRequestDiscount[]**](CreateOrderRequestDiscount.md) | __Deprecated__: Please set the discounts on the nested [order](#type-order) field instead. The discounts to include on the order. | [optional]
|
vendor/square/connect/docs/Model/CreatePaymentRequest.md
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CreatePaymentRequest
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Creates a payment from the source (nonce, card on file, etc.) The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees. For more information, see [Payments and Refunds Overview](/payments-api/overview). For information about application fees in a payment, see [Collect Fees](/payments-api/take-payments-and-collect-fees).
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**source_id** | getSourceId() | setSourceId($value) | **string** | The ID for the source of funds for this payment. This can be a nonce generated by the Payment Form or a card on file made with the Customers API. |
|
11 |
+
**idempotency_key** | getIdempotencyKey() | setIdempotencyKey($value) | **string** | A unique string that identifies this CreatePayment request. Keys can be any valid string but must be unique for every CreatePayment request. Max: 45 characters See [Idempotency keys](/basics/api101/idempotency) for more information. |
|
12 |
+
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of money to accept for this payment, not including `tip_money`. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment. |
|
13 |
+
**tip_money** | getTipMoney() | setTipMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount designated as a tip, in addition to `amount_money` Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment. | [optional]
|
14 |
+
**app_fee_money** | getAppFeeMoney() | setAppFeeMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of money the developer is taking as a fee for facilitating the payment on behalf of the seller. Cannot be more than 90% of the total amount of the Payment. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment. For more information about the application fee scenario, see [Collect Fees](/payments-api/take-payments-and-collect-fees). | [optional]
|
15 |
+
**autocomplete** | getAutocomplete() | setAutocomplete($value) | **bool** | If set to `true`, this payment will be completed when possible. If set to `false`, this payment will be held in an approved state until either explicitly completed or canceled. For more information, see [Delayed Payments](/payments-api/take-payments#delayed-payments). Default: true | [optional]
|
16 |
+
**order_id** | getOrderId() | setOrderId($value) | **string** | Associate a previously created order with this payment | [optional]
|
17 |
+
**customer_id** | getCustomerId() | setCustomerId($value) | **string** | The ID of the customer associated with the payment. Required if the `source_id` refers to a card on file created using the Customers API. | [optional]
|
18 |
+
**location_id** | getLocationId() | setLocationId($value) | **string** | The location ID to associate with the payment. If not specified, the default location is used. | [optional]
|
19 |
+
**reference_id** | getReferenceId() | setReferenceId($value) | **string** | A user-defined ID to associate with the payment. You can use this field to associate the payment to an entity in an external system. For example, you might specify an order ID that is generated by a third-party shopping cart. Limit 40 characters. | [optional]
|
20 |
+
**verification_token** | getVerificationToken() | setVerificationToken($value) | **string** | An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. See the [SCA Overview](/sca-overview) for more. | [optional]
|
21 |
+
**accept_partial_authorization** | getAcceptPartialAuthorization() | setAcceptPartialAuthorization($value) | **bool** | If set to true and charging a Square Gift Card, a payment may be returned with amount_money equal to less than what was requested. Example, a request for $20 when charging a Square Gift Card with balance of $5 wil result in an APPROVED payment of $5. You may choose to prompt the buyer for an additional payment to cover the remainder, or cancel the gift card payment. Cannot be `true` when `autocomplete = true For more information, see [Partial amount with Square gift cards](/payments-api/take-payments#partial-payment-gift-card). Default: false | [optional]
|
22 |
+
**buyer_email_address** | getBuyerEmailAddress() | setBuyerEmailAddress($value) | **string** | The buyer's e-mail address | [optional]
|
23 |
+
**billing_address** | getBillingAddress() | setBillingAddress($value) | [**\SquareConnect\Model\Address**](Address.md) | The buyer's billing address. | [optional]
|
24 |
+
**shipping_address** | getShippingAddress() | setShippingAddress($value) | [**\SquareConnect\Model\Address**](Address.md) | The buyer's shipping address. | [optional]
|
25 |
+
**note** | getNote() | setNote($value) | **string** | An optional note to be entered by the developer when creating a payment Limit 500 characters. | [optional]
|
26 |
+
|
27 |
+
Note: All properties are protected and only accessed via getters and setters.
|
28 |
+
|
29 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
30 |
+
|
vendor/square/connect/docs/Model/CreatePaymentResponse.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CreatePaymentResponse
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Defines the fields that are included in the response body of a request to the [CreatePayment](#endpoint-payments-createpayment) endpoint. Note: if there are errors processing the request, the payment field may not be present, or it may be present with a status of `FAILED`.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Information on errors encountered during the request. | [optional]
|
11 |
+
**payment** | getPayment() | setPayment($value) | [**\SquareConnect\Model\Payment**](Payment.md) | The newly created payment. | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/CreateRefundRequest.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Defines the body parameters that can be included in a request to the CreateRefund endpoint.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Defines the body parameters that can be included in a request to the [CreateRefund](#endpoint-createrefund) endpoint. Deprecated - recommend using [RefundPayment](#endpoint-refunds-refundpayment)
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
vendor/square/connect/docs/Model/CreateRefundResponse.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Defines the fields that are included in the response body of a request to the CreateRefund endpoint. One of `errors` or `refund` is present in a given response (never both).
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Defines the fields that are included in the response body of a request to the [CreateRefund](#endpoint-createrefund) endpoint. One of `errors` or `refund` is present in a given response (never both).
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
vendor/square/connect/docs/Model/Error.md
CHANGED
@@ -7,10 +7,10 @@ Represents an error encountered during a request to the Connect API.
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**category** | getCategory() | setCategory($value) | **string** | The
|
11 |
-
**code** | getCode() | setCode($value) | **string** | The
|
12 |
**detail** | getDetail() | setDetail($value) | **string** | A human-readable description of the error for debugging purposes. | [optional]
|
13 |
-
**field** | getField() | setField($value) | **string** | The name of the field provided in the original request that the error pertains to
|
14 |
|
15 |
Note: All properties are protected and only accessed via getters and setters.
|
16 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**category** | getCategory() | setCategory($value) | **string** | The high-level category for the error. See [ErrorCategory](#type-errorcategory) See [ErrorCategory](#type-errorcategory) for possible values |
|
11 |
+
**code** | getCode() | setCode($value) | **string** | The specific code of the error. See [ErrorCode](#type-errorcode) for possible See [ErrorCode](#type-errorcode) for possible values |
|
12 |
**detail** | getDetail() | setDetail($value) | **string** | A human-readable description of the error for debugging purposes. | [optional]
|
13 |
+
**field** | getField() | setField($value) | **string** | The name of the field provided in the original request (if any) that the error pertains to. | [optional]
|
14 |
|
15 |
Note: All properties are protected and only accessed via getters and setters.
|
16 |
|
vendor/square/connect/docs/Model/ErrorCode.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Indicates specific
|
6 |
|
7 |
## Properties
|
8 |
Name | Type
|
@@ -51,7 +51,6 @@ Name | Type
|
|
51 |
**INVALID_FORM_VALUE** | string
|
52 |
**ONE_INSTRUMENT_EXPECTED** | string
|
53 |
**NO_FIELDS_SET** | string
|
54 |
-
**DEPRECATED_FIELD_SET** | string
|
55 |
**CARD_EXPIRED** | string
|
56 |
**INVALID_EXPIRATION** | string
|
57 |
**INVALID_EXPIRATION_YEAR** | string
|
@@ -60,6 +59,26 @@ Name | Type
|
|
60 |
**UNSUPPORTED_ENTRY_METHOD** | string
|
61 |
**INVALID_ENCRYPTED_CARD** | string
|
62 |
**INVALID_CARD** | string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
**DELAYED_TRANSACTION_EXPIRED** | string
|
64 |
**DELAYED_TRANSACTION_CANCELED** | string
|
65 |
**DELAYED_TRANSACTION_CAPTURED** | string
|
@@ -82,10 +101,17 @@ Name | Type
|
|
82 |
**BAD_CERTIFICATE** | string
|
83 |
**INVALID_SQUARE_VERSION_FORMAT** | string
|
84 |
**API_VERSION_INCOMPATIBLE** | string
|
|
|
|
|
85 |
**CARD_DECLINED** | string
|
86 |
**VERIFY_CVV_FAILURE** | string
|
87 |
**VERIFY_AVS_FAILURE** | string
|
88 |
**CARD_DECLINED_CALL_ISSUER** | string
|
|
|
|
|
|
|
|
|
|
|
89 |
**NOT_FOUND** | string
|
90 |
**APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND** | string
|
91 |
**METHOD_NOT_ALLOWED** | string
|
@@ -97,6 +123,7 @@ Name | Type
|
|
97 |
**RATE_LIMITED** | string
|
98 |
**NOT_IMPLEMENTED** | string
|
99 |
**SERVICE_UNAVAILABLE** | string
|
|
|
100 |
**GATEWAY_TIMEOUT** | string
|
101 |
|
102 |
Note: All properties are protected and only accessed via getters and setters.
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Indicates the specific error that occurred during a request to a Square API.
|
6 |
|
7 |
## Properties
|
8 |
Name | Type
|
51 |
**INVALID_FORM_VALUE** | string
|
52 |
**ONE_INSTRUMENT_EXPECTED** | string
|
53 |
**NO_FIELDS_SET** | string
|
|
|
54 |
**CARD_EXPIRED** | string
|
55 |
**INVALID_EXPIRATION** | string
|
56 |
**INVALID_EXPIRATION_YEAR** | string
|
59 |
**UNSUPPORTED_ENTRY_METHOD** | string
|
60 |
**INVALID_ENCRYPTED_CARD** | string
|
61 |
**INVALID_CARD** | string
|
62 |
+
**GENERIC_DECLINE** | string
|
63 |
+
**CVV_FAILURE** | string
|
64 |
+
**ADDRESS_VERIFICATION_FAILURE** | string
|
65 |
+
**INVALID_ACCOUNT** | string
|
66 |
+
**CURRENCY_MISMATCH** | string
|
67 |
+
**INSUFFICIENT_FUNDS** | string
|
68 |
+
**INSUFFICIENT_PERMISSIONS** | string
|
69 |
+
**CARDHOLDER_INSUFFICIENT_PERMISSIONS** | string
|
70 |
+
**INVALID_LOCATION** | string
|
71 |
+
**TRANSACTION_LIMIT** | string
|
72 |
+
**VOICE_FAILURE** | string
|
73 |
+
**PAN_FAILURE** | string
|
74 |
+
**EXPIRATION_FAILURE** | string
|
75 |
+
**CARD_NOT_SUPPORTED** | string
|
76 |
+
**INVALID_PIN** | string
|
77 |
+
**INVALID_POSTAL_CODE** | string
|
78 |
+
**INVALID_FEES** | string
|
79 |
+
**MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED** | string
|
80 |
+
**PAYMENT_LIMIT_EXCEEDED** | string
|
81 |
+
**GIFT_CARD_AVAILABLE_AMOUNT** | string
|
82 |
**DELAYED_TRANSACTION_EXPIRED** | string
|
83 |
**DELAYED_TRANSACTION_CANCELED** | string
|
84 |
**DELAYED_TRANSACTION_CAPTURED** | string
|
101 |
**BAD_CERTIFICATE** | string
|
102 |
**INVALID_SQUARE_VERSION_FORMAT** | string
|
103 |
**API_VERSION_INCOMPATIBLE** | string
|
104 |
+
**INVALID_URL** | string
|
105 |
+
**HTTPS_ONLY** | string
|
106 |
**CARD_DECLINED** | string
|
107 |
**VERIFY_CVV_FAILURE** | string
|
108 |
**VERIFY_AVS_FAILURE** | string
|
109 |
**CARD_DECLINED_CALL_ISSUER** | string
|
110 |
+
**CARD_DECLINED_VERIFICATION_REQUIRED** | string
|
111 |
+
**BAD_EXPIRATION** | string
|
112 |
+
**CHIP_INSERTION_REQUIRED** | string
|
113 |
+
**ALLOWABLE_PIN_TRIES_EXCEEDED** | string
|
114 |
+
**RESERVATION_DECLINED** | string
|
115 |
**NOT_FOUND** | string
|
116 |
**APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND** | string
|
117 |
**METHOD_NOT_ALLOWED** | string
|
123 |
**RATE_LIMITED** | string
|
124 |
**NOT_IMPLEMENTED** | string
|
125 |
**SERVICE_UNAVAILABLE** | string
|
126 |
+
**TEMPORARY_ERROR** | string
|
127 |
**GATEWAY_TIMEOUT** | string
|
128 |
|
129 |
Note: All properties are protected and only accessed via getters and setters.
|
vendor/square/connect/docs/Model/GetPaymentRefundRequest.md
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# GetPaymentRefundRequest
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Retrieves a specific `Refund` using the `refund_id`.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
|
11 |
+
Note: All properties are protected and only accessed via getters and setters.
|
12 |
+
|
13 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
14 |
+
|
vendor/square/connect/docs/Model/GetPaymentRefundResponse.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# GetPaymentRefundResponse
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Defines the fields that are included in the response body of a request to the [GetRefund](#endpoint-refunds-getpaymentrefund) endpoint. Note: if there are errors processing the request, the refund field may not be present, or it may be present in a FAILED state.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Information on errors encountered during the request. | [optional]
|
11 |
+
**refund** | getRefund() | setRefund($value) | [**\SquareConnect\Model\PaymentRefund**](PaymentRefund.md) | The requested `PaymentRefund`. | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/GetPaymentRequest.md
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# GetPaymentRequest
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Retrieve details for a specific Payment.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
|
11 |
+
Note: All properties are protected and only accessed via getters and setters.
|
12 |
+
|
13 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
14 |
+
|
vendor/square/connect/docs/Model/GetPaymentResponse.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# GetPaymentResponse
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Defines the fields that are included in the response body of a request to the [GetPayment](#endpoint-payments-getpayment) endpoint.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Information on errors encountered during the request. | [optional]
|
11 |
+
**payment** | getPayment() | setPayment($value) | [**\SquareConnect\Model\Payment**](Payment.md) | The requested `Payment`. | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/InventoryAdjustment.md
CHANGED
@@ -14,7 +14,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
14 |
**location_id** | getLocationId() | setLocationId($value) | **string** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional]
|
15 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked. | [optional]
|
16 |
**catalog_object_type** | getCatalogObjectType() | setCatalogObjectType($value) | **string** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
|
17 |
-
**quantity** | getQuantity() | setQuantity($value) | **string** | The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`.
|
18 |
**total_price_money** | getTotalPriceMoney() | setTotalPriceMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The read-only total price paid for goods associated with the adjustment. Present if and only if `to_state` is `SOLD`. Always non-negative. | [optional]
|
19 |
**occurred_at** | getOccurredAt() | setOccurredAt($value) | **string** | A client-generated timestamp in RFC 3339 format that indicates when the adjustment took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional]
|
20 |
**created_at** | getCreatedAt() | setCreatedAt($value) | **string** | A read-only timestamp in RFC 3339 format that indicates when Square received the adjustment. | [optional]
|
14 |
**location_id** | getLocationId() | setLocationId($value) | **string** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional]
|
15 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked. | [optional]
|
16 |
**catalog_object_type** | getCatalogObjectType() | setCatalogObjectType($value) | **string** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
|
17 |
+
**quantity** | getQuantity() | setQuantity($value) | **string** | The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. | [optional]
|
18 |
**total_price_money** | getTotalPriceMoney() | setTotalPriceMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The read-only total price paid for goods associated with the adjustment. Present if and only if `to_state` is `SOLD`. Always non-negative. | [optional]
|
19 |
**occurred_at** | getOccurredAt() | setOccurredAt($value) | **string** | A client-generated timestamp in RFC 3339 format that indicates when the adjustment took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional]
|
20 |
**created_at** | getCreatedAt() | setCreatedAt($value) | **string** | A read-only timestamp in RFC 3339 format that indicates when Square received the adjustment. | [optional]
|
vendor/square/connect/docs/Model/InventoryCount.md
CHANGED
@@ -11,7 +11,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
11 |
**catalog_object_type** | getCatalogObjectType() | setCatalogObjectType($value) | **string** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
|
12 |
**state** | getState() | setState($value) | **string** | The current [InventoryState](#type-inventorystate) for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional]
|
13 |
**location_id** | getLocationId() | setLocationId($value) | **string** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional]
|
14 |
-
**quantity** | getQuantity() | setQuantity($value) | **string** | The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`.
|
15 |
**calculated_at** | getCalculatedAt() | setCalculatedAt($value) | **string** | A read-only timestamp in RFC 3339 format that indicates when Square received the most recent physical count or adjustment that had an affect on the estimated count. | [optional]
|
16 |
|
17 |
Note: All properties are protected and only accessed via getters and setters.
|
11 |
**catalog_object_type** | getCatalogObjectType() | setCatalogObjectType($value) | **string** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
|
12 |
**state** | getState() | setState($value) | **string** | The current [InventoryState](#type-inventorystate) for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional]
|
13 |
**location_id** | getLocationId() | setLocationId($value) | **string** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional]
|
14 |
+
**quantity** | getQuantity() | setQuantity($value) | **string** | The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. | [optional]
|
15 |
**calculated_at** | getCalculatedAt() | setCalculatedAt($value) | **string** | A read-only timestamp in RFC 3339 format that indicates when Square received the most recent physical count or adjustment that had an affect on the estimated count. | [optional]
|
16 |
|
17 |
Note: All properties are protected and only accessed via getters and setters.
|
vendor/square/connect/docs/Model/InventoryPhysicalCount.md
CHANGED
@@ -13,7 +13,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
13 |
**catalog_object_type** | getCatalogObjectType() | setCatalogObjectType($value) | **string** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
|
14 |
**state** | getState() | setState($value) | **string** | The current [InventoryState](#type-inventorystate) for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional]
|
15 |
**location_id** | getLocationId() | setLocationId($value) | **string** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional]
|
16 |
-
**quantity** | getQuantity() | setQuantity($value) | **string** | The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`.
|
17 |
**source** | getSource() | setSource($value) | [**\SquareConnect\Model\SourceApplication**](SourceApplication.md) | Read-only information about the application that submitted the physical count. | [optional]
|
18 |
**employee_id** | getEmployeeId() | setEmployeeId($value) | **string** | The Square ID of the [Employee](#type-employee) responsible for the physical count. | [optional]
|
19 |
**occurred_at** | getOccurredAt() | setOccurredAt($value) | **string** | A client-generated timestamp in RFC 3339 format that indicates when the physical count took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional]
|
13 |
**catalog_object_type** | getCatalogObjectType() | setCatalogObjectType($value) | **string** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
|
14 |
**state** | getState() | setState($value) | **string** | The current [InventoryState](#type-inventorystate) for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional]
|
15 |
**location_id** | getLocationId() | setLocationId($value) | **string** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional]
|
16 |
+
**quantity** | getQuantity() | setQuantity($value) | **string** | The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. | [optional]
|
17 |
**source** | getSource() | setSource($value) | [**\SquareConnect\Model\SourceApplication**](SourceApplication.md) | Read-only information about the application that submitted the physical count. | [optional]
|
18 |
**employee_id** | getEmployeeId() | setEmployeeId($value) | **string** | The Square ID of the [Employee](#type-employee) responsible for the physical count. | [optional]
|
19 |
**occurred_at** | getOccurredAt() | setOccurredAt($value) | **string** | A client-generated timestamp in RFC 3339 format that indicates when the physical count took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional]
|
vendor/square/connect/docs/Model/InventoryTransfer.md
CHANGED
@@ -14,7 +14,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
14 |
**to_location_id** | getToLocationId() | setToLocationId($value) | **string** | The Square ID of the [Location](#type-location) where the related quantity of items were tracked after the transfer. | [optional]
|
15 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked. | [optional]
|
16 |
**catalog_object_type** | getCatalogObjectType() | setCatalogObjectType($value) | **string** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked.Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
|
17 |
-
**quantity** | getQuantity() | setQuantity($value) | **string** | The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`.
|
18 |
**occurred_at** | getOccurredAt() | setOccurredAt($value) | **string** | A client-generated timestamp in RFC 3339 format that indicates when the transfer took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional]
|
19 |
**created_at** | getCreatedAt() | setCreatedAt($value) | **string** | A read-only timestamp in RFC 3339 format that indicates when Square received the transfer request. | [optional]
|
20 |
**source** | getSource() | setSource($value) | [**\SquareConnect\Model\SourceApplication**](SourceApplication.md) | Read-only information about the application that initiated the inventory transfer. | [optional]
|
14 |
**to_location_id** | getToLocationId() | setToLocationId($value) | **string** | The Square ID of the [Location](#type-location) where the related quantity of items were tracked after the transfer. | [optional]
|
15 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked. | [optional]
|
16 |
**catalog_object_type** | getCatalogObjectType() | setCatalogObjectType($value) | **string** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked.Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
|
17 |
+
**quantity** | getQuantity() | setQuantity($value) | **string** | The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. | [optional]
|
18 |
**occurred_at** | getOccurredAt() | setOccurredAt($value) | **string** | A client-generated timestamp in RFC 3339 format that indicates when the transfer took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional]
|
19 |
**created_at** | getCreatedAt() | setCreatedAt($value) | **string** | A read-only timestamp in RFC 3339 format that indicates when Square received the transfer request. | [optional]
|
20 |
**source** | getSource() | setSource($value) | [**\SquareConnect\Model\SourceApplication**](SourceApplication.md) | Read-only information about the application that initiated the inventory transfer. | [optional]
|
vendor/square/connect/docs/Model/ListPaymentRefundsRequest.md
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ListPaymentRefundsRequest
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Retrieves a list of refunds for the account making the request. Max results per page: 100
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**begin_time** | getBeginTime() | setBeginTime($value) | **string** | Timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year. | [optional]
|
11 |
+
**end_time** | getEndTime() | setEndTime($value) | **string** | Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. | [optional]
|
12 |
+
**sort_order** | getSortOrder() | setSortOrder($value) | **string** | The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). | [optional]
|
13 |
+
**cursor** | getCursor() | setCursor($value) | **string** | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
14 |
+
**location_id** | getLocationId() | setLocationId($value) | **string** | ID of location associated with payment. | [optional]
|
15 |
+
**status** | getStatus() | setStatus($value) | **string** | If provided, only refunds with the given status are returned. For a list of refund status values, see [PaymentRefund](#type-paymentrefund). Default: If omitted refunds are returned regardless of status. | [optional]
|
16 |
+
**source_type** | getSourceType() | setSourceType($value) | **string** | If provided, only refunds with the given source type are returned. - `CARD` - List refunds only for payments where card was specified as payment source. Default: If omitted refunds are returned regardless of source type. | [optional]
|
17 |
+
|
18 |
+
Note: All properties are protected and only accessed via getters and setters.
|
19 |
+
|
20 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
21 |
+
|
vendor/square/connect/docs/Model/ListPaymentRefundsResponse.md
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ListPaymentRefundsResponse
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Defines the fields that are included in the response body of a request to the [ListPaymentRefunds](#endpoint-refunds-listpaymentrefunds) endpoint. One of `errors` or `refunds` is present in a given response (never both).
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Information on errors encountered during the request. | [optional]
|
11 |
+
**refunds** | getRefunds() | setRefunds($value) | [**\SquareConnect\Model\PaymentRefund[]**](PaymentRefund.md) | The list of requested refunds. | [optional]
|
12 |
+
**cursor** | getCursor() | setCursor($value) | **string** | The pagination cursor to be used in a subsequent request. If empty, this is the final response. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
13 |
+
|
14 |
+
Note: All properties are protected and only accessed via getters and setters.
|
15 |
+
|
16 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
17 |
+
|
vendor/square/connect/docs/Model/ListPaymentsRequest.md
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ListPaymentsRequest
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Retrieves a list of refunds taken by the account making the request. Max results per page: 100
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**begin_time** | getBeginTime() | setBeginTime($value) | **string** | Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. | [optional]
|
11 |
+
**end_time** | getEndTime() | setEndTime($value) | **string** | Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. | [optional]
|
12 |
+
**sort_order** | getSortOrder() | setSortOrder($value) | **string** | The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). | [optional]
|
13 |
+
**cursor** | getCursor() | setCursor($value) | **string** | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
14 |
+
**location_id** | getLocationId() | setLocationId($value) | **string** | ID of location associated with payment | [optional]
|
15 |
+
**total** | getTotal() | setTotal($value) | **int** | The exact amount in the total_money for a `Payment`. | [optional]
|
16 |
+
**last_4** | getLast4() | setLast4($value) | **string** | The last 4 digits of `Payment` card. | [optional]
|
17 |
+
**card_brand** | getCardBrand() | setCardBrand($value) | **string** | The brand of `Payment` card. For example, `VISA` | [optional]
|
18 |
+
|
19 |
+
Note: All properties are protected and only accessed via getters and setters.
|
20 |
+
|
21 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
22 |
+
|
vendor/square/connect/docs/Model/ListPaymentsResponse.md
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ListPaymentsResponse
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Defines the fields that are included in the response body of a request to the [ListPayments](#endpoint-payments-listpayments) endpoint.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Information on errors encountered during the request. | [optional]
|
11 |
+
**payments** | getPayments() | setPayments($value) | [**\SquareConnect\Model\Payment[]**](Payment.md) | The requested list of `Payment`s. | [optional]
|
12 |
+
**cursor** | getCursor() | setCursor($value) | **string** | The pagination cursor to be used in a subsequent request. If empty, this is the final response. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
13 |
+
|
14 |
+
Note: All properties are protected and only accessed via getters and setters.
|
15 |
+
|
16 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
17 |
+
|
vendor/square/connect/docs/Model/ListRefundsRequest.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Defines the query parameters that can be included in a request to the ListRefunds endpoint.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Defines the query parameters that can be included in a request to the [ListRefunds](#endpoint-listrefunds) endpoint. Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders)
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
vendor/square/connect/docs/Model/ListRefundsResponse.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Defines the fields that are included in the response body of a request to the ListRefunds endpoint. One of `errors` or `refunds` is present in a given response (never both).
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Defines the fields that are included in the response body of a request to the [ListRefunds](#endpoint-listrefunds) endpoint. One of `errors` or `refunds` is present in a given response (never both).
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
vendor/square/connect/docs/Model/ListTransactionsRequest.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Defines the query parameters that can be included in a request to the ListTransactions endpoint.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Defines the query parameters that can be included in a request to the [ListTransactions](#endpoint-listtransactions) endpoint. Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders)
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
vendor/square/connect/docs/Model/ListTransactionsResponse.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Defines the fields that are included in the response body of a request to the ListTransactions endpoint. One of `errors` or `transactions` is present in a given response (never both).
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Defines the fields that are included in the response body of a request to the [ListTransactions](#endpoint-listtransactions) endpoint. One of `errors` or `transactions` is present in a given response (never both).
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
vendor/square/connect/docs/Model/Location.md
CHANGED
@@ -23,6 +23,14 @@ Name | Getter | Setter | Type | Description | Notes
|
|
23 |
**type** | getType() | setType($value) | **string** | The location's type, as set by the account owner in the Square dashboard. Typically used to indicate whether or not the location object represents a physical space like a building or mall space. See [LocationType](#type-locationtype) for possible values | [optional]
|
24 |
**website_url** | getWebsiteUrl() | setWebsiteUrl($value) | **string** | The location's website, as set by the account owner in the Square dashboard. Default: none; only exists if explicitly set. | [optional]
|
25 |
**business_hours** | getBusinessHours() | setBusinessHours($value) | [**\SquareConnect\Model\BusinessHours**](BusinessHours.md) | The hours of operation for a business location. Default: none; only exists if explicitly set. | [optional]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
Note: All properties are protected and only accessed via getters and setters.
|
28 |
|
23 |
**type** | getType() | setType($value) | **string** | The location's type, as set by the account owner in the Square dashboard. Typically used to indicate whether or not the location object represents a physical space like a building or mall space. See [LocationType](#type-locationtype) for possible values | [optional]
|
24 |
**website_url** | getWebsiteUrl() | setWebsiteUrl($value) | **string** | The location's website, as set by the account owner in the Square dashboard. Default: none; only exists if explicitly set. | [optional]
|
25 |
**business_hours** | getBusinessHours() | setBusinessHours($value) | [**\SquareConnect\Model\BusinessHours**](BusinessHours.md) | The hours of operation for a business location. Default: none; only exists if explicitly set. | [optional]
|
26 |
+
**business_email** | getBusinessEmail() | setBusinessEmail($value) | **string** | The email of the location. | [optional]
|
27 |
+
**description** | getDescription() | setDescription($value) | **string** | The business description of the location. | [optional]
|
28 |
+
**twitter_username** | getTwitterUsername() | setTwitterUsername($value) | **string** | The Twitter username of the location without the ' | [optional]
|
29 |
+
**instagram_username** | getInstagramUsername() | setInstagramUsername($value) | **string** | The Instagram username of the location without the ' | [optional]
|
30 |
+
**facebook_url** | getFacebookUrl() | setFacebookUrl($value) | **string** | The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. | [optional]
|
31 |
+
**coordinates** | getCoordinates() | setCoordinates($value) | [**\SquareConnect\Model\Coordinates**](Coordinates.md) | The physical coordinates (latitude and longitude) of the location. | [optional]
|
32 |
+
**logo_url** | getLogoUrl() | setLogoUrl($value) | **string** | The logo image URL of the location. | [optional]
|
33 |
+
**pos_background_url** | getPosBackgroundUrl() | setPosBackgroundUrl($value) | **string** | The Point of Sale background image URL of the location. | [optional]
|
34 |
|
35 |
Note: All properties are protected and only accessed via getters and setters.
|
36 |
|
vendor/square/connect/docs/Model/MeasurementUnit.md
CHANGED
@@ -12,6 +12,8 @@ Name | Getter | Setter | Type | Description | Notes
|
|
12 |
**length_unit** | getLengthUnit() | setLengthUnit($value) | **string** | Represents a standard length unit. See [MeasurementUnitLength](#type-measurementunitlength) for possible values | [optional]
|
13 |
**volume_unit** | getVolumeUnit() | setVolumeUnit($value) | **string** | Represents a standard volume unit. See [MeasurementUnitVolume](#type-measurementunitvolume) for possible values | [optional]
|
14 |
**weight_unit** | getWeightUnit() | setWeightUnit($value) | **string** | Represents a standard unit of weight or mass. See [MeasurementUnitWeight](#type-measurementunitweight) for possible values | [optional]
|
|
|
|
|
15 |
|
16 |
Note: All properties are protected and only accessed via getters and setters.
|
17 |
|
12 |
**length_unit** | getLengthUnit() | setLengthUnit($value) | **string** | Represents a standard length unit. See [MeasurementUnitLength](#type-measurementunitlength) for possible values | [optional]
|
13 |
**volume_unit** | getVolumeUnit() | setVolumeUnit($value) | **string** | Represents a standard volume unit. See [MeasurementUnitVolume](#type-measurementunitvolume) for possible values | [optional]
|
14 |
**weight_unit** | getWeightUnit() | setWeightUnit($value) | **string** | Represents a standard unit of weight or mass. See [MeasurementUnitWeight](#type-measurementunitweight) for possible values | [optional]
|
15 |
+
**generic_unit** | getGenericUnit() | setGenericUnit($value) | **string** | Reserved for API integrations that lack the ability to specify a real measurement unit See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values | [optional]
|
16 |
+
**type** | getType() | setType($value) | **string** | Represents the type of the measurement unit. See [MeasurementUnitUnitType](#type-measurementunitunittype) for possible values | [optional]
|
17 |
|
18 |
Note: All properties are protected and only accessed via getters and setters.
|
19 |
|
vendor/square/connect/docs/Model/MeasurementUnitGeneric.md
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# MeasurementUnitGeneric
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
A custom unit of measurement defined by the user.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Type
|
9 |
+
------------ | -------------
|
10 |
+
**UNIT** | string
|
11 |
+
|
12 |
+
Note: All properties are protected and only accessed via getters and setters.
|
13 |
+
|
14 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
15 |
+
|
vendor/square/connect/docs/Model/MeasurementUnitUnitType.md
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# MeasurementUnitUnitType
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Describes the type of this unit and indicates which field contains the unit information. This is an ‘open’ enum.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Type
|
9 |
+
------------ | -------------
|
10 |
+
**TYPE_CUSTOM** | string
|
11 |
+
**TYPE_AREA** | string
|
12 |
+
**TYPE_LENGTH** | string
|
13 |
+
**TYPE_VOLUME** | string
|
14 |
+
**TYPE_WEIGHT** | string
|
15 |
+
**TYPE_GENERIC** | string
|
16 |
+
|
17 |
+
Note: All properties are protected and only accessed via getters and setters.
|
18 |
+
|
19 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
20 |
+
|
vendor/square/connect/docs/Model/Money.md
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Represents an amount of money.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**amount** | getAmount() | setAmount($value) | **int** | The amount of money, in the smallest denomination of the currency indicated by `currency`. For example, when `currency` is `USD`, `amount` is in cents. | [optional]
|
11 |
-
**currency** | getCurrency() | setCurrency($value) | **string** | The type of currency, in __ISO 4217 format__. For example, the currency code for US dollars is `USD`. See [Currency](#type-currency) for possible values | [optional]
|
12 |
|
13 |
Note: All properties are protected and only accessed via getters and setters.
|
14 |
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Represents an amount of money. `Money` fields can be signed or unsigned.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**amount** | getAmount() | setAmount($value) | **int** | The amount of money, in the smallest denomination of the currency indicated by `currency`. For example, when `currency` is `USD`, `amount` is in cents. Monetary amounts can be positive or negative. See the specific API documentation to determine the meaning of the sign in a particular case. | [optional]
|
11 |
+
**currency** | getCurrency() | setCurrency($value) | **string** | The type of currency, in __ISO 4217 format__. For example, the currency code for US dollars is `USD`. See [Currency](#type-currency) for possible values. See [Currency](#type-currency) for possible values | [optional]
|
12 |
|
13 |
Note: All properties are protected and only accessed via getters and setters.
|
14 |
|
vendor/square/connect/docs/Model/ObtainTokenRequest.md
CHANGED
@@ -7,11 +7,11 @@
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**client_id** | getClientId() | setClientId($value) | **string** | The Square-issued ID of your application, available from the [application dashboard](https://connect.squareup.com/apps). |
|
11 |
-
**client_secret** | getClientSecret() | setClientSecret($value) | **string** | The Square-issued application secret for your application, available from the [application dashboard](https://connect.squareup.com/apps). |
|
12 |
**code** | getCode() | setCode($value) | **string** | The authorization code to exchange. This is required if `grant_type` is set to `authorization_code`, to indicate that the application wants to exchange an authorization code for an OAuth access token. | [optional]
|
13 |
**redirect_uri** | getRedirectUri() | setRedirectUri($value) | **string** | The redirect URL assigned in the [application dashboard](https://connect.squareup.com/apps). | [optional]
|
14 |
-
**grant_type** | getGrantType() | setGrantType($value) | **string** | Specifies the method to request an OAuth access token. Valid values are: `authorization_code`, `refresh_token`, and `migration_token` |
|
15 |
**refresh_token** | getRefreshToken() | setRefreshToken($value) | **string** | A valid refresh token for generating a new OAuth access token. A valid refresh token is required if `grant_type` is set to `refresh_token` , to indicate the application wants a replacement for an expired OAuth access token. | [optional]
|
16 |
**migration_token** | getMigrationToken() | setMigrationToken($value) | **string** | Legacy OAuth access token obtained using a Connect API version prior to 2019-03-13. This parameter is required if `grant_type` is set to `migration_token` to indicate that the application wants to get a replacement OAuth access token. The response also returns a refresh token. For more information, see [Migrate to Using Refresh Tokens](/authz/oauth/migration). | [optional]
|
17 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**client_id** | getClientId() | setClientId($value) | **string** | The Square-issued ID of your application, available from the [application dashboard](https://connect.squareup.com/apps). | [optional]
|
11 |
+
**client_secret** | getClientSecret() | setClientSecret($value) | **string** | The Square-issued application secret for your application, available from the [application dashboard](https://connect.squareup.com/apps). | [optional]
|
12 |
**code** | getCode() | setCode($value) | **string** | The authorization code to exchange. This is required if `grant_type` is set to `authorization_code`, to indicate that the application wants to exchange an authorization code for an OAuth access token. | [optional]
|
13 |
**redirect_uri** | getRedirectUri() | setRedirectUri($value) | **string** | The redirect URL assigned in the [application dashboard](https://connect.squareup.com/apps). | [optional]
|
14 |
+
**grant_type** | getGrantType() | setGrantType($value) | **string** | Specifies the method to request an OAuth access token. Valid values are: `authorization_code`, `refresh_token`, and `migration_token` | [optional]
|
15 |
**refresh_token** | getRefreshToken() | setRefreshToken($value) | **string** | A valid refresh token for generating a new OAuth access token. A valid refresh token is required if `grant_type` is set to `refresh_token` , to indicate the application wants a replacement for an expired OAuth access token. | [optional]
|
16 |
**migration_token** | getMigrationToken() | setMigrationToken($value) | **string** | Legacy OAuth access token obtained using a Connect API version prior to 2019-03-13. This parameter is required if `grant_type` is set to `migration_token` to indicate that the application wants to get a replacement OAuth access token. The response also returns a refresh token. For more information, see [Migrate to Using Refresh Tokens](/authz/oauth/migration). | [optional]
|
17 |
|
vendor/square/connect/docs/Model/ObtainTokenResponse.md
CHANGED
@@ -11,8 +11,8 @@ Name | Getter | Setter | Type | Description | Notes
|
|
11 |
**token_type** | getTokenType() | setTokenType($value) | **string** | This value is always _bearer_. | [optional]
|
12 |
**expires_at** | getExpiresAt() | setExpiresAt($value) | **string** | The date when access_token expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. | [optional]
|
13 |
**merchant_id** | getMerchantId() | setMerchantId($value) | **string** | The ID of the authorizing merchant's business. | [optional]
|
14 |
-
**subscription_id** | getSubscriptionId() | setSubscriptionId($value) | **string** |
|
15 |
-
**plan_id** | getPlanId() | setPlanId($value) | **string** | The ID of the
|
16 |
**id_token** | getIdToken() | setIdToken($value) | **string** | Then OpenID token belonging to this this person. Only present if the OPENID scope is included in the authorize request. | [optional]
|
17 |
**refresh_token** | getRefreshToken() | setRefreshToken($value) | **string** | A refresh token. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). | [optional]
|
18 |
|
11 |
**token_type** | getTokenType() | setTokenType($value) | **string** | This value is always _bearer_. | [optional]
|
12 |
**expires_at** | getExpiresAt() | setExpiresAt($value) | **string** | The date when access_token expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. | [optional]
|
13 |
**merchant_id** | getMerchantId() | setMerchantId($value) | **string** | The ID of the authorizing merchant's business. | [optional]
|
14 |
+
**subscription_id** | getSubscriptionId() | setSubscriptionId($value) | **string** | __LEGACY FIELD__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional]
|
15 |
+
**plan_id** | getPlanId() | setPlanId($value) | **string** | __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional]
|
16 |
**id_token** | getIdToken() | setIdToken($value) | **string** | Then OpenID token belonging to this this person. Only present if the OPENID scope is included in the authorize request. | [optional]
|
17 |
**refresh_token** | getRefreshToken() | setRefreshToken($value) | **string** | A refresh token. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). | [optional]
|
18 |
|
vendor/square/connect/docs/Model/Order.md
CHANGED
@@ -7,28 +7,31 @@ Contains all information related to a single order to process with Square, inclu
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**id** | getId() | setId($value) | **string** | The order's unique ID.
|
11 |
**location_id** | getLocationId() | setLocationId($value) | **string** | The ID of the merchant location this order is associated with. |
|
12 |
**reference_id** | getReferenceId() | setReferenceId($value) | **string** | A client specified identifier to associate an entity in another system with this order. | [optional]
|
13 |
**source** | getSource() | setSource($value) | [**\SquareConnect\Model\OrderSource**](OrderSource.md) | The origination details of the order. | [optional]
|
14 |
**customer_id** | getCustomerId() | setCustomerId($value) | **string** | The [Customer](#type-customer) ID of the customer associated with the order. | [optional]
|
15 |
**line_items** | getLineItems() | setLineItems($value) | [**\SquareConnect\Model\OrderLineItem[]**](OrderLineItem.md) | The line items included in the order. | [optional]
|
16 |
-
**taxes** | getTaxes() | setTaxes($value) | [**\SquareConnect\Model\OrderLineItemTax[]**](OrderLineItemTax.md) |
|
17 |
-
**discounts** | getDiscounts() | setDiscounts($value) | [**\SquareConnect\Model\OrderLineItemDiscount[]**](OrderLineItemDiscount.md) |
|
|
|
18 |
**fulfillments** | getFulfillments() | setFulfillments($value) | [**\SquareConnect\Model\OrderFulfillment[]**](OrderFulfillment.md) | Details on order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API may contain multiple fulfillments. | [optional]
|
19 |
**returns** | getReturns() | setReturns($value) | [**\SquareConnect\Model\OrderReturn[]**](OrderReturn.md) | Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. | [optional]
|
20 |
**return_amounts** | getReturnAmounts() | setReturnAmounts($value) | [**\SquareConnect\Model\OrderMoneyAmounts**](OrderMoneyAmounts.md) | Rollup of returned money amounts. | [optional]
|
21 |
**net_amounts** | getNetAmounts() | setNetAmounts($value) | [**\SquareConnect\Model\OrderMoneyAmounts**](OrderMoneyAmounts.md) | Net money amounts (sale money - return money). | [optional]
|
22 |
**rounding_adjustment** | getRoundingAdjustment() | setRoundingAdjustment($value) | [**\SquareConnect\Model\OrderRoundingAdjustment**](OrderRoundingAdjustment.md) | A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. | [optional]
|
23 |
-
**tenders** | getTenders() | setTenders($value) | [**\SquareConnect\Model\Tender[]**](Tender.md) | The Tenders which were used to pay for the Order.
|
24 |
-
**refunds** | getRefunds() | setRefunds($value) | [**\SquareConnect\Model\Refund[]**](Refund.md) | The Refunds that are part of this Order.
|
25 |
**created_at** | getCreatedAt() | setCreatedAt($value) | **string** | Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
26 |
**updated_at** | getUpdatedAt() | setUpdatedAt($value) | **string** | Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
27 |
**closed_at** | getClosedAt() | setClosedAt($value) | **string** | Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
28 |
**state** | getState() | setState($value) | **string** | The current state of the order. `OPEN`,`COMPLETED`,`CANCELED` See [OrderState](#type-orderstate) for possible values | [optional]
|
|
|
29 |
**total_money** | getTotalMoney() | setTotalMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total amount of money to collect for the order. | [optional]
|
30 |
**total_tax_money** | getTotalTaxMoney() | setTotalTaxMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total tax amount of money to collect for the order. | [optional]
|
31 |
**total_discount_money** | getTotalDiscountMoney() | setTotalDiscountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total discount amount of money to collect for the order. | [optional]
|
|
|
32 |
|
33 |
Note: All properties are protected and only accessed via getters and setters.
|
34 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**id** | getId() | setId($value) | **string** | The order's unique ID. | [optional]
|
11 |
**location_id** | getLocationId() | setLocationId($value) | **string** | The ID of the merchant location this order is associated with. |
|
12 |
**reference_id** | getReferenceId() | setReferenceId($value) | **string** | A client specified identifier to associate an entity in another system with this order. | [optional]
|
13 |
**source** | getSource() | setSource($value) | [**\SquareConnect\Model\OrderSource**](OrderSource.md) | The origination details of the order. | [optional]
|
14 |
**customer_id** | getCustomerId() | setCustomerId($value) | **string** | The [Customer](#type-customer) ID of the customer associated with the order. | [optional]
|
15 |
**line_items** | getLineItems() | setLineItems($value) | [**\SquareConnect\Model\OrderLineItem[]**](OrderLineItem.md) | The line items included in the order. | [optional]
|
16 |
+
**taxes** | getTaxes() | setTaxes($value) | [**\SquareConnect\Model\OrderLineItemTax[]**](OrderLineItemTax.md) | The list of all taxes associated with the order. Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with `LINE_ITEM` scope, an `OrderLineItemAppliedTax` must be added to each line item that the tax applies to. For taxes with `ORDER` scope, the server will generate an `OrderLineItemAppliedTax` for every line item. On reads, each tax in the list will include the total amount of that tax applied to the order. __IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, usage of the deprecated `line_items.taxes` field will result in an error. Please use `line_items.applied_taxes` instead. | [optional]
|
17 |
+
**discounts** | getDiscounts() | setDiscounts($value) | [**\SquareConnect\Model\OrderLineItemDiscount[]**](OrderLineItemDiscount.md) | The list of all discounts associated with the order. Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For discounts scoped to `LINE_ITEM`, an `OrderLineItemAppliedDiscount` must be added to each line item that the discount applies to. For discounts with `ORDER` scope, the server will generate an `OrderLineItemAppliedDiscount` for every line item. __IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this field, usage of the deprecated `line_items.discounts` field will result in an error. Please use `line_items.applied_discounts` instead. | [optional]
|
18 |
+
**service_charges** | getServiceCharges() | setServiceCharges($value) | [**\SquareConnect\Model\OrderServiceCharge[]**](OrderServiceCharge.md) | A list of service charges applied to the order. | [optional]
|
19 |
**fulfillments** | getFulfillments() | setFulfillments($value) | [**\SquareConnect\Model\OrderFulfillment[]**](OrderFulfillment.md) | Details on order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API may contain multiple fulfillments. | [optional]
|
20 |
**returns** | getReturns() | setReturns($value) | [**\SquareConnect\Model\OrderReturn[]**](OrderReturn.md) | Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. | [optional]
|
21 |
**return_amounts** | getReturnAmounts() | setReturnAmounts($value) | [**\SquareConnect\Model\OrderMoneyAmounts**](OrderMoneyAmounts.md) | Rollup of returned money amounts. | [optional]
|
22 |
**net_amounts** | getNetAmounts() | setNetAmounts($value) | [**\SquareConnect\Model\OrderMoneyAmounts**](OrderMoneyAmounts.md) | Net money amounts (sale money - return money). | [optional]
|
23 |
**rounding_adjustment** | getRoundingAdjustment() | setRoundingAdjustment($value) | [**\SquareConnect\Model\OrderRoundingAdjustment**](OrderRoundingAdjustment.md) | A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. | [optional]
|
24 |
+
**tenders** | getTenders() | setTenders($value) | [**\SquareConnect\Model\Tender[]**](Tender.md) | The Tenders which were used to pay for the Order. | [optional]
|
25 |
+
**refunds** | getRefunds() | setRefunds($value) | [**\SquareConnect\Model\Refund[]**](Refund.md) | The Refunds that are part of this Order. | [optional]
|
26 |
**created_at** | getCreatedAt() | setCreatedAt($value) | **string** | Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
27 |
**updated_at** | getUpdatedAt() | setUpdatedAt($value) | **string** | Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
28 |
**closed_at** | getClosedAt() | setClosedAt($value) | **string** | Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
29 |
**state** | getState() | setState($value) | **string** | The current state of the order. `OPEN`,`COMPLETED`,`CANCELED` See [OrderState](#type-orderstate) for possible values | [optional]
|
30 |
+
**version** | getVersion() | setVersion($value) | **int** | Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](/orders-api/manage-orders#update-orders). | [optional]
|
31 |
**total_money** | getTotalMoney() | setTotalMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total amount of money to collect for the order. | [optional]
|
32 |
**total_tax_money** | getTotalTaxMoney() | setTotalTaxMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total tax amount of money to collect for the order. | [optional]
|
33 |
**total_discount_money** | getTotalDiscountMoney() | setTotalDiscountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total discount amount of money to collect for the order. | [optional]
|
34 |
+
**total_service_charge_money** | getTotalServiceChargeMoney() | setTotalServiceChargeMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts. | [optional]
|
35 |
|
36 |
Note: All properties are protected and only accessed via getters and setters.
|
37 |
|
vendor/square/connect/docs/Model/OrderEntry.md
CHANGED
@@ -8,6 +8,7 @@ A lightweight description of an [Order](#type-order) that is returned when `retu
|
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
**order_id** | getOrderId() | setOrderId($value) | **string** | The id of the Order | [optional]
|
|
|
11 |
**location_id** | getLocationId() | setLocationId($value) | **string** | The location id the Order belongs to. | [optional]
|
12 |
|
13 |
Note: All properties are protected and only accessed via getters and setters.
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
**order_id** | getOrderId() | setOrderId($value) | **string** | The id of the Order | [optional]
|
11 |
+
**version** | getVersion() | setVersion($value) | **int** | Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](/orders-api/manage-orders#update-orders). | [optional]
|
12 |
**location_id** | getLocationId() | setLocationId($value) | **string** | The location id the Order belongs to. | [optional]
|
13 |
|
14 |
Note: All properties are protected and only accessed via getters and setters.
|
vendor/square/connect/docs/Model/OrderFulfillment.md
CHANGED
@@ -7,9 +7,11 @@ Contains details on how to fulfill this order.
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
|
|
10 |
**type** | getType() | setType($value) | **string** | The type of the fulfillment. See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values | [optional]
|
11 |
**state** | getState() | setState($value) | **string** | The state of the fulfillment. See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values | [optional]
|
12 |
-
**pickup_details** | getPickupDetails() | setPickupDetails($value) | [**\SquareConnect\Model\OrderFulfillmentPickupDetails**](OrderFulfillmentPickupDetails.md) | Contains pickup
|
|
|
13 |
|
14 |
Note: All properties are protected and only accessed via getters and setters.
|
15 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the fulfillment only within this order. | [optional]
|
11 |
**type** | getType() | setType($value) | **string** | The type of the fulfillment. See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values | [optional]
|
12 |
**state** | getState() | setState($value) | **string** | The state of the fulfillment. See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values | [optional]
|
13 |
+
**pickup_details** | getPickupDetails() | setPickupDetails($value) | [**\SquareConnect\Model\OrderFulfillmentPickupDetails**](OrderFulfillmentPickupDetails.md) | Contains details for a pickup fulfillment. Required when fulfillment type is `PICKUP`. | [optional]
|
14 |
+
**shipment_details** | getShipmentDetails() | setShipmentDetails($value) | [**\SquareConnect\Model\OrderFulfillmentShipmentDetails**](OrderFulfillmentShipmentDetails.md) | Contains details for a shipment fulfillment. Required when fulfillment type is `SHIPMENT`. A shipment fulfillment's relationship to fulfillment `state`: `PROPOSED`: A shipment is requested. `RESERVED`: Fulfillment accepted. Shipment processing. `PREPARED`: Shipment packaged. Shipping label created. `COMPLETED`: Package has been shipped. `CANCELED`: Shipment has been canceled. `FAILED`: Shipment has failed. | [optional]
|
15 |
|
16 |
Note: All properties are protected and only accessed via getters and setters.
|
17 |
|
vendor/square/connect/docs/Model/OrderFulfillmentPickupDetails.md
CHANGED
@@ -7,22 +7,22 @@ Contains details necessary to fulfill a pickup order.
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**recipient** | getRecipient() | setRecipient($value) | [**\SquareConnect\Model\OrderFulfillmentRecipient**](OrderFulfillmentRecipient.md) |
|
11 |
-
**expires_at** | getExpiresAt() | setExpiresAt($value) | **string** | The
|
12 |
-
**auto_complete_duration** | getAutoCompleteDuration() | setAutoCompleteDuration($value) | **string** | The
|
13 |
**schedule_type** | getScheduleType() | setScheduleType($value) | **string** | The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`. See [OrderFulfillmentPickupDetailsScheduleType](#type-orderfulfillmentpickupdetailsscheduletype) for possible values | [optional]
|
14 |
-
**pickup_at** | getPickupAt() | setPickupAt($value) | **string** | The
|
15 |
-
**pickup_window_duration** | getPickupWindowDuration() | setPickupWindowDuration($value) | **string** | The
|
16 |
-
**prep_time_duration** | getPrepTimeDuration() | setPrepTimeDuration($value) | **string** | The
|
17 |
-
**note** | getNote() | setNote($value) | **string** | A
|
18 |
-
**placed_at** | getPlacedAt() | setPlacedAt($value) | **string** | The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\"
|
19 |
-
**accepted_at** | getAcceptedAt() | setAcceptedAt($value) | **string** | The [timestamp](#workingwithdates)
|
20 |
-
**rejected_at** | getRejectedAt() | setRejectedAt($value) | **string** | The [timestamp](#workingwithdates)
|
21 |
-
**ready_at** | getReadyAt() | setReadyAt($value) | **string** | The [timestamp](#workingwithdates)
|
22 |
-
**expired_at** | getExpiredAt() | setExpiredAt($value) | **string** | The [timestamp](#workingwithdates)
|
23 |
-
**picked_up_at** | getPickedUpAt() | setPickedUpAt($value) | **string** | The [timestamp](#workingwithdates)
|
24 |
-
**canceled_at** | getCanceledAt() | setCanceledAt($value) | **string** | The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was canceled
|
25 |
-
**cancel_reason** | getCancelReason() | setCancelReason($value) | **string** | A description of why the pickup was canceled. Max length
|
26 |
|
27 |
Note: All properties are protected and only accessed via getters and setters.
|
28 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**recipient** | getRecipient() | setRecipient($value) | [**\SquareConnect\Model\OrderFulfillmentRecipient**](OrderFulfillmentRecipient.md) | Information on the person meant to pick up this fulfillment from a physical location. | [optional]
|
11 |
+
**expires_at** | getExpiresAt() | setExpiresAt($value) | **string** | The [timestamp](#workingwithdates) indicating when this fulfillment will expire if it is not accepted. Must be in RFC 3339 format e.g., \"2016-09-04T23:59:33.123Z\". Expiration time can only be set up to 7 days in the future. If `expires_at` is not set, this pickup fulfillment will be automatically accepted when placed. | [optional]
|
12 |
+
**auto_complete_duration** | getAutoCompleteDuration() | setAutoCompleteDuration($value) | **string** | The duration of time after which an open and accepted pickup fulfillment will automatically move to the `COMPLETED` state. Must be in RFC3339 duration format e.g., \"P1W3D\". If not set, this pickup fulfillment will remain accepted until it is canceled or completed. | [optional]
|
13 |
**schedule_type** | getScheduleType() | setScheduleType($value) | **string** | The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`. See [OrderFulfillmentPickupDetailsScheduleType](#type-orderfulfillmentpickupdetailsscheduletype) for possible values | [optional]
|
14 |
+
**pickup_at** | getPickupAt() | setPickupAt($value) | **string** | The [timestamp](#workingwithdates) that represents the start of the pickup window. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". For fulfillments with the schedule type `ASAP`, this is automatically set to the current time plus the expected duration to prepare the fulfillment. | [optional]
|
15 |
+
**pickup_window_duration** | getPickupWindowDuration() | setPickupWindowDuration($value) | **string** | The window of time in which the order should be picked up after the `pickup_at` timestamp. Must be in RFC3339 duration format, e.g., \"P1W3D\". Can be used as an informational guideline for merchants. | [optional]
|
16 |
+
**prep_time_duration** | getPrepTimeDuration() | setPrepTimeDuration($value) | **string** | The duration of time it takes to prepare this fulfillment. Must be in RFC3339 duration format, e.g., \"P1W3D\". | [optional]
|
17 |
+
**note** | getNote() | setNote($value) | **string** | A note meant to provide additional instructions about the pickup fulfillment displayed in the Square Point of Sale and set by the API. | [optional]
|
18 |
+
**placed_at** | getPlacedAt() | setPlacedAt($value) | **string** | The [timestamp](#workingwithdates) indicating when the fulfillment was placed. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
19 |
+
**accepted_at** | getAcceptedAt() | setAcceptedAt($value) | **string** | The [timestamp](#workingwithdates) indicating when the fulfillment was accepted. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
20 |
+
**rejected_at** | getRejectedAt() | setRejectedAt($value) | **string** | The [timestamp](#workingwithdates) indicating when the fulfillment was rejected. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
21 |
+
**ready_at** | getReadyAt() | setReadyAt($value) | **string** | The [timestamp](#workingwithdates) indicating when the fulfillment is marked as ready for pickup. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
22 |
+
**expired_at** | getExpiredAt() | setExpiredAt($value) | **string** | The [timestamp](#workingwithdates) indicating when the fulfillment expired. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
23 |
+
**picked_up_at** | getPickedUpAt() | setPickedUpAt($value) | **string** | The [timestamp](#workingwithdates) indicating when the fulfillment was picked up by the recipient. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
24 |
+
**canceled_at** | getCanceledAt() | setCanceledAt($value) | **string** | The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was canceled. | [optional]
|
25 |
+
**cancel_reason** | getCancelReason() | setCancelReason($value) | **string** | A description of why the pickup was canceled. Max length: 100 characters. | [optional]
|
26 |
|
27 |
Note: All properties are protected and only accessed via getters and setters.
|
28 |
|
vendor/square/connect/docs/Model/OrderFulfillmentRecipient.md
CHANGED
@@ -2,15 +2,16 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**customer_id** | getCustomerId() | setCustomerId($value) | **string** | The Customer ID of the customer associated with the fulfillment. If customer_id is provided, the
|
11 |
-
**display_name** | getDisplayName() | setDisplayName($value) | **string** | The display name of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id
|
12 |
-
**email_address** | getEmailAddress() | setEmailAddress($value) | **string** | The email address of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id
|
13 |
-
**phone_number** | getPhoneNumber() | setPhoneNumber($value) | **string** | The phone number of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id
|
|
|
14 |
|
15 |
Note: All properties are protected and only accessed via getters and setters.
|
16 |
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Contains information on the recipient of a fulfillment.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**customer_id** | getCustomerId() | setCustomerId($value) | **string** | The Customer ID of the customer associated with the fulfillment. If `customer_id` is provided, the fulfillment recipient's `display_name`, `email_address`, and `phone_number` are automatically populated from the targeted customer profile. If these fields are set in the request, the request values will override the information from the customer profile. If the targeted customer profile does not contain the necessary information and these fields are left unset, the request will result in an error. | [optional]
|
11 |
+
**display_name** | getDisplayName() | setDisplayName($value) | **string** | The display name of the fulfillment recipient. If provided, overrides the value pulled from the customer profile indicated by `customer_id`. | [optional]
|
12 |
+
**email_address** | getEmailAddress() | setEmailAddress($value) | **string** | The email address of the fulfillment recipient. If provided, overrides the value pulled from the customer profile indicated by `customer_id`. | [optional]
|
13 |
+
**phone_number** | getPhoneNumber() | setPhoneNumber($value) | **string** | The phone number of the fulfillment recipient. If provided, overrides the value pulled from the customer profile indicated by `customer_id`. | [optional]
|
14 |
+
**address** | getAddress() | setAddress($value) | [**\SquareConnect\Model\Address**](Address.md) | The address of the fulfillment recipient. If provided, overrides the value pulled from the customer profile indicated by `customer_id`. | [optional]
|
15 |
|
16 |
Note: All properties are protected and only accessed via getters and setters.
|
17 |
|
vendor/square/connect/docs/Model/OrderFulfillmentShipmentDetails.md
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OrderFulfillmentShipmentDetails
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Contains details necessary to fulfill a shipment order.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**recipient** | getRecipient() | setRecipient($value) | [**\SquareConnect\Model\OrderFulfillmentRecipient**](OrderFulfillmentRecipient.md) | Information on the person meant to receive this shipment fulfillment. | [optional]
|
11 |
+
**carrier** | getCarrier() | setCarrier($value) | **string** | The shipping carrier being used to ship this fulfillment e.g. UPS, FedEx, USPS, etc. | [optional]
|
12 |
+
**shipping_note** | getShippingNote() | setShippingNote($value) | **string** | A note with additional information for the shipping carrier. | [optional]
|
13 |
+
**shipping_type** | getShippingType() | setShippingType($value) | **string** | A description of the type of shipping product purchased from the carrier. e.g. First Class, Priority, Express | [optional]
|
14 |
+
**tracking_number** | getTrackingNumber() | setTrackingNumber($value) | **string** | The reference number provided by the carrier to track the shipment's progress. | [optional]
|
15 |
+
**tracking_url** | getTrackingUrl() | setTrackingUrl($value) | **string** | A link to the tracking webpage on the carrier's website. | [optional]
|
16 |
+
**placed_at** | getPlacedAt() | setPlacedAt($value) | **string** | The [timestamp](#workingwithdates) indicating when the shipment was requested. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
17 |
+
**in_progress_at** | getInProgressAt() | setInProgressAt($value) | **string** | The [timestamp](#workingwithdates) indicating when this fulfillment was moved to the `RESERVED` state. Indicates that preparation of this shipment has begun. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
18 |
+
**packaged_at** | getPackagedAt() | setPackagedAt($value) | **string** | The [timestamp](#workingwithdates) indicating when this fulfillment was moved to the `PREPARED` state. Indicates that the fulfillment is packaged. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
19 |
+
**expected_shipped_at** | getExpectedShippedAt() | setExpectedShippedAt($value) | **string** | The [timestamp](#workingwithdates) indicating when the shipment is expected to be delivered to the shipping carrier. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
20 |
+
**shipped_at** | getShippedAt() | setShippedAt($value) | **string** | The [timestamp](#workingwithdates) indicating when this fulfillment was moved to the `COMPLETED`state. Indicates that the fulfillment has been given to the shipping carrier. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
21 |
+
**canceled_at** | getCanceledAt() | setCanceledAt($value) | **string** | The [timestamp](#workingwithdates) indicating the shipment was canceled. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
22 |
+
**cancel_reason** | getCancelReason() | setCancelReason($value) | **string** | A description of why the shipment was canceled. | [optional]
|
23 |
+
**failed_at** | getFailedAt() | setFailedAt($value) | **string** | The [timestamp](#workingwithdates) indicating when the shipment failed to be completed. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
|
24 |
+
**failure_reason** | getFailureReason() | setFailureReason($value) | **string** | A description of why the shipment failed to be completed. | [optional]
|
25 |
+
|
26 |
+
Note: All properties are protected and only accessed via getters and setters.
|
27 |
+
|
28 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
29 |
+
|
vendor/square/connect/docs/Model/OrderFulfillmentState.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
The state of
|
6 |
|
7 |
## Properties
|
8 |
Name | Type
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
The current state of this fulfillment.
|
6 |
|
7 |
## Properties
|
8 |
Name | Type
|
vendor/square/connect/docs/Model/OrderFulfillmentType.md
CHANGED
@@ -8,6 +8,7 @@ The type of fulfillment.
|
|
8 |
Name | Type
|
9 |
------------ | -------------
|
10 |
**PICKUP** | string
|
|
|
11 |
|
12 |
Note: All properties are protected and only accessed via getters and setters.
|
13 |
|
8 |
Name | Type
|
9 |
------------ | -------------
|
10 |
**PICKUP** | string
|
11 |
+
**SHIPMENT** | string
|
12 |
|
13 |
Note: All properties are protected and only accessed via getters and setters.
|
14 |
|
vendor/square/connect/docs/Model/OrderLineItem.md
CHANGED
@@ -7,16 +7,18 @@ Represents a line item in an order. Each line item describes a different product
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**uid** | getUid() | setUid($value) | **string** |
|
11 |
**name** | getName() | setName($value) | **string** | The name of the line item. | [optional]
|
12 |
-
**quantity** | getQuantity() | setQuantity($value) | **string** | The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.
|
13 |
**quantity_unit** | getQuantityUnit() | setQuantityUnit($value) | [**\SquareConnect\Model\OrderQuantityUnit**](OrderQuantityUnit.md) | The unit and precision that this line item's quantity is measured in. | [optional]
|
14 |
**note** | getNote() | setNote($value) | **string** | The note of the line item. | [optional]
|
15 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The [CatalogItemVariation](#type-catalogitemvariation) id applied to this line item. | [optional]
|
16 |
**variation_name** | getVariationName() | setVariationName($value) | **string** | The name of the variation applied to this line item. | [optional]
|
17 |
**modifiers** | getModifiers() | setModifiers($value) | [**\SquareConnect\Model\OrderLineItemModifier[]**](OrderLineItemModifier.md) | The [CatalogModifier](#type-catalogmodifier)s applied to this line item. | [optional]
|
18 |
-
**taxes** | getTaxes() | setTaxes($value) | [**\SquareConnect\Model\OrderLineItemTax[]**](OrderLineItemTax.md) | A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. | [optional]
|
19 |
-
**discounts** | getDiscounts() | setDiscounts($value) | [**\SquareConnect\Model\OrderLineItemDiscount[]**](OrderLineItemDiscount.md) | A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list. | [optional]
|
|
|
|
|
20 |
**base_price_money** | getBasePriceMoney() | setBasePriceMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The base price for a single unit of the line item. | [optional]
|
21 |
**variation_total_price_money** | getVariationTotalPriceMoney() | setVariationTotalPriceMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total price of all item variations sold in this line item. Calculated as `base_price_money` multiplied by `quantity`. Does not include modifiers. | [optional]
|
22 |
**gross_sales_money** | getGrossSalesMoney() | setGrossSalesMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. | [optional]
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the line item only within this order. | [optional]
|
11 |
**name** | getName() | setName($value) | **string** | The name of the line item. | [optional]
|
12 |
+
**quantity** | getQuantity() | setQuantity($value) | **string** | The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. |
|
13 |
**quantity_unit** | getQuantityUnit() | setQuantityUnit($value) | [**\SquareConnect\Model\OrderQuantityUnit**](OrderQuantityUnit.md) | The unit and precision that this line item's quantity is measured in. | [optional]
|
14 |
**note** | getNote() | setNote($value) | **string** | The note of the line item. | [optional]
|
15 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The [CatalogItemVariation](#type-catalogitemvariation) id applied to this line item. | [optional]
|
16 |
**variation_name** | getVariationName() | setVariationName($value) | **string** | The name of the variation applied to this line item. | [optional]
|
17 |
**modifiers** | getModifiers() | setModifiers($value) | [**\SquareConnect\Model\OrderLineItemModifier[]**](OrderLineItemModifier.md) | The [CatalogModifier](#type-catalogmodifier)s applied to this line item. | [optional]
|
18 |
+
**taxes** | getTaxes() | setTaxes($value) | [**\SquareConnect\Model\OrderLineItemTax[]**](OrderLineItemTax.md) | A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. | [optional]
|
19 |
+
**discounts** | getDiscounts() | setDiscounts($value) | [**\SquareConnect\Model\OrderLineItemDiscount[]**](OrderLineItemDiscount.md) | A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list. This field has been deprecated in favour of `applied_discounts`. Usage of both this field and `applied_discounts` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. | [optional]
|
20 |
+
**applied_taxes** | getAppliedTaxes() | setAppliedTaxes($value) | [**\SquareConnect\Model\OrderLineItemAppliedTax[]**](OrderLineItemAppliedTax.md) | The list of references to taxes applied to this line item. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every line item for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any line items. To change the amount of a tax, modify the referenced top-level tax. | [optional]
|
21 |
+
**applied_discounts** | getAppliedDiscounts() | setAppliedDiscounts($value) | [**\SquareConnect\Model\OrderLineItemAppliedDiscount[]**](OrderLineItemAppliedDiscount.md) | The list of references to discounts applied to this line item. Each `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level `OrderLineItemDiscounts` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedDiscount` will be automatically created on every line item for all `ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records for `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any line items. To change the amount of a discount, modify the referenced top-level discount. | [optional]
|
22 |
**base_price_money** | getBasePriceMoney() | setBasePriceMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The base price for a single unit of the line item. | [optional]
|
23 |
**variation_total_price_money** | getVariationTotalPriceMoney() | setVariationTotalPriceMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total price of all item variations sold in this line item. Calculated as `base_price_money` multiplied by `quantity`. Does not include modifiers. | [optional]
|
24 |
**gross_sales_money** | getGrossSalesMoney() | setGrossSalesMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. | [optional]
|
vendor/square/connect/docs/Model/OrderLineItemAppliedDiscount.md
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OrderLineItemAppliedDiscount
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Represents an applied portion of a discount to a line item in an order. Order scoped discounts will automatically have applied discounts present for each line item. Line item scoped discounts must have applied discounts added manually for any applicable line items. The corresponding applied money will automatically be computed based on participating line items.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the applied discount only within this order. | [optional]
|
11 |
+
**discount_uid** | getDiscountUid() | setDiscountUid($value) | **string** | The `uid` of the discount the applied discount represents. Must reference a discount present in the `order.discounts` field. This field is immutable. To change which discounts apply to a line item, you must delete the discount and re-add it as a new `OrderLineItemAppliedDiscount`. |
|
12 |
+
**applied_money** | getAppliedMoney() | setAppliedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of money applied by the discount to the line item. | [optional]
|
13 |
+
|
14 |
+
Note: All properties are protected and only accessed via getters and setters.
|
15 |
+
|
16 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
17 |
+
|
vendor/square/connect/docs/Model/OrderLineItemAppliedTax.md
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OrderLineItemAppliedTax
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Represents an applied portion of a tax to a line item in an order. Order-scoped taxes automatically include the applied taxes in each line item. Line item taxes must be referenced from any applicable line items. The corresponding applied money is automatically computed, based on the set of participating line items.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the applied tax only within this order. | [optional]
|
11 |
+
**tax_uid** | getTaxUid() | setTaxUid($value) | **string** | The `uid` of the tax for which this applied tax represents. Must reference a tax present in the `order.taxes` field. This field is immutable. To change which taxes apply to a line item, delete and add new `OrderLineItemAppliedTax`s. |
|
12 |
+
**applied_money** | getAppliedMoney() | setAppliedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of money applied by the tax to the line item. | [optional]
|
13 |
+
|
14 |
+
Note: All properties are protected and only accessed via getters and setters.
|
15 |
+
|
16 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
17 |
+
|
vendor/square/connect/docs/Model/OrderLineItemDiscount.md
CHANGED
@@ -2,19 +2,19 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Represents a discount that applies to one or more line items in an order. Fixed-amount, order-
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**uid** | getUid() | setUid($value) | **string** |
|
11 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object id referencing [CatalogDiscount](#type-catalogdiscount). | [optional]
|
12 |
**name** | getName() | setName($value) | **string** | The discount's name. | [optional]
|
13 |
**type** | getType() | setType($value) | **string** | The type of the discount. If it is created by API, it would be either `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. VARIABLE_* is not supported in API because the order is created at the time of sale and either percentage or amount has to be specified. See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values | [optional]
|
14 |
**percentage** | getPercentage() | setPercentage($value) | **string** | The percentage of the discount, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. The percentage won't be set for an amount-based discount. | [optional]
|
15 |
-
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total monetary amount of the
|
16 |
-
**applied_money** | getAppliedMoney() | setAppliedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of discount actually applied to
|
17 |
-
**scope** | getScope() | setScope($value) | **string** | Indicates the level at which the discount applies. This field is
|
18 |
|
19 |
Note: All properties are protected and only accessed via getters and setters.
|
20 |
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Represents a discount that applies to one or more line items in an order. Fixed-amount, order-scoped discounts are distributed across all non-zero line item totals. The amount distributed to each line item is relative to the amount contributed by the item to the order subtotal.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the discount only within this order. | [optional]
|
11 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object id referencing [CatalogDiscount](#type-catalogdiscount). | [optional]
|
12 |
**name** | getName() | setName($value) | **string** | The discount's name. | [optional]
|
13 |
**type** | getType() | setType($value) | **string** | The type of the discount. If it is created by API, it would be either `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. VARIABLE_* is not supported in API because the order is created at the time of sale and either percentage or amount has to be specified. See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values | [optional]
|
14 |
**percentage** | getPercentage() | setPercentage($value) | **string** | The percentage of the discount, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. The percentage won't be set for an amount-based discount. | [optional]
|
15 |
+
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total declared monetary amount of the discount. `amount_money` is not set for percentage-based discounts. | [optional]
|
16 |
+
**applied_money** | getAppliedMoney() | setAppliedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of discount actually applied to the line item. Represents the amount of money applied as a line item-scoped discount. When an amount-based discount is scoped to the entire order, the value of `applied_money` is different from `amount_money` because the total amount of the discount is distributed across all line items. | [optional]
|
17 |
+
**scope** | getScope() | setScope($value) | **string** | Indicates the level at which the discount applies. For `ORDER` scoped discounts, Square generates references in `applied_discounts` on all order line items that do not have them. For `LINE_ITEM` scoped discounts, the discount only applies to line items with a discount reference in their `applied_discounts` field. This field is immutable. To change the scope of a discount you must delete the discount and re-add it as a new discount. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values | [optional]
|
18 |
|
19 |
Note: All properties are protected and only accessed via getters and setters.
|
20 |
|
vendor/square/connect/docs/Model/OrderLineItemModifier.md
CHANGED
@@ -7,7 +7,7 @@ A [CatalogModifier](#type-catalogmodifier).
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**uid** | getUid() | setUid($value) | **string** |
|
11 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object id referencing [CatalogModifier](#type-catalogmodifier). | [optional]
|
12 |
**name** | getName() | setName($value) | **string** | The name of the item modifier. | [optional]
|
13 |
**base_price_money** | getBasePriceMoney() | setBasePriceMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The base price for the modifier. `base_price_money` is required for ad hoc modifiers. If both `catalog_object_id` and `base_price_money` are set, `base_price_money` will override the predefined [CatalogModifier](#type-catalogmodifier) price. | [optional]
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the modifier only within this order. | [optional]
|
11 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object id referencing [CatalogModifier](#type-catalogmodifier). | [optional]
|
12 |
**name** | getName() | setName($value) | **string** | The name of the item modifier. | [optional]
|
13 |
**base_price_money** | getBasePriceMoney() | setBasePriceMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The base price for the modifier. `base_price_money` is required for ad hoc modifiers. If both `catalog_object_id` and `base_price_money` are set, `base_price_money` will override the predefined [CatalogModifier](#type-catalogmodifier) price. | [optional]
|
vendor/square/connect/docs/Model/OrderLineItemTax.md
CHANGED
@@ -2,18 +2,18 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Represents a tax that applies to one or more line
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**uid** | getUid() | setUid($value) | **string** |
|
11 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object id referencing [CatalogTax](#type-catalogtax). | [optional]
|
12 |
**name** | getName() | setName($value) | **string** | The tax's name. | [optional]
|
13 |
**type** | getType() | setType($value) | **string** | Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional]
|
14 |
-
**percentage** | getPercentage() | setPercentage($value) | **string** | The percentage of the tax, as a string representation of a decimal number.
|
15 |
-
**applied_money** | getAppliedMoney() | setAppliedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of the money applied by the tax in
|
16 |
-
**scope** | getScope() | setScope($value) | **string** | Indicates the level at which the tax applies. This field is
|
17 |
|
18 |
Note: All properties are protected and only accessed via getters and setters.
|
19 |
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Represents a tax that applies to one or more line item in the order. Fixed-amount, order-scoped taxes are distributed across all non-zero line item totals. The amount distributed to each line item is relative to the amount the item contributes to the order subtotal.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the tax only within this order. | [optional]
|
11 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object id referencing [CatalogTax](#type-catalogtax). | [optional]
|
12 |
**name** | getName() | setName($value) | **string** | The tax's name. | [optional]
|
13 |
**type** | getType() | setType($value) | **string** | Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional]
|
14 |
+
**percentage** | getPercentage() | setPercentage($value) | **string** | The percentage of the tax, as a string representation of a decimal number. For example, a value of `\"7.25\"` corresponds to a percentage of 7.25%. | [optional]
|
15 |
+
**applied_money** | getAppliedMoney() | setAppliedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of the money applied by the tax in the order. | [optional]
|
16 |
+
**scope** | getScope() | setScope($value) | **string** | Indicates the level at which the tax applies. For `ORDER` scoped taxes, Square generates references in `applied_taxes` on all order line items that do not have them. For `LINE_ITEM` scoped taxes, the tax will only apply to line items with references in their `applied_taxes` field. This field is immutable. To change the scope, you must delete the tax and re-add it as a new tax. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values | [optional]
|
17 |
|
18 |
Note: All properties are protected and only accessed via getters and setters.
|
19 |
|
vendor/square/connect/docs/Model/OrderQuantityUnit.md
CHANGED
@@ -8,7 +8,7 @@ Contains the measurement unit for a quantity and a precision which specifies the
|
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
**measurement_unit** | getMeasurementUnit() | setMeasurementUnit($value) | [**\SquareConnect\Model\MeasurementUnit**](MeasurementUnit.md) | A [MeasurementUnit](#type-measurementunit) that represents the unit of measure for the quantity. | [optional]
|
11 |
-
**precision** | getPrecision() | setPrecision($value) | **int** | For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5.
|
12 |
|
13 |
Note: All properties are protected and only accessed via getters and setters.
|
14 |
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
**measurement_unit** | getMeasurementUnit() | setMeasurementUnit($value) | [**\SquareConnect\Model\MeasurementUnit**](MeasurementUnit.md) | A [MeasurementUnit](#type-measurementunit) that represents the unit of measure for the quantity. | [optional]
|
11 |
+
**precision** | getPrecision() | setPrecision($value) | **int** | For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5. | [optional]
|
12 |
|
13 |
Note: All properties are protected and only accessed via getters and setters.
|
14 |
|
vendor/square/connect/docs/Model/OrderReturn.md
CHANGED
@@ -7,11 +7,12 @@ The set of line items, service charges, taxes, discounts, tips, etc. being retur
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**uid** | getUid() | setUid($value) | **string** |
|
11 |
**source_order_id** | getSourceOrderId() | setSourceOrderId($value) | **string** | Order which contains the original sale of these returned line items. This will be unset for unlinked returns. | [optional]
|
12 |
**return_line_items** | getReturnLineItems() | setReturnLineItems($value) | [**\SquareConnect\Model\OrderReturnLineItem[]**](OrderReturnLineItem.md) | Collection of line items which are being returned. | [optional]
|
13 |
-
**
|
14 |
-
**
|
|
|
15 |
**rounding_adjustment** | getRoundingAdjustment() | setRoundingAdjustment($value) | [**\SquareConnect\Model\OrderRoundingAdjustment**](OrderRoundingAdjustment.md) | A positive or negative rounding adjustment to the total value being returned. Commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. | [optional]
|
16 |
**return_amounts** | getReturnAmounts() | setReturnAmounts($value) | [**\SquareConnect\Model\OrderMoneyAmounts**](OrderMoneyAmounts.md) | Aggregate monetary value being returned by this Return entry. | [optional]
|
17 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the return only within this order. | [optional]
|
11 |
**source_order_id** | getSourceOrderId() | setSourceOrderId($value) | **string** | Order which contains the original sale of these returned line items. This will be unset for unlinked returns. | [optional]
|
12 |
**return_line_items** | getReturnLineItems() | setReturnLineItems($value) | [**\SquareConnect\Model\OrderReturnLineItem[]**](OrderReturnLineItem.md) | Collection of line items which are being returned. | [optional]
|
13 |
+
**return_service_charges** | getReturnServiceCharges() | setReturnServiceCharges($value) | [**\SquareConnect\Model\OrderReturnServiceCharge[]**](OrderReturnServiceCharge.md) | Collection of service charges which are being returned. | [optional]
|
14 |
+
**return_taxes** | getReturnTaxes() | setReturnTaxes($value) | [**\SquareConnect\Model\OrderReturnTax[]**](OrderReturnTax.md) | Collection of references to taxes being returned for an order, including the total applied tax amount to be returned. The taxes must reference a top-level tax ID from the source order. | [optional]
|
15 |
+
**return_discounts** | getReturnDiscounts() | setReturnDiscounts($value) | [**\SquareConnect\Model\OrderReturnDiscount[]**](OrderReturnDiscount.md) | Collection of references to discounts being returned for an order, including the total applied discount amount to be returned. The discounts must reference a top-level discount ID from the source order. | [optional]
|
16 |
**rounding_adjustment** | getRoundingAdjustment() | setRoundingAdjustment($value) | [**\SquareConnect\Model\OrderRoundingAdjustment**](OrderRoundingAdjustment.md) | A positive or negative rounding adjustment to the total value being returned. Commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. | [optional]
|
17 |
**return_amounts** | getReturnAmounts() | setReturnAmounts($value) | [**\SquareConnect\Model\OrderMoneyAmounts**](OrderMoneyAmounts.md) | Aggregate monetary value being returned by this Return entry. | [optional]
|
18 |
|
vendor/square/connect/docs/Model/OrderReturnDiscount.md
CHANGED
@@ -2,20 +2,20 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
The line item
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**uid** | getUid() | setUid($value) | **string** |
|
11 |
**source_discount_uid** | getSourceDiscountUid() | setSourceDiscountUid($value) | **string** | `uid` of the Discount from the Order which contains the original application of this discount. | [optional]
|
12 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object id referencing [CatalogDiscount](#type-catalogdiscount). | [optional]
|
13 |
**name** | getName() | setName($value) | **string** | The discount's name. | [optional]
|
14 |
**type** | getType() | setType($value) | **string** | The type of the discount. If it is created by API, it would be either `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. VARIABLE_* is not supported in API because the order is created at the time of sale and either percentage or amount has to be specified. See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values | [optional]
|
15 |
**percentage** | getPercentage() | setPercentage($value) | **string** | The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. The percentage won't be set for an amount-based discount. | [optional]
|
16 |
-
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total monetary amount of the
|
17 |
**applied_money** | getAppliedMoney() | setAppliedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of discount actually applied to this line item. When an amount-based discount is at order-level, this value is different from `amount_money` because the discount is distributed across the line items. | [optional]
|
18 |
-
**scope** | getScope() | setScope($value) | **string** | Indicates the level at which the
|
19 |
|
20 |
Note: All properties are protected and only accessed via getters and setters.
|
21 |
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Represents a discount being returned that applies to one or more return line items in an order. Fixed-amount, order-scoped discounts are distributed across all non-zero return line item totals. The amount distributed to each return line item is relative to that item’s contribution to the order subtotal.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the return discount only within this order. | [optional]
|
11 |
**source_discount_uid** | getSourceDiscountUid() | setSourceDiscountUid($value) | **string** | `uid` of the Discount from the Order which contains the original application of this discount. | [optional]
|
12 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object id referencing [CatalogDiscount](#type-catalogdiscount). | [optional]
|
13 |
**name** | getName() | setName($value) | **string** | The discount's name. | [optional]
|
14 |
**type** | getType() | setType($value) | **string** | The type of the discount. If it is created by API, it would be either `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. VARIABLE_* is not supported in API because the order is created at the time of sale and either percentage or amount has to be specified. See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values | [optional]
|
15 |
**percentage** | getPercentage() | setPercentage($value) | **string** | The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. The percentage won't be set for an amount-based discount. | [optional]
|
16 |
+
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total declared monetary amount of the discount. The amount_money won't be set for a percentage-based discount. | [optional]
|
17 |
**applied_money** | getAppliedMoney() | setAppliedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of discount actually applied to this line item. When an amount-based discount is at order-level, this value is different from `amount_money` because the discount is distributed across the line items. | [optional]
|
18 |
+
**scope** | getScope() | setScope($value) | **string** | Indicates the level at which the `OrderReturnDiscount` applies. For `ORDER` scoped discounts, the server will generate references in `applied_discounts` on all `OrderReturnLineItem`s. For `LINE_ITEM` scoped discounts, the discount will only apply to `OrderReturnLineItem`s with references in their `applied_discounts` field. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values | [optional]
|
19 |
|
20 |
Note: All properties are protected and only accessed via getters and setters.
|
21 |
|
vendor/square/connect/docs/Model/OrderReturnLineItem.md
CHANGED
@@ -7,7 +7,7 @@ The line item being returned in an Order.
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**uid** | getUid() | setUid($value) | **string** | Unique identifier for this return line item entry.
|
11 |
**source_line_item_uid** | getSourceLineItemUid() | setSourceLineItemUid($value) | **string** | `uid` of the LineItem in the original sale Order. | [optional]
|
12 |
**name** | getName() | setName($value) | **string** | The name of the line item. | [optional]
|
13 |
**quantity** | getQuantity() | setQuantity($value) | **string** | The quantity returned, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. |
|
@@ -16,8 +16,10 @@ Name | Getter | Setter | Type | Description | Notes
|
|
16 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The [CatalogItemVariation](#type-catalogitemvariation) id applied to this returned line item. | [optional]
|
17 |
**variation_name** | getVariationName() | setVariationName($value) | **string** | The name of the variation applied to this returned line item. | [optional]
|
18 |
**return_modifiers** | getReturnModifiers() | setReturnModifiers($value) | [**\SquareConnect\Model\OrderReturnLineItemModifier[]**](OrderReturnLineItemModifier.md) | The [CatalogModifier](#type-catalogmodifier)s applied to this line item. | [optional]
|
19 |
-
**return_taxes** | getReturnTaxes() | setReturnTaxes($value) | [**\SquareConnect\Model\OrderReturnTax[]**](OrderReturnTax.md) | A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item. | [optional]
|
20 |
-
**return_discounts** | getReturnDiscounts() | setReturnDiscounts($value) | [**\SquareConnect\Model\OrderReturnDiscount[]**](OrderReturnDiscount.md) | A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any return-level discounts apportioned to this item. | [optional]
|
|
|
|
|
21 |
**base_price_money** | getBasePriceMoney() | setBasePriceMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The base price for a single unit of the line item. | [optional]
|
22 |
**variation_total_price_money** | getVariationTotalPriceMoney() | setVariationTotalPriceMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total price of all item variations returned in this line item. Calculated as `base_price_money` multiplied by `quantity`. Does not include modifiers. | [optional]
|
23 |
**gross_return_money** | getGrossReturnMoney() | setGrossReturnMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The gross return amount of money calculated as (item base price + modifiers price) * quantity. | [optional]
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique identifier for this return line item entry. | [optional]
|
11 |
**source_line_item_uid** | getSourceLineItemUid() | setSourceLineItemUid($value) | **string** | `uid` of the LineItem in the original sale Order. | [optional]
|
12 |
**name** | getName() | setName($value) | **string** | The name of the line item. | [optional]
|
13 |
**quantity** | getQuantity() | setQuantity($value) | **string** | The quantity returned, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. |
|
16 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The [CatalogItemVariation](#type-catalogitemvariation) id applied to this returned line item. | [optional]
|
17 |
**variation_name** | getVariationName() | setVariationName($value) | **string** | The name of the variation applied to this returned line item. | [optional]
|
18 |
**return_modifiers** | getReturnModifiers() | setReturnModifiers($value) | [**\SquareConnect\Model\OrderReturnLineItemModifier[]**](OrderReturnLineItemModifier.md) | The [CatalogModifier](#type-catalogmodifier)s applied to this line item. | [optional]
|
19 |
+
**return_taxes** | getReturnTaxes() | setReturnTaxes($value) | [**\SquareConnect\Model\OrderReturnTax[]**](OrderReturnTax.md) | A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item. This field has been deprecated in favour of `applied_taxes`. | [optional]
|
20 |
+
**return_discounts** | getReturnDiscounts() | setReturnDiscounts($value) | [**\SquareConnect\Model\OrderReturnDiscount[]**](OrderReturnDiscount.md) | A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any return-level discounts apportioned to this item. This field has been deprecated in favour of `applied_discounts`. | [optional]
|
21 |
+
**applied_taxes** | getAppliedTaxes() | setAppliedTaxes($value) | [**\SquareConnect\Model\OrderLineItemAppliedTax[]**](OrderLineItemAppliedTax.md) | The list of references to `OrderReturnTax` entities applied to the returned line item. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderReturnTax` applied to the returned line item. On reads, the amount applied is populated. | [optional]
|
22 |
+
**applied_discounts** | getAppliedDiscounts() | setAppliedDiscounts($value) | [**\SquareConnect\Model\OrderLineItemAppliedDiscount[]**](OrderLineItemAppliedDiscount.md) | The list of references to `OrderReturnDiscount` entities applied to the returned line item. Each `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level `OrderReturnDiscount` applied to the returned line item. On reads, the amount applied is populated. | [optional]
|
23 |
**base_price_money** | getBasePriceMoney() | setBasePriceMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The base price for a single unit of the line item. | [optional]
|
24 |
**variation_total_price_money** | getVariationTotalPriceMoney() | setVariationTotalPriceMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total price of all item variations returned in this line item. Calculated as `base_price_money` multiplied by `quantity`. Does not include modifiers. | [optional]
|
25 |
**gross_return_money** | getGrossReturnMoney() | setGrossReturnMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The gross return amount of money calculated as (item base price + modifiers price) * quantity. | [optional]
|
vendor/square/connect/docs/Model/OrderReturnLineItemModifier.md
CHANGED
@@ -7,7 +7,7 @@ A line item modifier being returned.
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**uid** | getUid() | setUid($value) | **string** |
|
11 |
**source_modifier_uid** | getSourceModifierUid() | setSourceModifierUid($value) | **string** | `uid` of the Modifier from the LineItem from the Order which contains the original sale of this line item modifier. | [optional]
|
12 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object id referencing [CatalogModifier](#type-catalogmodifier). | [optional]
|
13 |
**name** | getName() | setName($value) | **string** | The name of the item modifier. | [optional]
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the return modifier only within this order. | [optional]
|
11 |
**source_modifier_uid** | getSourceModifierUid() | setSourceModifierUid($value) | **string** | `uid` of the Modifier from the LineItem from the Order which contains the original sale of this line item modifier. | [optional]
|
12 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object id referencing [CatalogModifier](#type-catalogmodifier). | [optional]
|
13 |
**name** | getName() | setName($value) | **string** | The name of the item modifier. | [optional]
|
vendor/square/connect/docs/Model/OrderReturnServiceCharge.md
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OrderReturnServiceCharge
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Represents the service charge applied to the original order.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the return service charge only within this order. | [optional]
|
11 |
+
**source_service_charge_uid** | getSourceServiceChargeUid() | setSourceServiceChargeUid($value) | **string** | `uid` of the Service Charge from the Order containing the original charge of the service charge. `source_service_charge_uid` is `null` for unlinked returns. | [optional]
|
12 |
+
**name** | getName() | setName($value) | **string** | The name of the service charge. | [optional]
|
13 |
+
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object ID of the associated [CatalogServiceCharge](#type-catalogservicecharge). | [optional]
|
14 |
+
**percentage** | getPercentage() | setPercentage($value) | **string** | The percentage of the service charge, as a string representation of a decimal number. For example, a value of `\"7.25\"` corresponds to a percentage of 7.25%. Exactly one of `percentage` or `amount_money` should be set. | [optional]
|
15 |
+
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of a non-percentage based service charge. Exactly one of `percentage` or `amount_money` should be set. | [optional]
|
16 |
+
**applied_money** | getAppliedMoney() | setAppliedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of money applied to the order by the service charge, including any inclusive tax amounts, as calculated by Square. - For fixed-amount service charges, `applied_money` is equal to `amount_money`. - For percentage-based service charges, `applied_money` is the money calculated using the percentage. | [optional]
|
17 |
+
**total_money** | getTotalMoney() | setTotalMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total amount of money to collect for the service charge. __NOTE__: if an inclusive tax is applied to the service charge, `total_money` does not equal `applied_money` plus `total_tax_money` since the inclusive tax amount will already be included in both `applied_money` and `total_tax_money`. | [optional]
|
18 |
+
**total_tax_money** | getTotalTaxMoney() | setTotalTaxMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total amount of tax money to collect for the service charge. | [optional]
|
19 |
+
**calculation_phase** | getCalculationPhase() | setCalculationPhase($value) | **string** | The calculation phase after which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values | [optional]
|
20 |
+
**taxable** | getTaxable() | setTaxable($value) | **bool** | Indicates whether the surcharge can be taxed. Service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. | [optional]
|
21 |
+
**return_taxes** | getReturnTaxes() | setReturnTaxes($value) | [**\SquareConnect\Model\OrderReturnTax[]**](OrderReturnTax.md) | Taxes applied to the `OrderReturnServiceCharge`. By default, return-level taxes apply to `OrderReturnServiceCharge`s calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item. This field has been deprecated in favour of `applied_taxes`. | [optional]
|
22 |
+
**applied_taxes** | getAppliedTaxes() | setAppliedTaxes($value) | [**\SquareConnect\Model\OrderLineItemAppliedTax[]**](OrderLineItemAppliedTax.md) | The list of references to `OrderReturnTax` entities applied to the `OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderReturnTax` that is being applied to the `OrderReturnServiceCharge`. On reads, the amount applied is populated. | [optional]
|
23 |
+
|
24 |
+
Note: All properties are protected and only accessed via getters and setters.
|
25 |
+
|
26 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
27 |
+
|
vendor/square/connect/docs/Model/OrderReturnTax.md
CHANGED
@@ -2,19 +2,19 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
The line item
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**uid** | getUid() | setUid($value) | **string** |
|
11 |
**source_tax_uid** | getSourceTaxUid() | setSourceTaxUid($value) | **string** | `uid` of the Tax from the Order which contains the original charge of this tax. | [optional]
|
12 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object id referencing [CatalogTax](#type-catalogtax). | [optional]
|
13 |
**name** | getName() | setName($value) | **string** | The tax's name. | [optional]
|
14 |
**type** | getType() | setType($value) | **string** | Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional]
|
15 |
-
**percentage** | getPercentage() | setPercentage($value) | **string** | The percentage of the tax, as a string representation of a decimal number.
|
16 |
**applied_money** | getAppliedMoney() | setAppliedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of the money applied by the tax in an order. | [optional]
|
17 |
-
**scope** | getScope() | setScope($value) | **string** | Indicates the level at which the
|
18 |
|
19 |
Note: All properties are protected and only accessed via getters and setters.
|
20 |
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Represents a tax being returned that applies to one or more return line items in an order. Fixed-amount, order-scoped taxes are distributed across all non-zero return line item totals. The amount distributed to each return line item is relative to that item’s contribution to the order subtotal.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the return tax only within this order. | [optional]
|
11 |
**source_tax_uid** | getSourceTaxUid() | setSourceTaxUid($value) | **string** | `uid` of the Tax from the Order which contains the original charge of this tax. | [optional]
|
12 |
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object id referencing [CatalogTax](#type-catalogtax). | [optional]
|
13 |
**name** | getName() | setName($value) | **string** | The tax's name. | [optional]
|
14 |
**type** | getType() | setType($value) | **string** | Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional]
|
15 |
+
**percentage** | getPercentage() | setPercentage($value) | **string** | The percentage of the tax, as a string representation of a decimal number. For example, a value of `\"7.25\"` corresponds to a percentage of 7.25%. | [optional]
|
16 |
**applied_money** | getAppliedMoney() | setAppliedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of the money applied by the tax in an order. | [optional]
|
17 |
+
**scope** | getScope() | setScope($value) | **string** | Indicates the level at which the `OrderReturnTax` applies. For `ORDER` scoped taxes, Square generates references in `applied_taxes` on all `OrderReturnLineItem`s. For `LINE_ITEM` scoped taxes, the tax will only apply to `OrderReturnLineItem`s with references in their `applied_discounts` field. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values | [optional]
|
18 |
|
19 |
Note: All properties are protected and only accessed via getters and setters.
|
20 |
|
vendor/square/connect/docs/Model/OrderRoundingAdjustment.md
CHANGED
@@ -7,7 +7,7 @@ A rounding adjustment of the money being returned. Commonly used to apply Cash R
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**uid** | getUid() | setUid($value) | **string** |
|
11 |
**name** | getName() | setName($value) | **string** | The name of the rounding adjustment from the original sale Order. | [optional]
|
12 |
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | Actual rounding adjustment amount. | [optional]
|
13 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the rounding adjustment only within this order. | [optional]
|
11 |
**name** | getName() | setName($value) | **string** | The name of the rounding adjustment from the original sale Order. | [optional]
|
12 |
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | Actual rounding adjustment amount. | [optional]
|
13 |
|
vendor/square/connect/docs/Model/OrderServiceCharge.md
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OrderServiceCharge
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Represents a service charge applied to an order.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**uid** | getUid() | setUid($value) | **string** | Unique ID that identifies the service charge only within this order. | [optional]
|
11 |
+
**name** | getName() | setName($value) | **string** | The name of the service charge. | [optional]
|
12 |
+
**catalog_object_id** | getCatalogObjectId() | setCatalogObjectId($value) | **string** | The catalog object ID referencing the service charge [CatalogObject](#type-catalogobject). | [optional]
|
13 |
+
**percentage** | getPercentage() | setPercentage($value) | **string** | The service charge percentage as a string representation of a decimal number. For example, `\"7.25\"` indicates a service charge of 7.25%. Exactly 1 of `percentage` or `amount_money` should be set. | [optional]
|
14 |
+
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of a non-percentage based service charge. Exactly one of `percentage` or `amount_money` should be set. | [optional]
|
15 |
+
**applied_money** | getAppliedMoney() | setAppliedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of money applied to the order by the service charge, including any inclusive tax amounts, as calculated by Square. - For fixed-amount service charges, `applied_money` is equal to `amount_money`. - For percentage-based service charges, `applied_money` is the money calculated using the percentage. | [optional]
|
16 |
+
**total_money** | getTotalMoney() | setTotalMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total amount of money to collect for the service charge. __Note__: if an inclusive tax is applied to the service charge, `total_money` __does not__ equal `applied_money` plus `total_tax_money` since the inclusive tax amount will already be included in both `applied_money` and `total_tax_money`. | [optional]
|
17 |
+
**total_tax_money** | getTotalTaxMoney() | setTotalTaxMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total amount of tax money to collect for the service charge. | [optional]
|
18 |
+
**calculation_phase** | getCalculationPhase() | setCalculationPhase($value) | **string** | The calculation phase at which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values | [optional]
|
19 |
+
**taxable** | getTaxable() | setTaxable($value) | **bool** | Indicates whether the service charge can be taxed. If set to `true`, order-level taxes automatically apply to the service charge. Note that service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. | [optional]
|
20 |
+
**taxes** | getTaxes() | setTaxes($value) | [**\SquareConnect\Model\OrderLineItemTax[]**](OrderLineItemTax.md) | A list of taxes applied to this service charge. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this service charge. When creating an Order, set your service charge-level taxes in this list. By default, order-level taxes apply to service charges calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error. | [optional]
|
21 |
+
**applied_taxes** | getAppliedTaxes() | setAppliedTaxes($value) | [**\SquareConnect\Model\OrderLineItemAppliedTax[]**](OrderLineItemAppliedTax.md) | The list of references to taxes applied to this service charge. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` that is being applied to this service charge. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every taxable service charge for all `ORDER` scoped taxes that are added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any taxable service charge. Taxable service charges have the `taxable` field set to true and calculated in the `SUBTOTAL_PHASE`. To change the amount of a tax, modify the referenced top-level tax. | [optional]
|
22 |
+
|
23 |
+
Note: All properties are protected and only accessed via getters and setters.
|
24 |
+
|
25 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
26 |
+
|
vendor/square/connect/docs/Model/OrderServiceChargeCalculationPhase.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OrderServiceChargeCalculationPhase
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Represents a phase in the process of calculating order totals. Service charges are applied __after__ the indicated phase. [Read more about how order totals are calculated.](/docs/orders-api/how-it-works#how-totals-are-calculated)
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Type
|
9 |
+
------------ | -------------
|
10 |
+
**SUBTOTAL_PHASE** | string
|
11 |
+
**TOTAL_PHASE** | string
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/PayOrderRequest.md
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# PayOrderRequest
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Defines the fields that are included in requests to the [PayOrder](#endpoint-payorder) endpoint.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**idempotency_key** | getIdempotencyKey() | setIdempotencyKey($value) | **string** | A value you specify that uniquely identifies this request among requests you've sent. If you're unsure whether a particular payment request was completed successfully, you can reattempt it with the same idempotency key without worrying about duplicate payments. See [Idempotency](/working-with-apis/idempotency) for more information. |
|
11 |
+
**order_version** | getOrderVersion() | setOrderVersion($value) | **int** | The version of the order being paid. If not supplied, the latest version will be paid. | [optional]
|
12 |
+
**payment_ids** | getPaymentIds() | setPaymentIds($value) | **string[]** | | [optional]
|
13 |
+
|
14 |
+
Note: All properties are protected and only accessed via getters and setters.
|
15 |
+
|
16 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
17 |
+
|
vendor/square/connect/docs/Model/PayOrderResponse.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# PayOrderResponse
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Defines the fields that are included in the response body of a request to the [PayOrder](#endpoint-payorder) endpoint.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Any errors that occurred during the request. | [optional]
|
11 |
+
**order** | getOrder() | setOrder($value) | [**\SquareConnect\Model\Order**](Order.md) | The paid, updated [order](#type-order). | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/Payment.md
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Payment
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Represents a payment processed by the Square API.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**id** | getId() | setId($value) | **string** | Unique ID for the payment. |
|
11 |
+
**created_at** | getCreatedAt() | setCreatedAt($value) | **string** | Timestamp of when the payment was created, in RFC 3339 format. | [optional]
|
12 |
+
**updated_at** | getUpdatedAt() | setUpdatedAt($value) | **string** | Timestamp of when the payment was last updated, in RFC 3339 format. | [optional]
|
13 |
+
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of money processed for this payment, not including `tip_money`. Specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. For more information, see [Working with monetary amounts](/build-basics/working-with-monetary-amounts). |
|
14 |
+
**tip_money** | getTipMoney() | setTipMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount designated as a tip. Specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. | [optional]
|
15 |
+
**total_money** | getTotalMoney() | setTotalMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total money for the payment, including `amount_money` and `tip_money`. Specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. | [optional]
|
16 |
+
**app_fee_money** | getAppFeeMoney() | setAppFeeMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of money the developer is taking as a fee for facilitating the payment on behalf of the seller. Specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. For more information, see [Take Payments and Collect Fees](/payments-api/take-payments-and-collect-fees). Cannot be more than 90% of the `total_money` value. | [optional]
|
17 |
+
**processing_fee** | getProcessingFee() | setProcessingFee($value) | [**\SquareConnect\Model\ProcessingFee[]**](ProcessingFee.md) | Processing fees and fee adjustments assessed by Square on this payment. | [optional]
|
18 |
+
**refunded_money** | getRefundedMoney() | setRefundedMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | Total amount of the payment refunded to-date. Specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. | [optional]
|
19 |
+
**status** | getStatus() | setStatus($value) | **string** | Indicates whether the payment is `APPROVED`, `COMPLETED`, `CANCELED`, or `FAILED`. | [optional]
|
20 |
+
**source_type** | getSourceType() | setSourceType($value) | **string** | The source type for this payment | [optional]
|
21 |
+
**card_details** | getCardDetails() | setCardDetails($value) | [**\SquareConnect\Model\CardPaymentDetails**](CardPaymentDetails.md) | Non-confidential details about the source. Only populated if the `source_type` is `CARD`. | [optional]
|
22 |
+
**location_id** | getLocationId() | setLocationId($value) | **string** | ID of the location associated with the payment. | [optional]
|
23 |
+
**order_id** | getOrderId() | setOrderId($value) | **string** | ID of the order associated with this payment. | [optional]
|
24 |
+
**reference_id** | getReferenceId() | setReferenceId($value) | **string** | An optional ID that associates this payment with an entity in another system. | [optional]
|
25 |
+
**customer_id** | getCustomerId() | setCustomerId($value) | **string** | An optional customer_id to be entered by the developer when creating a payment. | [optional]
|
26 |
+
**refund_ids** | getRefundIds() | setRefundIds($value) | **string[]** | List of `refund_id`s identifying refunds for this payment. | [optional]
|
27 |
+
**buyer_email_address** | getBuyerEmailAddress() | setBuyerEmailAddress($value) | **string** | The buyer's e-mail address | [optional]
|
28 |
+
**billing_address** | getBillingAddress() | setBillingAddress($value) | [**\SquareConnect\Model\Address**](Address.md) | The buyer's billing address | [optional]
|
29 |
+
**shipping_address** | getShippingAddress() | setShippingAddress($value) | [**\SquareConnect\Model\Address**](Address.md) | The buyer's shipping address | [optional]
|
30 |
+
**note** | getNote() | setNote($value) | **string** | An optional note to include when creating a payment | [optional]
|
31 |
+
|
32 |
+
Note: All properties are protected and only accessed via getters and setters.
|
33 |
+
|
34 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
35 |
+
|
vendor/square/connect/docs/Model/PaymentRefund.md
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# PaymentRefund
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Represents a refund of a payment made using Square. Contains information on the original payment and the amount of money refunded.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**id** | getId() | setId($value) | **string** | Unique ID for this refund, generated by Square. |
|
11 |
+
**status** | getStatus() | setStatus($value) | **string** | The refund's status: - `PENDING` - awaiting approval - `COMPLETED` - successfully completed - `REJECTED` - the refund was rejected - `FAILED` - an error occurred | [optional]
|
12 |
+
**location_id** | getLocationId() | setLocationId($value) | **string** | Location ID associated with the payment this refund is attached to. | [optional]
|
13 |
+
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of money refunded, specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. |
|
14 |
+
**app_fee_money** | getAppFeeMoney() | setAppFeeMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | Amount of money the app developer contributed to help cover the refunded amount. Specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](/build-basics/working-with-monetary-amounts) for details. | [optional]
|
15 |
+
**processing_fee** | getProcessingFee() | setProcessingFee($value) | [**\SquareConnect\Model\ProcessingFee[]**](ProcessingFee.md) | Processing fees and fee adjustments assessed by Square on this refund. | [optional]
|
16 |
+
**payment_id** | getPaymentId() | setPaymentId($value) | **string** | The ID of the payment assocated with this refund. | [optional]
|
17 |
+
**order_id** | getOrderId() | setOrderId($value) | **string** | The ID of the order associated with the refund. | [optional]
|
18 |
+
**reason** | getReason() | setReason($value) | **string** | The reason for the refund. | [optional]
|
19 |
+
**created_at** | getCreatedAt() | setCreatedAt($value) | **string** | Timestamp of when the refund was created, in RFC 3339 format. | [optional]
|
20 |
+
**updated_at** | getUpdatedAt() | setUpdatedAt($value) | **string** | Timestamp of when the refund was last updated, in RFC 3339 format. | [optional]
|
21 |
+
|
22 |
+
Note: All properties are protected and only accessed via getters and setters.
|
23 |
+
|
24 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
25 |
+
|
vendor/square/connect/docs/Model/ProcessingFee.md
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ProcessingFee
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Represents Square processing fee.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**effective_at** | getEffectiveAt() | setEffectiveAt($value) | **string** | Timestamp of when the fee takes effect, in RFC 3339 format. | [optional]
|
11 |
+
**type** | getType() | setType($value) | **string** | The type of fee assessed or adjusted. Can be one of: `INITIAL`, `ADJUSTMENT`. | [optional]
|
12 |
+
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The fee amount assessed or adjusted by Square. May be negative. Positive values represent funds being assessed, while negative values represent funds being returned. | [optional]
|
13 |
+
|
14 |
+
Note: All properties are protected and only accessed via getters and setters.
|
15 |
+
|
16 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
17 |
+
|
vendor/square/connect/docs/Model/RefundPaymentRequest.md
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# RefundPaymentRequest
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Refunds a payment.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**idempotency_key** | getIdempotencyKey() | setIdempotencyKey($value) | **string** | A unique string that identifies this RefundPayment request. Key can be any valid string but must be unique for every RefundPayment request. For more information, see [Idempotency keys](/basics/api101/idempotency). |
|
11 |
+
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of money to refund. Cannot be more than the `total_money` value of the payment minus the total amount of all previously completed refunds for this payment. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is charging the card. |
|
12 |
+
**app_fee_money** | getAppFeeMoney() | setAppFeeMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | Amount of money the developer will contribute to help cover the refunded amount. Specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. Value cannot be more than the `amount_money`. You can specify this parameter in a refund request only if the same parameter was also included when taking the payment. This is part of the application fee scenario the API supports. For more information, see [Collect Fees](/payments-api/take-payments-and-collect-fees) | [optional]
|
13 |
+
**payment_id** | getPaymentId() | setPaymentId($value) | **string** | Unique ID of the payment being refunded. | [optional]
|
14 |
+
**reason** | getReason() | setReason($value) | **string** | A description of the reason for the refund. | [optional]
|
15 |
+
|
16 |
+
Note: All properties are protected and only accessed via getters and setters.
|
17 |
+
|
18 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
19 |
+
|
vendor/square/connect/docs/Model/RefundPaymentResponse.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# RefundPaymentResponse
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Defines the fields that are included in the response body of a request to the [RefundPayment](#endpoint-refunds-refundpayment) endpoint. Note: if there are errors processing the request, the refund field may not be present, or it may be present in a FAILED state.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Information on errors encountered during the request. | [optional]
|
11 |
+
**refund** | getRefund() | setRefund($value) | [**\SquareConnect\Model\PaymentRefund**](PaymentRefund.md) | The successfully created `PaymentRefund`. | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/RenewTokenResponse.md
CHANGED
@@ -11,8 +11,8 @@ Name | Getter | Setter | Type | Description | Notes
|
|
11 |
**token_type** | getTokenType() | setTokenType($value) | **string** | This value is always _bearer_. | [optional]
|
12 |
**expires_at** | getExpiresAt() | setExpiresAt($value) | **string** | The date when access_token expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. | [optional]
|
13 |
**merchant_id** | getMerchantId() | setMerchantId($value) | **string** | The ID of the authorizing merchant's business. | [optional]
|
14 |
-
**subscription_id** | getSubscriptionId() | setSubscriptionId($value) | **string** | The ID of the merchant
|
15 |
-
**plan_id** | getPlanId() | setPlanId($value) | **string** | The ID of the
|
16 |
|
17 |
Note: All properties are protected and only accessed via getters and setters.
|
18 |
|
11 |
**token_type** | getTokenType() | setTokenType($value) | **string** | This value is always _bearer_. | [optional]
|
12 |
**expires_at** | getExpiresAt() | setExpiresAt($value) | **string** | The date when access_token expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. | [optional]
|
13 |
**merchant_id** | getMerchantId() | setMerchantId($value) | **string** | The ID of the authorizing merchant's business. | [optional]
|
14 |
+
**subscription_id** | getSubscriptionId() | setSubscriptionId($value) | **string** | __LEGACY FIELD__. The ID of the merchant subscription associated with the authorization. Only present if the merchant signed up for a subscription during authorization. | [optional]
|
15 |
+
**plan_id** | getPlanId() | setPlanId($value) | **string** | __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional]
|
16 |
|
17 |
Note: All properties are protected and only accessed via getters and setters.
|
18 |
|
vendor/square/connect/docs/Model/RetrieveCatalogObjectRequest.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**include_related_objects** | getIncludeRelatedObjects() | setIncludeRelatedObjects($value) | **bool** | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of
|
11 |
|
12 |
Note: All properties are protected and only accessed via getters and setters.
|
13 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**include_related_objects** | getIncludeRelatedObjects() | setIncludeRelatedObjects($value) | **bool** | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` | [optional]
|
11 |
|
12 |
Note: All properties are protected and only accessed via getters and setters.
|
13 |
|
vendor/square/connect/docs/Model/RetrieveLocationRequest.md
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# RetrieveLocationRequest
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
|
11 |
+
Note: All properties are protected and only accessed via getters and setters.
|
12 |
+
|
13 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
14 |
+
|
vendor/square/connect/docs/Model/RetrieveLocationResponse.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# RetrieveLocationResponse
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Defines the fields that are included in the response body of a request to the [RetrieveLocation](#endpoint-retrievelocation) endpoint. One of `errors` or `location` is present in a given response (never both).
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Any errors that occurred during the request. | [optional]
|
11 |
+
**location** | getLocation() | setLocation($value) | [**\SquareConnect\Model\Location**](Location.md) | The requested location. | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/RetrieveTransactionResponse.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Defines the fields that are included in the response body of a request to the RetrieveTransaction endpoint. One of `errors` or `transaction` is present in a given response (never both).
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Defines the fields that are included in the response body of a request to the [RetrieveTransaction](#endpont-retrievetransaction) endpoint. One of `errors` or `transaction` is present in a given response (never both).
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
vendor/square/connect/docs/Model/SearchCatalogObjectsRequest.md
CHANGED
@@ -10,7 +10,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
10 |
**cursor** | getCursor() | setCursor($value) | **string** | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
11 |
**object_types** | getObjectTypes() | setObjectTypes($value) | **string[]** | The desired set of object types to appear in the search results. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`. See [CatalogObjectType](#type-catalogobjecttype) for possible values | [optional]
|
12 |
**include_deleted_objects** | getIncludeDeletedObjects() | setIncludeDeletedObjects($value) | **bool** | If `true`, deleted objects will be included in the results. Deleted objects will have their `is_deleted` field set to `true`. | [optional]
|
13 |
-
**include_related_objects** | getIncludeRelatedObjects() | setIncludeRelatedObjects($value) | **bool** | If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. | [optional]
|
14 |
**begin_time** | getBeginTime() | setBeginTime($value) | **string** | Return objects modified after this [timestamp](#workingwithdates), in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". The timestamp is exclusive - objects with a timestamp equal to `begin_time` will not be included in the response. | [optional]
|
15 |
**query** | getQuery() | setQuery($value) | [**\SquareConnect\Model\CatalogQuery**](CatalogQuery.md) | A query to be used to filter or sort the results. If no query is specified, the entire catalog will be returned. | [optional]
|
16 |
**limit** | getLimit() | setLimit($value) | **int** | A limit on the number of results to be returned in a single page. The limit is advisory - the implementation may return more or fewer results. If the supplied limit is negative, zero, or is higher than the maximum limit of 1,000, it will be ignored. | [optional]
|
10 |
**cursor** | getCursor() | setCursor($value) | **string** | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
11 |
**object_types** | getObjectTypes() | setObjectTypes($value) | **string[]** | The desired set of object types to appear in the search results. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`. See [CatalogObjectType](#type-catalogobjecttype) for possible values | [optional]
|
12 |
**include_deleted_objects** | getIncludeDeletedObjects() | setIncludeDeletedObjects($value) | **bool** | If `true`, deleted objects will be included in the results. Deleted objects will have their `is_deleted` field set to `true`. | [optional]
|
13 |
+
**include_related_objects** | getIncludeRelatedObjects() | setIncludeRelatedObjects($value) | **bool** | If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. | [optional]
|
14 |
**begin_time** | getBeginTime() | setBeginTime($value) | **string** | Return objects modified after this [timestamp](#workingwithdates), in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". The timestamp is exclusive - objects with a timestamp equal to `begin_time` will not be included in the response. | [optional]
|
15 |
**query** | getQuery() | setQuery($value) | [**\SquareConnect\Model\CatalogQuery**](CatalogQuery.md) | A query to be used to filter or sort the results. If no query is specified, the entire catalog will be returned. | [optional]
|
16 |
**limit** | getLimit() | setLimit($value) | **int** | A limit on the number of results to be returned in a single page. The limit is advisory - the implementation may return more or fewer results. If the supplied limit is negative, zero, or is higher than the maximum limit of 1,000, it will be ignored. | [optional]
|
vendor/square/connect/docs/Model/SearchOrdersCustomerFilter.md
CHANGED
@@ -7,7 +7,7 @@ Filter based on Order `customer_id` and any Tender `customer_id` associated with
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**customer_ids** | getCustomerIds() | setCustomerIds($value) | **string[]** |
|
11 |
|
12 |
Note: All properties are protected and only accessed via getters and setters.
|
13 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**customer_ids** | getCustomerIds() | setCustomerIds($value) | **string[]** | List of customer IDs to filter by. Max: 10 customer IDs. | [optional]
|
11 |
|
12 |
Note: All properties are protected and only accessed via getters and setters.
|
13 |
|
vendor/square/connect/docs/Model/SearchOrdersDateTimeFilter.md
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Filter for `Order` objects based on whether their `CREATED_AT`, `CLOSED_AT` or `UPDATED_AT` timestamps fall within a specified time range. You can specify the time range and which timestamp to filter for. You can filter for only one time range at a time. For each time range, the start time and end time are inclusive. If the end time is absent, it defaults to the time of the first request for the cursor. __Important:__ If you use the DateTimeFilter
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**created_at** | getCreatedAt() | setCreatedAt($value) | [**\SquareConnect\Model\TimeRange**](TimeRange.md) | Time range for filtering on the `created_at` timestamp. | [optional]
|
11 |
-
**updated_at** | getUpdatedAt() | setUpdatedAt($value) | [**\SquareConnect\Model\TimeRange**](TimeRange.md) | Time range for filtering on the `updated_at` timestamp. | [optional]
|
12 |
-
**closed_at** | getClosedAt() | setClosedAt($value) | [**\SquareConnect\Model\TimeRange**](TimeRange.md) | Time range for filtering on the `closed_at` timestamp. | [optional]
|
13 |
|
14 |
Note: All properties are protected and only accessed via getters and setters.
|
15 |
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Filter for `Order` objects based on whether their `CREATED_AT`, `CLOSED_AT` or `UPDATED_AT` timestamps fall within a specified time range. You can specify the time range and which timestamp to filter for. You can filter for only one time range at a time. For each time range, the start time and end time are inclusive. If the end time is absent, it defaults to the time of the first request for the cursor. __Important:__ If you use the DateTimeFilter in a SearchOrders query, you must also set the `sort_field` in [OrdersSort](#type-searchorderordersort) to the same field you filter for. For example, if you set the `CLOSED_AT` field in DateTimeFilter, you must also set the `sort_field` in SearchOrdersSort to `CLOSED_AT`. Otherwise, SearchOrders will throw an error. [Learn more about filtering orders by time range](/orders-api/manage-orders#important-note-on-filtering-orders-by-time-range).
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**created_at** | getCreatedAt() | setCreatedAt($value) | [**\SquareConnect\Model\TimeRange**](TimeRange.md) | Time range for filtering on the `created_at` timestamp. If you use this value, you must also set the `sort_field` in the OrdersSearchSort object to `CREATED_AT`. | [optional]
|
11 |
+
**updated_at** | getUpdatedAt() | setUpdatedAt($value) | [**\SquareConnect\Model\TimeRange**](TimeRange.md) | Time range for filtering on the `updated_at` timestamp. If you use this value, you must also set the `sort_field` in the OrdersSearchSort object to `UPDATED_AT`. | [optional]
|
12 |
+
**closed_at** | getClosedAt() | setClosedAt($value) | [**\SquareConnect\Model\TimeRange**](TimeRange.md) | Time range for filtering on the `closed_at` timestamp. If you use this value, you must also set the `sort_field` in the OrdersSearchSort object to `CLOSED_AT`. | [optional]
|
13 |
|
14 |
Note: All properties are protected and only accessed via getters and setters.
|
15 |
|
vendor/square/connect/docs/Model/SearchOrdersFilter.md
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
**state_filter** | getStateFilter() | setStateFilter($value) | [**\SquareConnect\Model\SearchOrdersStateFilter**](SearchOrdersStateFilter.md) | Filter by [`OrderState`](#type-orderstate). | [optional]
|
11 |
-
**date_time_filter** | getDateTimeFilter() | setDateTimeFilter($value) | [**\SquareConnect\Model\SearchOrdersDateTimeFilter**](SearchOrdersDateTimeFilter.md) | Filter for results within a time range. | [optional]
|
12 |
**fulfillment_filter** | getFulfillmentFilter() | setFulfillmentFilter($value) | [**\SquareConnect\Model\SearchOrdersFulfillmentFilter**](SearchOrdersFulfillmentFilter.md) | Filter by fulfillment type or state. | [optional]
|
13 |
**source_filter** | getSourceFilter() | setSourceFilter($value) | [**\SquareConnect\Model\SearchOrdersSourceFilter**](SearchOrdersSourceFilter.md) | Filter by source of order. | [optional]
|
14 |
**customer_filter** | getCustomerFilter() | setCustomerFilter($value) | [**\SquareConnect\Model\SearchOrdersCustomerFilter**](SearchOrdersCustomerFilter.md) | Filter by customers associated with the order. | [optional]
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Filtering criteria to use for a SearchOrders request. Multiple filters will be ANDed together.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
**state_filter** | getStateFilter() | setStateFilter($value) | [**\SquareConnect\Model\SearchOrdersStateFilter**](SearchOrdersStateFilter.md) | Filter by [`OrderState`](#type-orderstate). | [optional]
|
11 |
+
**date_time_filter** | getDateTimeFilter() | setDateTimeFilter($value) | [**\SquareConnect\Model\SearchOrdersDateTimeFilter**](SearchOrdersDateTimeFilter.md) | Filter for results within a time range. __Important:__ If you filter for orders by time range, you must set SearchOrdersSort to sort by the same field. [Learn more about filtering orders by time range](/orders-api/manage-orders#important-note-on-filtering-orders-by-time-range) | [optional]
|
12 |
**fulfillment_filter** | getFulfillmentFilter() | setFulfillmentFilter($value) | [**\SquareConnect\Model\SearchOrdersFulfillmentFilter**](SearchOrdersFulfillmentFilter.md) | Filter by fulfillment type or state. | [optional]
|
13 |
**source_filter** | getSourceFilter() | setSourceFilter($value) | [**\SquareConnect\Model\SearchOrdersSourceFilter**](SearchOrdersSourceFilter.md) | Filter by source of order. | [optional]
|
14 |
**customer_filter** | getCustomerFilter() | setCustomerFilter($value) | [**\SquareConnect\Model\SearchOrdersCustomerFilter**](SearchOrdersCustomerFilter.md) | Filter by customers associated with the order. | [optional]
|
vendor/square/connect/docs/Model/SearchOrdersRequest.md
CHANGED
@@ -7,11 +7,11 @@ The request does not have any required fields. When given no query criteria, Sea
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**location_ids** | getLocationIds() | setLocationIds($value) | **string[]** | The location IDs for the orders to query.
|
11 |
**cursor** | getCursor() | setCursor($value) | **string** | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
12 |
-
**query** | getQuery() | setQuery($value) | [**\SquareConnect\Model\SearchOrdersQuery**](SearchOrdersQuery.md) | Query conditions used to filter or sort the results. Note that when fetching additional pages using a
|
13 |
-
**limit** | getLimit() | setLimit($value) | **int** |
|
14 |
-
**return_entries** | getReturnEntries() | setReturnEntries($value) | **bool** |
|
15 |
|
16 |
Note: All properties are protected and only accessed via getters and setters.
|
17 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**location_ids** | getLocationIds() | setLocationIds($value) | **string[]** | The location IDs for the orders to query. All locations must belong to the same merchant. Min: 1 location IDs. Max: 10 location IDs. | [optional]
|
11 |
**cursor** | getCursor() | setCursor($value) | **string** | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
12 |
+
**query** | getQuery() | setQuery($value) | [**\SquareConnect\Model\SearchOrdersQuery**](SearchOrdersQuery.md) | Query conditions used to filter or sort the results. Note that when fetching additional pages using a cursor, the query must be equal to the query used to fetch the first page of results. | [optional]
|
13 |
+
**limit** | getLimit() | setLimit($value) | **int** | Maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. Default: `500` | [optional]
|
14 |
+
**return_entries** | getReturnEntries() | setReturnEntries($value) | **bool** | Boolean that controls the format of the search results. If `true`, SearchOrders will return [`OrderEntry`](#type-orderentry) objects. If `false`, SearchOrders will return complete Order objects. Default: `false`. | [optional]
|
15 |
|
16 |
Note: All properties are protected and only accessed via getters and setters.
|
17 |
|
vendor/square/connect/docs/Model/SearchOrdersResponse.md
CHANGED
@@ -7,11 +7,10 @@ Only one of `order_entries` or `orders` fields will be set, depending on whether
|
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**order_entries** | getOrderEntries() | setOrderEntries($value) | [**\SquareConnect\Model\OrderEntry[]**](OrderEntry.md) | List of [OrderEntries](#type-orderentry) that fit the query conditions.
|
11 |
-
**orders** | getOrders() | setOrders($value) | [**\SquareConnect\Model\Order[]**](Order.md) | List of [
|
12 |
**cursor** | getCursor() | setCursor($value) | **string** | The pagination cursor to be used in a subsequent request. If unset, this is the final response. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
13 |
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | [Errors](#type-error) encountered during the search. | [optional]
|
14 |
-
**unconvertible_transaction_ids** | getUnconvertibleTransactionIds() | setUnconvertibleTransactionIds($value) | **string[]** | List of transaction IDs identifying transactions that could not be converted to an `Order`. Empty if `return_entries` is true, however, attempts to retrieve those orders may encounter subsequent `unconvertible_transcation_ids` Note that this field will not be present after SearchOrders moves from BETA to GA. | [optional]
|
15 |
|
16 |
Note: All properties are protected and only accessed via getters and setters.
|
17 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**order_entries** | getOrderEntries() | setOrderEntries($value) | [**\SquareConnect\Model\OrderEntry[]**](OrderEntry.md) | List of [OrderEntries](#type-orderentry) that fit the query conditions. Populated only if `return_entries` was set to `true` in the request. | [optional]
|
11 |
+
**orders** | getOrders() | setOrders($value) | [**\SquareConnect\Model\Order[]**](Order.md) | List of [Order](#type-order) objects that match query conditions. Populated only if `return_entries` in the request is set to `false`. | [optional]
|
12 |
**cursor** | getCursor() | setCursor($value) | **string** | The pagination cursor to be used in a subsequent request. If unset, this is the final response. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
13 |
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | [Errors](#type-error) encountered during the search. | [optional]
|
|
|
14 |
|
15 |
Note: All properties are protected and only accessed via getters and setters.
|
16 |
|
vendor/square/connect/docs/Model/SearchOrdersSort.md
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Sorting
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**sort_field** | getSortField() | setSortField($value) | **string** | The field to sort by. __Important:__ When using a [DateTimeFilter](#type-searchordersfilter), `sort_field` must match the set
|
11 |
-
**sort_order** | getSortOrder() | setSortOrder($value) | **string** | The order in which results are returned. Defaults to `DESC`. See [SortOrder](#type-sortorder) for possible values | [optional]
|
12 |
|
13 |
Note: All properties are protected and only accessed via getters and setters.
|
14 |
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Sorting criteria for a SearchOrders request. Results can only be sorted by a timestamp field.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**sort_field** | getSortField() | setSortField($value) | **string** | The field to sort by. __Important:__ When using a [DateTimeFilter](#type-searchordersfilter), `sort_field` must match the timestamp field that the DateTimeFilter uses to filter. For example, If you set your `sort_field` to `CLOSED_AT` and you use a DateTimeFilter, your DateTimeFilter must filter for orders by their `CLOSED_AT` date. If this field does not match the timestamp field in `DateTimeFilter`, SearchOrders will return an error. Default: `CREATED_AT`. See [SearchOrdersSortField](#type-searchorderssortfield) for possible values |
|
11 |
+
**sort_order** | getSortOrder() | setSortOrder($value) | **string** | The chronological order in which results are returned. Defaults to `DESC`. See [SortOrder](#type-sortorder) for possible values | [optional]
|
12 |
|
13 |
Note: All properties are protected and only accessed via getters and setters.
|
14 |
|
vendor/square/connect/docs/Model/SearchOrdersSourceFilter.md
CHANGED
@@ -2,12 +2,12 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Filter based on
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
-
**source_names** | getSourceNames() | setSourceNames($value) | **string[]** | Filters by [Source](#type-ordersource) `name`. Will return any orders with with `source.name`
|
11 |
|
12 |
Note: All properties are protected and only accessed via getters and setters.
|
13 |
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Filter based on order `source` information.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
9 |
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**source_names** | getSourceNames() | setSourceNames($value) | **string[]** | Filters by [Source](#type-ordersource) `name`. Will return any orders with with a `source.name` that matches any of the listed source names. Max: 10 source names. | [optional]
|
11 |
|
12 |
Note: All properties are protected and only accessed via getters and setters.
|
13 |
|
vendor/square/connect/docs/Model/StandardUnitDescription.md
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# StandardUnitDescription
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Contains the name and abbreviation for standard measurement unit.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**unit** | getUnit() | setUnit($value) | [**\SquareConnect\Model\MeasurementUnit**](MeasurementUnit.md) | Identifies the measurement unit being described. | [optional]
|
11 |
+
**name** | getName() | setName($value) | **string** | Display name of the measurement unit. For example, 'Pound'. | [optional]
|
12 |
+
**abbreviation** | getAbbreviation() | setAbbreviation($value) | **string** | Abbreviation for the measurement unit. For example, 'lb'. | [optional]
|
13 |
+
|
14 |
+
Note: All properties are protected and only accessed via getters and setters.
|
15 |
+
|
16 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
17 |
+
|
vendor/square/connect/docs/Model/StandardUnitDescriptionGroup.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# StandardUnitDescriptionGroup
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Group of standard measurement units.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**standard_unit_descriptions** | getStandardUnitDescriptions() | setStandardUnitDescriptions($value) | [**\SquareConnect\Model\StandardUnitDescription[]**](StandardUnitDescription.md) | List of measurement units in this description group. | [optional]
|
11 |
+
**language_code** | getLanguageCode() | setLanguageCode($value) | **string** | IETF language tag. | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/Tender.md
CHANGED
@@ -12,7 +12,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
12 |
**transaction_id** | getTransactionId() | setTransactionId($value) | **string** | The ID of the tender's associated transaction. | [optional]
|
13 |
**created_at** | getCreatedAt() | setCreatedAt($value) | **string** | The time when the tender was created, in RFC 3339 format. | [optional]
|
14 |
**note** | getNote() | setNote($value) | **string** | An optional note associated with the tender at the time of payment. | [optional]
|
15 |
-
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of the tender. | [optional]
|
16 |
**tip_money** | getTipMoney() | setTipMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The tip's amount of the tender. | [optional]
|
17 |
**processing_fee_money** | getProcessingFeeMoney() | setProcessingFeeMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of any Square processing fees applied to the tender. This field is not immediately populated when a new transaction is created. It is usually available after about ten seconds. | [optional]
|
18 |
**customer_id** | getCustomerId() | setCustomerId($value) | **string** | If the tender is associated with a customer or represents a customer's card on file, this is the ID of the associated customer. | [optional]
|
@@ -20,6 +20,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
20 |
**card_details** | getCardDetails() | setCardDetails($value) | [**\SquareConnect\Model\TenderCardDetails**](TenderCardDetails.md) | The details of the card tender. This value is present only if the value of `type` is `CARD`. | [optional]
|
21 |
**cash_details** | getCashDetails() | setCashDetails($value) | [**\SquareConnect\Model\TenderCashDetails**](TenderCashDetails.md) | The details of the cash tender. This value is present only if the value of `type` is `CASH`. | [optional]
|
22 |
**additional_recipients** | getAdditionalRecipients() | setAdditionalRecipients($value) | [**\SquareConnect\Model\AdditionalRecipient[]**](AdditionalRecipient.md) | Additional recipients (other than the merchant) receiving a portion of this tender. For example, fees assessed on the purchase by a third party integration. | [optional]
|
|
|
23 |
|
24 |
Note: All properties are protected and only accessed via getters and setters.
|
25 |
|
12 |
**transaction_id** | getTransactionId() | setTransactionId($value) | **string** | The ID of the tender's associated transaction. | [optional]
|
13 |
**created_at** | getCreatedAt() | setCreatedAt($value) | **string** | The time when the tender was created, in RFC 3339 format. | [optional]
|
14 |
**note** | getNote() | setNote($value) | **string** | An optional note associated with the tender at the time of payment. | [optional]
|
15 |
+
**amount_money** | getAmountMoney() | setAmountMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The total amount of the tender, including `tip_money`. If the tender has a `payment_id`, the `total_money` of the corresponding [Payment](#type-payment) will be equal to the `amount_money` of the tender. | [optional]
|
16 |
**tip_money** | getTipMoney() | setTipMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The tip's amount of the tender. | [optional]
|
17 |
**processing_fee_money** | getProcessingFeeMoney() | setProcessingFeeMoney($value) | [**\SquareConnect\Model\Money**](Money.md) | The amount of any Square processing fees applied to the tender. This field is not immediately populated when a new transaction is created. It is usually available after about ten seconds. | [optional]
|
18 |
**customer_id** | getCustomerId() | setCustomerId($value) | **string** | If the tender is associated with a customer or represents a customer's card on file, this is the ID of the associated customer. | [optional]
|
20 |
**card_details** | getCardDetails() | setCardDetails($value) | [**\SquareConnect\Model\TenderCardDetails**](TenderCardDetails.md) | The details of the card tender. This value is present only if the value of `type` is `CARD`. | [optional]
|
21 |
**cash_details** | getCashDetails() | setCashDetails($value) | [**\SquareConnect\Model\TenderCashDetails**](TenderCashDetails.md) | The details of the cash tender. This value is present only if the value of `type` is `CASH`. | [optional]
|
22 |
**additional_recipients** | getAdditionalRecipients() | setAdditionalRecipients($value) | [**\SquareConnect\Model\AdditionalRecipient[]**](AdditionalRecipient.md) | Additional recipients (other than the merchant) receiving a portion of this tender. For example, fees assessed on the purchase by a third party integration. | [optional]
|
23 |
+
**payment_id** | getPaymentId() | setPaymentId($value) | **string** | The ID of the [Payment](#type-payment) that corresponds to this tender. This value is only present for payments created with the v2 Payments API. | [optional]
|
24 |
|
25 |
Note: All properties are protected and only accessed via getters and setters.
|
26 |
|
vendor/square/connect/docs/Model/UpdateOrderRequest.md
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# UpdateOrderRequest
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Defines the fields that are included in requests to the [UpdateOrder](#endpoint-orders-updateorder) endpoint.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**order** | getOrder() | setOrder($value) | [**\SquareConnect\Model\Order**](Order.md) | The [sparse order](/orders-api/manage-orders#sparse-order-objects) containing only the fields to update and the version the update is being applied to. | [optional]
|
11 |
+
**fields_to_clear** | getFieldsToClear() | setFieldsToClear($value) | **string[]** | The [dot notation paths](/orders-api/manage-orders#on-dot-notation) fields to clear. For example, `line_items[uid].note` [Read more about Deleting fields](/orders-api/manage-orders#delete-fields). | [optional]
|
12 |
+
**idempotency_key** | getIdempotencyKey() | setIdempotencyKey($value) | **string** | A value you specify that uniquely identifies this update request If you're unsure whether a particular update was applied to an order successfully, you can reattempt it with the same idempotency key without worrying about creating duplicate updates to the order. The latest order version will be returned. See [Idempotency](/basics/api101/idempotency) for more information. | [optional]
|
13 |
+
|
14 |
+
Note: All properties are protected and only accessed via getters and setters.
|
15 |
+
|
16 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
17 |
+
|
vendor/square/connect/docs/Model/UpdateOrderResponse.md
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# UpdateOrderResponse
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
Defines the fields that are included in the response body of a request to the [UpdateOrder](#endpoint-orders-updateorder) endpoint.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Getter | Setter | Type | Description | Notes
|
9 |
+
------------ | ------------- | ------------- | ------------- | ------------- | -------------
|
10 |
+
**order** | getOrder() | setOrder($value) | [**\SquareConnect\Model\Order**](Order.md) | The updated Order. | [optional]
|
11 |
+
**errors** | getErrors() | setErrors($value) | [**\SquareConnect\Model\Error[]**](Error.md) | Any errors that occurred during the request. | [optional]
|
12 |
+
|
13 |
+
Note: All properties are protected and only accessed via getters and setters.
|
14 |
+
|
15 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
16 |
+
|
vendor/square/connect/docs/Model/V1CashDrawerShift.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
@@ -16,7 +16,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
16 |
**opening_employee_id** | getOpeningEmployeeId() | setOpeningEmployeeId($value) | **string** | The ID of the employee that started the cash drawer shift. | [optional]
|
17 |
**ending_employee_id** | getEndingEmployeeId() | setEndingEmployeeId($value) | **string** | The ID of the employee that ended the cash drawer shift. | [optional]
|
18 |
**closing_employee_id** | getClosingEmployeeId() | setClosingEmployeeId($value) | **string** | The ID of the employee that closed the cash drawer shift by auditing the cash drawer's contents. | [optional]
|
19 |
-
**description** | getDescription() | setDescription($value) | **string** |
|
20 |
**starting_cash_money** | getStartingCashMoney() | setStartingCashMoney($value) | [**\SquareConnect\Model\V1Money**](V1Money.md) | The amount of money in the cash drawer at the start of the shift. | [optional]
|
21 |
**cash_payment_money** | getCashPaymentMoney() | setCashPaymentMoney($value) | [**\SquareConnect\Model\V1Money**](V1Money.md) | The amount of money added to the cash drawer from cash payments. | [optional]
|
22 |
**cash_refunds_money** | getCashRefundsMoney() | setCashRefundsMoney($value) | [**\SquareConnect\Model\V1Money**](V1Money.md) | The amount of money removed from the cash drawer from cash refunds. This value is always negative or zero. | [optional]
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Contains details for a single cash drawer shift.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
16 |
**opening_employee_id** | getOpeningEmployeeId() | setOpeningEmployeeId($value) | **string** | The ID of the employee that started the cash drawer shift. | [optional]
|
17 |
**ending_employee_id** | getEndingEmployeeId() | setEndingEmployeeId($value) | **string** | The ID of the employee that ended the cash drawer shift. | [optional]
|
18 |
**closing_employee_id** | getClosingEmployeeId() | setClosingEmployeeId($value) | **string** | The ID of the employee that closed the cash drawer shift by auditing the cash drawer's contents. | [optional]
|
19 |
+
**description** | getDescription() | setDescription($value) | **string** | A description of the cash drawer shift. | [optional]
|
20 |
**starting_cash_money** | getStartingCashMoney() | setStartingCashMoney($value) | [**\SquareConnect\Model\V1Money**](V1Money.md) | The amount of money in the cash drawer at the start of the shift. | [optional]
|
21 |
**cash_payment_money** | getCashPaymentMoney() | setCashPaymentMoney($value) | [**\SquareConnect\Model\V1Money**](V1Money.md) | The amount of money added to the cash drawer from cash payments. | [optional]
|
22 |
**cash_refunds_money** | getCashRefundsMoney() | setCashRefundsMoney($value) | [**\SquareConnect\Model\V1Money**](V1Money.md) | The amount of money removed from the cash drawer from cash refunds. This value is always negative or zero. | [optional]
|
vendor/square/connect/docs/Model/V1Item.md
CHANGED
@@ -18,7 +18,7 @@ Name | Getter | Setter | Type | Description | Notes
|
|
18 |
**master_image** | getMasterImage() | setMasterImage($value) | [**\SquareConnect\Model\V1ItemImage**](V1ItemImage.md) | The item's master image, if any. | [optional]
|
19 |
**category** | getCategory() | setCategory($value) | [**\SquareConnect\Model\V1Category**](V1Category.md) | The category the item belongs to, if any. | [optional]
|
20 |
**variations** | getVariations() | setVariations($value) | [**\SquareConnect\Model\V1Variation[]**](V1Variation.md) | The item's variations. You must specify at least one variation. | [optional]
|
21 |
-
**modifier_lists** | getModifierLists() | setModifierLists($value) | [**\SquareConnect\Model\
|
22 |
**fees** | getFees() | setFees($value) | [**\SquareConnect\Model\V1Fee[]**](V1Fee.md) | The fees that apply to the item, if any. | [optional]
|
23 |
**taxable** | getTaxable() | setTaxable($value) | **bool** | Deprecated. This field is not used. | [optional]
|
24 |
**category_id** | getCategoryId() | setCategoryId($value) | **string** | The ID of the item's category, if any. | [optional]
|
18 |
**master_image** | getMasterImage() | setMasterImage($value) | [**\SquareConnect\Model\V1ItemImage**](V1ItemImage.md) | The item's master image, if any. | [optional]
|
19 |
**category** | getCategory() | setCategory($value) | [**\SquareConnect\Model\V1Category**](V1Category.md) | The category the item belongs to, if any. | [optional]
|
20 |
**variations** | getVariations() | setVariations($value) | [**\SquareConnect\Model\V1Variation[]**](V1Variation.md) | The item's variations. You must specify at least one variation. | [optional]
|
21 |
+
**modifier_lists** | getModifierLists() | setModifierLists($value) | [**\SquareConnect\Model\V1ModifierList[]**](V1ModifierList.md) | The modifier lists that apply to the item, if any. | [optional]
|
22 |
**fees** | getFees() | setFees($value) | [**\SquareConnect\Model\V1Fee[]**](V1Fee.md) | The fees that apply to the item, if any. | [optional]
|
23 |
**taxable** | getTaxable() | setTaxable($value) | **bool** | Deprecated. This field is not used. | [optional]
|
24 |
**category_id** | getCategoryId() | setCategoryId($value) | **string** | The ID of the item's category, if any. | [optional]
|
vendor/square/connect/docs/Model/VoidTransactionResponse.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
### Description
|
4 |
|
5 |
-
Defines the fields that are included in the response body of a request to the VoidTransaction endpoint.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
2 |
|
3 |
### Description
|
4 |
|
5 |
+
Defines the fields that are included in the response body of a request to the [VoidTransaction](#endpoint-voidtransaction) endpoint.
|
6 |
|
7 |
## Properties
|
8 |
Name | Getter | Setter | Type | Description | Notes
|
vendor/square/connect/docs/Model/WebhookEvents.md
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# WebhookEvents
|
2 |
+
|
3 |
+
### Description
|
4 |
+
|
5 |
+
The type of an event that triggers a webhook notification to an application.
|
6 |
+
|
7 |
+
## Properties
|
8 |
+
Name | Type
|
9 |
+
------------ | -------------
|
10 |
+
**inventory.count.updated** | string
|
11 |
+
|
12 |
+
Note: All properties are protected and only accessed via getters and setters.
|
13 |
+
|
14 |
+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
15 |
+
|
vendor/square/connect/lib/Api/ApplePayApi.php
CHANGED
@@ -108,7 +108,7 @@ class ApplePayApi
|
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
-
$headerParams['Square-Version'] = "2019-
|
112 |
|
113 |
|
114 |
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
112 |
|
113 |
|
114 |
|
vendor/square/connect/lib/Api/CatalogApi.php
CHANGED
@@ -108,7 +108,7 @@ class CatalogApi
|
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
-
$headerParams['Square-Version'] = "2019-
|
112 |
|
113 |
|
114 |
|
@@ -201,7 +201,7 @@ class CatalogApi
|
|
201 |
$headerParams['Accept'] = $_header_accept;
|
202 |
}
|
203 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
204 |
-
$headerParams['Square-Version'] = "2019-
|
205 |
|
206 |
|
207 |
|
@@ -294,7 +294,7 @@ class CatalogApi
|
|
294 |
$headerParams['Accept'] = $_header_accept;
|
295 |
}
|
296 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
297 |
-
$headerParams['Square-Version'] = "2019-
|
298 |
|
299 |
|
300 |
|
@@ -381,7 +381,7 @@ class CatalogApi
|
|
381 |
$headerParams['Accept'] = $_header_accept;
|
382 |
}
|
383 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
384 |
-
$headerParams['Square-Version'] = "2019-
|
385 |
|
386 |
|
387 |
|
@@ -470,7 +470,7 @@ class CatalogApi
|
|
470 |
$headerParams['Accept'] = $_header_accept;
|
471 |
}
|
472 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
473 |
-
$headerParams['Square-Version'] = "2019-
|
474 |
|
475 |
|
476 |
|
@@ -564,7 +564,7 @@ class CatalogApi
|
|
564 |
$headerParams['Accept'] = $_header_accept;
|
565 |
}
|
566 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
567 |
-
$headerParams['Square-Version'] = "2019-
|
568 |
|
569 |
// query params
|
570 |
if ($cursor !== null) {
|
@@ -621,7 +621,7 @@ class CatalogApi
|
|
621 |
* RetrieveCatalogObject
|
622 |
*
|
623 |
* @param string $object_id The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. (required)
|
624 |
-
* @param bool $include_related_objects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of
|
625 |
* @return \SquareConnect\Model\RetrieveCatalogObjectResponse
|
626 |
* @throws \SquareConnect\ApiException on non-2xx response
|
627 |
*/
|
@@ -638,7 +638,7 @@ class CatalogApi
|
|
638 |
* RetrieveCatalogObject
|
639 |
*
|
640 |
* @param string $object_id The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. (required)
|
641 |
-
* @param bool $include_related_objects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of
|
642 |
* @return Array of \SquareConnect\Model\RetrieveCatalogObjectResponse, HTTP status code, HTTP response headers (array of strings)
|
643 |
* @throws \SquareConnect\ApiException on non-2xx response
|
644 |
*/
|
@@ -661,7 +661,7 @@ class CatalogApi
|
|
661 |
$headerParams['Accept'] = $_header_accept;
|
662 |
}
|
663 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
664 |
-
$headerParams['Square-Version'] = "2019-
|
665 |
|
666 |
// query params
|
667 |
if ($include_related_objects !== null) {
|
@@ -760,7 +760,7 @@ class CatalogApi
|
|
760 |
$headerParams['Accept'] = $_header_accept;
|
761 |
}
|
762 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
763 |
-
$headerParams['Square-Version'] = "2019-
|
764 |
|
765 |
|
766 |
|
@@ -853,7 +853,7 @@ class CatalogApi
|
|
853 |
$headerParams['Accept'] = $_header_accept;
|
854 |
}
|
855 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
856 |
-
$headerParams['Square-Version'] = "2019-
|
857 |
|
858 |
|
859 |
|
@@ -946,7 +946,7 @@ class CatalogApi
|
|
946 |
$headerParams['Accept'] = $_header_accept;
|
947 |
}
|
948 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
949 |
-
$headerParams['Square-Version'] = "2019-
|
950 |
|
951 |
|
952 |
|
@@ -1039,7 +1039,7 @@ class CatalogApi
|
|
1039 |
$headerParams['Accept'] = $_header_accept;
|
1040 |
}
|
1041 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1042 |
-
$headerParams['Square-Version'] = "2019-
|
1043 |
|
1044 |
|
1045 |
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
112 |
|
113 |
|
114 |
|
201 |
$headerParams['Accept'] = $_header_accept;
|
202 |
}
|
203 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
204 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
205 |
|
206 |
|
207 |
|
294 |
$headerParams['Accept'] = $_header_accept;
|
295 |
}
|
296 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
297 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
298 |
|
299 |
|
300 |
|
381 |
$headerParams['Accept'] = $_header_accept;
|
382 |
}
|
383 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
384 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
385 |
|
386 |
|
387 |
|
470 |
$headerParams['Accept'] = $_header_accept;
|
471 |
}
|
472 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
473 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
474 |
|
475 |
|
476 |
|
564 |
$headerParams['Accept'] = $_header_accept;
|
565 |
}
|
566 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
567 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
568 |
|
569 |
// query params
|
570 |
if ($cursor !== null) {
|
621 |
* RetrieveCatalogObject
|
622 |
*
|
623 |
* @param string $object_id The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. (required)
|
624 |
+
* @param bool $include_related_objects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` (optional)
|
625 |
* @return \SquareConnect\Model\RetrieveCatalogObjectResponse
|
626 |
* @throws \SquareConnect\ApiException on non-2xx response
|
627 |
*/
|
638 |
* RetrieveCatalogObject
|
639 |
*
|
640 |
* @param string $object_id The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. (required)
|
641 |
+
* @param bool $include_related_objects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` (optional)
|
642 |
* @return Array of \SquareConnect\Model\RetrieveCatalogObjectResponse, HTTP status code, HTTP response headers (array of strings)
|
643 |
* @throws \SquareConnect\ApiException on non-2xx response
|
644 |
*/
|
661 |
$headerParams['Accept'] = $_header_accept;
|
662 |
}
|
663 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
664 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
665 |
|
666 |
// query params
|
667 |
if ($include_related_objects !== null) {
|
760 |
$headerParams['Accept'] = $_header_accept;
|
761 |
}
|
762 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
763 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
764 |
|
765 |
|
766 |
|
853 |
$headerParams['Accept'] = $_header_accept;
|
854 |
}
|
855 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
856 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
857 |
|
858 |
|
859 |
|
946 |
$headerParams['Accept'] = $_header_accept;
|
947 |
}
|
948 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
949 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
950 |
|
951 |
|
952 |
|
1039 |
$headerParams['Accept'] = $_header_accept;
|
1040 |
}
|
1041 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1042 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1043 |
|
1044 |
|
1045 |
|
vendor/square/connect/lib/Api/CheckoutApi.php
CHANGED
@@ -114,7 +114,7 @@ class CheckoutApi
|
|
114 |
$headerParams['Accept'] = $_header_accept;
|
115 |
}
|
116 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
117 |
-
$headerParams['Square-Version'] = "2019-
|
118 |
|
119 |
|
120 |
|
114 |
$headerParams['Accept'] = $_header_accept;
|
115 |
}
|
116 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
117 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
118 |
|
119 |
|
120 |
|
vendor/square/connect/lib/Api/CustomersApi.php
CHANGED
@@ -108,7 +108,7 @@ class CustomersApi
|
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
-
$headerParams['Square-Version'] = "2019-
|
112 |
|
113 |
|
114 |
|
@@ -162,7 +162,7 @@ class CustomersApi
|
|
162 |
*
|
163 |
* CreateCustomerCard
|
164 |
*
|
165 |
-
* @param string $customer_id The ID of the customer
|
166 |
* @param \SquareConnect\Model\CreateCustomerCardRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
167 |
* @return \SquareConnect\Model\CreateCustomerCardResponse
|
168 |
* @throws \SquareConnect\ApiException on non-2xx response
|
@@ -179,7 +179,7 @@ class CustomersApi
|
|
179 |
*
|
180 |
* CreateCustomerCard
|
181 |
*
|
182 |
-
* @param string $customer_id The ID of the customer
|
183 |
* @param \SquareConnect\Model\CreateCustomerCardRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
184 |
* @return Array of \SquareConnect\Model\CreateCustomerCardResponse, HTTP status code, HTTP response headers (array of strings)
|
185 |
* @throws \SquareConnect\ApiException on non-2xx response
|
@@ -207,7 +207,7 @@ class CustomersApi
|
|
207 |
$headerParams['Accept'] = $_header_accept;
|
208 |
}
|
209 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
210 |
-
$headerParams['Square-Version'] = "2019-
|
211 |
|
212 |
|
213 |
|
@@ -307,7 +307,7 @@ class CustomersApi
|
|
307 |
$headerParams['Accept'] = $_header_accept;
|
308 |
}
|
309 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
310 |
-
$headerParams['Square-Version'] = "2019-
|
311 |
|
312 |
|
313 |
|
@@ -409,7 +409,7 @@ class CustomersApi
|
|
409 |
$headerParams['Accept'] = $_header_accept;
|
410 |
}
|
411 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
412 |
-
$headerParams['Square-Version'] = "2019-
|
413 |
|
414 |
|
415 |
|
@@ -512,7 +512,7 @@ class CustomersApi
|
|
512 |
$headerParams['Accept'] = $_header_accept;
|
513 |
}
|
514 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
515 |
-
$headerParams['Square-Version'] = "2019-
|
516 |
|
517 |
// query params
|
518 |
if ($cursor !== null) {
|
@@ -610,7 +610,7 @@ class CustomersApi
|
|
610 |
$headerParams['Accept'] = $_header_accept;
|
611 |
}
|
612 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
613 |
-
$headerParams['Square-Version'] = "2019-
|
614 |
|
615 |
|
616 |
|
@@ -706,7 +706,7 @@ class CustomersApi
|
|
706 |
$headerParams['Accept'] = $_header_accept;
|
707 |
}
|
708 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
709 |
-
$headerParams['Square-Version'] = "2019-
|
710 |
|
711 |
|
712 |
|
@@ -805,7 +805,7 @@ class CustomersApi
|
|
805 |
$headerParams['Accept'] = $_header_accept;
|
806 |
}
|
807 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
808 |
-
$headerParams['Square-Version'] = "2019-
|
809 |
|
810 |
|
811 |
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
112 |
|
113 |
|
114 |
|
162 |
*
|
163 |
* CreateCustomerCard
|
164 |
*
|
165 |
+
* @param string $customer_id The Square ID of the customer profile the card is linked to. (required)
|
166 |
* @param \SquareConnect\Model\CreateCustomerCardRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
167 |
* @return \SquareConnect\Model\CreateCustomerCardResponse
|
168 |
* @throws \SquareConnect\ApiException on non-2xx response
|
179 |
*
|
180 |
* CreateCustomerCard
|
181 |
*
|
182 |
+
* @param string $customer_id The Square ID of the customer profile the card is linked to. (required)
|
183 |
* @param \SquareConnect\Model\CreateCustomerCardRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
184 |
* @return Array of \SquareConnect\Model\CreateCustomerCardResponse, HTTP status code, HTTP response headers (array of strings)
|
185 |
* @throws \SquareConnect\ApiException on non-2xx response
|
207 |
$headerParams['Accept'] = $_header_accept;
|
208 |
}
|
209 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
210 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
211 |
|
212 |
|
213 |
|
307 |
$headerParams['Accept'] = $_header_accept;
|
308 |
}
|
309 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
310 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
311 |
|
312 |
|
313 |
|
409 |
$headerParams['Accept'] = $_header_accept;
|
410 |
}
|
411 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
412 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
413 |
|
414 |
|
415 |
|
512 |
$headerParams['Accept'] = $_header_accept;
|
513 |
}
|
514 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
515 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
516 |
|
517 |
// query params
|
518 |
if ($cursor !== null) {
|
610 |
$headerParams['Accept'] = $_header_accept;
|
611 |
}
|
612 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
613 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
614 |
|
615 |
|
616 |
|
706 |
$headerParams['Accept'] = $_header_accept;
|
707 |
}
|
708 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
709 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
710 |
|
711 |
|
712 |
|
805 |
$headerParams['Accept'] = $_header_accept;
|
806 |
}
|
807 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
808 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
809 |
|
810 |
|
811 |
|
vendor/square/connect/lib/Api/EmployeesApi.php
CHANGED
@@ -110,7 +110,7 @@ class EmployeesApi
|
|
110 |
$headerParams['Accept'] = $_header_accept;
|
111 |
}
|
112 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
113 |
-
$headerParams['Square-Version'] = "2019-
|
114 |
|
115 |
// query params
|
116 |
if ($location_id !== null) {
|
@@ -211,7 +211,7 @@ class EmployeesApi
|
|
211 |
$headerParams['Accept'] = $_header_accept;
|
212 |
}
|
213 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
214 |
-
$headerParams['Square-Version'] = "2019-
|
215 |
|
216 |
|
217 |
|
110 |
$headerParams['Accept'] = $_header_accept;
|
111 |
}
|
112 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
113 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
114 |
|
115 |
// query params
|
116 |
if ($location_id !== null) {
|
211 |
$headerParams['Accept'] = $_header_accept;
|
212 |
}
|
213 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
214 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
215 |
|
216 |
|
217 |
|
vendor/square/connect/lib/Api/InventoryApi.php
CHANGED
@@ -108,7 +108,7 @@ class InventoryApi
|
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
-
$headerParams['Square-Version'] = "2019-
|
112 |
|
113 |
|
114 |
|
@@ -201,7 +201,7 @@ class InventoryApi
|
|
201 |
$headerParams['Accept'] = $_header_accept;
|
202 |
}
|
203 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
204 |
-
$headerParams['Square-Version'] = "2019-
|
205 |
|
206 |
|
207 |
|
@@ -294,7 +294,7 @@ class InventoryApi
|
|
294 |
$headerParams['Accept'] = $_header_accept;
|
295 |
}
|
296 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
297 |
-
$headerParams['Square-Version'] = "2019-
|
298 |
|
299 |
|
300 |
|
@@ -387,7 +387,7 @@ class InventoryApi
|
|
387 |
$headerParams['Accept'] = $_header_accept;
|
388 |
}
|
389 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
390 |
-
$headerParams['Square-Version'] = "2019-
|
391 |
|
392 |
|
393 |
|
@@ -487,7 +487,7 @@ class InventoryApi
|
|
487 |
$headerParams['Accept'] = $_header_accept;
|
488 |
}
|
489 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
490 |
-
$headerParams['Square-Version'] = "2019-
|
491 |
|
492 |
// query params
|
493 |
if ($location_ids !== null) {
|
@@ -593,7 +593,7 @@ class InventoryApi
|
|
593 |
$headerParams['Accept'] = $_header_accept;
|
594 |
}
|
595 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
596 |
-
$headerParams['Square-Version'] = "2019-
|
597 |
|
598 |
// query params
|
599 |
if ($location_ids !== null) {
|
@@ -695,7 +695,7 @@ class InventoryApi
|
|
695 |
$headerParams['Accept'] = $_header_accept;
|
696 |
}
|
697 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
698 |
-
$headerParams['Square-Version'] = "2019-
|
699 |
|
700 |
|
701 |
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
112 |
|
113 |
|
114 |
|
201 |
$headerParams['Accept'] = $_header_accept;
|
202 |
}
|
203 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
204 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
205 |
|
206 |
|
207 |
|
294 |
$headerParams['Accept'] = $_header_accept;
|
295 |
}
|
296 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
297 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
298 |
|
299 |
|
300 |
|
387 |
$headerParams['Accept'] = $_header_accept;
|
388 |
}
|
389 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
390 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
391 |
|
392 |
|
393 |
|
487 |
$headerParams['Accept'] = $_header_accept;
|
488 |
}
|
489 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
490 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
491 |
|
492 |
// query params
|
493 |
if ($location_ids !== null) {
|
593 |
$headerParams['Accept'] = $_header_accept;
|
594 |
}
|
595 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
596 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
597 |
|
598 |
// query params
|
599 |
if ($location_ids !== null) {
|
695 |
$headerParams['Accept'] = $_header_accept;
|
696 |
}
|
697 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
698 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
699 |
|
700 |
|
701 |
|
vendor/square/connect/lib/Api/LaborApi.php
CHANGED
@@ -108,7 +108,7 @@ class LaborApi
|
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
-
$headerParams['Square-Version'] = "2019-
|
112 |
|
113 |
|
114 |
|
@@ -201,7 +201,7 @@ class LaborApi
|
|
201 |
$headerParams['Accept'] = $_header_accept;
|
202 |
}
|
203 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
204 |
-
$headerParams['Square-Version'] = "2019-
|
205 |
|
206 |
|
207 |
|
@@ -294,7 +294,7 @@ class LaborApi
|
|
294 |
$headerParams['Accept'] = $_header_accept;
|
295 |
}
|
296 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
297 |
-
$headerParams['Square-Version'] = "2019-
|
298 |
|
299 |
|
300 |
|
@@ -390,7 +390,7 @@ class LaborApi
|
|
390 |
$headerParams['Accept'] = $_header_accept;
|
391 |
}
|
392 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
393 |
-
$headerParams['Square-Version'] = "2019-
|
394 |
|
395 |
|
396 |
|
@@ -486,7 +486,7 @@ class LaborApi
|
|
486 |
$headerParams['Accept'] = $_header_accept;
|
487 |
}
|
488 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
489 |
-
$headerParams['Square-Version'] = "2019-
|
490 |
|
491 |
|
492 |
|
@@ -582,7 +582,7 @@ class LaborApi
|
|
582 |
$headerParams['Accept'] = $_header_accept;
|
583 |
}
|
584 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
585 |
-
$headerParams['Square-Version'] = "2019-
|
586 |
|
587 |
|
588 |
|
@@ -678,7 +678,7 @@ class LaborApi
|
|
678 |
$headerParams['Accept'] = $_header_accept;
|
679 |
}
|
680 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
681 |
-
$headerParams['Square-Version'] = "2019-
|
682 |
|
683 |
|
684 |
|
@@ -774,7 +774,7 @@ class LaborApi
|
|
774 |
$headerParams['Accept'] = $_header_accept;
|
775 |
}
|
776 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
777 |
-
$headerParams['Square-Version'] = "2019-
|
778 |
|
779 |
// query params
|
780 |
if ($location_id !== null) {
|
@@ -872,7 +872,7 @@ class LaborApi
|
|
872 |
$headerParams['Accept'] = $_header_accept;
|
873 |
}
|
874 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
875 |
-
$headerParams['Square-Version'] = "2019-
|
876 |
|
877 |
// query params
|
878 |
if ($employee_id !== null) {
|
@@ -968,7 +968,7 @@ class LaborApi
|
|
968 |
$headerParams['Accept'] = $_header_accept;
|
969 |
}
|
970 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
971 |
-
$headerParams['Square-Version'] = "2019-
|
972 |
|
973 |
// query params
|
974 |
if ($limit !== null) {
|
@@ -1063,7 +1063,7 @@ class LaborApi
|
|
1063 |
$headerParams['Accept'] = $_header_accept;
|
1064 |
}
|
1065 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1066 |
-
$headerParams['Square-Version'] = "2019-
|
1067 |
|
1068 |
|
1069 |
|
@@ -1162,7 +1162,7 @@ class LaborApi
|
|
1162 |
$headerParams['Accept'] = $_header_accept;
|
1163 |
}
|
1164 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1165 |
-
$headerParams['Square-Version'] = "2019-
|
1166 |
|
1167 |
|
1168 |
|
@@ -1268,7 +1268,7 @@ class LaborApi
|
|
1268 |
$headerParams['Accept'] = $_header_accept;
|
1269 |
}
|
1270 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1271 |
-
$headerParams['Square-Version'] = "2019-
|
1272 |
|
1273 |
|
1274 |
|
@@ -1374,7 +1374,7 @@ class LaborApi
|
|
1374 |
$headerParams['Accept'] = $_header_accept;
|
1375 |
}
|
1376 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1377 |
-
$headerParams['Square-Version'] = "2019-
|
1378 |
|
1379 |
|
1380 |
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
112 |
|
113 |
|
114 |
|
201 |
$headerParams['Accept'] = $_header_accept;
|
202 |
}
|
203 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
204 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
205 |
|
206 |
|
207 |
|
294 |
$headerParams['Accept'] = $_header_accept;
|
295 |
}
|
296 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
297 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
298 |
|
299 |
|
300 |
|
390 |
$headerParams['Accept'] = $_header_accept;
|
391 |
}
|
392 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
393 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
394 |
|
395 |
|
396 |
|
486 |
$headerParams['Accept'] = $_header_accept;
|
487 |
}
|
488 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
489 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
490 |
|
491 |
|
492 |
|
582 |
$headerParams['Accept'] = $_header_accept;
|
583 |
}
|
584 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
585 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
586 |
|
587 |
|
588 |
|
678 |
$headerParams['Accept'] = $_header_accept;
|
679 |
}
|
680 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
681 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
682 |
|
683 |
|
684 |
|
774 |
$headerParams['Accept'] = $_header_accept;
|
775 |
}
|
776 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
777 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
778 |
|
779 |
// query params
|
780 |
if ($location_id !== null) {
|
872 |
$headerParams['Accept'] = $_header_accept;
|
873 |
}
|
874 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
875 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
876 |
|
877 |
// query params
|
878 |
if ($employee_id !== null) {
|
968 |
$headerParams['Accept'] = $_header_accept;
|
969 |
}
|
970 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
971 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
972 |
|
973 |
// query params
|
974 |
if ($limit !== null) {
|
1063 |
$headerParams['Accept'] = $_header_accept;
|
1064 |
}
|
1065 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1066 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1067 |
|
1068 |
|
1069 |
|
1162 |
$headerParams['Accept'] = $_header_accept;
|
1163 |
}
|
1164 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1165 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1166 |
|
1167 |
|
1168 |
|
1268 |
$headerParams['Accept'] = $_header_accept;
|
1269 |
}
|
1270 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1271 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1272 |
|
1273 |
|
1274 |
|
1374 |
$headerParams['Accept'] = $_header_accept;
|
1375 |
}
|
1376 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1377 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1378 |
|
1379 |
|
1380 |
|
vendor/square/connect/lib/Api/LocationsApi.php
CHANGED
@@ -102,7 +102,7 @@ class LocationsApi
|
|
102 |
$headerParams['Accept'] = $_header_accept;
|
103 |
}
|
104 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
105 |
-
$headerParams['Square-Version'] = "2019-
|
106 |
|
107 |
|
108 |
|
102 |
$headerParams['Accept'] = $_header_accept;
|
103 |
}
|
104 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
105 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
106 |
|
107 |
|
108 |
|
vendor/square/connect/lib/Api/MobileAuthorizationApi.php
CHANGED
@@ -108,7 +108,7 @@ class MobileAuthorizationApi
|
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
-
$headerParams['Square-Version'] = "2019-
|
112 |
|
113 |
|
114 |
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
112 |
|
113 |
|
114 |
|
vendor/square/connect/lib/Api/OAuthApi.php
CHANGED
@@ -108,7 +108,7 @@ class OAuthApi
|
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
-
$headerParams['Square-Version'] = "2019-
|
112 |
|
113 |
|
114 |
|
@@ -153,6 +153,7 @@ class OAuthApi
|
|
153 |
}
|
154 |
}
|
155 |
/**
|
|
|
156 |
* renewToken
|
157 |
*
|
158 |
* RenewToken
|
@@ -164,6 +165,7 @@ class OAuthApi
|
|
164 |
*/
|
165 |
public function renewToken($client_id, $body)
|
166 |
{
|
|
|
167 |
list($response, $statusCode, $httpHeader) = $this->renewTokenWithHttpInfo ($client_id, $body);
|
168 |
return $response;
|
169 |
}
|
@@ -202,7 +204,7 @@ class OAuthApi
|
|
202 |
$headerParams['Accept'] = $_header_accept;
|
203 |
}
|
204 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
205 |
-
$headerParams['Square-Version'] = "2019-
|
206 |
|
207 |
|
208 |
|
@@ -304,7 +306,7 @@ class OAuthApi
|
|
304 |
$headerParams['Accept'] = $_header_accept;
|
305 |
}
|
306 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
307 |
-
$headerParams['Square-Version'] = "2019-
|
308 |
|
309 |
|
310 |
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
112 |
|
113 |
|
114 |
|
153 |
}
|
154 |
}
|
155 |
/**
|
156 |
+
* @deprecated
|
157 |
* renewToken
|
158 |
*
|
159 |
* RenewToken
|
165 |
*/
|
166 |
public function renewToken($client_id, $body)
|
167 |
{
|
168 |
+
trigger_error('Calling deprecated API: OAuthApi.renewToken', E_USER_DEPRECATED);
|
169 |
list($response, $statusCode, $httpHeader) = $this->renewTokenWithHttpInfo ($client_id, $body);
|
170 |
return $response;
|
171 |
}
|
204 |
$headerParams['Accept'] = $_header_accept;
|
205 |
}
|
206 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
207 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
208 |
|
209 |
|
210 |
|
306 |
$headerParams['Accept'] = $_header_accept;
|
307 |
}
|
308 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
309 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
310 |
|
311 |
|
312 |
|
vendor/square/connect/lib/Api/OrdersApi.php
CHANGED
@@ -114,7 +114,7 @@ class OrdersApi
|
|
114 |
$headerParams['Accept'] = $_header_accept;
|
115 |
}
|
116 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
117 |
-
$headerParams['Square-Version'] = "2019-
|
118 |
|
119 |
|
120 |
|
@@ -220,7 +220,7 @@ class OrdersApi
|
|
220 |
$headerParams['Accept'] = $_header_accept;
|
221 |
}
|
222 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
223 |
-
$headerParams['Square-Version'] = "2019-
|
224 |
|
225 |
|
226 |
|
@@ -276,6 +276,112 @@ class OrdersApi
|
|
276 |
throw $e;
|
277 |
}
|
278 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
/**
|
280 |
* searchOrders
|
281 |
*
|
@@ -320,7 +426,7 @@ class OrdersApi
|
|
320 |
$headerParams['Accept'] = $_header_accept;
|
321 |
}
|
322 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
323 |
-
$headerParams['Square-Version'] = "2019-
|
324 |
|
325 |
|
326 |
|
@@ -366,6 +472,125 @@ class OrdersApi
|
|
366 |
break;
|
367 |
}
|
368 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
throw $e;
|
370 |
}
|
371 |
}
|
114 |
$headerParams['Accept'] = $_header_accept;
|
115 |
}
|
116 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
117 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
118 |
|
119 |
|
120 |
|
220 |
$headerParams['Accept'] = $_header_accept;
|
221 |
}
|
222 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
223 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
224 |
|
225 |
|
226 |
|
276 |
throw $e;
|
277 |
}
|
278 |
}
|
279 |
+
/**
|
280 |
+
* payOrder
|
281 |
+
*
|
282 |
+
* PayOrder
|
283 |
+
*
|
284 |
+
* @param string $order_id The ID of the order being paid. (required)
|
285 |
+
* @param \SquareConnect\Model\PayOrderRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
286 |
+
* @return \SquareConnect\Model\PayOrderResponse
|
287 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
288 |
+
*/
|
289 |
+
public function payOrder($order_id, $body)
|
290 |
+
{
|
291 |
+
list($response, $statusCode, $httpHeader) = $this->payOrderWithHttpInfo ($order_id, $body);
|
292 |
+
return $response;
|
293 |
+
}
|
294 |
+
|
295 |
+
|
296 |
+
/**
|
297 |
+
* payOrderWithHttpInfo
|
298 |
+
*
|
299 |
+
* PayOrder
|
300 |
+
*
|
301 |
+
* @param string $order_id The ID of the order being paid. (required)
|
302 |
+
* @param \SquareConnect\Model\PayOrderRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
303 |
+
* @return Array of \SquareConnect\Model\PayOrderResponse, HTTP status code, HTTP response headers (array of strings)
|
304 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
305 |
+
*/
|
306 |
+
public function payOrderWithHttpInfo($order_id, $body)
|
307 |
+
{
|
308 |
+
|
309 |
+
// verify the required parameter 'order_id' is set
|
310 |
+
if ($order_id === null) {
|
311 |
+
throw new \InvalidArgumentException('Missing the required parameter $order_id when calling payOrder');
|
312 |
+
}
|
313 |
+
// verify the required parameter 'body' is set
|
314 |
+
if ($body === null) {
|
315 |
+
throw new \InvalidArgumentException('Missing the required parameter $body when calling payOrder');
|
316 |
+
}
|
317 |
+
|
318 |
+
// parse inputs
|
319 |
+
$resourcePath = "/v2/orders/{order_id}/pay";
|
320 |
+
$httpBody = '';
|
321 |
+
$queryParams = array();
|
322 |
+
$headerParams = array();
|
323 |
+
$formParams = array();
|
324 |
+
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
|
325 |
+
if (!is_null($_header_accept)) {
|
326 |
+
$headerParams['Accept'] = $_header_accept;
|
327 |
+
}
|
328 |
+
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
329 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
330 |
+
|
331 |
+
|
332 |
+
|
333 |
+
// path params
|
334 |
+
if ($order_id !== null) {
|
335 |
+
$resourcePath = str_replace(
|
336 |
+
"{" . "order_id" . "}",
|
337 |
+
$this->apiClient->getSerializer()->toPathValue($order_id),
|
338 |
+
$resourcePath
|
339 |
+
);
|
340 |
+
}
|
341 |
+
// default format to json
|
342 |
+
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
343 |
+
|
344 |
+
|
345 |
+
// body params
|
346 |
+
$_tempBody = null;
|
347 |
+
if (isset($body)) {
|
348 |
+
$_tempBody = $body;
|
349 |
+
}
|
350 |
+
|
351 |
+
// for model (json/xml)
|
352 |
+
if (isset($_tempBody)) {
|
353 |
+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
354 |
+
} elseif (count($formParams) > 0) {
|
355 |
+
$httpBody = $formParams; // for HTTP post (form)
|
356 |
+
}
|
357 |
+
|
358 |
+
// this endpoint requires OAuth (access token)
|
359 |
+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
360 |
+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
361 |
+
}
|
362 |
+
// make the API Call
|
363 |
+
try {
|
364 |
+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
365 |
+
$resourcePath, 'POST',
|
366 |
+
$queryParams, $httpBody,
|
367 |
+
$headerParams, '\SquareConnect\Model\PayOrderResponse'
|
368 |
+
);
|
369 |
+
if (!$response) {
|
370 |
+
return array(null, $statusCode, $httpHeader);
|
371 |
+
}
|
372 |
+
|
373 |
+
return array(\SquareConnect\ObjectSerializer::deserialize($response, '\SquareConnect\Model\PayOrderResponse', $httpHeader), $statusCode, $httpHeader);
|
374 |
+
} catch (ApiException $e) {
|
375 |
+
switch ($e->getCode()) {
|
376 |
+
case 200:
|
377 |
+
$data = \SquareConnect\ObjectSerializer::deserialize($e->getResponseBody(), '\SquareConnect\Model\PayOrderResponse', $e->getResponseHeaders());
|
378 |
+
$e->setResponseObject($data);
|
379 |
+
break;
|
380 |
+
}
|
381 |
+
|
382 |
+
throw $e;
|
383 |
+
}
|
384 |
+
}
|
385 |
/**
|
386 |
* searchOrders
|
387 |
*
|
426 |
$headerParams['Accept'] = $_header_accept;
|
427 |
}
|
428 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
429 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
430 |
|
431 |
|
432 |
|
472 |
break;
|
473 |
}
|
474 |
|
475 |
+
throw $e;
|
476 |
+
}
|
477 |
+
}
|
478 |
+
/**
|
479 |
+
* updateOrder
|
480 |
+
*
|
481 |
+
* UpdateOrder
|
482 |
+
*
|
483 |
+
* @param string $location_id The ID of the order's associated location. (required)
|
484 |
+
* @param string $order_id The ID of the order to update. (required)
|
485 |
+
* @param \SquareConnect\Model\UpdateOrderRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
486 |
+
* @return \SquareConnect\Model\UpdateOrderResponse
|
487 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
488 |
+
*/
|
489 |
+
public function updateOrder($location_id, $order_id, $body)
|
490 |
+
{
|
491 |
+
list($response, $statusCode, $httpHeader) = $this->updateOrderWithHttpInfo ($location_id, $order_id, $body);
|
492 |
+
return $response;
|
493 |
+
}
|
494 |
+
|
495 |
+
|
496 |
+
/**
|
497 |
+
* updateOrderWithHttpInfo
|
498 |
+
*
|
499 |
+
* UpdateOrder
|
500 |
+
*
|
501 |
+
* @param string $location_id The ID of the order's associated location. (required)
|
502 |
+
* @param string $order_id The ID of the order to update. (required)
|
503 |
+
* @param \SquareConnect\Model\UpdateOrderRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
504 |
+
* @return Array of \SquareConnect\Model\UpdateOrderResponse, HTTP status code, HTTP response headers (array of strings)
|
505 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
506 |
+
*/
|
507 |
+
public function updateOrderWithHttpInfo($location_id, $order_id, $body)
|
508 |
+
{
|
509 |
+
|
510 |
+
// verify the required parameter 'location_id' is set
|
511 |
+
if ($location_id === null) {
|
512 |
+
throw new \InvalidArgumentException('Missing the required parameter $location_id when calling updateOrder');
|
513 |
+
}
|
514 |
+
// verify the required parameter 'order_id' is set
|
515 |
+
if ($order_id === null) {
|
516 |
+
throw new \InvalidArgumentException('Missing the required parameter $order_id when calling updateOrder');
|
517 |
+
}
|
518 |
+
// verify the required parameter 'body' is set
|
519 |
+
if ($body === null) {
|
520 |
+
throw new \InvalidArgumentException('Missing the required parameter $body when calling updateOrder');
|
521 |
+
}
|
522 |
+
|
523 |
+
// parse inputs
|
524 |
+
$resourcePath = "/v2/locations/{location_id}/orders/{order_id}";
|
525 |
+
$httpBody = '';
|
526 |
+
$queryParams = array();
|
527 |
+
$headerParams = array();
|
528 |
+
$formParams = array();
|
529 |
+
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
|
530 |
+
if (!is_null($_header_accept)) {
|
531 |
+
$headerParams['Accept'] = $_header_accept;
|
532 |
+
}
|
533 |
+
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
534 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
535 |
+
|
536 |
+
|
537 |
+
|
538 |
+
// path params
|
539 |
+
if ($location_id !== null) {
|
540 |
+
$resourcePath = str_replace(
|
541 |
+
"{" . "location_id" . "}",
|
542 |
+
$this->apiClient->getSerializer()->toPathValue($location_id),
|
543 |
+
$resourcePath
|
544 |
+
);
|
545 |
+
}// path params
|
546 |
+
if ($order_id !== null) {
|
547 |
+
$resourcePath = str_replace(
|
548 |
+
"{" . "order_id" . "}",
|
549 |
+
$this->apiClient->getSerializer()->toPathValue($order_id),
|
550 |
+
$resourcePath
|
551 |
+
);
|
552 |
+
}
|
553 |
+
// default format to json
|
554 |
+
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
555 |
+
|
556 |
+
|
557 |
+
// body params
|
558 |
+
$_tempBody = null;
|
559 |
+
if (isset($body)) {
|
560 |
+
$_tempBody = $body;
|
561 |
+
}
|
562 |
+
|
563 |
+
// for model (json/xml)
|
564 |
+
if (isset($_tempBody)) {
|
565 |
+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
566 |
+
} elseif (count($formParams) > 0) {
|
567 |
+
$httpBody = $formParams; // for HTTP post (form)
|
568 |
+
}
|
569 |
+
|
570 |
+
// this endpoint requires OAuth (access token)
|
571 |
+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
572 |
+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
573 |
+
}
|
574 |
+
// make the API Call
|
575 |
+
try {
|
576 |
+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
577 |
+
$resourcePath, 'PUT',
|
578 |
+
$queryParams, $httpBody,
|
579 |
+
$headerParams, '\SquareConnect\Model\UpdateOrderResponse'
|
580 |
+
);
|
581 |
+
if (!$response) {
|
582 |
+
return array(null, $statusCode, $httpHeader);
|
583 |
+
}
|
584 |
+
|
585 |
+
return array(\SquareConnect\ObjectSerializer::deserialize($response, '\SquareConnect\Model\UpdateOrderResponse', $httpHeader), $statusCode, $httpHeader);
|
586 |
+
} catch (ApiException $e) {
|
587 |
+
switch ($e->getCode()) {
|
588 |
+
case 200:
|
589 |
+
$data = \SquareConnect\ObjectSerializer::deserialize($e->getResponseBody(), '\SquareConnect\Model\UpdateOrderResponse', $e->getResponseHeaders());
|
590 |
+
$e->setResponseObject($data);
|
591 |
+
break;
|
592 |
+
}
|
593 |
+
|
594 |
throw $e;
|
595 |
}
|
596 |
}
|
vendor/square/connect/lib/Api/PaymentsApi.php
ADDED
@@ -0,0 +1,664 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Api;
|
9 |
+
|
10 |
+
use \SquareConnect\Configuration;
|
11 |
+
use \SquareConnect\ApiClient;
|
12 |
+
use \SquareConnect\ApiException;
|
13 |
+
use \SquareConnect\ObjectSerializer;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* PaymentsApi Class Doc Comment
|
17 |
+
*
|
18 |
+
* @category Class
|
19 |
+
* @package SquareConnect
|
20 |
+
* @author Square Inc.
|
21 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
22 |
+
* @link https://squareup.com/developers
|
23 |
+
*/
|
24 |
+
class PaymentsApi
|
25 |
+
{
|
26 |
+
|
27 |
+
/**
|
28 |
+
* API Client
|
29 |
+
* @var \SquareConnect\ApiClient instance of the ApiClient
|
30 |
+
*/
|
31 |
+
protected $apiClient;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Constructor
|
35 |
+
* @param \SquareConnect\ApiClient|null $apiClient The api client to use
|
36 |
+
*/
|
37 |
+
function __construct($apiClient = null)
|
38 |
+
{
|
39 |
+
if ($apiClient == null) {
|
40 |
+
$apiClient = new ApiClient();
|
41 |
+
$apiClient->getConfig()->setHost('https://connect.squareup.com');
|
42 |
+
}
|
43 |
+
|
44 |
+
$this->apiClient = $apiClient;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get API client
|
49 |
+
* @return \SquareConnect\ApiClient get the API client
|
50 |
+
*/
|
51 |
+
public function getApiClient()
|
52 |
+
{
|
53 |
+
return $this->apiClient;
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Set the API client
|
58 |
+
* @param \SquareConnect\ApiClient $apiClient set the API client
|
59 |
+
* @return PaymentsApi
|
60 |
+
*/
|
61 |
+
public function setApiClient(ApiClient $apiClient)
|
62 |
+
{
|
63 |
+
$this->apiClient = $apiClient;
|
64 |
+
return $this;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* cancelPayment
|
69 |
+
*
|
70 |
+
* CancelPayment
|
71 |
+
*
|
72 |
+
* @param string $payment_id `payment_id` identifying the payment to be canceled. (required)
|
73 |
+
* @return \SquareConnect\Model\CancelPaymentResponse
|
74 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
75 |
+
*/
|
76 |
+
public function cancelPayment($payment_id)
|
77 |
+
{
|
78 |
+
list($response, $statusCode, $httpHeader) = $this->cancelPaymentWithHttpInfo ($payment_id);
|
79 |
+
return $response;
|
80 |
+
}
|
81 |
+
|
82 |
+
|
83 |
+
/**
|
84 |
+
* cancelPaymentWithHttpInfo
|
85 |
+
*
|
86 |
+
* CancelPayment
|
87 |
+
*
|
88 |
+
* @param string $payment_id `payment_id` identifying the payment to be canceled. (required)
|
89 |
+
* @return Array of \SquareConnect\Model\CancelPaymentResponse, HTTP status code, HTTP response headers (array of strings)
|
90 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
91 |
+
*/
|
92 |
+
public function cancelPaymentWithHttpInfo($payment_id)
|
93 |
+
{
|
94 |
+
|
95 |
+
// verify the required parameter 'payment_id' is set
|
96 |
+
if ($payment_id === null) {
|
97 |
+
throw new \InvalidArgumentException('Missing the required parameter $payment_id when calling cancelPayment');
|
98 |
+
}
|
99 |
+
|
100 |
+
// parse inputs
|
101 |
+
$resourcePath = "/v2/payments/{payment_id}/cancel";
|
102 |
+
$httpBody = '';
|
103 |
+
$queryParams = array();
|
104 |
+
$headerParams = array();
|
105 |
+
$formParams = array();
|
106 |
+
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
|
107 |
+
if (!is_null($_header_accept)) {
|
108 |
+
$headerParams['Accept'] = $_header_accept;
|
109 |
+
}
|
110 |
+
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
// path params
|
116 |
+
if ($payment_id !== null) {
|
117 |
+
$resourcePath = str_replace(
|
118 |
+
"{" . "payment_id" . "}",
|
119 |
+
$this->apiClient->getSerializer()->toPathValue($payment_id),
|
120 |
+
$resourcePath
|
121 |
+
);
|
122 |
+
}
|
123 |
+
// default format to json
|
124 |
+
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
125 |
+
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
// for model (json/xml)
|
130 |
+
if (isset($_tempBody)) {
|
131 |
+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
132 |
+
} elseif (count($formParams) > 0) {
|
133 |
+
$httpBody = $formParams; // for HTTP post (form)
|
134 |
+
}
|
135 |
+
|
136 |
+
// this endpoint requires OAuth (access token)
|
137 |
+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
138 |
+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
139 |
+
}
|
140 |
+
// make the API Call
|
141 |
+
try {
|
142 |
+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
143 |
+
$resourcePath, 'POST',
|
144 |
+
$queryParams, $httpBody,
|
145 |
+
$headerParams, '\SquareConnect\Model\CancelPaymentResponse'
|
146 |
+
);
|
147 |
+
if (!$response) {
|
148 |
+
return array(null, $statusCode, $httpHeader);
|
149 |
+
}
|
150 |
+
|
151 |
+
return array(\SquareConnect\ObjectSerializer::deserialize($response, '\SquareConnect\Model\CancelPaymentResponse', $httpHeader), $statusCode, $httpHeader);
|
152 |
+
} catch (ApiException $e) {
|
153 |
+
switch ($e->getCode()) {
|
154 |
+
case 200:
|
155 |
+
$data = \SquareConnect\ObjectSerializer::deserialize($e->getResponseBody(), '\SquareConnect\Model\CancelPaymentResponse', $e->getResponseHeaders());
|
156 |
+
$e->setResponseObject($data);
|
157 |
+
break;
|
158 |
+
}
|
159 |
+
|
160 |
+
throw $e;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
/**
|
164 |
+
* cancelPaymentByIdempotencyKey
|
165 |
+
*
|
166 |
+
* CancelPaymentByIdempotencyKey
|
167 |
+
*
|
168 |
+
* @param \SquareConnect\Model\CancelPaymentByIdempotencyKeyRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
169 |
+
* @return \SquareConnect\Model\CancelPaymentByIdempotencyKeyResponse
|
170 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
171 |
+
*/
|
172 |
+
public function cancelPaymentByIdempotencyKey($body)
|
173 |
+
{
|
174 |
+
list($response, $statusCode, $httpHeader) = $this->cancelPaymentByIdempotencyKeyWithHttpInfo ($body);
|
175 |
+
return $response;
|
176 |
+
}
|
177 |
+
|
178 |
+
|
179 |
+
/**
|
180 |
+
* cancelPaymentByIdempotencyKeyWithHttpInfo
|
181 |
+
*
|
182 |
+
* CancelPaymentByIdempotencyKey
|
183 |
+
*
|
184 |
+
* @param \SquareConnect\Model\CancelPaymentByIdempotencyKeyRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
185 |
+
* @return Array of \SquareConnect\Model\CancelPaymentByIdempotencyKeyResponse, HTTP status code, HTTP response headers (array of strings)
|
186 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
187 |
+
*/
|
188 |
+
public function cancelPaymentByIdempotencyKeyWithHttpInfo($body)
|
189 |
+
{
|
190 |
+
|
191 |
+
// verify the required parameter 'body' is set
|
192 |
+
if ($body === null) {
|
193 |
+
throw new \InvalidArgumentException('Missing the required parameter $body when calling cancelPaymentByIdempotencyKey');
|
194 |
+
}
|
195 |
+
|
196 |
+
// parse inputs
|
197 |
+
$resourcePath = "/v2/payments/cancel";
|
198 |
+
$httpBody = '';
|
199 |
+
$queryParams = array();
|
200 |
+
$headerParams = array();
|
201 |
+
$formParams = array();
|
202 |
+
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
|
203 |
+
if (!is_null($_header_accept)) {
|
204 |
+
$headerParams['Accept'] = $_header_accept;
|
205 |
+
}
|
206 |
+
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
207 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
208 |
+
|
209 |
+
|
210 |
+
|
211 |
+
|
212 |
+
// default format to json
|
213 |
+
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
214 |
+
|
215 |
+
|
216 |
+
// body params
|
217 |
+
$_tempBody = null;
|
218 |
+
if (isset($body)) {
|
219 |
+
$_tempBody = $body;
|
220 |
+
}
|
221 |
+
|
222 |
+
// for model (json/xml)
|
223 |
+
if (isset($_tempBody)) {
|
224 |
+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
225 |
+
} elseif (count($formParams) > 0) {
|
226 |
+
$httpBody = $formParams; // for HTTP post (form)
|
227 |
+
}
|
228 |
+
|
229 |
+
// this endpoint requires OAuth (access token)
|
230 |
+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
231 |
+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
232 |
+
}
|
233 |
+
// make the API Call
|
234 |
+
try {
|
235 |
+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
236 |
+
$resourcePath, 'POST',
|
237 |
+
$queryParams, $httpBody,
|
238 |
+
$headerParams, '\SquareConnect\Model\CancelPaymentByIdempotencyKeyResponse'
|
239 |
+
);
|
240 |
+
if (!$response) {
|
241 |
+
return array(null, $statusCode, $httpHeader);
|
242 |
+
}
|
243 |
+
|
244 |
+
return array(\SquareConnect\ObjectSerializer::deserialize($response, '\SquareConnect\Model\CancelPaymentByIdempotencyKeyResponse', $httpHeader), $statusCode, $httpHeader);
|
245 |
+
} catch (ApiException $e) {
|
246 |
+
switch ($e->getCode()) {
|
247 |
+
case 200:
|
248 |
+
$data = \SquareConnect\ObjectSerializer::deserialize($e->getResponseBody(), '\SquareConnect\Model\CancelPaymentByIdempotencyKeyResponse', $e->getResponseHeaders());
|
249 |
+
$e->setResponseObject($data);
|
250 |
+
break;
|
251 |
+
}
|
252 |
+
|
253 |
+
throw $e;
|
254 |
+
}
|
255 |
+
}
|
256 |
+
/**
|
257 |
+
* completePayment
|
258 |
+
*
|
259 |
+
* CompletePayment
|
260 |
+
*
|
261 |
+
* @param string $payment_id Unique ID identifying the payment to be completed. (required)
|
262 |
+
* @return \SquareConnect\Model\CompletePaymentResponse
|
263 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
264 |
+
*/
|
265 |
+
public function completePayment($payment_id)
|
266 |
+
{
|
267 |
+
list($response, $statusCode, $httpHeader) = $this->completePaymentWithHttpInfo ($payment_id);
|
268 |
+
return $response;
|
269 |
+
}
|
270 |
+
|
271 |
+
|
272 |
+
/**
|
273 |
+
* completePaymentWithHttpInfo
|
274 |
+
*
|
275 |
+
* CompletePayment
|
276 |
+
*
|
277 |
+
* @param string $payment_id Unique ID identifying the payment to be completed. (required)
|
278 |
+
* @return Array of \SquareConnect\Model\CompletePaymentResponse, HTTP status code, HTTP response headers (array of strings)
|
279 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
280 |
+
*/
|
281 |
+
public function completePaymentWithHttpInfo($payment_id)
|
282 |
+
{
|
283 |
+
|
284 |
+
// verify the required parameter 'payment_id' is set
|
285 |
+
if ($payment_id === null) {
|
286 |
+
throw new \InvalidArgumentException('Missing the required parameter $payment_id when calling completePayment');
|
287 |
+
}
|
288 |
+
|
289 |
+
// parse inputs
|
290 |
+
$resourcePath = "/v2/payments/{payment_id}/complete";
|
291 |
+
$httpBody = '';
|
292 |
+
$queryParams = array();
|
293 |
+
$headerParams = array();
|
294 |
+
$formParams = array();
|
295 |
+
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
|
296 |
+
if (!is_null($_header_accept)) {
|
297 |
+
$headerParams['Accept'] = $_header_accept;
|
298 |
+
}
|
299 |
+
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
300 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
301 |
+
|
302 |
+
|
303 |
+
|
304 |
+
// path params
|
305 |
+
if ($payment_id !== null) {
|
306 |
+
$resourcePath = str_replace(
|
307 |
+
"{" . "payment_id" . "}",
|
308 |
+
$this->apiClient->getSerializer()->toPathValue($payment_id),
|
309 |
+
$resourcePath
|
310 |
+
);
|
311 |
+
}
|
312 |
+
// default format to json
|
313 |
+
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
314 |
+
|
315 |
+
|
316 |
+
|
317 |
+
|
318 |
+
// for model (json/xml)
|
319 |
+
if (isset($_tempBody)) {
|
320 |
+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
321 |
+
} elseif (count($formParams) > 0) {
|
322 |
+
$httpBody = $formParams; // for HTTP post (form)
|
323 |
+
}
|
324 |
+
|
325 |
+
// this endpoint requires OAuth (access token)
|
326 |
+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
327 |
+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
328 |
+
}
|
329 |
+
// make the API Call
|
330 |
+
try {
|
331 |
+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
332 |
+
$resourcePath, 'POST',
|
333 |
+
$queryParams, $httpBody,
|
334 |
+
$headerParams, '\SquareConnect\Model\CompletePaymentResponse'
|
335 |
+
);
|
336 |
+
if (!$response) {
|
337 |
+
return array(null, $statusCode, $httpHeader);
|
338 |
+
}
|
339 |
+
|
340 |
+
return array(\SquareConnect\ObjectSerializer::deserialize($response, '\SquareConnect\Model\CompletePaymentResponse', $httpHeader), $statusCode, $httpHeader);
|
341 |
+
} catch (ApiException $e) {
|
342 |
+
switch ($e->getCode()) {
|
343 |
+
case 200:
|
344 |
+
$data = \SquareConnect\ObjectSerializer::deserialize($e->getResponseBody(), '\SquareConnect\Model\CompletePaymentResponse', $e->getResponseHeaders());
|
345 |
+
$e->setResponseObject($data);
|
346 |
+
break;
|
347 |
+
}
|
348 |
+
|
349 |
+
throw $e;
|
350 |
+
}
|
351 |
+
}
|
352 |
+
/**
|
353 |
+
* createPayment
|
354 |
+
*
|
355 |
+
* CreatePayment
|
356 |
+
*
|
357 |
+
* @param \SquareConnect\Model\CreatePaymentRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
358 |
+
* @return \SquareConnect\Model\CreatePaymentResponse
|
359 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
360 |
+
*/
|
361 |
+
public function createPayment($body)
|
362 |
+
{
|
363 |
+
list($response, $statusCode, $httpHeader) = $this->createPaymentWithHttpInfo ($body);
|
364 |
+
return $response;
|
365 |
+
}
|
366 |
+
|
367 |
+
|
368 |
+
/**
|
369 |
+
* createPaymentWithHttpInfo
|
370 |
+
*
|
371 |
+
* CreatePayment
|
372 |
+
*
|
373 |
+
* @param \SquareConnect\Model\CreatePaymentRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
374 |
+
* @return Array of \SquareConnect\Model\CreatePaymentResponse, HTTP status code, HTTP response headers (array of strings)
|
375 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
376 |
+
*/
|
377 |
+
public function createPaymentWithHttpInfo($body)
|
378 |
+
{
|
379 |
+
|
380 |
+
// verify the required parameter 'body' is set
|
381 |
+
if ($body === null) {
|
382 |
+
throw new \InvalidArgumentException('Missing the required parameter $body when calling createPayment');
|
383 |
+
}
|
384 |
+
|
385 |
+
// parse inputs
|
386 |
+
$resourcePath = "/v2/payments";
|
387 |
+
$httpBody = '';
|
388 |
+
$queryParams = array();
|
389 |
+
$headerParams = array();
|
390 |
+
$formParams = array();
|
391 |
+
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
|
392 |
+
if (!is_null($_header_accept)) {
|
393 |
+
$headerParams['Accept'] = $_header_accept;
|
394 |
+
}
|
395 |
+
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
396 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
397 |
+
|
398 |
+
|
399 |
+
|
400 |
+
|
401 |
+
// default format to json
|
402 |
+
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
403 |
+
|
404 |
+
|
405 |
+
// body params
|
406 |
+
$_tempBody = null;
|
407 |
+
if (isset($body)) {
|
408 |
+
$_tempBody = $body;
|
409 |
+
}
|
410 |
+
|
411 |
+
// for model (json/xml)
|
412 |
+
if (isset($_tempBody)) {
|
413 |
+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
414 |
+
} elseif (count($formParams) > 0) {
|
415 |
+
$httpBody = $formParams; // for HTTP post (form)
|
416 |
+
}
|
417 |
+
|
418 |
+
// this endpoint requires OAuth (access token)
|
419 |
+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
420 |
+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
421 |
+
}
|
422 |
+
// make the API Call
|
423 |
+
try {
|
424 |
+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
425 |
+
$resourcePath, 'POST',
|
426 |
+
$queryParams, $httpBody,
|
427 |
+
$headerParams, '\SquareConnect\Model\CreatePaymentResponse'
|
428 |
+
);
|
429 |
+
if (!$response) {
|
430 |
+
return array(null, $statusCode, $httpHeader);
|
431 |
+
}
|
432 |
+
|
433 |
+
return array(\SquareConnect\ObjectSerializer::deserialize($response, '\SquareConnect\Model\CreatePaymentResponse', $httpHeader), $statusCode, $httpHeader);
|
434 |
+
} catch (ApiException $e) {
|
435 |
+
switch ($e->getCode()) {
|
436 |
+
case 200:
|
437 |
+
$data = \SquareConnect\ObjectSerializer::deserialize($e->getResponseBody(), '\SquareConnect\Model\CreatePaymentResponse', $e->getResponseHeaders());
|
438 |
+
$e->setResponseObject($data);
|
439 |
+
break;
|
440 |
+
}
|
441 |
+
|
442 |
+
throw $e;
|
443 |
+
}
|
444 |
+
}
|
445 |
+
/**
|
446 |
+
* getPayment
|
447 |
+
*
|
448 |
+
* GetPayment
|
449 |
+
*
|
450 |
+
* @param string $payment_id Unique ID for the desired `Payment`. (required)
|
451 |
+
* @return \SquareConnect\Model\GetPaymentResponse
|
452 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
453 |
+
*/
|
454 |
+
public function getPayment($payment_id)
|
455 |
+
{
|
456 |
+
list($response, $statusCode, $httpHeader) = $this->getPaymentWithHttpInfo ($payment_id);
|
457 |
+
return $response;
|
458 |
+
}
|
459 |
+
|
460 |
+
|
461 |
+
/**
|
462 |
+
* getPaymentWithHttpInfo
|
463 |
+
*
|
464 |
+
* GetPayment
|
465 |
+
*
|
466 |
+
* @param string $payment_id Unique ID for the desired `Payment`. (required)
|
467 |
+
* @return Array of \SquareConnect\Model\GetPaymentResponse, HTTP status code, HTTP response headers (array of strings)
|
468 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
469 |
+
*/
|
470 |
+
public function getPaymentWithHttpInfo($payment_id)
|
471 |
+
{
|
472 |
+
|
473 |
+
// verify the required parameter 'payment_id' is set
|
474 |
+
if ($payment_id === null) {
|
475 |
+
throw new \InvalidArgumentException('Missing the required parameter $payment_id when calling getPayment');
|
476 |
+
}
|
477 |
+
|
478 |
+
// parse inputs
|
479 |
+
$resourcePath = "/v2/payments/{payment_id}";
|
480 |
+
$httpBody = '';
|
481 |
+
$queryParams = array();
|
482 |
+
$headerParams = array();
|
483 |
+
$formParams = array();
|
484 |
+
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
|
485 |
+
if (!is_null($_header_accept)) {
|
486 |
+
$headerParams['Accept'] = $_header_accept;
|
487 |
+
}
|
488 |
+
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
489 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
490 |
+
|
491 |
+
|
492 |
+
|
493 |
+
// path params
|
494 |
+
if ($payment_id !== null) {
|
495 |
+
$resourcePath = str_replace(
|
496 |
+
"{" . "payment_id" . "}",
|
497 |
+
$this->apiClient->getSerializer()->toPathValue($payment_id),
|
498 |
+
$resourcePath
|
499 |
+
);
|
500 |
+
}
|
501 |
+
// default format to json
|
502 |
+
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
503 |
+
|
504 |
+
|
505 |
+
|
506 |
+
|
507 |
+
// for model (json/xml)
|
508 |
+
if (isset($_tempBody)) {
|
509 |
+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
510 |
+
} elseif (count($formParams) > 0) {
|
511 |
+
$httpBody = $formParams; // for HTTP post (form)
|
512 |
+
}
|
513 |
+
|
514 |
+
// this endpoint requires OAuth (access token)
|
515 |
+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
516 |
+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
517 |
+
}
|
518 |
+
// make the API Call
|
519 |
+
try {
|
520 |
+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
521 |
+
$resourcePath, 'GET',
|
522 |
+
$queryParams, $httpBody,
|
523 |
+
$headerParams, '\SquareConnect\Model\GetPaymentResponse'
|
524 |
+
);
|
525 |
+
if (!$response) {
|
526 |
+
return array(null, $statusCode, $httpHeader);
|
527 |
+
}
|
528 |
+
|
529 |
+
return array(\SquareConnect\ObjectSerializer::deserialize($response, '\SquareConnect\Model\GetPaymentResponse', $httpHeader), $statusCode, $httpHeader);
|
530 |
+
} catch (ApiException $e) {
|
531 |
+
switch ($e->getCode()) {
|
532 |
+
case 200:
|
533 |
+
$data = \SquareConnect\ObjectSerializer::deserialize($e->getResponseBody(), '\SquareConnect\Model\GetPaymentResponse', $e->getResponseHeaders());
|
534 |
+
$e->setResponseObject($data);
|
535 |
+
break;
|
536 |
+
}
|
537 |
+
|
538 |
+
throw $e;
|
539 |
+
}
|
540 |
+
}
|
541 |
+
/**
|
542 |
+
* listPayments
|
543 |
+
*
|
544 |
+
* ListPayments
|
545 |
+
*
|
546 |
+
* @param string $begin_time Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. (optional)
|
547 |
+
* @param string $end_time Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. (optional)
|
548 |
+
* @param string $sort_order The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). (optional)
|
549 |
+
* @param string $cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information. (optional)
|
550 |
+
* @param string $location_id ID of location associated with payment (optional)
|
551 |
+
* @param int $total The exact amount in the total_money for a `Payment`. (optional)
|
552 |
+
* @param string $last_4 The last 4 digits of `Payment` card. (optional)
|
553 |
+
* @param string $card_brand The brand of `Payment` card. For example, `VISA` (optional)
|
554 |
+
* @return \SquareConnect\Model\ListPaymentsResponse
|
555 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
556 |
+
*/
|
557 |
+
public function listPayments($begin_time = null, $end_time = null, $sort_order = null, $cursor = null, $location_id = null, $total = null, $last_4 = null, $card_brand = null)
|
558 |
+
{
|
559 |
+
list($response, $statusCode, $httpHeader) = $this->listPaymentsWithHttpInfo ($begin_time, $end_time, $sort_order, $cursor, $location_id, $total, $last_4, $card_brand);
|
560 |
+
return $response;
|
561 |
+
}
|
562 |
+
|
563 |
+
|
564 |
+
/**
|
565 |
+
* listPaymentsWithHttpInfo
|
566 |
+
*
|
567 |
+
* ListPayments
|
568 |
+
*
|
569 |
+
* @param string $begin_time Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. (optional)
|
570 |
+
* @param string $end_time Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. (optional)
|
571 |
+
* @param string $sort_order The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). (optional)
|
572 |
+
* @param string $cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information. (optional)
|
573 |
+
* @param string $location_id ID of location associated with payment (optional)
|
574 |
+
* @param int $total The exact amount in the total_money for a `Payment`. (optional)
|
575 |
+
* @param string $last_4 The last 4 digits of `Payment` card. (optional)
|
576 |
+
* @param string $card_brand The brand of `Payment` card. For example, `VISA` (optional)
|
577 |
+
* @return Array of \SquareConnect\Model\ListPaymentsResponse, HTTP status code, HTTP response headers (array of strings)
|
578 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
579 |
+
*/
|
580 |
+
public function listPaymentsWithHttpInfo($begin_time = null, $end_time = null, $sort_order = null, $cursor = null, $location_id = null, $total = null, $last_4 = null, $card_brand = null)
|
581 |
+
{
|
582 |
+
|
583 |
+
|
584 |
+
// parse inputs
|
585 |
+
$resourcePath = "/v2/payments";
|
586 |
+
$httpBody = '';
|
587 |
+
$queryParams = array();
|
588 |
+
$headerParams = array();
|
589 |
+
$formParams = array();
|
590 |
+
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
|
591 |
+
if (!is_null($_header_accept)) {
|
592 |
+
$headerParams['Accept'] = $_header_accept;
|
593 |
+
}
|
594 |
+
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
595 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
596 |
+
|
597 |
+
// query params
|
598 |
+
if ($begin_time !== null) {
|
599 |
+
$queryParams['begin_time'] = $this->apiClient->getSerializer()->toQueryValue($begin_time);
|
600 |
+
}// query params
|
601 |
+
if ($end_time !== null) {
|
602 |
+
$queryParams['end_time'] = $this->apiClient->getSerializer()->toQueryValue($end_time);
|
603 |
+
}// query params
|
604 |
+
if ($sort_order !== null) {
|
605 |
+
$queryParams['sort_order'] = $this->apiClient->getSerializer()->toQueryValue($sort_order);
|
606 |
+
}// query params
|
607 |
+
if ($cursor !== null) {
|
608 |
+
$queryParams['cursor'] = $this->apiClient->getSerializer()->toQueryValue($cursor);
|
609 |
+
}// query params
|
610 |
+
if ($location_id !== null) {
|
611 |
+
$queryParams['location_id'] = $this->apiClient->getSerializer()->toQueryValue($location_id);
|
612 |
+
}// query params
|
613 |
+
if ($total !== null) {
|
614 |
+
$queryParams['total'] = $this->apiClient->getSerializer()->toQueryValue($total);
|
615 |
+
}// query params
|
616 |
+
if ($last_4 !== null) {
|
617 |
+
$queryParams['last_4'] = $this->apiClient->getSerializer()->toQueryValue($last_4);
|
618 |
+
}// query params
|
619 |
+
if ($card_brand !== null) {
|
620 |
+
$queryParams['card_brand'] = $this->apiClient->getSerializer()->toQueryValue($card_brand);
|
621 |
+
}
|
622 |
+
|
623 |
+
|
624 |
+
// default format to json
|
625 |
+
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
626 |
+
|
627 |
+
|
628 |
+
|
629 |
+
|
630 |
+
// for model (json/xml)
|
631 |
+
if (isset($_tempBody)) {
|
632 |
+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
633 |
+
} elseif (count($formParams) > 0) {
|
634 |
+
$httpBody = $formParams; // for HTTP post (form)
|
635 |
+
}
|
636 |
+
|
637 |
+
// this endpoint requires OAuth (access token)
|
638 |
+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
639 |
+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
640 |
+
}
|
641 |
+
// make the API Call
|
642 |
+
try {
|
643 |
+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
644 |
+
$resourcePath, 'GET',
|
645 |
+
$queryParams, $httpBody,
|
646 |
+
$headerParams, '\SquareConnect\Model\ListPaymentsResponse'
|
647 |
+
);
|
648 |
+
if (!$response) {
|
649 |
+
return array(null, $statusCode, $httpHeader);
|
650 |
+
}
|
651 |
+
|
652 |
+
return array(\SquareConnect\ObjectSerializer::deserialize($response, '\SquareConnect\Model\ListPaymentsResponse', $httpHeader), $statusCode, $httpHeader);
|
653 |
+
} catch (ApiException $e) {
|
654 |
+
switch ($e->getCode()) {
|
655 |
+
case 200:
|
656 |
+
$data = \SquareConnect\ObjectSerializer::deserialize($e->getResponseBody(), '\SquareConnect\Model\ListPaymentsResponse', $e->getResponseHeaders());
|
657 |
+
$e->setResponseObject($data);
|
658 |
+
break;
|
659 |
+
}
|
660 |
+
|
661 |
+
throw $e;
|
662 |
+
}
|
663 |
+
}
|
664 |
+
}
|
vendor/square/connect/lib/Api/RefundsApi.php
ADDED
@@ -0,0 +1,374 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Api;
|
9 |
+
|
10 |
+
use \SquareConnect\Configuration;
|
11 |
+
use \SquareConnect\ApiClient;
|
12 |
+
use \SquareConnect\ApiException;
|
13 |
+
use \SquareConnect\ObjectSerializer;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* RefundsApi Class Doc Comment
|
17 |
+
*
|
18 |
+
* @category Class
|
19 |
+
* @package SquareConnect
|
20 |
+
* @author Square Inc.
|
21 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
22 |
+
* @link https://squareup.com/developers
|
23 |
+
*/
|
24 |
+
class RefundsApi
|
25 |
+
{
|
26 |
+
|
27 |
+
/**
|
28 |
+
* API Client
|
29 |
+
* @var \SquareConnect\ApiClient instance of the ApiClient
|
30 |
+
*/
|
31 |
+
protected $apiClient;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Constructor
|
35 |
+
* @param \SquareConnect\ApiClient|null $apiClient The api client to use
|
36 |
+
*/
|
37 |
+
function __construct($apiClient = null)
|
38 |
+
{
|
39 |
+
if ($apiClient == null) {
|
40 |
+
$apiClient = new ApiClient();
|
41 |
+
$apiClient->getConfig()->setHost('https://connect.squareup.com');
|
42 |
+
}
|
43 |
+
|
44 |
+
$this->apiClient = $apiClient;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get API client
|
49 |
+
* @return \SquareConnect\ApiClient get the API client
|
50 |
+
*/
|
51 |
+
public function getApiClient()
|
52 |
+
{
|
53 |
+
return $this->apiClient;
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Set the API client
|
58 |
+
* @param \SquareConnect\ApiClient $apiClient set the API client
|
59 |
+
* @return RefundsApi
|
60 |
+
*/
|
61 |
+
public function setApiClient(ApiClient $apiClient)
|
62 |
+
{
|
63 |
+
$this->apiClient = $apiClient;
|
64 |
+
return $this;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* getPaymentRefund
|
69 |
+
*
|
70 |
+
* GetPaymentRefund
|
71 |
+
*
|
72 |
+
* @param string $refund_id Unique ID for the desired `PaymentRefund`. (required)
|
73 |
+
* @return \SquareConnect\Model\GetPaymentRefundResponse
|
74 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
75 |
+
*/
|
76 |
+
public function getPaymentRefund($refund_id)
|
77 |
+
{
|
78 |
+
list($response, $statusCode, $httpHeader) = $this->getPaymentRefundWithHttpInfo ($refund_id);
|
79 |
+
return $response;
|
80 |
+
}
|
81 |
+
|
82 |
+
|
83 |
+
/**
|
84 |
+
* getPaymentRefundWithHttpInfo
|
85 |
+
*
|
86 |
+
* GetPaymentRefund
|
87 |
+
*
|
88 |
+
* @param string $refund_id Unique ID for the desired `PaymentRefund`. (required)
|
89 |
+
* @return Array of \SquareConnect\Model\GetPaymentRefundResponse, HTTP status code, HTTP response headers (array of strings)
|
90 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
91 |
+
*/
|
92 |
+
public function getPaymentRefundWithHttpInfo($refund_id)
|
93 |
+
{
|
94 |
+
|
95 |
+
// verify the required parameter 'refund_id' is set
|
96 |
+
if ($refund_id === null) {
|
97 |
+
throw new \InvalidArgumentException('Missing the required parameter $refund_id when calling getPaymentRefund');
|
98 |
+
}
|
99 |
+
|
100 |
+
// parse inputs
|
101 |
+
$resourcePath = "/v2/refunds/{refund_id}";
|
102 |
+
$httpBody = '';
|
103 |
+
$queryParams = array();
|
104 |
+
$headerParams = array();
|
105 |
+
$formParams = array();
|
106 |
+
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
|
107 |
+
if (!is_null($_header_accept)) {
|
108 |
+
$headerParams['Accept'] = $_header_accept;
|
109 |
+
}
|
110 |
+
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
// path params
|
116 |
+
if ($refund_id !== null) {
|
117 |
+
$resourcePath = str_replace(
|
118 |
+
"{" . "refund_id" . "}",
|
119 |
+
$this->apiClient->getSerializer()->toPathValue($refund_id),
|
120 |
+
$resourcePath
|
121 |
+
);
|
122 |
+
}
|
123 |
+
// default format to json
|
124 |
+
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
125 |
+
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
// for model (json/xml)
|
130 |
+
if (isset($_tempBody)) {
|
131 |
+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
132 |
+
} elseif (count($formParams) > 0) {
|
133 |
+
$httpBody = $formParams; // for HTTP post (form)
|
134 |
+
}
|
135 |
+
|
136 |
+
// this endpoint requires OAuth (access token)
|
137 |
+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
138 |
+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
139 |
+
}
|
140 |
+
// make the API Call
|
141 |
+
try {
|
142 |
+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
143 |
+
$resourcePath, 'GET',
|
144 |
+
$queryParams, $httpBody,
|
145 |
+
$headerParams, '\SquareConnect\Model\GetPaymentRefundResponse'
|
146 |
+
);
|
147 |
+
if (!$response) {
|
148 |
+
return array(null, $statusCode, $httpHeader);
|
149 |
+
}
|
150 |
+
|
151 |
+
return array(\SquareConnect\ObjectSerializer::deserialize($response, '\SquareConnect\Model\GetPaymentRefundResponse', $httpHeader), $statusCode, $httpHeader);
|
152 |
+
} catch (ApiException $e) {
|
153 |
+
switch ($e->getCode()) {
|
154 |
+
case 200:
|
155 |
+
$data = \SquareConnect\ObjectSerializer::deserialize($e->getResponseBody(), '\SquareConnect\Model\GetPaymentRefundResponse', $e->getResponseHeaders());
|
156 |
+
$e->setResponseObject($data);
|
157 |
+
break;
|
158 |
+
}
|
159 |
+
|
160 |
+
throw $e;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
/**
|
164 |
+
* listPaymentRefunds
|
165 |
+
*
|
166 |
+
* ListPaymentRefunds
|
167 |
+
*
|
168 |
+
* @param string $begin_time Timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year. (optional)
|
169 |
+
* @param string $end_time Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. (optional)
|
170 |
+
* @param string $sort_order The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). (optional)
|
171 |
+
* @param string $cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information. (optional)
|
172 |
+
* @param string $location_id ID of location associated with payment. (optional)
|
173 |
+
* @param string $status If provided, only refunds with the given status are returned. For a list of refund status values, see [PaymentRefund](#type-paymentrefund). Default: If omitted refunds are returned regardless of status. (optional)
|
174 |
+
* @param string $source_type If provided, only refunds with the given source type are returned. - `CARD` - List refunds only for payments where card was specified as payment source. Default: If omitted refunds are returned regardless of source type. (optional)
|
175 |
+
* @return \SquareConnect\Model\ListPaymentRefundsResponse
|
176 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
177 |
+
*/
|
178 |
+
public function listPaymentRefunds($begin_time = null, $end_time = null, $sort_order = null, $cursor = null, $location_id = null, $status = null, $source_type = null)
|
179 |
+
{
|
180 |
+
list($response, $statusCode, $httpHeader) = $this->listPaymentRefundsWithHttpInfo ($begin_time, $end_time, $sort_order, $cursor, $location_id, $status, $source_type);
|
181 |
+
return $response;
|
182 |
+
}
|
183 |
+
|
184 |
+
|
185 |
+
/**
|
186 |
+
* listPaymentRefundsWithHttpInfo
|
187 |
+
*
|
188 |
+
* ListPaymentRefunds
|
189 |
+
*
|
190 |
+
* @param string $begin_time Timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year. (optional)
|
191 |
+
* @param string $end_time Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time. (optional)
|
192 |
+
* @param string $sort_order The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). (optional)
|
193 |
+
* @param string $cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information. (optional)
|
194 |
+
* @param string $location_id ID of location associated with payment. (optional)
|
195 |
+
* @param string $status If provided, only refunds with the given status are returned. For a list of refund status values, see [PaymentRefund](#type-paymentrefund). Default: If omitted refunds are returned regardless of status. (optional)
|
196 |
+
* @param string $source_type If provided, only refunds with the given source type are returned. - `CARD` - List refunds only for payments where card was specified as payment source. Default: If omitted refunds are returned regardless of source type. (optional)
|
197 |
+
* @return Array of \SquareConnect\Model\ListPaymentRefundsResponse, HTTP status code, HTTP response headers (array of strings)
|
198 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
199 |
+
*/
|
200 |
+
public function listPaymentRefundsWithHttpInfo($begin_time = null, $end_time = null, $sort_order = null, $cursor = null, $location_id = null, $status = null, $source_type = null)
|
201 |
+
{
|
202 |
+
|
203 |
+
|
204 |
+
// parse inputs
|
205 |
+
$resourcePath = "/v2/refunds";
|
206 |
+
$httpBody = '';
|
207 |
+
$queryParams = array();
|
208 |
+
$headerParams = array();
|
209 |
+
$formParams = array();
|
210 |
+
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
|
211 |
+
if (!is_null($_header_accept)) {
|
212 |
+
$headerParams['Accept'] = $_header_accept;
|
213 |
+
}
|
214 |
+
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
215 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
216 |
+
|
217 |
+
// query params
|
218 |
+
if ($begin_time !== null) {
|
219 |
+
$queryParams['begin_time'] = $this->apiClient->getSerializer()->toQueryValue($begin_time);
|
220 |
+
}// query params
|
221 |
+
if ($end_time !== null) {
|
222 |
+
$queryParams['end_time'] = $this->apiClient->getSerializer()->toQueryValue($end_time);
|
223 |
+
}// query params
|
224 |
+
if ($sort_order !== null) {
|
225 |
+
$queryParams['sort_order'] = $this->apiClient->getSerializer()->toQueryValue($sort_order);
|
226 |
+
}// query params
|
227 |
+
if ($cursor !== null) {
|
228 |
+
$queryParams['cursor'] = $this->apiClient->getSerializer()->toQueryValue($cursor);
|
229 |
+
}// query params
|
230 |
+
if ($location_id !== null) {
|
231 |
+
$queryParams['location_id'] = $this->apiClient->getSerializer()->toQueryValue($location_id);
|
232 |
+
}// query params
|
233 |
+
if ($status !== null) {
|
234 |
+
$queryParams['status'] = $this->apiClient->getSerializer()->toQueryValue($status);
|
235 |
+
}// query params
|
236 |
+
if ($source_type !== null) {
|
237 |
+
$queryParams['source_type'] = $this->apiClient->getSerializer()->toQueryValue($source_type);
|
238 |
+
}
|
239 |
+
|
240 |
+
|
241 |
+
// default format to json
|
242 |
+
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
243 |
+
|
244 |
+
|
245 |
+
|
246 |
+
|
247 |
+
// for model (json/xml)
|
248 |
+
if (isset($_tempBody)) {
|
249 |
+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
250 |
+
} elseif (count($formParams) > 0) {
|
251 |
+
$httpBody = $formParams; // for HTTP post (form)
|
252 |
+
}
|
253 |
+
|
254 |
+
// this endpoint requires OAuth (access token)
|
255 |
+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
256 |
+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
257 |
+
}
|
258 |
+
// make the API Call
|
259 |
+
try {
|
260 |
+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
261 |
+
$resourcePath, 'GET',
|
262 |
+
$queryParams, $httpBody,
|
263 |
+
$headerParams, '\SquareConnect\Model\ListPaymentRefundsResponse'
|
264 |
+
);
|
265 |
+
if (!$response) {
|
266 |
+
return array(null, $statusCode, $httpHeader);
|
267 |
+
}
|
268 |
+
|
269 |
+
return array(\SquareConnect\ObjectSerializer::deserialize($response, '\SquareConnect\Model\ListPaymentRefundsResponse', $httpHeader), $statusCode, $httpHeader);
|
270 |
+
} catch (ApiException $e) {
|
271 |
+
switch ($e->getCode()) {
|
272 |
+
case 200:
|
273 |
+
$data = \SquareConnect\ObjectSerializer::deserialize($e->getResponseBody(), '\SquareConnect\Model\ListPaymentRefundsResponse', $e->getResponseHeaders());
|
274 |
+
$e->setResponseObject($data);
|
275 |
+
break;
|
276 |
+
}
|
277 |
+
|
278 |
+
throw $e;
|
279 |
+
}
|
280 |
+
}
|
281 |
+
/**
|
282 |
+
* refundPayment
|
283 |
+
*
|
284 |
+
* RefundPayment
|
285 |
+
*
|
286 |
+
* @param \SquareConnect\Model\RefundPaymentRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
287 |
+
* @return \SquareConnect\Model\RefundPaymentResponse
|
288 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
289 |
+
*/
|
290 |
+
public function refundPayment($body)
|
291 |
+
{
|
292 |
+
list($response, $statusCode, $httpHeader) = $this->refundPaymentWithHttpInfo ($body);
|
293 |
+
return $response;
|
294 |
+
}
|
295 |
+
|
296 |
+
|
297 |
+
/**
|
298 |
+
* refundPaymentWithHttpInfo
|
299 |
+
*
|
300 |
+
* RefundPayment
|
301 |
+
*
|
302 |
+
* @param \SquareConnect\Model\RefundPaymentRequest $body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
|
303 |
+
* @return Array of \SquareConnect\Model\RefundPaymentResponse, HTTP status code, HTTP response headers (array of strings)
|
304 |
+
* @throws \SquareConnect\ApiException on non-2xx response
|
305 |
+
*/
|
306 |
+
public function refundPaymentWithHttpInfo($body)
|
307 |
+
{
|
308 |
+
|
309 |
+
// verify the required parameter 'body' is set
|
310 |
+
if ($body === null) {
|
311 |
+
throw new \InvalidArgumentException('Missing the required parameter $body when calling refundPayment');
|
312 |
+
}
|
313 |
+
|
314 |
+
// parse inputs
|
315 |
+
$resourcePath = "/v2/refunds";
|
316 |
+
$httpBody = '';
|
317 |
+
$queryParams = array();
|
318 |
+
$headerParams = array();
|
319 |
+
$formParams = array();
|
320 |
+
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
|
321 |
+
if (!is_null($_header_accept)) {
|
322 |
+
$headerParams['Accept'] = $_header_accept;
|
323 |
+
}
|
324 |
+
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
325 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
326 |
+
|
327 |
+
|
328 |
+
|
329 |
+
|
330 |
+
// default format to json
|
331 |
+
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
332 |
+
|
333 |
+
|
334 |
+
// body params
|
335 |
+
$_tempBody = null;
|
336 |
+
if (isset($body)) {
|
337 |
+
$_tempBody = $body;
|
338 |
+
}
|
339 |
+
|
340 |
+
// for model (json/xml)
|
341 |
+
if (isset($_tempBody)) {
|
342 |
+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
343 |
+
} elseif (count($formParams) > 0) {
|
344 |
+
$httpBody = $formParams; // for HTTP post (form)
|
345 |
+
}
|
346 |
+
|
347 |
+
// this endpoint requires OAuth (access token)
|
348 |
+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
349 |
+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
350 |
+
}
|
351 |
+
// make the API Call
|
352 |
+
try {
|
353 |
+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
354 |
+
$resourcePath, 'POST',
|
355 |
+
$queryParams, $httpBody,
|
356 |
+
$headerParams, '\SquareConnect\Model\RefundPaymentResponse'
|
357 |
+
);
|
358 |
+
if (!$response) {
|
359 |
+
return array(null, $statusCode, $httpHeader);
|
360 |
+
}
|
361 |
+
|
362 |
+
return array(\SquareConnect\ObjectSerializer::deserialize($response, '\SquareConnect\Model\RefundPaymentResponse', $httpHeader), $statusCode, $httpHeader);
|
363 |
+
} catch (ApiException $e) {
|
364 |
+
switch ($e->getCode()) {
|
365 |
+
case 200:
|
366 |
+
$data = \SquareConnect\ObjectSerializer::deserialize($e->getResponseBody(), '\SquareConnect\Model\RefundPaymentResponse', $e->getResponseHeaders());
|
367 |
+
$e->setResponseObject($data);
|
368 |
+
break;
|
369 |
+
}
|
370 |
+
|
371 |
+
throw $e;
|
372 |
+
}
|
373 |
+
}
|
374 |
+
}
|
vendor/square/connect/lib/Api/ReportingApi.php
CHANGED
@@ -65,6 +65,7 @@ class ReportingApi
|
|
65 |
}
|
66 |
|
67 |
/**
|
|
|
68 |
* listAdditionalRecipientReceivableRefunds
|
69 |
*
|
70 |
* ListAdditionalRecipientReceivableRefunds
|
@@ -79,6 +80,7 @@ class ReportingApi
|
|
79 |
*/
|
80 |
public function listAdditionalRecipientReceivableRefunds($location_id, $begin_time = null, $end_time = null, $sort_order = null, $cursor = null)
|
81 |
{
|
|
|
82 |
list($response, $statusCode, $httpHeader) = $this->listAdditionalRecipientReceivableRefundsWithHttpInfo ($location_id, $begin_time, $end_time, $sort_order, $cursor);
|
83 |
return $response;
|
84 |
}
|
@@ -116,7 +118,7 @@ class ReportingApi
|
|
116 |
$headerParams['Accept'] = $_header_accept;
|
117 |
}
|
118 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
119 |
-
$headerParams['Square-Version'] = "2019-
|
120 |
|
121 |
// query params
|
122 |
if ($begin_time !== null) {
|
@@ -181,6 +183,7 @@ class ReportingApi
|
|
181 |
}
|
182 |
}
|
183 |
/**
|
|
|
184 |
* listAdditionalRecipientReceivables
|
185 |
*
|
186 |
* ListAdditionalRecipientReceivables
|
@@ -195,6 +198,7 @@ class ReportingApi
|
|
195 |
*/
|
196 |
public function listAdditionalRecipientReceivables($location_id, $begin_time = null, $end_time = null, $sort_order = null, $cursor = null)
|
197 |
{
|
|
|
198 |
list($response, $statusCode, $httpHeader) = $this->listAdditionalRecipientReceivablesWithHttpInfo ($location_id, $begin_time, $end_time, $sort_order, $cursor);
|
199 |
return $response;
|
200 |
}
|
@@ -232,7 +236,7 @@ class ReportingApi
|
|
232 |
$headerParams['Accept'] = $_header_accept;
|
233 |
}
|
234 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
235 |
-
$headerParams['Square-Version'] = "2019-
|
236 |
|
237 |
// query params
|
238 |
if ($begin_time !== null) {
|
65 |
}
|
66 |
|
67 |
/**
|
68 |
+
* @deprecated
|
69 |
* listAdditionalRecipientReceivableRefunds
|
70 |
*
|
71 |
* ListAdditionalRecipientReceivableRefunds
|
80 |
*/
|
81 |
public function listAdditionalRecipientReceivableRefunds($location_id, $begin_time = null, $end_time = null, $sort_order = null, $cursor = null)
|
82 |
{
|
83 |
+
trigger_error('Calling deprecated API: ReportingApi.listAdditionalRecipientReceivableRefunds', E_USER_DEPRECATED);
|
84 |
list($response, $statusCode, $httpHeader) = $this->listAdditionalRecipientReceivableRefundsWithHttpInfo ($location_id, $begin_time, $end_time, $sort_order, $cursor);
|
85 |
return $response;
|
86 |
}
|
118 |
$headerParams['Accept'] = $_header_accept;
|
119 |
}
|
120 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
121 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
122 |
|
123 |
// query params
|
124 |
if ($begin_time !== null) {
|
183 |
}
|
184 |
}
|
185 |
/**
|
186 |
+
* @deprecated
|
187 |
* listAdditionalRecipientReceivables
|
188 |
*
|
189 |
* ListAdditionalRecipientReceivables
|
198 |
*/
|
199 |
public function listAdditionalRecipientReceivables($location_id, $begin_time = null, $end_time = null, $sort_order = null, $cursor = null)
|
200 |
{
|
201 |
+
trigger_error('Calling deprecated API: ReportingApi.listAdditionalRecipientReceivables', E_USER_DEPRECATED);
|
202 |
list($response, $statusCode, $httpHeader) = $this->listAdditionalRecipientReceivablesWithHttpInfo ($location_id, $begin_time, $end_time, $sort_order, $cursor);
|
203 |
return $response;
|
204 |
}
|
236 |
$headerParams['Accept'] = $_header_accept;
|
237 |
}
|
238 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
239 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
240 |
|
241 |
// query params
|
242 |
if ($begin_time !== null) {
|
vendor/square/connect/lib/Api/TransactionsApi.php
CHANGED
@@ -65,6 +65,7 @@ class TransactionsApi
|
|
65 |
}
|
66 |
|
67 |
/**
|
|
|
68 |
* captureTransaction
|
69 |
*
|
70 |
* CaptureTransaction
|
@@ -76,6 +77,7 @@ class TransactionsApi
|
|
76 |
*/
|
77 |
public function captureTransaction($location_id, $transaction_id)
|
78 |
{
|
|
|
79 |
list($response, $statusCode, $httpHeader) = $this->captureTransactionWithHttpInfo ($location_id, $transaction_id);
|
80 |
return $response;
|
81 |
}
|
@@ -114,7 +116,7 @@ class TransactionsApi
|
|
114 |
$headerParams['Accept'] = $_header_accept;
|
115 |
}
|
116 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
117 |
-
$headerParams['Square-Version'] = "2019-
|
118 |
|
119 |
|
120 |
|
@@ -174,6 +176,7 @@ class TransactionsApi
|
|
174 |
}
|
175 |
}
|
176 |
/**
|
|
|
177 |
* charge
|
178 |
*
|
179 |
* Charge
|
@@ -185,6 +188,7 @@ class TransactionsApi
|
|
185 |
*/
|
186 |
public function charge($location_id, $body)
|
187 |
{
|
|
|
188 |
list($response, $statusCode, $httpHeader) = $this->chargeWithHttpInfo ($location_id, $body);
|
189 |
return $response;
|
190 |
}
|
@@ -223,7 +227,7 @@ class TransactionsApi
|
|
223 |
$headerParams['Accept'] = $_header_accept;
|
224 |
}
|
225 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
226 |
-
$headerParams['Square-Version'] = "2019-
|
227 |
|
228 |
|
229 |
|
@@ -280,6 +284,7 @@ class TransactionsApi
|
|
280 |
}
|
281 |
}
|
282 |
/**
|
|
|
283 |
* createRefund
|
284 |
*
|
285 |
* CreateRefund
|
@@ -292,6 +297,7 @@ class TransactionsApi
|
|
292 |
*/
|
293 |
public function createRefund($location_id, $transaction_id, $body)
|
294 |
{
|
|
|
295 |
list($response, $statusCode, $httpHeader) = $this->createRefundWithHttpInfo ($location_id, $transaction_id, $body);
|
296 |
return $response;
|
297 |
}
|
@@ -335,7 +341,7 @@ class TransactionsApi
|
|
335 |
$headerParams['Accept'] = $_header_accept;
|
336 |
}
|
337 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
338 |
-
$headerParams['Square-Version'] = "2019-
|
339 |
|
340 |
|
341 |
|
@@ -399,6 +405,7 @@ class TransactionsApi
|
|
399 |
}
|
400 |
}
|
401 |
/**
|
|
|
402 |
* listRefunds
|
403 |
*
|
404 |
* ListRefunds
|
@@ -413,6 +420,7 @@ class TransactionsApi
|
|
413 |
*/
|
414 |
public function listRefunds($location_id, $begin_time = null, $end_time = null, $sort_order = null, $cursor = null)
|
415 |
{
|
|
|
416 |
list($response, $statusCode, $httpHeader) = $this->listRefundsWithHttpInfo ($location_id, $begin_time, $end_time, $sort_order, $cursor);
|
417 |
return $response;
|
418 |
}
|
@@ -450,7 +458,7 @@ class TransactionsApi
|
|
450 |
$headerParams['Accept'] = $_header_accept;
|
451 |
}
|
452 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
453 |
-
$headerParams['Square-Version'] = "2019-
|
454 |
|
455 |
// query params
|
456 |
if ($begin_time !== null) {
|
@@ -515,6 +523,7 @@ class TransactionsApi
|
|
515 |
}
|
516 |
}
|
517 |
/**
|
|
|
518 |
* listTransactions
|
519 |
*
|
520 |
* ListTransactions
|
@@ -529,6 +538,7 @@ class TransactionsApi
|
|
529 |
*/
|
530 |
public function listTransactions($location_id, $begin_time = null, $end_time = null, $sort_order = null, $cursor = null)
|
531 |
{
|
|
|
532 |
list($response, $statusCode, $httpHeader) = $this->listTransactionsWithHttpInfo ($location_id, $begin_time, $end_time, $sort_order, $cursor);
|
533 |
return $response;
|
534 |
}
|
@@ -566,7 +576,7 @@ class TransactionsApi
|
|
566 |
$headerParams['Accept'] = $_header_accept;
|
567 |
}
|
568 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
569 |
-
$headerParams['Square-Version'] = "2019-
|
570 |
|
571 |
// query params
|
572 |
if ($begin_time !== null) {
|
@@ -631,6 +641,7 @@ class TransactionsApi
|
|
631 |
}
|
632 |
}
|
633 |
/**
|
|
|
634 |
* retrieveTransaction
|
635 |
*
|
636 |
* RetrieveTransaction
|
@@ -642,6 +653,7 @@ class TransactionsApi
|
|
642 |
*/
|
643 |
public function retrieveTransaction($location_id, $transaction_id)
|
644 |
{
|
|
|
645 |
list($response, $statusCode, $httpHeader) = $this->retrieveTransactionWithHttpInfo ($location_id, $transaction_id);
|
646 |
return $response;
|
647 |
}
|
@@ -680,7 +692,7 @@ class TransactionsApi
|
|
680 |
$headerParams['Accept'] = $_header_accept;
|
681 |
}
|
682 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
683 |
-
$headerParams['Square-Version'] = "2019-
|
684 |
|
685 |
|
686 |
|
@@ -740,6 +752,7 @@ class TransactionsApi
|
|
740 |
}
|
741 |
}
|
742 |
/**
|
|
|
743 |
* voidTransaction
|
744 |
*
|
745 |
* VoidTransaction
|
@@ -751,6 +764,7 @@ class TransactionsApi
|
|
751 |
*/
|
752 |
public function voidTransaction($location_id, $transaction_id)
|
753 |
{
|
|
|
754 |
list($response, $statusCode, $httpHeader) = $this->voidTransactionWithHttpInfo ($location_id, $transaction_id);
|
755 |
return $response;
|
756 |
}
|
@@ -789,7 +803,7 @@ class TransactionsApi
|
|
789 |
$headerParams['Accept'] = $_header_accept;
|
790 |
}
|
791 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
792 |
-
$headerParams['Square-Version'] = "2019-
|
793 |
|
794 |
|
795 |
|
65 |
}
|
66 |
|
67 |
/**
|
68 |
+
* @deprecated
|
69 |
* captureTransaction
|
70 |
*
|
71 |
* CaptureTransaction
|
77 |
*/
|
78 |
public function captureTransaction($location_id, $transaction_id)
|
79 |
{
|
80 |
+
trigger_error('Calling deprecated API: TransactionsApi.captureTransaction', E_USER_DEPRECATED);
|
81 |
list($response, $statusCode, $httpHeader) = $this->captureTransactionWithHttpInfo ($location_id, $transaction_id);
|
82 |
return $response;
|
83 |
}
|
116 |
$headerParams['Accept'] = $_header_accept;
|
117 |
}
|
118 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
119 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
120 |
|
121 |
|
122 |
|
176 |
}
|
177 |
}
|
178 |
/**
|
179 |
+
* @deprecated
|
180 |
* charge
|
181 |
*
|
182 |
* Charge
|
188 |
*/
|
189 |
public function charge($location_id, $body)
|
190 |
{
|
191 |
+
trigger_error('Calling deprecated API: TransactionsApi.charge', E_USER_DEPRECATED);
|
192 |
list($response, $statusCode, $httpHeader) = $this->chargeWithHttpInfo ($location_id, $body);
|
193 |
return $response;
|
194 |
}
|
227 |
$headerParams['Accept'] = $_header_accept;
|
228 |
}
|
229 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
230 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
231 |
|
232 |
|
233 |
|
284 |
}
|
285 |
}
|
286 |
/**
|
287 |
+
* @deprecated
|
288 |
* createRefund
|
289 |
*
|
290 |
* CreateRefund
|
297 |
*/
|
298 |
public function createRefund($location_id, $transaction_id, $body)
|
299 |
{
|
300 |
+
trigger_error('Calling deprecated API: TransactionsApi.createRefund', E_USER_DEPRECATED);
|
301 |
list($response, $statusCode, $httpHeader) = $this->createRefundWithHttpInfo ($location_id, $transaction_id, $body);
|
302 |
return $response;
|
303 |
}
|
341 |
$headerParams['Accept'] = $_header_accept;
|
342 |
}
|
343 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
344 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
345 |
|
346 |
|
347 |
|
405 |
}
|
406 |
}
|
407 |
/**
|
408 |
+
* @deprecated
|
409 |
* listRefunds
|
410 |
*
|
411 |
* ListRefunds
|
420 |
*/
|
421 |
public function listRefunds($location_id, $begin_time = null, $end_time = null, $sort_order = null, $cursor = null)
|
422 |
{
|
423 |
+
trigger_error('Calling deprecated API: TransactionsApi.listRefunds', E_USER_DEPRECATED);
|
424 |
list($response, $statusCode, $httpHeader) = $this->listRefundsWithHttpInfo ($location_id, $begin_time, $end_time, $sort_order, $cursor);
|
425 |
return $response;
|
426 |
}
|
458 |
$headerParams['Accept'] = $_header_accept;
|
459 |
}
|
460 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
461 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
462 |
|
463 |
// query params
|
464 |
if ($begin_time !== null) {
|
523 |
}
|
524 |
}
|
525 |
/**
|
526 |
+
* @deprecated
|
527 |
* listTransactions
|
528 |
*
|
529 |
* ListTransactions
|
538 |
*/
|
539 |
public function listTransactions($location_id, $begin_time = null, $end_time = null, $sort_order = null, $cursor = null)
|
540 |
{
|
541 |
+
trigger_error('Calling deprecated API: TransactionsApi.listTransactions', E_USER_DEPRECATED);
|
542 |
list($response, $statusCode, $httpHeader) = $this->listTransactionsWithHttpInfo ($location_id, $begin_time, $end_time, $sort_order, $cursor);
|
543 |
return $response;
|
544 |
}
|
576 |
$headerParams['Accept'] = $_header_accept;
|
577 |
}
|
578 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
579 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
580 |
|
581 |
// query params
|
582 |
if ($begin_time !== null) {
|
641 |
}
|
642 |
}
|
643 |
/**
|
644 |
+
* @deprecated
|
645 |
* retrieveTransaction
|
646 |
*
|
647 |
* RetrieveTransaction
|
653 |
*/
|
654 |
public function retrieveTransaction($location_id, $transaction_id)
|
655 |
{
|
656 |
+
trigger_error('Calling deprecated API: TransactionsApi.retrieveTransaction', E_USER_DEPRECATED);
|
657 |
list($response, $statusCode, $httpHeader) = $this->retrieveTransactionWithHttpInfo ($location_id, $transaction_id);
|
658 |
return $response;
|
659 |
}
|
692 |
$headerParams['Accept'] = $_header_accept;
|
693 |
}
|
694 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
695 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
696 |
|
697 |
|
698 |
|
752 |
}
|
753 |
}
|
754 |
/**
|
755 |
+
* @deprecated
|
756 |
* voidTransaction
|
757 |
*
|
758 |
* VoidTransaction
|
764 |
*/
|
765 |
public function voidTransaction($location_id, $transaction_id)
|
766 |
{
|
767 |
+
trigger_error('Calling deprecated API: TransactionsApi.voidTransaction', E_USER_DEPRECATED);
|
768 |
list($response, $statusCode, $httpHeader) = $this->voidTransactionWithHttpInfo ($location_id, $transaction_id);
|
769 |
return $response;
|
770 |
}
|
803 |
$headerParams['Accept'] = $_header_accept;
|
804 |
}
|
805 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
806 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
807 |
|
808 |
|
809 |
|
vendor/square/connect/lib/Api/V1EmployeesApi.php
CHANGED
@@ -108,7 +108,7 @@ class V1EmployeesApi
|
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
-
$headerParams['Square-Version'] = "2019-
|
112 |
|
113 |
|
114 |
|
@@ -201,7 +201,7 @@ class V1EmployeesApi
|
|
201 |
$headerParams['Accept'] = $_header_accept;
|
202 |
}
|
203 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
204 |
-
$headerParams['Square-Version'] = "2019-
|
205 |
|
206 |
|
207 |
|
@@ -294,7 +294,7 @@ class V1EmployeesApi
|
|
294 |
$headerParams['Accept'] = $_header_accept;
|
295 |
}
|
296 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
297 |
-
$headerParams['Square-Version'] = "2019-
|
298 |
|
299 |
|
300 |
|
@@ -387,7 +387,7 @@ class V1EmployeesApi
|
|
387 |
$headerParams['Accept'] = $_header_accept;
|
388 |
}
|
389 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
390 |
-
$headerParams['Square-Version'] = "2019-
|
391 |
|
392 |
|
393 |
|
@@ -489,7 +489,7 @@ class V1EmployeesApi
|
|
489 |
$headerParams['Accept'] = $_header_accept;
|
490 |
}
|
491 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
492 |
-
$headerParams['Square-Version'] = "2019-
|
493 |
|
494 |
// query params
|
495 |
if ($order !== null) {
|
@@ -594,7 +594,7 @@ class V1EmployeesApi
|
|
594 |
$headerParams['Accept'] = $_header_accept;
|
595 |
}
|
596 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
597 |
-
$headerParams['Square-Version'] = "2019-
|
598 |
|
599 |
// query params
|
600 |
if ($order !== null) {
|
@@ -704,7 +704,7 @@ class V1EmployeesApi
|
|
704 |
$headerParams['Accept'] = $_header_accept;
|
705 |
}
|
706 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
707 |
-
$headerParams['Square-Version'] = "2019-
|
708 |
|
709 |
// query params
|
710 |
if ($order !== null) {
|
@@ -820,7 +820,7 @@ class V1EmployeesApi
|
|
820 |
$headerParams['Accept'] = $_header_accept;
|
821 |
}
|
822 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
823 |
-
$headerParams['Square-Version'] = "2019-
|
824 |
|
825 |
|
826 |
|
@@ -932,7 +932,7 @@ class V1EmployeesApi
|
|
932 |
$headerParams['Accept'] = $_header_accept;
|
933 |
}
|
934 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
935 |
-
$headerParams['Square-Version'] = "2019-
|
936 |
|
937 |
// query params
|
938 |
if ($order !== null) {
|
@@ -1060,7 +1060,7 @@ class V1EmployeesApi
|
|
1060 |
$headerParams['Accept'] = $_header_accept;
|
1061 |
}
|
1062 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1063 |
-
$headerParams['Square-Version'] = "2019-
|
1064 |
|
1065 |
|
1066 |
|
@@ -1163,7 +1163,7 @@ class V1EmployeesApi
|
|
1163 |
$headerParams['Accept'] = $_header_accept;
|
1164 |
}
|
1165 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1166 |
-
$headerParams['Square-Version'] = "2019-
|
1167 |
|
1168 |
|
1169 |
|
@@ -1259,7 +1259,7 @@ class V1EmployeesApi
|
|
1259 |
$headerParams['Accept'] = $_header_accept;
|
1260 |
}
|
1261 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1262 |
-
$headerParams['Square-Version'] = "2019-
|
1263 |
|
1264 |
|
1265 |
|
@@ -1355,7 +1355,7 @@ class V1EmployeesApi
|
|
1355 |
$headerParams['Accept'] = $_header_accept;
|
1356 |
}
|
1357 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1358 |
-
$headerParams['Square-Version'] = "2019-
|
1359 |
|
1360 |
|
1361 |
|
@@ -1457,7 +1457,7 @@ class V1EmployeesApi
|
|
1457 |
$headerParams['Accept'] = $_header_accept;
|
1458 |
}
|
1459 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1460 |
-
$headerParams['Square-Version'] = "2019-
|
1461 |
|
1462 |
|
1463 |
|
@@ -1563,7 +1563,7 @@ class V1EmployeesApi
|
|
1563 |
$headerParams['Accept'] = $_header_accept;
|
1564 |
}
|
1565 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1566 |
-
$headerParams['Square-Version'] = "2019-
|
1567 |
|
1568 |
|
1569 |
|
@@ -1669,7 +1669,7 @@ class V1EmployeesApi
|
|
1669 |
$headerParams['Accept'] = $_header_accept;
|
1670 |
}
|
1671 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1672 |
-
$headerParams['Square-Version'] = "2019-
|
1673 |
|
1674 |
|
1675 |
|
108 |
$headerParams['Accept'] = $_header_accept;
|
109 |
}
|
110 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
111 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
112 |
|
113 |
|
114 |
|
201 |
$headerParams['Accept'] = $_header_accept;
|
202 |
}
|
203 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
204 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
205 |
|
206 |
|
207 |
|
294 |
$headerParams['Accept'] = $_header_accept;
|
295 |
}
|
296 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
297 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
298 |
|
299 |
|
300 |
|
387 |
$headerParams['Accept'] = $_header_accept;
|
388 |
}
|
389 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
390 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
391 |
|
392 |
|
393 |
|
489 |
$headerParams['Accept'] = $_header_accept;
|
490 |
}
|
491 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
492 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
493 |
|
494 |
// query params
|
495 |
if ($order !== null) {
|
594 |
$headerParams['Accept'] = $_header_accept;
|
595 |
}
|
596 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
597 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
598 |
|
599 |
// query params
|
600 |
if ($order !== null) {
|
704 |
$headerParams['Accept'] = $_header_accept;
|
705 |
}
|
706 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
707 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
708 |
|
709 |
// query params
|
710 |
if ($order !== null) {
|
820 |
$headerParams['Accept'] = $_header_accept;
|
821 |
}
|
822 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
823 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
824 |
|
825 |
|
826 |
|
932 |
$headerParams['Accept'] = $_header_accept;
|
933 |
}
|
934 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
935 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
936 |
|
937 |
// query params
|
938 |
if ($order !== null) {
|
1060 |
$headerParams['Accept'] = $_header_accept;
|
1061 |
}
|
1062 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1063 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1064 |
|
1065 |
|
1066 |
|
1163 |
$headerParams['Accept'] = $_header_accept;
|
1164 |
}
|
1165 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1166 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1167 |
|
1168 |
|
1169 |
|
1259 |
$headerParams['Accept'] = $_header_accept;
|
1260 |
}
|
1261 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1262 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1263 |
|
1264 |
|
1265 |
|
1355 |
$headerParams['Accept'] = $_header_accept;
|
1356 |
}
|
1357 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1358 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1359 |
|
1360 |
|
1361 |
|
1457 |
$headerParams['Accept'] = $_header_accept;
|
1458 |
}
|
1459 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1460 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1461 |
|
1462 |
|
1463 |
|
1563 |
$headerParams['Accept'] = $_header_accept;
|
1564 |
}
|
1565 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1566 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1567 |
|
1568 |
|
1569 |
|
1669 |
$headerParams['Accept'] = $_header_accept;
|
1670 |
}
|
1671 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1672 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1673 |
|
1674 |
|
1675 |
|
vendor/square/connect/lib/Api/V1ItemsApi.php
CHANGED
@@ -120,7 +120,7 @@ class V1ItemsApi
|
|
120 |
$headerParams['Accept'] = $_header_accept;
|
121 |
}
|
122 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
123 |
-
$headerParams['Square-Version'] = "2019-
|
124 |
|
125 |
|
126 |
|
@@ -239,7 +239,7 @@ class V1ItemsApi
|
|
239 |
$headerParams['Accept'] = $_header_accept;
|
240 |
}
|
241 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
242 |
-
$headerParams['Square-Version'] = "2019-
|
243 |
|
244 |
|
245 |
|
@@ -361,7 +361,7 @@ class V1ItemsApi
|
|
361 |
$headerParams['Accept'] = $_header_accept;
|
362 |
}
|
363 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
364 |
-
$headerParams['Square-Version'] = "2019-
|
365 |
|
366 |
|
367 |
|
@@ -477,7 +477,7 @@ class V1ItemsApi
|
|
477 |
$headerParams['Accept'] = $_header_accept;
|
478 |
}
|
479 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
480 |
-
$headerParams['Square-Version'] = "2019-
|
481 |
|
482 |
|
483 |
|
@@ -583,7 +583,7 @@ class V1ItemsApi
|
|
583 |
$headerParams['Accept'] = $_header_accept;
|
584 |
}
|
585 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
586 |
-
$headerParams['Square-Version'] = "2019-
|
587 |
|
588 |
|
589 |
|
@@ -689,7 +689,7 @@ class V1ItemsApi
|
|
689 |
$headerParams['Accept'] = $_header_accept;
|
690 |
}
|
691 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
692 |
-
$headerParams['Square-Version'] = "2019-
|
693 |
|
694 |
|
695 |
|
@@ -795,7 +795,7 @@ class V1ItemsApi
|
|
795 |
$headerParams['Accept'] = $_header_accept;
|
796 |
}
|
797 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
798 |
-
$headerParams['Square-Version'] = "2019-
|
799 |
|
800 |
|
801 |
|
@@ -901,7 +901,7 @@ class V1ItemsApi
|
|
901 |
$headerParams['Accept'] = $_header_accept;
|
902 |
}
|
903 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
904 |
-
$headerParams['Square-Version'] = "2019-
|
905 |
|
906 |
|
907 |
|
@@ -1013,7 +1013,7 @@ class V1ItemsApi
|
|
1013 |
$headerParams['Accept'] = $_header_accept;
|
1014 |
}
|
1015 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1016 |
-
$headerParams['Square-Version'] = "2019-
|
1017 |
|
1018 |
|
1019 |
|
@@ -1126,7 +1126,7 @@ class V1ItemsApi
|
|
1126 |
$headerParams['Accept'] = $_header_accept;
|
1127 |
}
|
1128 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1129 |
-
$headerParams['Square-Version'] = "2019-
|
1130 |
|
1131 |
|
1132 |
|
@@ -1238,7 +1238,7 @@ class V1ItemsApi
|
|
1238 |
$headerParams['Accept'] = $_header_accept;
|
1239 |
}
|
1240 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1241 |
-
$headerParams['Square-Version'] = "2019-
|
1242 |
|
1243 |
|
1244 |
|
@@ -1351,7 +1351,7 @@ class V1ItemsApi
|
|
1351 |
$headerParams['Accept'] = $_header_accept;
|
1352 |
}
|
1353 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1354 |
-
$headerParams['Square-Version'] = "2019-
|
1355 |
|
1356 |
|
1357 |
|
@@ -1460,7 +1460,7 @@ class V1ItemsApi
|
|
1460 |
$headerParams['Accept'] = $_header_accept;
|
1461 |
}
|
1462 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1463 |
-
$headerParams['Square-Version'] = "2019-
|
1464 |
|
1465 |
|
1466 |
|
@@ -1569,7 +1569,7 @@ class V1ItemsApi
|
|
1569 |
$headerParams['Accept'] = $_header_accept;
|
1570 |
}
|
1571 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1572 |
-
$headerParams['Square-Version'] = "2019-
|
1573 |
|
1574 |
|
1575 |
|
@@ -1678,7 +1678,7 @@ class V1ItemsApi
|
|
1678 |
$headerParams['Accept'] = $_header_accept;
|
1679 |
}
|
1680 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1681 |
-
$headerParams['Square-Version'] = "2019-
|
1682 |
|
1683 |
|
1684 |
|
@@ -1787,7 +1787,7 @@ class V1ItemsApi
|
|
1787 |
$headerParams['Accept'] = $_header_accept;
|
1788 |
}
|
1789 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1790 |
-
$headerParams['Square-Version'] = "2019-
|
1791 |
|
1792 |
|
1793 |
|
@@ -1902,7 +1902,7 @@ class V1ItemsApi
|
|
1902 |
$headerParams['Accept'] = $_header_accept;
|
1903 |
}
|
1904 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1905 |
-
$headerParams['Square-Version'] = "2019-
|
1906 |
|
1907 |
|
1908 |
|
@@ -2018,7 +2018,7 @@ class V1ItemsApi
|
|
2018 |
$headerParams['Accept'] = $_header_accept;
|
2019 |
}
|
2020 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2021 |
-
$headerParams['Square-Version'] = "2019-
|
2022 |
|
2023 |
|
2024 |
|
@@ -2131,7 +2131,7 @@ class V1ItemsApi
|
|
2131 |
$headerParams['Accept'] = $_header_accept;
|
2132 |
}
|
2133 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2134 |
-
$headerParams['Square-Version'] = "2019-
|
2135 |
|
2136 |
// query params
|
2137 |
if ($row !== null) {
|
@@ -2252,7 +2252,7 @@ class V1ItemsApi
|
|
2252 |
$headerParams['Accept'] = $_header_accept;
|
2253 |
}
|
2254 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2255 |
-
$headerParams['Square-Version'] = "2019-
|
2256 |
|
2257 |
|
2258 |
|
@@ -2362,7 +2362,7 @@ class V1ItemsApi
|
|
2362 |
$headerParams['Accept'] = $_header_accept;
|
2363 |
}
|
2364 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2365 |
-
$headerParams['Square-Version'] = "2019-
|
2366 |
|
2367 |
|
2368 |
|
@@ -2458,7 +2458,7 @@ class V1ItemsApi
|
|
2458 |
$headerParams['Accept'] = $_header_accept;
|
2459 |
}
|
2460 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2461 |
-
$headerParams['Square-Version'] = "2019-
|
2462 |
|
2463 |
|
2464 |
|
@@ -2554,7 +2554,7 @@ class V1ItemsApi
|
|
2554 |
$headerParams['Accept'] = $_header_accept;
|
2555 |
}
|
2556 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2557 |
-
$headerParams['Square-Version'] = "2019-
|
2558 |
|
2559 |
|
2560 |
|
@@ -2654,7 +2654,7 @@ class V1ItemsApi
|
|
2654 |
$headerParams['Accept'] = $_header_accept;
|
2655 |
}
|
2656 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2657 |
-
$headerParams['Square-Version'] = "2019-
|
2658 |
|
2659 |
// query params
|
2660 |
if ($limit !== null) {
|
@@ -2758,7 +2758,7 @@ class V1ItemsApi
|
|
2758 |
$headerParams['Accept'] = $_header_accept;
|
2759 |
}
|
2760 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2761 |
-
$headerParams['Square-Version'] = "2019-
|
2762 |
|
2763 |
// query params
|
2764 |
if ($batch_token !== null) {
|
@@ -2857,7 +2857,7 @@ class V1ItemsApi
|
|
2857 |
$headerParams['Accept'] = $_header_accept;
|
2858 |
}
|
2859 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2860 |
-
$headerParams['Square-Version'] = "2019-
|
2861 |
|
2862 |
|
2863 |
|
@@ -2953,7 +2953,7 @@ class V1ItemsApi
|
|
2953 |
$headerParams['Accept'] = $_header_accept;
|
2954 |
}
|
2955 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2956 |
-
$headerParams['Square-Version'] = "2019-
|
2957 |
|
2958 |
|
2959 |
|
@@ -3061,7 +3061,7 @@ class V1ItemsApi
|
|
3061 |
$headerParams['Accept'] = $_header_accept;
|
3062 |
}
|
3063 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3064 |
-
$headerParams['Square-Version'] = "2019-
|
3065 |
|
3066 |
|
3067 |
|
@@ -3183,7 +3183,7 @@ class V1ItemsApi
|
|
3183 |
$headerParams['Accept'] = $_header_accept;
|
3184 |
}
|
3185 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3186 |
-
$headerParams['Square-Version'] = "2019-
|
3187 |
|
3188 |
|
3189 |
|
@@ -3299,7 +3299,7 @@ class V1ItemsApi
|
|
3299 |
$headerParams['Accept'] = $_header_accept;
|
3300 |
}
|
3301 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3302 |
-
$headerParams['Square-Version'] = "2019-
|
3303 |
|
3304 |
|
3305 |
|
@@ -3408,7 +3408,7 @@ class V1ItemsApi
|
|
3408 |
$headerParams['Accept'] = $_header_accept;
|
3409 |
}
|
3410 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3411 |
-
$headerParams['Square-Version'] = "2019-
|
3412 |
|
3413 |
|
3414 |
|
@@ -3523,7 +3523,7 @@ class V1ItemsApi
|
|
3523 |
$headerParams['Accept'] = $_header_accept;
|
3524 |
}
|
3525 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3526 |
-
$headerParams['Square-Version'] = "2019-
|
3527 |
|
3528 |
|
3529 |
|
@@ -3642,7 +3642,7 @@ class V1ItemsApi
|
|
3642 |
$headerParams['Accept'] = $_header_accept;
|
3643 |
}
|
3644 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3645 |
-
$headerParams['Square-Version'] = "2019-
|
3646 |
|
3647 |
|
3648 |
|
@@ -3761,7 +3761,7 @@ class V1ItemsApi
|
|
3761 |
$headerParams['Accept'] = $_header_accept;
|
3762 |
}
|
3763 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3764 |
-
$headerParams['Square-Version'] = "2019-
|
3765 |
|
3766 |
|
3767 |
|
@@ -3880,7 +3880,7 @@ class V1ItemsApi
|
|
3880 |
$headerParams['Accept'] = $_header_accept;
|
3881 |
}
|
3882 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3883 |
-
$headerParams['Square-Version'] = "2019-
|
3884 |
|
3885 |
|
3886 |
|
@@ -3999,7 +3999,7 @@ class V1ItemsApi
|
|
3999 |
$headerParams['Accept'] = $_header_accept;
|
4000 |
}
|
4001 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
4002 |
-
$headerParams['Square-Version'] = "2019-
|
4003 |
|
4004 |
|
4005 |
|
@@ -4124,7 +4124,7 @@ class V1ItemsApi
|
|
4124 |
$headerParams['Accept'] = $_header_accept;
|
4125 |
}
|
4126 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
4127 |
-
$headerParams['Square-Version'] = "2019-
|
4128 |
|
4129 |
|
4130 |
|
@@ -4250,7 +4250,7 @@ class V1ItemsApi
|
|
4250 |
$headerParams['Accept'] = $_header_accept;
|
4251 |
}
|
4252 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
4253 |
-
$headerParams['Square-Version'] = "2019-
|
4254 |
|
4255 |
|
4256 |
|
@@ -4369,7 +4369,7 @@ class V1ItemsApi
|
|
4369 |
$headerParams['Accept'] = $_header_accept;
|
4370 |
}
|
4371 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
4372 |
-
$headerParams['Square-Version'] = "2019-
|
4373 |
|
4374 |
|
4375 |
|
@@ -4494,7 +4494,7 @@ class V1ItemsApi
|
|
4494 |
$headerParams['Accept'] = $_header_accept;
|
4495 |
}
|
4496 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
4497 |
-
$headerParams['Square-Version'] = "2019-
|
4498 |
|
4499 |
|
4500 |
|
120 |
$headerParams['Accept'] = $_header_accept;
|
121 |
}
|
122 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
123 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
124 |
|
125 |
|
126 |
|
239 |
$headerParams['Accept'] = $_header_accept;
|
240 |
}
|
241 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
242 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
243 |
|
244 |
|
245 |
|
361 |
$headerParams['Accept'] = $_header_accept;
|
362 |
}
|
363 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
364 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
365 |
|
366 |
|
367 |
|
477 |
$headerParams['Accept'] = $_header_accept;
|
478 |
}
|
479 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
480 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
481 |
|
482 |
|
483 |
|
583 |
$headerParams['Accept'] = $_header_accept;
|
584 |
}
|
585 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
586 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
587 |
|
588 |
|
589 |
|
689 |
$headerParams['Accept'] = $_header_accept;
|
690 |
}
|
691 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
692 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
693 |
|
694 |
|
695 |
|
795 |
$headerParams['Accept'] = $_header_accept;
|
796 |
}
|
797 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
798 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
799 |
|
800 |
|
801 |
|
901 |
$headerParams['Accept'] = $_header_accept;
|
902 |
}
|
903 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
904 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
905 |
|
906 |
|
907 |
|
1013 |
$headerParams['Accept'] = $_header_accept;
|
1014 |
}
|
1015 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1016 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1017 |
|
1018 |
|
1019 |
|
1126 |
$headerParams['Accept'] = $_header_accept;
|
1127 |
}
|
1128 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1129 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1130 |
|
1131 |
|
1132 |
|
1238 |
$headerParams['Accept'] = $_header_accept;
|
1239 |
}
|
1240 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1241 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1242 |
|
1243 |
|
1244 |
|
1351 |
$headerParams['Accept'] = $_header_accept;
|
1352 |
}
|
1353 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1354 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1355 |
|
1356 |
|
1357 |
|
1460 |
$headerParams['Accept'] = $_header_accept;
|
1461 |
}
|
1462 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1463 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1464 |
|
1465 |
|
1466 |
|
1569 |
$headerParams['Accept'] = $_header_accept;
|
1570 |
}
|
1571 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1572 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1573 |
|
1574 |
|
1575 |
|
1678 |
$headerParams['Accept'] = $_header_accept;
|
1679 |
}
|
1680 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1681 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1682 |
|
1683 |
|
1684 |
|
1787 |
$headerParams['Accept'] = $_header_accept;
|
1788 |
}
|
1789 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1790 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1791 |
|
1792 |
|
1793 |
|
1902 |
$headerParams['Accept'] = $_header_accept;
|
1903 |
}
|
1904 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1905 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1906 |
|
1907 |
|
1908 |
|
2018 |
$headerParams['Accept'] = $_header_accept;
|
2019 |
}
|
2020 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2021 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
2022 |
|
2023 |
|
2024 |
|
2131 |
$headerParams['Accept'] = $_header_accept;
|
2132 |
}
|
2133 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2134 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
2135 |
|
2136 |
// query params
|
2137 |
if ($row !== null) {
|
2252 |
$headerParams['Accept'] = $_header_accept;
|
2253 |
}
|
2254 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2255 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
2256 |
|
2257 |
|
2258 |
|
2362 |
$headerParams['Accept'] = $_header_accept;
|
2363 |
}
|
2364 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2365 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
2366 |
|
2367 |
|
2368 |
|
2458 |
$headerParams['Accept'] = $_header_accept;
|
2459 |
}
|
2460 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2461 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
2462 |
|
2463 |
|
2464 |
|
2554 |
$headerParams['Accept'] = $_header_accept;
|
2555 |
}
|
2556 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2557 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
2558 |
|
2559 |
|
2560 |
|
2654 |
$headerParams['Accept'] = $_header_accept;
|
2655 |
}
|
2656 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2657 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
2658 |
|
2659 |
// query params
|
2660 |
if ($limit !== null) {
|
2758 |
$headerParams['Accept'] = $_header_accept;
|
2759 |
}
|
2760 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2761 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
2762 |
|
2763 |
// query params
|
2764 |
if ($batch_token !== null) {
|
2857 |
$headerParams['Accept'] = $_header_accept;
|
2858 |
}
|
2859 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2860 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
2861 |
|
2862 |
|
2863 |
|
2953 |
$headerParams['Accept'] = $_header_accept;
|
2954 |
}
|
2955 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
2956 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
2957 |
|
2958 |
|
2959 |
|
3061 |
$headerParams['Accept'] = $_header_accept;
|
3062 |
}
|
3063 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3064 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
3065 |
|
3066 |
|
3067 |
|
3183 |
$headerParams['Accept'] = $_header_accept;
|
3184 |
}
|
3185 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3186 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
3187 |
|
3188 |
|
3189 |
|
3299 |
$headerParams['Accept'] = $_header_accept;
|
3300 |
}
|
3301 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3302 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
3303 |
|
3304 |
|
3305 |
|
3408 |
$headerParams['Accept'] = $_header_accept;
|
3409 |
}
|
3410 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3411 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
3412 |
|
3413 |
|
3414 |
|
3523 |
$headerParams['Accept'] = $_header_accept;
|
3524 |
}
|
3525 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3526 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
3527 |
|
3528 |
|
3529 |
|
3642 |
$headerParams['Accept'] = $_header_accept;
|
3643 |
}
|
3644 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3645 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
3646 |
|
3647 |
|
3648 |
|
3761 |
$headerParams['Accept'] = $_header_accept;
|
3762 |
}
|
3763 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3764 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
3765 |
|
3766 |
|
3767 |
|
3880 |
$headerParams['Accept'] = $_header_accept;
|
3881 |
}
|
3882 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
3883 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
3884 |
|
3885 |
|
3886 |
|
3999 |
$headerParams['Accept'] = $_header_accept;
|
4000 |
}
|
4001 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
4002 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
4003 |
|
4004 |
|
4005 |
|
4124 |
$headerParams['Accept'] = $_header_accept;
|
4125 |
}
|
4126 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
4127 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
4128 |
|
4129 |
|
4130 |
|
4250 |
$headerParams['Accept'] = $_header_accept;
|
4251 |
}
|
4252 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
4253 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
4254 |
|
4255 |
|
4256 |
|
4369 |
$headerParams['Accept'] = $_header_accept;
|
4370 |
}
|
4371 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
4372 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
4373 |
|
4374 |
|
4375 |
|
4494 |
$headerParams['Accept'] = $_header_accept;
|
4495 |
}
|
4496 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
4497 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
4498 |
|
4499 |
|
4500 |
|
vendor/square/connect/lib/Api/V1LocationsApi.php
CHANGED
@@ -102,7 +102,7 @@ class V1LocationsApi
|
|
102 |
$headerParams['Accept'] = $_header_accept;
|
103 |
}
|
104 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
105 |
-
$headerParams['Square-Version'] = "2019-
|
106 |
|
107 |
|
108 |
|
@@ -185,7 +185,7 @@ class V1LocationsApi
|
|
185 |
$headerParams['Accept'] = $_header_accept;
|
186 |
}
|
187 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
188 |
-
$headerParams['Square-Version'] = "2019-
|
189 |
|
190 |
|
191 |
|
102 |
$headerParams['Accept'] = $_header_accept;
|
103 |
}
|
104 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
105 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
106 |
|
107 |
|
108 |
|
185 |
$headerParams['Accept'] = $_header_accept;
|
186 |
}
|
187 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
188 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
189 |
|
190 |
|
191 |
|
vendor/square/connect/lib/Api/V1TransactionsApi.php
CHANGED
@@ -114,7 +114,7 @@ class V1TransactionsApi
|
|
114 |
$headerParams['Accept'] = $_header_accept;
|
115 |
}
|
116 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
117 |
-
$headerParams['Square-Version'] = "2019-
|
118 |
|
119 |
|
120 |
|
@@ -214,7 +214,7 @@ class V1TransactionsApi
|
|
214 |
$headerParams['Accept'] = $_header_accept;
|
215 |
}
|
216 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
217 |
-
$headerParams['Square-Version'] = "2019-
|
218 |
|
219 |
|
220 |
|
@@ -316,7 +316,7 @@ class V1TransactionsApi
|
|
316 |
$headerParams['Accept'] = $_header_accept;
|
317 |
}
|
318 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
319 |
-
$headerParams['Square-Version'] = "2019-
|
320 |
|
321 |
// query params
|
322 |
if ($order !== null) {
|
@@ -433,7 +433,7 @@ class V1TransactionsApi
|
|
433 |
$headerParams['Accept'] = $_header_accept;
|
434 |
}
|
435 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
436 |
-
$headerParams['Square-Version'] = "2019-
|
437 |
|
438 |
// query params
|
439 |
if ($order !== null) {
|
@@ -557,7 +557,7 @@ class V1TransactionsApi
|
|
557 |
$headerParams['Accept'] = $_header_accept;
|
558 |
}
|
559 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
560 |
-
$headerParams['Square-Version'] = "2019-
|
561 |
|
562 |
// query params
|
563 |
if ($order !== null) {
|
@@ -680,7 +680,7 @@ class V1TransactionsApi
|
|
680 |
$headerParams['Accept'] = $_header_accept;
|
681 |
}
|
682 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
683 |
-
$headerParams['Square-Version'] = "2019-
|
684 |
|
685 |
// query params
|
686 |
if ($order !== null) {
|
@@ -800,7 +800,7 @@ class V1TransactionsApi
|
|
800 |
$headerParams['Accept'] = $_header_accept;
|
801 |
}
|
802 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
803 |
-
$headerParams['Square-Version'] = "2019-
|
804 |
|
805 |
|
806 |
|
@@ -909,7 +909,7 @@ class V1TransactionsApi
|
|
909 |
$headerParams['Accept'] = $_header_accept;
|
910 |
}
|
911 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
912 |
-
$headerParams['Square-Version'] = "2019-
|
913 |
|
914 |
|
915 |
|
@@ -1018,7 +1018,7 @@ class V1TransactionsApi
|
|
1018 |
$headerParams['Accept'] = $_header_accept;
|
1019 |
}
|
1020 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1021 |
-
$headerParams['Square-Version'] = "2019-
|
1022 |
|
1023 |
|
1024 |
|
@@ -1127,7 +1127,7 @@ class V1TransactionsApi
|
|
1127 |
$headerParams['Accept'] = $_header_accept;
|
1128 |
}
|
1129 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1130 |
-
$headerParams['Square-Version'] = "2019-
|
1131 |
|
1132 |
|
1133 |
|
@@ -1242,7 +1242,7 @@ class V1TransactionsApi
|
|
1242 |
$headerParams['Accept'] = $_header_accept;
|
1243 |
}
|
1244 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1245 |
-
$headerParams['Square-Version'] = "2019-
|
1246 |
|
1247 |
|
1248 |
|
114 |
$headerParams['Accept'] = $_header_accept;
|
115 |
}
|
116 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
117 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
118 |
|
119 |
|
120 |
|
214 |
$headerParams['Accept'] = $_header_accept;
|
215 |
}
|
216 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
217 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
218 |
|
219 |
|
220 |
|
316 |
$headerParams['Accept'] = $_header_accept;
|
317 |
}
|
318 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
319 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
320 |
|
321 |
// query params
|
322 |
if ($order !== null) {
|
433 |
$headerParams['Accept'] = $_header_accept;
|
434 |
}
|
435 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
436 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
437 |
|
438 |
// query params
|
439 |
if ($order !== null) {
|
557 |
$headerParams['Accept'] = $_header_accept;
|
558 |
}
|
559 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
560 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
561 |
|
562 |
// query params
|
563 |
if ($order !== null) {
|
680 |
$headerParams['Accept'] = $_header_accept;
|
681 |
}
|
682 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
683 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
684 |
|
685 |
// query params
|
686 |
if ($order !== null) {
|
800 |
$headerParams['Accept'] = $_header_accept;
|
801 |
}
|
802 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
803 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
804 |
|
805 |
|
806 |
|
909 |
$headerParams['Accept'] = $_header_accept;
|
910 |
}
|
911 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
912 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
913 |
|
914 |
|
915 |
|
1018 |
$headerParams['Accept'] = $_header_accept;
|
1019 |
}
|
1020 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1021 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1022 |
|
1023 |
|
1024 |
|
1127 |
$headerParams['Accept'] = $_header_accept;
|
1128 |
}
|
1129 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1130 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1131 |
|
1132 |
|
1133 |
|
1242 |
$headerParams['Accept'] = $_header_accept;
|
1243 |
}
|
1244 |
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));
|
1245 |
+
$headerParams['Square-Version'] = "2019-08-14";
|
1246 |
|
1247 |
|
1248 |
|
vendor/square/connect/lib/Configuration.php
CHANGED
@@ -94,7 +94,7 @@ class Configuration
|
|
94 |
*
|
95 |
* @var string
|
96 |
*/
|
97 |
-
protected $userAgent = "Square-Connect-PHP/2.
|
98 |
|
99 |
/**
|
100 |
* Debug switch (default set to false)
|
@@ -501,7 +501,7 @@ class Configuration
|
|
501 |
$report .= " OS: ".php_uname()."\n";
|
502 |
$report .= " PHP Version: ".phpversion()."\n";
|
503 |
$report .= " OpenAPI Spec Version: 2.0\n";
|
504 |
-
$report .= " SDK Package Version: 2.
|
505 |
$report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath()."\n";
|
506 |
|
507 |
return $report;
|
94 |
*
|
95 |
* @var string
|
96 |
*/
|
97 |
+
protected $userAgent = "Square-Connect-PHP/2.20190814.2";
|
98 |
|
99 |
/**
|
100 |
* Debug switch (default set to false)
|
501 |
$report .= " OS: ".php_uname()."\n";
|
502 |
$report .= " PHP Version: ".phpversion()."\n";
|
503 |
$report .= " OpenAPI Spec Version: 2.0\n";
|
504 |
+
$report .= " SDK Package Version: 2.20190814.2\n";
|
505 |
$report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath()."\n";
|
506 |
|
507 |
return $report;
|
vendor/square/connect/lib/Model/BalancePaymentDetails.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* BalancePaymentDetails Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class BalancePaymentDetails implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'account_id' => 'string',
|
28 |
+
'status' => 'string'
|
29 |
+
);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
33 |
+
* @var string[]
|
34 |
+
*/
|
35 |
+
static $attributeMap = array(
|
36 |
+
'account_id' => 'account_id',
|
37 |
+
'status' => 'status'
|
38 |
+
);
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
42 |
+
* @var string[]
|
43 |
+
*/
|
44 |
+
static $setters = array(
|
45 |
+
'account_id' => 'setAccountId',
|
46 |
+
'status' => 'setStatus'
|
47 |
+
);
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of attributes to getter functions (for serialization of requests)
|
51 |
+
* @var string[]
|
52 |
+
*/
|
53 |
+
static $getters = array(
|
54 |
+
'account_id' => 'getAccountId',
|
55 |
+
'status' => 'getStatus'
|
56 |
+
);
|
57 |
+
|
58 |
+
/**
|
59 |
+
* $account_id ID for the account used to fund the payment.
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
+
protected $account_id;
|
63 |
+
/**
|
64 |
+
* $status The balance payment’s current state. Can be `COMPLETED` or `FAILED`.
|
65 |
+
* @var string
|
66 |
+
*/
|
67 |
+
protected $status;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Constructor
|
71 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
72 |
+
*/
|
73 |
+
public function __construct(array $data = null)
|
74 |
+
{
|
75 |
+
if ($data != null) {
|
76 |
+
if (isset($data["account_id"])) {
|
77 |
+
$this->account_id = $data["account_id"];
|
78 |
+
} else {
|
79 |
+
$this->account_id = null;
|
80 |
+
}
|
81 |
+
if (isset($data["status"])) {
|
82 |
+
$this->status = $data["status"];
|
83 |
+
} else {
|
84 |
+
$this->status = null;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Gets account_id
|
90 |
+
* @return string
|
91 |
+
*/
|
92 |
+
public function getAccountId()
|
93 |
+
{
|
94 |
+
return $this->account_id;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Sets account_id
|
99 |
+
* @param string $account_id ID for the account used to fund the payment.
|
100 |
+
* @return $this
|
101 |
+
*/
|
102 |
+
public function setAccountId($account_id)
|
103 |
+
{
|
104 |
+
$this->account_id = $account_id;
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
/**
|
108 |
+
* Gets status
|
109 |
+
* @return string
|
110 |
+
*/
|
111 |
+
public function getStatus()
|
112 |
+
{
|
113 |
+
return $this->status;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Sets status
|
118 |
+
* @param string $status The balance payment’s current state. Can be `COMPLETED` or `FAILED`.
|
119 |
+
* @return $this
|
120 |
+
*/
|
121 |
+
public function setStatus($status)
|
122 |
+
{
|
123 |
+
$this->status = $status;
|
124 |
+
return $this;
|
125 |
+
}
|
126 |
+
/**
|
127 |
+
* Returns true if offset exists. False otherwise.
|
128 |
+
* @param integer $offset Offset
|
129 |
+
* @return boolean
|
130 |
+
*/
|
131 |
+
public function offsetExists($offset)
|
132 |
+
{
|
133 |
+
return isset($this->$offset);
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Gets offset.
|
138 |
+
* @param integer $offset Offset
|
139 |
+
* @return mixed
|
140 |
+
*/
|
141 |
+
public function offsetGet($offset)
|
142 |
+
{
|
143 |
+
return $this->$offset;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Sets value based on offset.
|
148 |
+
* @param integer $offset Offset
|
149 |
+
* @param mixed $value Value to be set
|
150 |
+
* @return void
|
151 |
+
*/
|
152 |
+
public function offsetSet($offset, $value)
|
153 |
+
{
|
154 |
+
$this->$offset = $value;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Unsets offset.
|
159 |
+
* @param integer $offset Offset
|
160 |
+
* @return void
|
161 |
+
*/
|
162 |
+
public function offsetUnset($offset)
|
163 |
+
{
|
164 |
+
unset($this->$offset);
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Gets the string presentation of the object
|
169 |
+
* @return string
|
170 |
+
*/
|
171 |
+
public function __toString()
|
172 |
+
{
|
173 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
174 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
175 |
+
} else {
|
176 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
vendor/square/connect/lib/Model/BatchRetrieveCatalogObjectsRequest.php
CHANGED
@@ -61,7 +61,7 @@ class BatchRetrieveCatalogObjectsRequest implements ArrayAccess
|
|
61 |
*/
|
62 |
protected $object_ids;
|
63 |
/**
|
64 |
-
* $include_related_objects If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem),
|
65 |
* @var bool
|
66 |
*/
|
67 |
protected $include_related_objects;
|
@@ -115,7 +115,7 @@ class BatchRetrieveCatalogObjectsRequest implements ArrayAccess
|
|
115 |
|
116 |
/**
|
117 |
* Sets include_related_objects
|
118 |
-
* @param bool $include_related_objects If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem),
|
119 |
* @return $this
|
120 |
*/
|
121 |
public function setIncludeRelatedObjects($include_related_objects)
|
61 |
*/
|
62 |
protected $object_ids;
|
63 |
/**
|
64 |
+
* $include_related_objects If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response.
|
65 |
* @var bool
|
66 |
*/
|
67 |
protected $include_related_objects;
|
115 |
|
116 |
/**
|
117 |
* Sets include_related_objects
|
118 |
+
* @param bool $include_related_objects If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response.
|
119 |
* @return $this
|
120 |
*/
|
121 |
public function setIncludeRelatedObjects($include_related_objects)
|
vendor/square/connect/lib/Model/BatchRetrieveOrdersResponse.php
CHANGED
@@ -25,8 +25,7 @@ class BatchRetrieveOrdersResponse implements ArrayAccess
|
|
25 |
*/
|
26 |
static $swaggerTypes = array(
|
27 |
'orders' => '\SquareConnect\Model\Order[]',
|
28 |
-
'errors' => '\SquareConnect\Model\Error[]'
|
29 |
-
'unconvertible_transaction_ids' => 'string[]'
|
30 |
);
|
31 |
|
32 |
/**
|
@@ -35,8 +34,7 @@ class BatchRetrieveOrdersResponse implements ArrayAccess
|
|
35 |
*/
|
36 |
static $attributeMap = array(
|
37 |
'orders' => 'orders',
|
38 |
-
'errors' => 'errors'
|
39 |
-
'unconvertible_transaction_ids' => 'unconvertible_transaction_ids'
|
40 |
);
|
41 |
|
42 |
/**
|
@@ -45,8 +43,7 @@ class BatchRetrieveOrdersResponse implements ArrayAccess
|
|
45 |
*/
|
46 |
static $setters = array(
|
47 |
'orders' => 'setOrders',
|
48 |
-
'errors' => 'setErrors'
|
49 |
-
'unconvertible_transaction_ids' => 'setUnconvertibleTransactionIds'
|
50 |
);
|
51 |
|
52 |
/**
|
@@ -55,12 +52,11 @@ class BatchRetrieveOrdersResponse implements ArrayAccess
|
|
55 |
*/
|
56 |
static $getters = array(
|
57 |
'orders' => 'getOrders',
|
58 |
-
'errors' => 'getErrors'
|
59 |
-
'unconvertible_transaction_ids' => 'getUnconvertibleTransactionIds'
|
60 |
);
|
61 |
|
62 |
/**
|
63 |
-
* $orders The requested orders. This will omit any requested orders that do not exist
|
64 |
* @var \SquareConnect\Model\Order[]
|
65 |
*/
|
66 |
protected $orders;
|
@@ -69,11 +65,6 @@ class BatchRetrieveOrdersResponse implements ArrayAccess
|
|
69 |
* @var \SquareConnect\Model\Error[]
|
70 |
*/
|
71 |
protected $errors;
|
72 |
-
/**
|
73 |
-
* $unconvertible_transaction_ids List of transaction ids within the requested set of ids that encountered transformation issues when being converted to an Order.
|
74 |
-
* @var string[]
|
75 |
-
*/
|
76 |
-
protected $unconvertible_transaction_ids;
|
77 |
|
78 |
/**
|
79 |
* Constructor
|
@@ -92,11 +83,6 @@ class BatchRetrieveOrdersResponse implements ArrayAccess
|
|
92 |
} else {
|
93 |
$this->errors = null;
|
94 |
}
|
95 |
-
if (isset($data["unconvertible_transaction_ids"])) {
|
96 |
-
$this->unconvertible_transaction_ids = $data["unconvertible_transaction_ids"];
|
97 |
-
} else {
|
98 |
-
$this->unconvertible_transaction_ids = null;
|
99 |
-
}
|
100 |
}
|
101 |
}
|
102 |
/**
|
@@ -110,7 +96,7 @@ class BatchRetrieveOrdersResponse implements ArrayAccess
|
|
110 |
|
111 |
/**
|
112 |
* Sets orders
|
113 |
-
* @param \SquareConnect\Model\Order[] $orders The requested orders. This will omit any requested orders that do not exist
|
114 |
* @return $this
|
115 |
*/
|
116 |
public function setOrders($orders)
|
@@ -137,25 +123,6 @@ class BatchRetrieveOrdersResponse implements ArrayAccess
|
|
137 |
$this->errors = $errors;
|
138 |
return $this;
|
139 |
}
|
140 |
-
/**
|
141 |
-
* Gets unconvertible_transaction_ids
|
142 |
-
* @return string[]
|
143 |
-
*/
|
144 |
-
public function getUnconvertibleTransactionIds()
|
145 |
-
{
|
146 |
-
return $this->unconvertible_transaction_ids;
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* Sets unconvertible_transaction_ids
|
151 |
-
* @param string[] $unconvertible_transaction_ids List of transaction ids within the requested set of ids that encountered transformation issues when being converted to an Order.
|
152 |
-
* @return $this
|
153 |
-
*/
|
154 |
-
public function setUnconvertibleTransactionIds($unconvertible_transaction_ids)
|
155 |
-
{
|
156 |
-
$this->unconvertible_transaction_ids = $unconvertible_transaction_ids;
|
157 |
-
return $this;
|
158 |
-
}
|
159 |
/**
|
160 |
* Returns true if offset exists. False otherwise.
|
161 |
* @param integer $offset Offset
|
25 |
*/
|
26 |
static $swaggerTypes = array(
|
27 |
'orders' => '\SquareConnect\Model\Order[]',
|
28 |
+
'errors' => '\SquareConnect\Model\Error[]'
|
|
|
29 |
);
|
30 |
|
31 |
/**
|
34 |
*/
|
35 |
static $attributeMap = array(
|
36 |
'orders' => 'orders',
|
37 |
+
'errors' => 'errors'
|
|
|
38 |
);
|
39 |
|
40 |
/**
|
43 |
*/
|
44 |
static $setters = array(
|
45 |
'orders' => 'setOrders',
|
46 |
+
'errors' => 'setErrors'
|
|
|
47 |
);
|
48 |
|
49 |
/**
|
52 |
*/
|
53 |
static $getters = array(
|
54 |
'orders' => 'getOrders',
|
55 |
+
'errors' => 'getErrors'
|
|
|
56 |
);
|
57 |
|
58 |
/**
|
59 |
+
* $orders The requested orders. This will omit any requested orders that do not exist.
|
60 |
* @var \SquareConnect\Model\Order[]
|
61 |
*/
|
62 |
protected $orders;
|
65 |
* @var \SquareConnect\Model\Error[]
|
66 |
*/
|
67 |
protected $errors;
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
/**
|
70 |
* Constructor
|
83 |
} else {
|
84 |
$this->errors = null;
|
85 |
}
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
}
|
88 |
/**
|
96 |
|
97 |
/**
|
98 |
* Sets orders
|
99 |
+
* @param \SquareConnect\Model\Order[] $orders The requested orders. This will omit any requested orders that do not exist.
|
100 |
* @return $this
|
101 |
*/
|
102 |
public function setOrders($orders)
|
123 |
$this->errors = $errors;
|
124 |
return $this;
|
125 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
/**
|
127 |
* Returns true if offset exists. False otherwise.
|
128 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/CancelPaymentByIdempotencyKeyRequest.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CancelPaymentByIdempotencyKeyRequest Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CancelPaymentByIdempotencyKeyRequest implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'idempotency_key' => 'string'
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
'idempotency_key' => 'idempotency_key'
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
'idempotency_key' => 'setIdempotencyKey'
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
'idempotency_key' => 'getIdempotencyKey'
|
52 |
+
);
|
53 |
+
|
54 |
+
/**
|
55 |
+
* $idempotency_key `idempotency_key` identifying the payment to be canceled.
|
56 |
+
* @var string
|
57 |
+
*/
|
58 |
+
protected $idempotency_key;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Constructor
|
62 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
63 |
+
*/
|
64 |
+
public function __construct(array $data = null)
|
65 |
+
{
|
66 |
+
if ($data != null) {
|
67 |
+
if (isset($data["idempotency_key"])) {
|
68 |
+
$this->idempotency_key = $data["idempotency_key"];
|
69 |
+
} else {
|
70 |
+
$this->idempotency_key = null;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
/**
|
75 |
+
* Gets idempotency_key
|
76 |
+
* @return string
|
77 |
+
*/
|
78 |
+
public function getIdempotencyKey()
|
79 |
+
{
|
80 |
+
return $this->idempotency_key;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Sets idempotency_key
|
85 |
+
* @param string $idempotency_key `idempotency_key` identifying the payment to be canceled.
|
86 |
+
* @return $this
|
87 |
+
*/
|
88 |
+
public function setIdempotencyKey($idempotency_key)
|
89 |
+
{
|
90 |
+
$this->idempotency_key = $idempotency_key;
|
91 |
+
return $this;
|
92 |
+
}
|
93 |
+
/**
|
94 |
+
* Returns true if offset exists. False otherwise.
|
95 |
+
* @param integer $offset Offset
|
96 |
+
* @return boolean
|
97 |
+
*/
|
98 |
+
public function offsetExists($offset)
|
99 |
+
{
|
100 |
+
return isset($this->$offset);
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Gets offset.
|
105 |
+
* @param integer $offset Offset
|
106 |
+
* @return mixed
|
107 |
+
*/
|
108 |
+
public function offsetGet($offset)
|
109 |
+
{
|
110 |
+
return $this->$offset;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Sets value based on offset.
|
115 |
+
* @param integer $offset Offset
|
116 |
+
* @param mixed $value Value to be set
|
117 |
+
* @return void
|
118 |
+
*/
|
119 |
+
public function offsetSet($offset, $value)
|
120 |
+
{
|
121 |
+
$this->$offset = $value;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Unsets offset.
|
126 |
+
* @param integer $offset Offset
|
127 |
+
* @return void
|
128 |
+
*/
|
129 |
+
public function offsetUnset($offset)
|
130 |
+
{
|
131 |
+
unset($this->$offset);
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Gets the string presentation of the object
|
136 |
+
* @return string
|
137 |
+
*/
|
138 |
+
public function __toString()
|
139 |
+
{
|
140 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
141 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
142 |
+
} else {
|
143 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
vendor/square/connect/lib/Model/CancelPaymentByIdempotencyKeyResponse.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CancelPaymentByIdempotencyKeyResponse Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CancelPaymentByIdempotencyKeyResponse implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'errors' => '\SquareConnect\Model\Error[]'
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
'errors' => 'errors'
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
'errors' => 'setErrors'
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
'errors' => 'getErrors'
|
52 |
+
);
|
53 |
+
|
54 |
+
/**
|
55 |
+
* $errors Any errors that occurred during the request.
|
56 |
+
* @var \SquareConnect\Model\Error[]
|
57 |
+
*/
|
58 |
+
protected $errors;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Constructor
|
62 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
63 |
+
*/
|
64 |
+
public function __construct(array $data = null)
|
65 |
+
{
|
66 |
+
if ($data != null) {
|
67 |
+
if (isset($data["errors"])) {
|
68 |
+
$this->errors = $data["errors"];
|
69 |
+
} else {
|
70 |
+
$this->errors = null;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
/**
|
75 |
+
* Gets errors
|
76 |
+
* @return \SquareConnect\Model\Error[]
|
77 |
+
*/
|
78 |
+
public function getErrors()
|
79 |
+
{
|
80 |
+
return $this->errors;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Sets errors
|
85 |
+
* @param \SquareConnect\Model\Error[] $errors Any errors that occurred during the request.
|
86 |
+
* @return $this
|
87 |
+
*/
|
88 |
+
public function setErrors($errors)
|
89 |
+
{
|
90 |
+
$this->errors = $errors;
|
91 |
+
return $this;
|
92 |
+
}
|
93 |
+
/**
|
94 |
+
* Returns true if offset exists. False otherwise.
|
95 |
+
* @param integer $offset Offset
|
96 |
+
* @return boolean
|
97 |
+
*/
|
98 |
+
public function offsetExists($offset)
|
99 |
+
{
|
100 |
+
return isset($this->$offset);
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Gets offset.
|
105 |
+
* @param integer $offset Offset
|
106 |
+
* @return mixed
|
107 |
+
*/
|
108 |
+
public function offsetGet($offset)
|
109 |
+
{
|
110 |
+
return $this->$offset;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Sets value based on offset.
|
115 |
+
* @param integer $offset Offset
|
116 |
+
* @param mixed $value Value to be set
|
117 |
+
* @return void
|
118 |
+
*/
|
119 |
+
public function offsetSet($offset, $value)
|
120 |
+
{
|
121 |
+
$this->$offset = $value;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Unsets offset.
|
126 |
+
* @param integer $offset Offset
|
127 |
+
* @return void
|
128 |
+
*/
|
129 |
+
public function offsetUnset($offset)
|
130 |
+
{
|
131 |
+
unset($this->$offset);
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Gets the string presentation of the object
|
136 |
+
* @return string
|
137 |
+
*/
|
138 |
+
public function __toString()
|
139 |
+
{
|
140 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
141 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
142 |
+
} else {
|
143 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
vendor/square/connect/lib/Model/CancelPaymentRequest.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CancelPaymentRequest Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CancelPaymentRequest implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
|
52 |
+
);
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Constructor
|
57 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
58 |
+
*/
|
59 |
+
public function __construct(array $data = null)
|
60 |
+
{
|
61 |
+
if ($data != null) {
|
62 |
+
}
|
63 |
+
}
|
64 |
+
/**
|
65 |
+
* Returns true if offset exists. False otherwise.
|
66 |
+
* @param integer $offset Offset
|
67 |
+
* @return boolean
|
68 |
+
*/
|
69 |
+
public function offsetExists($offset)
|
70 |
+
{
|
71 |
+
return isset($this->$offset);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Gets offset.
|
76 |
+
* @param integer $offset Offset
|
77 |
+
* @return mixed
|
78 |
+
*/
|
79 |
+
public function offsetGet($offset)
|
80 |
+
{
|
81 |
+
return $this->$offset;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Sets value based on offset.
|
86 |
+
* @param integer $offset Offset
|
87 |
+
* @param mixed $value Value to be set
|
88 |
+
* @return void
|
89 |
+
*/
|
90 |
+
public function offsetSet($offset, $value)
|
91 |
+
{
|
92 |
+
$this->$offset = $value;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Unsets offset.
|
97 |
+
* @param integer $offset Offset
|
98 |
+
* @return void
|
99 |
+
*/
|
100 |
+
public function offsetUnset($offset)
|
101 |
+
{
|
102 |
+
unset($this->$offset);
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Gets the string presentation of the object
|
107 |
+
* @return string
|
108 |
+
*/
|
109 |
+
public function __toString()
|
110 |
+
{
|
111 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
112 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
113 |
+
} else {
|
114 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
vendor/square/connect/lib/Model/CancelPaymentResponse.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CancelPaymentResponse Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CancelPaymentResponse implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'errors' => '\SquareConnect\Model\Error[]',
|
28 |
+
'payment' => '\SquareConnect\Model\Payment'
|
29 |
+
);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
33 |
+
* @var string[]
|
34 |
+
*/
|
35 |
+
static $attributeMap = array(
|
36 |
+
'errors' => 'errors',
|
37 |
+
'payment' => 'payment'
|
38 |
+
);
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
42 |
+
* @var string[]
|
43 |
+
*/
|
44 |
+
static $setters = array(
|
45 |
+
'errors' => 'setErrors',
|
46 |
+
'payment' => 'setPayment'
|
47 |
+
);
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of attributes to getter functions (for serialization of requests)
|
51 |
+
* @var string[]
|
52 |
+
*/
|
53 |
+
static $getters = array(
|
54 |
+
'errors' => 'getErrors',
|
55 |
+
'payment' => 'getPayment'
|
56 |
+
);
|
57 |
+
|
58 |
+
/**
|
59 |
+
* $errors Information on errors encountered during the request.
|
60 |
+
* @var \SquareConnect\Model\Error[]
|
61 |
+
*/
|
62 |
+
protected $errors;
|
63 |
+
/**
|
64 |
+
* $payment The successfully canceled `Payment` object.
|
65 |
+
* @var \SquareConnect\Model\Payment
|
66 |
+
*/
|
67 |
+
protected $payment;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Constructor
|
71 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
72 |
+
*/
|
73 |
+
public function __construct(array $data = null)
|
74 |
+
{
|
75 |
+
if ($data != null) {
|
76 |
+
if (isset($data["errors"])) {
|
77 |
+
$this->errors = $data["errors"];
|
78 |
+
} else {
|
79 |
+
$this->errors = null;
|
80 |
+
}
|
81 |
+
if (isset($data["payment"])) {
|
82 |
+
$this->payment = $data["payment"];
|
83 |
+
} else {
|
84 |
+
$this->payment = null;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Gets errors
|
90 |
+
* @return \SquareConnect\Model\Error[]
|
91 |
+
*/
|
92 |
+
public function getErrors()
|
93 |
+
{
|
94 |
+
return $this->errors;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Sets errors
|
99 |
+
* @param \SquareConnect\Model\Error[] $errors Information on errors encountered during the request.
|
100 |
+
* @return $this
|
101 |
+
*/
|
102 |
+
public function setErrors($errors)
|
103 |
+
{
|
104 |
+
$this->errors = $errors;
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
/**
|
108 |
+
* Gets payment
|
109 |
+
* @return \SquareConnect\Model\Payment
|
110 |
+
*/
|
111 |
+
public function getPayment()
|
112 |
+
{
|
113 |
+
return $this->payment;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Sets payment
|
118 |
+
* @param \SquareConnect\Model\Payment $payment The successfully canceled `Payment` object.
|
119 |
+
* @return $this
|
120 |
+
*/
|
121 |
+
public function setPayment($payment)
|
122 |
+
{
|
123 |
+
$this->payment = $payment;
|
124 |
+
return $this;
|
125 |
+
}
|
126 |
+
/**
|
127 |
+
* Returns true if offset exists. False otherwise.
|
128 |
+
* @param integer $offset Offset
|
129 |
+
* @return boolean
|
130 |
+
*/
|
131 |
+
public function offsetExists($offset)
|
132 |
+
{
|
133 |
+
return isset($this->$offset);
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Gets offset.
|
138 |
+
* @param integer $offset Offset
|
139 |
+
* @return mixed
|
140 |
+
*/
|
141 |
+
public function offsetGet($offset)
|
142 |
+
{
|
143 |
+
return $this->$offset;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Sets value based on offset.
|
148 |
+
* @param integer $offset Offset
|
149 |
+
* @param mixed $value Value to be set
|
150 |
+
* @return void
|
151 |
+
*/
|
152 |
+
public function offsetSet($offset, $value)
|
153 |
+
{
|
154 |
+
$this->$offset = $value;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Unsets offset.
|
159 |
+
* @param integer $offset Offset
|
160 |
+
* @return void
|
161 |
+
*/
|
162 |
+
public function offsetUnset($offset)
|
163 |
+
{
|
164 |
+
unset($this->$offset);
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Gets the string presentation of the object
|
169 |
+
* @return string
|
170 |
+
*/
|
171 |
+
public function __toString()
|
172 |
+
{
|
173 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
174 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
175 |
+
} else {
|
176 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
vendor/square/connect/lib/Model/Card.php
CHANGED
@@ -115,7 +115,7 @@ class Card implements ArrayAccess
|
|
115 |
*/
|
116 |
protected $billing_address;
|
117 |
/**
|
118 |
-
* $fingerprint
|
119 |
* @var string
|
120 |
*/
|
121 |
protected $fingerprint;
|
@@ -313,7 +313,7 @@ class Card implements ArrayAccess
|
|
313 |
|
314 |
/**
|
315 |
* Sets fingerprint
|
316 |
-
* @param string $fingerprint
|
317 |
* @return $this
|
318 |
*/
|
319 |
public function setFingerprint($fingerprint)
|
115 |
*/
|
116 |
protected $billing_address;
|
117 |
/**
|
118 |
+
* $fingerprint A unique, Square-assigned ID that identifies the card across multiple locations and applications for a single Square account.
|
119 |
* @var string
|
120 |
*/
|
121 |
protected $fingerprint;
|
313 |
|
314 |
/**
|
315 |
* Sets fingerprint
|
316 |
+
* @param string $fingerprint A unique, Square-assigned ID that identifies the card across multiple locations and applications for a single Square account.
|
317 |
* @return $this
|
318 |
*/
|
319 |
public function setFingerprint($fingerprint)
|
vendor/square/connect/lib/Model/CardPaymentDetails.php
ADDED
@@ -0,0 +1,443 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CardPaymentDetails Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CardPaymentDetails implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'status' => 'string',
|
28 |
+
'card' => '\SquareConnect\Model\Card',
|
29 |
+
'entry_method' => 'string',
|
30 |
+
'cvv_status' => 'string',
|
31 |
+
'avs_status' => 'string',
|
32 |
+
'auth_result_code' => 'string',
|
33 |
+
'application_identifier' => 'string',
|
34 |
+
'application_name' => 'string',
|
35 |
+
'application_cryptogram' => 'string',
|
36 |
+
'errors' => '\SquareConnect\Model\Error[]'
|
37 |
+
);
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
41 |
+
* @var string[]
|
42 |
+
*/
|
43 |
+
static $attributeMap = array(
|
44 |
+
'status' => 'status',
|
45 |
+
'card' => 'card',
|
46 |
+
'entry_method' => 'entry_method',
|
47 |
+
'cvv_status' => 'cvv_status',
|
48 |
+
'avs_status' => 'avs_status',
|
49 |
+
'auth_result_code' => 'auth_result_code',
|
50 |
+
'application_identifier' => 'application_identifier',
|
51 |
+
'application_name' => 'application_name',
|
52 |
+
'application_cryptogram' => 'application_cryptogram',
|
53 |
+
'errors' => 'errors'
|
54 |
+
);
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
58 |
+
* @var string[]
|
59 |
+
*/
|
60 |
+
static $setters = array(
|
61 |
+
'status' => 'setStatus',
|
62 |
+
'card' => 'setCard',
|
63 |
+
'entry_method' => 'setEntryMethod',
|
64 |
+
'cvv_status' => 'setCvvStatus',
|
65 |
+
'avs_status' => 'setAvsStatus',
|
66 |
+
'auth_result_code' => 'setAuthResultCode',
|
67 |
+
'application_identifier' => 'setApplicationIdentifier',
|
68 |
+
'application_name' => 'setApplicationName',
|
69 |
+
'application_cryptogram' => 'setApplicationCryptogram',
|
70 |
+
'errors' => 'setErrors'
|
71 |
+
);
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Array of attributes to getter functions (for serialization of requests)
|
75 |
+
* @var string[]
|
76 |
+
*/
|
77 |
+
static $getters = array(
|
78 |
+
'status' => 'getStatus',
|
79 |
+
'card' => 'getCard',
|
80 |
+
'entry_method' => 'getEntryMethod',
|
81 |
+
'cvv_status' => 'getCvvStatus',
|
82 |
+
'avs_status' => 'getAvsStatus',
|
83 |
+
'auth_result_code' => 'getAuthResultCode',
|
84 |
+
'application_identifier' => 'getApplicationIdentifier',
|
85 |
+
'application_name' => 'getApplicationName',
|
86 |
+
'application_cryptogram' => 'getApplicationCryptogram',
|
87 |
+
'errors' => 'getErrors'
|
88 |
+
);
|
89 |
+
|
90 |
+
/**
|
91 |
+
* $status The card payment's current state. It can be one of: `AUTHORIZED`, `CAPTURED`, `VOIDED`, `FAILED`.
|
92 |
+
* @var string
|
93 |
+
*/
|
94 |
+
protected $status;
|
95 |
+
/**
|
96 |
+
* $card The credit card's non-confidential details.
|
97 |
+
* @var \SquareConnect\Model\Card
|
98 |
+
*/
|
99 |
+
protected $card;
|
100 |
+
/**
|
101 |
+
* $entry_method The method used to enter the card's details for the payment. Can be `KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.
|
102 |
+
* @var string
|
103 |
+
*/
|
104 |
+
protected $entry_method;
|
105 |
+
/**
|
106 |
+
* $cvv_status Status code returned from the Card Verification Value (CVV) check.
|
107 |
+
* @var string
|
108 |
+
*/
|
109 |
+
protected $cvv_status;
|
110 |
+
/**
|
111 |
+
* $avs_status Status code returned from the Address Verification System (AVS) check.
|
112 |
+
* @var string
|
113 |
+
*/
|
114 |
+
protected $avs_status;
|
115 |
+
/**
|
116 |
+
* $auth_result_code Status code returned by the card issuer that describes the payment's authorization status.
|
117 |
+
* @var string
|
118 |
+
*/
|
119 |
+
protected $auth_result_code;
|
120 |
+
/**
|
121 |
+
* $application_identifier For EMV payments, identifies the EMV application used for the payment
|
122 |
+
* @var string
|
123 |
+
*/
|
124 |
+
protected $application_identifier;
|
125 |
+
/**
|
126 |
+
* $application_name For EMV payments, the human-readable name of the EMV application used for the payment.
|
127 |
+
* @var string
|
128 |
+
*/
|
129 |
+
protected $application_name;
|
130 |
+
/**
|
131 |
+
* $application_cryptogram For EMV payments, the cryptogram generated for the payment.
|
132 |
+
* @var string
|
133 |
+
*/
|
134 |
+
protected $application_cryptogram;
|
135 |
+
/**
|
136 |
+
* $errors Information on errors encountered during the request.
|
137 |
+
* @var \SquareConnect\Model\Error[]
|
138 |
+
*/
|
139 |
+
protected $errors;
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Constructor
|
143 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
144 |
+
*/
|
145 |
+
public function __construct(array $data = null)
|
146 |
+
{
|
147 |
+
if ($data != null) {
|
148 |
+
if (isset($data["status"])) {
|
149 |
+
$this->status = $data["status"];
|
150 |
+
} else {
|
151 |
+
$this->status = null;
|
152 |
+
}
|
153 |
+
if (isset($data["card"])) {
|
154 |
+
$this->card = $data["card"];
|
155 |
+
} else {
|
156 |
+
$this->card = null;
|
157 |
+
}
|
158 |
+
if (isset($data["entry_method"])) {
|
159 |
+
$this->entry_method = $data["entry_method"];
|
160 |
+
} else {
|
161 |
+
$this->entry_method = null;
|
162 |
+
}
|
163 |
+
if (isset($data["cvv_status"])) {
|
164 |
+
$this->cvv_status = $data["cvv_status"];
|
165 |
+
} else {
|
166 |
+
$this->cvv_status = null;
|
167 |
+
}
|
168 |
+
if (isset($data["avs_status"])) {
|
169 |
+
$this->avs_status = $data["avs_status"];
|
170 |
+
} else {
|
171 |
+
$this->avs_status = null;
|
172 |
+
}
|
173 |
+
if (isset($data["auth_result_code"])) {
|
174 |
+
$this->auth_result_code = $data["auth_result_code"];
|
175 |
+
} else {
|
176 |
+
$this->auth_result_code = null;
|
177 |
+
}
|
178 |
+
if (isset($data["application_identifier"])) {
|
179 |
+
$this->application_identifier = $data["application_identifier"];
|
180 |
+
} else {
|
181 |
+
$this->application_identifier = null;
|
182 |
+
}
|
183 |
+
if (isset($data["application_name"])) {
|
184 |
+
$this->application_name = $data["application_name"];
|
185 |
+
} else {
|
186 |
+
$this->application_name = null;
|
187 |
+
}
|
188 |
+
if (isset($data["application_cryptogram"])) {
|
189 |
+
$this->application_cryptogram = $data["application_cryptogram"];
|
190 |
+
} else {
|
191 |
+
$this->application_cryptogram = null;
|
192 |
+
}
|
193 |
+
if (isset($data["errors"])) {
|
194 |
+
$this->errors = $data["errors"];
|
195 |
+
} else {
|
196 |
+
$this->errors = null;
|
197 |
+
}
|
198 |
+
}
|
199 |
+
}
|
200 |
+
/**
|
201 |
+
* Gets status
|
202 |
+
* @return string
|
203 |
+
*/
|
204 |
+
public function getStatus()
|
205 |
+
{
|
206 |
+
return $this->status;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Sets status
|
211 |
+
* @param string $status The card payment's current state. It can be one of: `AUTHORIZED`, `CAPTURED`, `VOIDED`, `FAILED`.
|
212 |
+
* @return $this
|
213 |
+
*/
|
214 |
+
public function setStatus($status)
|
215 |
+
{
|
216 |
+
$this->status = $status;
|
217 |
+
return $this;
|
218 |
+
}
|
219 |
+
/**
|
220 |
+
* Gets card
|
221 |
+
* @return \SquareConnect\Model\Card
|
222 |
+
*/
|
223 |
+
public function getCard()
|
224 |
+
{
|
225 |
+
return $this->card;
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Sets card
|
230 |
+
* @param \SquareConnect\Model\Card $card The credit card's non-confidential details.
|
231 |
+
* @return $this
|
232 |
+
*/
|
233 |
+
public function setCard($card)
|
234 |
+
{
|
235 |
+
$this->card = $card;
|
236 |
+
return $this;
|
237 |
+
}
|
238 |
+
/**
|
239 |
+
* Gets entry_method
|
240 |
+
* @return string
|
241 |
+
*/
|
242 |
+
public function getEntryMethod()
|
243 |
+
{
|
244 |
+
return $this->entry_method;
|
245 |
+
}
|
246 |
+
|
247 |
+
/**
|
248 |
+
* Sets entry_method
|
249 |
+
* @param string $entry_method The method used to enter the card's details for the payment. Can be `KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.
|
250 |
+
* @return $this
|
251 |
+
*/
|
252 |
+
public function setEntryMethod($entry_method)
|
253 |
+
{
|
254 |
+
$this->entry_method = $entry_method;
|
255 |
+
return $this;
|
256 |
+
}
|
257 |
+
/**
|
258 |
+
* Gets cvv_status
|
259 |
+
* @return string
|
260 |
+
*/
|
261 |
+
public function getCvvStatus()
|
262 |
+
{
|
263 |
+
return $this->cvv_status;
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Sets cvv_status
|
268 |
+
* @param string $cvv_status Status code returned from the Card Verification Value (CVV) check.
|
269 |
+
* @return $this
|
270 |
+
*/
|
271 |
+
public function setCvvStatus($cvv_status)
|
272 |
+
{
|
273 |
+
$this->cvv_status = $cvv_status;
|
274 |
+
return $this;
|
275 |
+
}
|
276 |
+
/**
|
277 |
+
* Gets avs_status
|
278 |
+
* @return string
|
279 |
+
*/
|
280 |
+
public function getAvsStatus()
|
281 |
+
{
|
282 |
+
return $this->avs_status;
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Sets avs_status
|
287 |
+
* @param string $avs_status Status code returned from the Address Verification System (AVS) check.
|
288 |
+
* @return $this
|
289 |
+
*/
|
290 |
+
public function setAvsStatus($avs_status)
|
291 |
+
{
|
292 |
+
$this->avs_status = $avs_status;
|
293 |
+
return $this;
|
294 |
+
}
|
295 |
+
/**
|
296 |
+
* Gets auth_result_code
|
297 |
+
* @return string
|
298 |
+
*/
|
299 |
+
public function getAuthResultCode()
|
300 |
+
{
|
301 |
+
return $this->auth_result_code;
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Sets auth_result_code
|
306 |
+
* @param string $auth_result_code Status code returned by the card issuer that describes the payment's authorization status.
|
307 |
+
* @return $this
|
308 |
+
*/
|
309 |
+
public function setAuthResultCode($auth_result_code)
|
310 |
+
{
|
311 |
+
$this->auth_result_code = $auth_result_code;
|
312 |
+
return $this;
|
313 |
+
}
|
314 |
+
/**
|
315 |
+
* Gets application_identifier
|
316 |
+
* @return string
|
317 |
+
*/
|
318 |
+
public function getApplicationIdentifier()
|
319 |
+
{
|
320 |
+
return $this->application_identifier;
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Sets application_identifier
|
325 |
+
* @param string $application_identifier For EMV payments, identifies the EMV application used for the payment
|
326 |
+
* @return $this
|
327 |
+
*/
|
328 |
+
public function setApplicationIdentifier($application_identifier)
|
329 |
+
{
|
330 |
+
$this->application_identifier = $application_identifier;
|
331 |
+
return $this;
|
332 |
+
}
|
333 |
+
/**
|
334 |
+
* Gets application_name
|
335 |
+
* @return string
|
336 |
+
*/
|
337 |
+
public function getApplicationName()
|
338 |
+
{
|
339 |
+
return $this->application_name;
|
340 |
+
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Sets application_name
|
344 |
+
* @param string $application_name For EMV payments, the human-readable name of the EMV application used for the payment.
|
345 |
+
* @return $this
|
346 |
+
*/
|
347 |
+
public function setApplicationName($application_name)
|
348 |
+
{
|
349 |
+
$this->application_name = $application_name;
|
350 |
+
return $this;
|
351 |
+
}
|
352 |
+
/**
|
353 |
+
* Gets application_cryptogram
|
354 |
+
* @return string
|
355 |
+
*/
|
356 |
+
public function getApplicationCryptogram()
|
357 |
+
{
|
358 |
+
return $this->application_cryptogram;
|
359 |
+
}
|
360 |
+
|
361 |
+
/**
|
362 |
+
* Sets application_cryptogram
|
363 |
+
* @param string $application_cryptogram For EMV payments, the cryptogram generated for the payment.
|
364 |
+
* @return $this
|
365 |
+
*/
|
366 |
+
public function setApplicationCryptogram($application_cryptogram)
|
367 |
+
{
|
368 |
+
$this->application_cryptogram = $application_cryptogram;
|
369 |
+
return $this;
|
370 |
+
}
|
371 |
+
/**
|
372 |
+
* Gets errors
|
373 |
+
* @return \SquareConnect\Model\Error[]
|
374 |
+
*/
|
375 |
+
public function getErrors()
|
376 |
+
{
|
377 |
+
return $this->errors;
|
378 |
+
}
|
379 |
+
|
380 |
+
/**
|
381 |
+
* Sets errors
|
382 |
+
* @param \SquareConnect\Model\Error[] $errors Information on errors encountered during the request.
|
383 |
+
* @return $this
|
384 |
+
*/
|
385 |
+
public function setErrors($errors)
|
386 |
+
{
|
387 |
+
$this->errors = $errors;
|
388 |
+
return $this;
|
389 |
+
}
|
390 |
+
/**
|
391 |
+
* Returns true if offset exists. False otherwise.
|
392 |
+
* @param integer $offset Offset
|
393 |
+
* @return boolean
|
394 |
+
*/
|
395 |
+
public function offsetExists($offset)
|
396 |
+
{
|
397 |
+
return isset($this->$offset);
|
398 |
+
}
|
399 |
+
|
400 |
+
/**
|
401 |
+
* Gets offset.
|
402 |
+
* @param integer $offset Offset
|
403 |
+
* @return mixed
|
404 |
+
*/
|
405 |
+
public function offsetGet($offset)
|
406 |
+
{
|
407 |
+
return $this->$offset;
|
408 |
+
}
|
409 |
+
|
410 |
+
/**
|
411 |
+
* Sets value based on offset.
|
412 |
+
* @param integer $offset Offset
|
413 |
+
* @param mixed $value Value to be set
|
414 |
+
* @return void
|
415 |
+
*/
|
416 |
+
public function offsetSet($offset, $value)
|
417 |
+
{
|
418 |
+
$this->$offset = $value;
|
419 |
+
}
|
420 |
+
|
421 |
+
/**
|
422 |
+
* Unsets offset.
|
423 |
+
* @param integer $offset Offset
|
424 |
+
* @return void
|
425 |
+
*/
|
426 |
+
public function offsetUnset($offset)
|
427 |
+
{
|
428 |
+
unset($this->$offset);
|
429 |
+
}
|
430 |
+
|
431 |
+
/**
|
432 |
+
* Gets the string presentation of the object
|
433 |
+
* @return string
|
434 |
+
*/
|
435 |
+
public function __toString()
|
436 |
+
{
|
437 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
438 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
439 |
+
} else {
|
440 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
441 |
+
}
|
442 |
+
}
|
443 |
+
}
|
vendor/square/connect/lib/Model/CatalogInfoResponse.php
CHANGED
@@ -25,7 +25,8 @@ class CatalogInfoResponse implements ArrayAccess
|
|
25 |
*/
|
26 |
static $swaggerTypes = array(
|
27 |
'errors' => '\SquareConnect\Model\Error[]',
|
28 |
-
'limits' => '\SquareConnect\Model\CatalogInfoResponseLimits'
|
|
|
29 |
);
|
30 |
|
31 |
/**
|
@@ -34,7 +35,8 @@ class CatalogInfoResponse implements ArrayAccess
|
|
34 |
*/
|
35 |
static $attributeMap = array(
|
36 |
'errors' => 'errors',
|
37 |
-
'limits' => 'limits'
|
|
|
38 |
);
|
39 |
|
40 |
/**
|
@@ -43,7 +45,8 @@ class CatalogInfoResponse implements ArrayAccess
|
|
43 |
*/
|
44 |
static $setters = array(
|
45 |
'errors' => 'setErrors',
|
46 |
-
'limits' => 'setLimits'
|
|
|
47 |
);
|
48 |
|
49 |
/**
|
@@ -52,7 +55,8 @@ class CatalogInfoResponse implements ArrayAccess
|
|
52 |
*/
|
53 |
static $getters = array(
|
54 |
'errors' => 'getErrors',
|
55 |
-
'limits' => 'getLimits'
|
|
|
56 |
);
|
57 |
|
58 |
/**
|
@@ -65,6 +69,11 @@ class CatalogInfoResponse implements ArrayAccess
|
|
65 |
* @var \SquareConnect\Model\CatalogInfoResponseLimits
|
66 |
*/
|
67 |
protected $limits;
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
/**
|
70 |
* Constructor
|
@@ -83,6 +92,11 @@ class CatalogInfoResponse implements ArrayAccess
|
|
83 |
} else {
|
84 |
$this->limits = null;
|
85 |
}
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
}
|
88 |
/**
|
@@ -123,6 +137,25 @@ class CatalogInfoResponse implements ArrayAccess
|
|
123 |
$this->limits = $limits;
|
124 |
return $this;
|
125 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
/**
|
127 |
* Returns true if offset exists. False otherwise.
|
128 |
* @param integer $offset Offset
|
25 |
*/
|
26 |
static $swaggerTypes = array(
|
27 |
'errors' => '\SquareConnect\Model\Error[]',
|
28 |
+
'limits' => '\SquareConnect\Model\CatalogInfoResponseLimits',
|
29 |
+
'standard_unit_description_group' => '\SquareConnect\Model\StandardUnitDescriptionGroup'
|
30 |
);
|
31 |
|
32 |
/**
|
35 |
*/
|
36 |
static $attributeMap = array(
|
37 |
'errors' => 'errors',
|
38 |
+
'limits' => 'limits',
|
39 |
+
'standard_unit_description_group' => 'standard_unit_description_group'
|
40 |
);
|
41 |
|
42 |
/**
|
45 |
*/
|
46 |
static $setters = array(
|
47 |
'errors' => 'setErrors',
|
48 |
+
'limits' => 'setLimits',
|
49 |
+
'standard_unit_description_group' => 'setStandardUnitDescriptionGroup'
|
50 |
);
|
51 |
|
52 |
/**
|
55 |
*/
|
56 |
static $getters = array(
|
57 |
'errors' => 'getErrors',
|
58 |
+
'limits' => 'getLimits',
|
59 |
+
'standard_unit_description_group' => 'getStandardUnitDescriptionGroup'
|
60 |
);
|
61 |
|
62 |
/**
|
69 |
* @var \SquareConnect\Model\CatalogInfoResponseLimits
|
70 |
*/
|
71 |
protected $limits;
|
72 |
+
/**
|
73 |
+
* $standard_unit_description_group Names and abbreviations for standard units.
|
74 |
+
* @var \SquareConnect\Model\StandardUnitDescriptionGroup
|
75 |
+
*/
|
76 |
+
protected $standard_unit_description_group;
|
77 |
|
78 |
/**
|
79 |
* Constructor
|
92 |
} else {
|
93 |
$this->limits = null;
|
94 |
}
|
95 |
+
if (isset($data["standard_unit_description_group"])) {
|
96 |
+
$this->standard_unit_description_group = $data["standard_unit_description_group"];
|
97 |
+
} else {
|
98 |
+
$this->standard_unit_description_group = null;
|
99 |
+
}
|
100 |
}
|
101 |
}
|
102 |
/**
|
137 |
$this->limits = $limits;
|
138 |
return $this;
|
139 |
}
|
140 |
+
/**
|
141 |
+
* Gets standard_unit_description_group
|
142 |
+
* @return \SquareConnect\Model\StandardUnitDescriptionGroup
|
143 |
+
*/
|
144 |
+
public function getStandardUnitDescriptionGroup()
|
145 |
+
{
|
146 |
+
return $this->standard_unit_description_group;
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Sets standard_unit_description_group
|
151 |
+
* @param \SquareConnect\Model\StandardUnitDescriptionGroup $standard_unit_description_group Names and abbreviations for standard units.
|
152 |
+
* @return $this
|
153 |
+
*/
|
154 |
+
public function setStandardUnitDescriptionGroup($standard_unit_description_group)
|
155 |
+
{
|
156 |
+
$this->standard_unit_description_group = $standard_unit_description_group;
|
157 |
+
return $this;
|
158 |
+
}
|
159 |
/**
|
160 |
* Returns true if offset exists. False otherwise.
|
161 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/CatalogItem.php
CHANGED
@@ -34,10 +34,10 @@ class CatalogItem implements ArrayAccess
|
|
34 |
'category_id' => 'string',
|
35 |
'tax_ids' => 'string[]',
|
36 |
'modifier_list_info' => '\SquareConnect\Model\CatalogItemModifierListInfo[]',
|
37 |
-
'image_url' => 'string',
|
38 |
'variations' => '\SquareConnect\Model\CatalogObject[]',
|
39 |
'product_type' => 'string',
|
40 |
-
'skip_modifier_screen' => 'bool'
|
|
|
41 |
);
|
42 |
|
43 |
/**
|
@@ -55,10 +55,10 @@ class CatalogItem implements ArrayAccess
|
|
55 |
'category_id' => 'category_id',
|
56 |
'tax_ids' => 'tax_ids',
|
57 |
'modifier_list_info' => 'modifier_list_info',
|
58 |
-
'image_url' => 'image_url',
|
59 |
'variations' => 'variations',
|
60 |
'product_type' => 'product_type',
|
61 |
-
'skip_modifier_screen' => 'skip_modifier_screen'
|
|
|
62 |
);
|
63 |
|
64 |
/**
|
@@ -76,10 +76,10 @@ class CatalogItem implements ArrayAccess
|
|
76 |
'category_id' => 'setCategoryId',
|
77 |
'tax_ids' => 'setTaxIds',
|
78 |
'modifier_list_info' => 'setModifierListInfo',
|
79 |
-
'image_url' => 'setImageUrl',
|
80 |
'variations' => 'setVariations',
|
81 |
'product_type' => 'setProductType',
|
82 |
-
'skip_modifier_screen' => 'setSkipModifierScreen'
|
|
|
83 |
);
|
84 |
|
85 |
/**
|
@@ -97,10 +97,10 @@ class CatalogItem implements ArrayAccess
|
|
97 |
'category_id' => 'getCategoryId',
|
98 |
'tax_ids' => 'getTaxIds',
|
99 |
'modifier_list_info' => 'getModifierListInfo',
|
100 |
-
'image_url' => 'getImageUrl',
|
101 |
'variations' => 'getVariations',
|
102 |
'product_type' => 'getProductType',
|
103 |
-
'skip_modifier_screen' => 'getSkipModifierScreen'
|
|
|
104 |
);
|
105 |
|
106 |
/**
|
@@ -154,17 +154,12 @@ class CatalogItem implements ArrayAccess
|
|
154 |
*/
|
155 |
protected $modifier_list_info;
|
156 |
/**
|
157 |
-
* $
|
158 |
-
* @var string
|
159 |
-
*/
|
160 |
-
protected $image_url;
|
161 |
-
/**
|
162 |
-
* $variations A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item.
|
163 |
* @var \SquareConnect\Model\CatalogObject[]
|
164 |
*/
|
165 |
protected $variations;
|
166 |
/**
|
167 |
-
* $product_type The product type of the item. May not be changed once an item has been created. Only items of product type `REGULAR` may be created by this API; items with other product types are read-only. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values
|
168 |
* @var string
|
169 |
*/
|
170 |
protected $product_type;
|
@@ -173,6 +168,11 @@ class CatalogItem implements ArrayAccess
|
|
173 |
* @var bool
|
174 |
*/
|
175 |
protected $skip_modifier_screen;
|
|
|
|
|
|
|
|
|
|
|
176 |
|
177 |
/**
|
178 |
* Constructor
|
@@ -231,11 +231,6 @@ class CatalogItem implements ArrayAccess
|
|
231 |
} else {
|
232 |
$this->modifier_list_info = null;
|
233 |
}
|
234 |
-
if (isset($data["image_url"])) {
|
235 |
-
$this->image_url = $data["image_url"];
|
236 |
-
} else {
|
237 |
-
$this->image_url = null;
|
238 |
-
}
|
239 |
if (isset($data["variations"])) {
|
240 |
$this->variations = $data["variations"];
|
241 |
} else {
|
@@ -251,6 +246,11 @@ class CatalogItem implements ArrayAccess
|
|
251 |
} else {
|
252 |
$this->skip_modifier_screen = null;
|
253 |
}
|
|
|
|
|
|
|
|
|
|
|
254 |
}
|
255 |
}
|
256 |
/**
|
@@ -443,25 +443,6 @@ class CatalogItem implements ArrayAccess
|
|
443 |
$this->modifier_list_info = $modifier_list_info;
|
444 |
return $this;
|
445 |
}
|
446 |
-
/**
|
447 |
-
* Gets image_url
|
448 |
-
* @return string
|
449 |
-
*/
|
450 |
-
public function getImageUrl()
|
451 |
-
{
|
452 |
-
return $this->image_url;
|
453 |
-
}
|
454 |
-
|
455 |
-
/**
|
456 |
-
* Sets image_url
|
457 |
-
* @param string $image_url __Deprecated__. The URL of an image representing this item. Deprecated in favor of `image_id` in [`CatalogObject`](#type-catalogobject).
|
458 |
-
* @return $this
|
459 |
-
*/
|
460 |
-
public function setImageUrl($image_url)
|
461 |
-
{
|
462 |
-
$this->image_url = $image_url;
|
463 |
-
return $this;
|
464 |
-
}
|
465 |
/**
|
466 |
* Gets variations
|
467 |
* @return \SquareConnect\Model\CatalogObject[]
|
@@ -473,7 +454,7 @@ class CatalogItem implements ArrayAccess
|
|
473 |
|
474 |
/**
|
475 |
* Sets variations
|
476 |
-
* @param \SquareConnect\Model\CatalogObject[] $variations A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item.
|
477 |
* @return $this
|
478 |
*/
|
479 |
public function setVariations($variations)
|
@@ -492,7 +473,7 @@ class CatalogItem implements ArrayAccess
|
|
492 |
|
493 |
/**
|
494 |
* Sets product_type
|
495 |
-
* @param string $product_type The product type of the item. May not be changed once an item has been created. Only items of product type `REGULAR` may be created by this API; items with other product types are read-only. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values
|
496 |
* @return $this
|
497 |
*/
|
498 |
public function setProductType($product_type)
|
@@ -519,6 +500,25 @@ class CatalogItem implements ArrayAccess
|
|
519 |
$this->skip_modifier_screen = $skip_modifier_screen;
|
520 |
return $this;
|
521 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
522 |
/**
|
523 |
* Returns true if offset exists. False otherwise.
|
524 |
* @param integer $offset Offset
|
34 |
'category_id' => 'string',
|
35 |
'tax_ids' => 'string[]',
|
36 |
'modifier_list_info' => '\SquareConnect\Model\CatalogItemModifierListInfo[]',
|
|
|
37 |
'variations' => '\SquareConnect\Model\CatalogObject[]',
|
38 |
'product_type' => 'string',
|
39 |
+
'skip_modifier_screen' => 'bool',
|
40 |
+
'item_options' => '\SquareConnect\Model\CatalogItemOptionForItem[]'
|
41 |
);
|
42 |
|
43 |
/**
|
55 |
'category_id' => 'category_id',
|
56 |
'tax_ids' => 'tax_ids',
|
57 |
'modifier_list_info' => 'modifier_list_info',
|
|
|
58 |
'variations' => 'variations',
|
59 |
'product_type' => 'product_type',
|
60 |
+
'skip_modifier_screen' => 'skip_modifier_screen',
|
61 |
+
'item_options' => 'item_options'
|
62 |
);
|
63 |
|
64 |
/**
|
76 |
'category_id' => 'setCategoryId',
|
77 |
'tax_ids' => 'setTaxIds',
|
78 |
'modifier_list_info' => 'setModifierListInfo',
|
|
|
79 |
'variations' => 'setVariations',
|
80 |
'product_type' => 'setProductType',
|
81 |
+
'skip_modifier_screen' => 'setSkipModifierScreen',
|
82 |
+
'item_options' => 'setItemOptions'
|
83 |
);
|
84 |
|
85 |
/**
|
97 |
'category_id' => 'getCategoryId',
|
98 |
'tax_ids' => 'getTaxIds',
|
99 |
'modifier_list_info' => 'getModifierListInfo',
|
|
|
100 |
'variations' => 'getVariations',
|
101 |
'product_type' => 'getProductType',
|
102 |
+
'skip_modifier_screen' => 'getSkipModifierScreen',
|
103 |
+
'item_options' => 'getItemOptions'
|
104 |
);
|
105 |
|
106 |
/**
|
154 |
*/
|
155 |
protected $modifier_list_info;
|
156 |
/**
|
157 |
+
* $variations A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. Maximum: 250 item variations
|
|
|
|
|
|
|
|
|
|
|
158 |
* @var \SquareConnect\Model\CatalogObject[]
|
159 |
*/
|
160 |
protected $variations;
|
161 |
/**
|
162 |
+
* $product_type The product type of the item. May not be changed once an item has been created. Only items of product type `REGULAR` or `APPOINTMENTS_SERVICE` may be created by this API; items with other product types are read-only. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values
|
163 |
* @var string
|
164 |
*/
|
165 |
protected $product_type;
|
168 |
* @var bool
|
169 |
*/
|
170 |
protected $skip_modifier_screen;
|
171 |
+
/**
|
172 |
+
* $item_options List of item options IDs for this item. Used to manage and group item variations in a specified order. Maximum: 6 item options.
|
173 |
+
* @var \SquareConnect\Model\CatalogItemOptionForItem[]
|
174 |
+
*/
|
175 |
+
protected $item_options;
|
176 |
|
177 |
/**
|
178 |
* Constructor
|
231 |
} else {
|
232 |
$this->modifier_list_info = null;
|
233 |
}
|
|
|
|
|
|
|
|
|
|
|
234 |
if (isset($data["variations"])) {
|
235 |
$this->variations = $data["variations"];
|
236 |
} else {
|
246 |
} else {
|
247 |
$this->skip_modifier_screen = null;
|
248 |
}
|
249 |
+
if (isset($data["item_options"])) {
|
250 |
+
$this->item_options = $data["item_options"];
|
251 |
+
} else {
|
252 |
+
$this->item_options = null;
|
253 |
+
}
|
254 |
}
|
255 |
}
|
256 |
/**
|
443 |
$this->modifier_list_info = $modifier_list_info;
|
444 |
return $this;
|
445 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
/**
|
447 |
* Gets variations
|
448 |
* @return \SquareConnect\Model\CatalogObject[]
|
454 |
|
455 |
/**
|
456 |
* Sets variations
|
457 |
+
* @param \SquareConnect\Model\CatalogObject[] $variations A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. Maximum: 250 item variations
|
458 |
* @return $this
|
459 |
*/
|
460 |
public function setVariations($variations)
|
473 |
|
474 |
/**
|
475 |
* Sets product_type
|
476 |
+
* @param string $product_type The product type of the item. May not be changed once an item has been created. Only items of product type `REGULAR` or `APPOINTMENTS_SERVICE` may be created by this API; items with other product types are read-only. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values
|
477 |
* @return $this
|
478 |
*/
|
479 |
public function setProductType($product_type)
|
500 |
$this->skip_modifier_screen = $skip_modifier_screen;
|
501 |
return $this;
|
502 |
}
|
503 |
+
/**
|
504 |
+
* Gets item_options
|
505 |
+
* @return \SquareConnect\Model\CatalogItemOptionForItem[]
|
506 |
+
*/
|
507 |
+
public function getItemOptions()
|
508 |
+
{
|
509 |
+
return $this->item_options;
|
510 |
+
}
|
511 |
+
|
512 |
+
/**
|
513 |
+
* Sets item_options
|
514 |
+
* @param \SquareConnect\Model\CatalogItemOptionForItem[] $item_options List of item options IDs for this item. Used to manage and group item variations in a specified order. Maximum: 6 item options.
|
515 |
+
* @return $this
|
516 |
+
*/
|
517 |
+
public function setItemOptions($item_options)
|
518 |
+
{
|
519 |
+
$this->item_options = $item_options;
|
520 |
+
return $this;
|
521 |
+
}
|
522 |
/**
|
523 |
* Returns true if offset exists. False otherwise.
|
524 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/CatalogItemOption.php
ADDED
@@ -0,0 +1,311 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CatalogItemOption Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CatalogItemOption implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'name' => 'string',
|
28 |
+
'display_name' => 'string',
|
29 |
+
'description' => 'string',
|
30 |
+
'show_colors' => 'bool',
|
31 |
+
'values' => '\SquareConnect\Model\CatalogObject[]',
|
32 |
+
'item_count' => 'int'
|
33 |
+
);
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
37 |
+
* @var string[]
|
38 |
+
*/
|
39 |
+
static $attributeMap = array(
|
40 |
+
'name' => 'name',
|
41 |
+
'display_name' => 'display_name',
|
42 |
+
'description' => 'description',
|
43 |
+
'show_colors' => 'show_colors',
|
44 |
+
'values' => 'values',
|
45 |
+
'item_count' => 'item_count'
|
46 |
+
);
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
50 |
+
* @var string[]
|
51 |
+
*/
|
52 |
+
static $setters = array(
|
53 |
+
'name' => 'setName',
|
54 |
+
'display_name' => 'setDisplayName',
|
55 |
+
'description' => 'setDescription',
|
56 |
+
'show_colors' => 'setShowColors',
|
57 |
+
'values' => 'setValues',
|
58 |
+
'item_count' => 'setItemCount'
|
59 |
+
);
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Array of attributes to getter functions (for serialization of requests)
|
63 |
+
* @var string[]
|
64 |
+
*/
|
65 |
+
static $getters = array(
|
66 |
+
'name' => 'getName',
|
67 |
+
'display_name' => 'getDisplayName',
|
68 |
+
'description' => 'getDescription',
|
69 |
+
'show_colors' => 'getShowColors',
|
70 |
+
'values' => 'getValues',
|
71 |
+
'item_count' => 'getItemCount'
|
72 |
+
);
|
73 |
+
|
74 |
+
/**
|
75 |
+
* $name The item option's display name for the seller. Must be unique across all item options. Searchable.
|
76 |
+
* @var string
|
77 |
+
*/
|
78 |
+
protected $name;
|
79 |
+
/**
|
80 |
+
* $display_name The item option's display name for the customer. Searchable.
|
81 |
+
* @var string
|
82 |
+
*/
|
83 |
+
protected $display_name;
|
84 |
+
/**
|
85 |
+
* $description The item option's human-readable description. Displays for in the Square Point of Sale app for the seller and in the Online Store or on receipts for the buyer.
|
86 |
+
* @var string
|
87 |
+
*/
|
88 |
+
protected $description;
|
89 |
+
/**
|
90 |
+
* $show_colors If true, display colors for entries in `values` when present.
|
91 |
+
* @var bool
|
92 |
+
*/
|
93 |
+
protected $show_colors;
|
94 |
+
/**
|
95 |
+
* $values A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemOptionValue](#type-catalogitemoptionvalue)s for this item.
|
96 |
+
* @var \SquareConnect\Model\CatalogObject[]
|
97 |
+
*/
|
98 |
+
protected $values;
|
99 |
+
/**
|
100 |
+
* $item_count The number of [CatalogItem](#type-catalogitem)s currently associated with this item option. Present only if the `include_counts` was specified in the request. Any count over 100 will be returned as `100`.
|
101 |
+
* @var int
|
102 |
+
*/
|
103 |
+
protected $item_count;
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Constructor
|
107 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
108 |
+
*/
|
109 |
+
public function __construct(array $data = null)
|
110 |
+
{
|
111 |
+
if ($data != null) {
|
112 |
+
if (isset($data["name"])) {
|
113 |
+
$this->name = $data["name"];
|
114 |
+
} else {
|
115 |
+
$this->name = null;
|
116 |
+
}
|
117 |
+
if (isset($data["display_name"])) {
|
118 |
+
$this->display_name = $data["display_name"];
|
119 |
+
} else {
|
120 |
+
$this->display_name = null;
|
121 |
+
}
|
122 |
+
if (isset($data["description"])) {
|
123 |
+
$this->description = $data["description"];
|
124 |
+
} else {
|
125 |
+
$this->description = null;
|
126 |
+
}
|
127 |
+
if (isset($data["show_colors"])) {
|
128 |
+
$this->show_colors = $data["show_colors"];
|
129 |
+
} else {
|
130 |
+
$this->show_colors = null;
|
131 |
+
}
|
132 |
+
if (isset($data["values"])) {
|
133 |
+
$this->values = $data["values"];
|
134 |
+
} else {
|
135 |
+
$this->values = null;
|
136 |
+
}
|
137 |
+
if (isset($data["item_count"])) {
|
138 |
+
$this->item_count = $data["item_count"];
|
139 |
+
} else {
|
140 |
+
$this->item_count = null;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
/**
|
145 |
+
* Gets name
|
146 |
+
* @return string
|
147 |
+
*/
|
148 |
+
public function getName()
|
149 |
+
{
|
150 |
+
return $this->name;
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Sets name
|
155 |
+
* @param string $name The item option's display name for the seller. Must be unique across all item options. Searchable.
|
156 |
+
* @return $this
|
157 |
+
*/
|
158 |
+
public function setName($name)
|
159 |
+
{
|
160 |
+
$this->name = $name;
|
161 |
+
return $this;
|
162 |
+
}
|
163 |
+
/**
|
164 |
+
* Gets display_name
|
165 |
+
* @return string
|
166 |
+
*/
|
167 |
+
public function getDisplayName()
|
168 |
+
{
|
169 |
+
return $this->display_name;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Sets display_name
|
174 |
+
* @param string $display_name The item option's display name for the customer. Searchable.
|
175 |
+
* @return $this
|
176 |
+
*/
|
177 |
+
public function setDisplayName($display_name)
|
178 |
+
{
|
179 |
+
$this->display_name = $display_name;
|
180 |
+
return $this;
|
181 |
+
}
|
182 |
+
/**
|
183 |
+
* Gets description
|
184 |
+
* @return string
|
185 |
+
*/
|
186 |
+
public function getDescription()
|
187 |
+
{
|
188 |
+
return $this->description;
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Sets description
|
193 |
+
* @param string $description The item option's human-readable description. Displays for in the Square Point of Sale app for the seller and in the Online Store or on receipts for the buyer.
|
194 |
+
* @return $this
|
195 |
+
*/
|
196 |
+
public function setDescription($description)
|
197 |
+
{
|
198 |
+
$this->description = $description;
|
199 |
+
return $this;
|
200 |
+
}
|
201 |
+
/**
|
202 |
+
* Gets show_colors
|
203 |
+
* @return bool
|
204 |
+
*/
|
205 |
+
public function getShowColors()
|
206 |
+
{
|
207 |
+
return $this->show_colors;
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Sets show_colors
|
212 |
+
* @param bool $show_colors If true, display colors for entries in `values` when present.
|
213 |
+
* @return $this
|
214 |
+
*/
|
215 |
+
public function setShowColors($show_colors)
|
216 |
+
{
|
217 |
+
$this->show_colors = $show_colors;
|
218 |
+
return $this;
|
219 |
+
}
|
220 |
+
/**
|
221 |
+
* Gets values
|
222 |
+
* @return \SquareConnect\Model\CatalogObject[]
|
223 |
+
*/
|
224 |
+
public function getValues()
|
225 |
+
{
|
226 |
+
return $this->values;
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Sets values
|
231 |
+
* @param \SquareConnect\Model\CatalogObject[] $values A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemOptionValue](#type-catalogitemoptionvalue)s for this item.
|
232 |
+
* @return $this
|
233 |
+
*/
|
234 |
+
public function setValues($values)
|
235 |
+
{
|
236 |
+
$this->values = $values;
|
237 |
+
return $this;
|
238 |
+
}
|
239 |
+
/**
|
240 |
+
* Gets item_count
|
241 |
+
* @return int
|
242 |
+
*/
|
243 |
+
public function getItemCount()
|
244 |
+
{
|
245 |
+
return $this->item_count;
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Sets item_count
|
250 |
+
* @param int $item_count The number of [CatalogItem](#type-catalogitem)s currently associated with this item option. Present only if the `include_counts` was specified in the request. Any count over 100 will be returned as `100`.
|
251 |
+
* @return $this
|
252 |
+
*/
|
253 |
+
public function setItemCount($item_count)
|
254 |
+
{
|
255 |
+
$this->item_count = $item_count;
|
256 |
+
return $this;
|
257 |
+
}
|
258 |
+
/**
|
259 |
+
* Returns true if offset exists. False otherwise.
|
260 |
+
* @param integer $offset Offset
|
261 |
+
* @return boolean
|
262 |
+
*/
|
263 |
+
public function offsetExists($offset)
|
264 |
+
{
|
265 |
+
return isset($this->$offset);
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Gets offset.
|
270 |
+
* @param integer $offset Offset
|
271 |
+
* @return mixed
|
272 |
+
*/
|
273 |
+
public function offsetGet($offset)
|
274 |
+
{
|
275 |
+
return $this->$offset;
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Sets value based on offset.
|
280 |
+
* @param integer $offset Offset
|
281 |
+
* @param mixed $value Value to be set
|
282 |
+
* @return void
|
283 |
+
*/
|
284 |
+
public function offsetSet($offset, $value)
|
285 |
+
{
|
286 |
+
$this->$offset = $value;
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Unsets offset.
|
291 |
+
* @param integer $offset Offset
|
292 |
+
* @return void
|
293 |
+
*/
|
294 |
+
public function offsetUnset($offset)
|
295 |
+
{
|
296 |
+
unset($this->$offset);
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Gets the string presentation of the object
|
301 |
+
* @return string
|
302 |
+
*/
|
303 |
+
public function __toString()
|
304 |
+
{
|
305 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
306 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
307 |
+
} else {
|
308 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
309 |
+
}
|
310 |
+
}
|
311 |
+
}
|
vendor/square/connect/lib/Model/CatalogItemOptionForItem.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CatalogItemOptionForItem Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CatalogItemOptionForItem implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'item_option_id' => 'string'
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
'item_option_id' => 'item_option_id'
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
'item_option_id' => 'setItemOptionId'
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
'item_option_id' => 'getItemOptionId'
|
52 |
+
);
|
53 |
+
|
54 |
+
/**
|
55 |
+
* $item_option_id The unique id of the item option, used to form the dimensions of the item option matrix in a specified order.
|
56 |
+
* @var string
|
57 |
+
*/
|
58 |
+
protected $item_option_id;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Constructor
|
62 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
63 |
+
*/
|
64 |
+
public function __construct(array $data = null)
|
65 |
+
{
|
66 |
+
if ($data != null) {
|
67 |
+
if (isset($data["item_option_id"])) {
|
68 |
+
$this->item_option_id = $data["item_option_id"];
|
69 |
+
} else {
|
70 |
+
$this->item_option_id = null;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
/**
|
75 |
+
* Gets item_option_id
|
76 |
+
* @return string
|
77 |
+
*/
|
78 |
+
public function getItemOptionId()
|
79 |
+
{
|
80 |
+
return $this->item_option_id;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Sets item_option_id
|
85 |
+
* @param string $item_option_id The unique id of the item option, used to form the dimensions of the item option matrix in a specified order.
|
86 |
+
* @return $this
|
87 |
+
*/
|
88 |
+
public function setItemOptionId($item_option_id)
|
89 |
+
{
|
90 |
+
$this->item_option_id = $item_option_id;
|
91 |
+
return $this;
|
92 |
+
}
|
93 |
+
/**
|
94 |
+
* Returns true if offset exists. False otherwise.
|
95 |
+
* @param integer $offset Offset
|
96 |
+
* @return boolean
|
97 |
+
*/
|
98 |
+
public function offsetExists($offset)
|
99 |
+
{
|
100 |
+
return isset($this->$offset);
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Gets offset.
|
105 |
+
* @param integer $offset Offset
|
106 |
+
* @return mixed
|
107 |
+
*/
|
108 |
+
public function offsetGet($offset)
|
109 |
+
{
|
110 |
+
return $this->$offset;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Sets value based on offset.
|
115 |
+
* @param integer $offset Offset
|
116 |
+
* @param mixed $value Value to be set
|
117 |
+
* @return void
|
118 |
+
*/
|
119 |
+
public function offsetSet($offset, $value)
|
120 |
+
{
|
121 |
+
$this->$offset = $value;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Unsets offset.
|
126 |
+
* @param integer $offset Offset
|
127 |
+
* @return void
|
128 |
+
*/
|
129 |
+
public function offsetUnset($offset)
|
130 |
+
{
|
131 |
+
unset($this->$offset);
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Gets the string presentation of the object
|
136 |
+
* @return string
|
137 |
+
*/
|
138 |
+
public function __toString()
|
139 |
+
{
|
140 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
141 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
142 |
+
} else {
|
143 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
vendor/square/connect/lib/Model/CatalogItemOptionValue.php
ADDED
@@ -0,0 +1,311 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CatalogItemOptionValue Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CatalogItemOptionValue implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'item_option_id' => 'string',
|
28 |
+
'name' => 'string',
|
29 |
+
'description' => 'string',
|
30 |
+
'color' => 'string',
|
31 |
+
'ordinal' => 'int',
|
32 |
+
'item_variation_count' => 'int'
|
33 |
+
);
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
37 |
+
* @var string[]
|
38 |
+
*/
|
39 |
+
static $attributeMap = array(
|
40 |
+
'item_option_id' => 'item_option_id',
|
41 |
+
'name' => 'name',
|
42 |
+
'description' => 'description',
|
43 |
+
'color' => 'color',
|
44 |
+
'ordinal' => 'ordinal',
|
45 |
+
'item_variation_count' => 'item_variation_count'
|
46 |
+
);
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
50 |
+
* @var string[]
|
51 |
+
*/
|
52 |
+
static $setters = array(
|
53 |
+
'item_option_id' => 'setItemOptionId',
|
54 |
+
'name' => 'setName',
|
55 |
+
'description' => 'setDescription',
|
56 |
+
'color' => 'setColor',
|
57 |
+
'ordinal' => 'setOrdinal',
|
58 |
+
'item_variation_count' => 'setItemVariationCount'
|
59 |
+
);
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Array of attributes to getter functions (for serialization of requests)
|
63 |
+
* @var string[]
|
64 |
+
*/
|
65 |
+
static $getters = array(
|
66 |
+
'item_option_id' => 'getItemOptionId',
|
67 |
+
'name' => 'getName',
|
68 |
+
'description' => 'getDescription',
|
69 |
+
'color' => 'getColor',
|
70 |
+
'ordinal' => 'getOrdinal',
|
71 |
+
'item_variation_count' => 'getItemVariationCount'
|
72 |
+
);
|
73 |
+
|
74 |
+
/**
|
75 |
+
* $item_option_id Unique ID of the associated item option.
|
76 |
+
* @var string
|
77 |
+
*/
|
78 |
+
protected $item_option_id;
|
79 |
+
/**
|
80 |
+
* $name Name of this item option value. Searchable.
|
81 |
+
* @var string
|
82 |
+
*/
|
83 |
+
protected $name;
|
84 |
+
/**
|
85 |
+
* $description The option value's human-readable description.
|
86 |
+
* @var string
|
87 |
+
*/
|
88 |
+
protected $description;
|
89 |
+
/**
|
90 |
+
* $color The HTML color for this value in the format #FFRRGGBB or #RRGGBB (e.g., \"#ff8d4e85\"). Only displayed if parent Item Option's `show_colors` flag is enabled. value.
|
91 |
+
* @var string
|
92 |
+
*/
|
93 |
+
protected $color;
|
94 |
+
/**
|
95 |
+
* $ordinal Determines where this option value appears in a list of option values.
|
96 |
+
* @var int
|
97 |
+
*/
|
98 |
+
protected $ordinal;
|
99 |
+
/**
|
100 |
+
* $item_variation_count The number of [CatalogItemVariation(#type-catalogitemvariation)s that currently make use of this Item Option value. Present only if `retrieve_counts` was specified on the request used to retrieve the parent Item Option of this value. Maximum: 100 counts.
|
101 |
+
* @var int
|
102 |
+
*/
|
103 |
+
protected $item_variation_count;
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Constructor
|
107 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
108 |
+
*/
|
109 |
+
public function __construct(array $data = null)
|
110 |
+
{
|
111 |
+
if ($data != null) {
|
112 |
+
if (isset($data["item_option_id"])) {
|
113 |
+
$this->item_option_id = $data["item_option_id"];
|
114 |
+
} else {
|
115 |
+
$this->item_option_id = null;
|
116 |
+
}
|
117 |
+
if (isset($data["name"])) {
|
118 |
+
$this->name = $data["name"];
|
119 |
+
} else {
|
120 |
+
$this->name = null;
|
121 |
+
}
|
122 |
+
if (isset($data["description"])) {
|
123 |
+
$this->description = $data["description"];
|
124 |
+
} else {
|
125 |
+
$this->description = null;
|
126 |
+
}
|
127 |
+
if (isset($data["color"])) {
|
128 |
+
$this->color = $data["color"];
|
129 |
+
} else {
|
130 |
+
$this->color = null;
|
131 |
+
}
|
132 |
+
if (isset($data["ordinal"])) {
|
133 |
+
$this->ordinal = $data["ordinal"];
|
134 |
+
} else {
|
135 |
+
$this->ordinal = null;
|
136 |
+
}
|
137 |
+
if (isset($data["item_variation_count"])) {
|
138 |
+
$this->item_variation_count = $data["item_variation_count"];
|
139 |
+
} else {
|
140 |
+
$this->item_variation_count = null;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
/**
|
145 |
+
* Gets item_option_id
|
146 |
+
* @return string
|
147 |
+
*/
|
148 |
+
public function getItemOptionId()
|
149 |
+
{
|
150 |
+
return $this->item_option_id;
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Sets item_option_id
|
155 |
+
* @param string $item_option_id Unique ID of the associated item option.
|
156 |
+
* @return $this
|
157 |
+
*/
|
158 |
+
public function setItemOptionId($item_option_id)
|
159 |
+
{
|
160 |
+
$this->item_option_id = $item_option_id;
|
161 |
+
return $this;
|
162 |
+
}
|
163 |
+
/**
|
164 |
+
* Gets name
|
165 |
+
* @return string
|
166 |
+
*/
|
167 |
+
public function getName()
|
168 |
+
{
|
169 |
+
return $this->name;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Sets name
|
174 |
+
* @param string $name Name of this item option value. Searchable.
|
175 |
+
* @return $this
|
176 |
+
*/
|
177 |
+
public function setName($name)
|
178 |
+
{
|
179 |
+
$this->name = $name;
|
180 |
+
return $this;
|
181 |
+
}
|
182 |
+
/**
|
183 |
+
* Gets description
|
184 |
+
* @return string
|
185 |
+
*/
|
186 |
+
public function getDescription()
|
187 |
+
{
|
188 |
+
return $this->description;
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Sets description
|
193 |
+
* @param string $description The option value's human-readable description.
|
194 |
+
* @return $this
|
195 |
+
*/
|
196 |
+
public function setDescription($description)
|
197 |
+
{
|
198 |
+
$this->description = $description;
|
199 |
+
return $this;
|
200 |
+
}
|
201 |
+
/**
|
202 |
+
* Gets color
|
203 |
+
* @return string
|
204 |
+
*/
|
205 |
+
public function getColor()
|
206 |
+
{
|
207 |
+
return $this->color;
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Sets color
|
212 |
+
* @param string $color The HTML color for this value in the format #FFRRGGBB or #RRGGBB (e.g., \"#ff8d4e85\"). Only displayed if parent Item Option's `show_colors` flag is enabled. value.
|
213 |
+
* @return $this
|
214 |
+
*/
|
215 |
+
public function setColor($color)
|
216 |
+
{
|
217 |
+
$this->color = $color;
|
218 |
+
return $this;
|
219 |
+
}
|
220 |
+
/**
|
221 |
+
* Gets ordinal
|
222 |
+
* @return int
|
223 |
+
*/
|
224 |
+
public function getOrdinal()
|
225 |
+
{
|
226 |
+
return $this->ordinal;
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Sets ordinal
|
231 |
+
* @param int $ordinal Determines where this option value appears in a list of option values.
|
232 |
+
* @return $this
|
233 |
+
*/
|
234 |
+
public function setOrdinal($ordinal)
|
235 |
+
{
|
236 |
+
$this->ordinal = $ordinal;
|
237 |
+
return $this;
|
238 |
+
}
|
239 |
+
/**
|
240 |
+
* Gets item_variation_count
|
241 |
+
* @return int
|
242 |
+
*/
|
243 |
+
public function getItemVariationCount()
|
244 |
+
{
|
245 |
+
return $this->item_variation_count;
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Sets item_variation_count
|
250 |
+
* @param int $item_variation_count The number of [CatalogItemVariation(#type-catalogitemvariation)s that currently make use of this Item Option value. Present only if `retrieve_counts` was specified on the request used to retrieve the parent Item Option of this value. Maximum: 100 counts.
|
251 |
+
* @return $this
|
252 |
+
*/
|
253 |
+
public function setItemVariationCount($item_variation_count)
|
254 |
+
{
|
255 |
+
$this->item_variation_count = $item_variation_count;
|
256 |
+
return $this;
|
257 |
+
}
|
258 |
+
/**
|
259 |
+
* Returns true if offset exists. False otherwise.
|
260 |
+
* @param integer $offset Offset
|
261 |
+
* @return boolean
|
262 |
+
*/
|
263 |
+
public function offsetExists($offset)
|
264 |
+
{
|
265 |
+
return isset($this->$offset);
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Gets offset.
|
270 |
+
* @param integer $offset Offset
|
271 |
+
* @return mixed
|
272 |
+
*/
|
273 |
+
public function offsetGet($offset)
|
274 |
+
{
|
275 |
+
return $this->$offset;
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Sets value based on offset.
|
280 |
+
* @param integer $offset Offset
|
281 |
+
* @param mixed $value Value to be set
|
282 |
+
* @return void
|
283 |
+
*/
|
284 |
+
public function offsetSet($offset, $value)
|
285 |
+
{
|
286 |
+
$this->$offset = $value;
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Unsets offset.
|
291 |
+
* @param integer $offset Offset
|
292 |
+
* @return void
|
293 |
+
*/
|
294 |
+
public function offsetUnset($offset)
|
295 |
+
{
|
296 |
+
unset($this->$offset);
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Gets the string presentation of the object
|
301 |
+
* @return string
|
302 |
+
*/
|
303 |
+
public function __toString()
|
304 |
+
{
|
305 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
306 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
307 |
+
} else {
|
308 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
309 |
+
}
|
310 |
+
}
|
311 |
+
}
|
vendor/square/connect/lib/Model/CatalogItemOptionValueForItemVariation.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CatalogItemOptionValueForItemVariation Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CatalogItemOptionValueForItemVariation implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'item_option_id' => 'string',
|
28 |
+
'item_option_value_id' => 'string'
|
29 |
+
);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
33 |
+
* @var string[]
|
34 |
+
*/
|
35 |
+
static $attributeMap = array(
|
36 |
+
'item_option_id' => 'item_option_id',
|
37 |
+
'item_option_value_id' => 'item_option_value_id'
|
38 |
+
);
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
42 |
+
* @var string[]
|
43 |
+
*/
|
44 |
+
static $setters = array(
|
45 |
+
'item_option_id' => 'setItemOptionId',
|
46 |
+
'item_option_value_id' => 'setItemOptionValueId'
|
47 |
+
);
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of attributes to getter functions (for serialization of requests)
|
51 |
+
* @var string[]
|
52 |
+
*/
|
53 |
+
static $getters = array(
|
54 |
+
'item_option_id' => 'getItemOptionId',
|
55 |
+
'item_option_value_id' => 'getItemOptionValueId'
|
56 |
+
);
|
57 |
+
|
58 |
+
/**
|
59 |
+
* $item_option_id The unique id of an item option.
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
+
protected $item_option_id;
|
63 |
+
/**
|
64 |
+
* $item_option_value_id The unique id of the selected value for the item option.
|
65 |
+
* @var string
|
66 |
+
*/
|
67 |
+
protected $item_option_value_id;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Constructor
|
71 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
72 |
+
*/
|
73 |
+
public function __construct(array $data = null)
|
74 |
+
{
|
75 |
+
if ($data != null) {
|
76 |
+
if (isset($data["item_option_id"])) {
|
77 |
+
$this->item_option_id = $data["item_option_id"];
|
78 |
+
} else {
|
79 |
+
$this->item_option_id = null;
|
80 |
+
}
|
81 |
+
if (isset($data["item_option_value_id"])) {
|
82 |
+
$this->item_option_value_id = $data["item_option_value_id"];
|
83 |
+
} else {
|
84 |
+
$this->item_option_value_id = null;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Gets item_option_id
|
90 |
+
* @return string
|
91 |
+
*/
|
92 |
+
public function getItemOptionId()
|
93 |
+
{
|
94 |
+
return $this->item_option_id;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Sets item_option_id
|
99 |
+
* @param string $item_option_id The unique id of an item option.
|
100 |
+
* @return $this
|
101 |
+
*/
|
102 |
+
public function setItemOptionId($item_option_id)
|
103 |
+
{
|
104 |
+
$this->item_option_id = $item_option_id;
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
/**
|
108 |
+
* Gets item_option_value_id
|
109 |
+
* @return string
|
110 |
+
*/
|
111 |
+
public function getItemOptionValueId()
|
112 |
+
{
|
113 |
+
return $this->item_option_value_id;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Sets item_option_value_id
|
118 |
+
* @param string $item_option_value_id The unique id of the selected value for the item option.
|
119 |
+
* @return $this
|
120 |
+
*/
|
121 |
+
public function setItemOptionValueId($item_option_value_id)
|
122 |
+
{
|
123 |
+
$this->item_option_value_id = $item_option_value_id;
|
124 |
+
return $this;
|
125 |
+
}
|
126 |
+
/**
|
127 |
+
* Returns true if offset exists. False otherwise.
|
128 |
+
* @param integer $offset Offset
|
129 |
+
* @return boolean
|
130 |
+
*/
|
131 |
+
public function offsetExists($offset)
|
132 |
+
{
|
133 |
+
return isset($this->$offset);
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Gets offset.
|
138 |
+
* @param integer $offset Offset
|
139 |
+
* @return mixed
|
140 |
+
*/
|
141 |
+
public function offsetGet($offset)
|
142 |
+
{
|
143 |
+
return $this->$offset;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Sets value based on offset.
|
148 |
+
* @param integer $offset Offset
|
149 |
+
* @param mixed $value Value to be set
|
150 |
+
* @return void
|
151 |
+
*/
|
152 |
+
public function offsetSet($offset, $value)
|
153 |
+
{
|
154 |
+
$this->$offset = $value;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Unsets offset.
|
159 |
+
* @param integer $offset Offset
|
160 |
+
* @return void
|
161 |
+
*/
|
162 |
+
public function offsetUnset($offset)
|
163 |
+
{
|
164 |
+
unset($this->$offset);
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Gets the string presentation of the object
|
169 |
+
* @return string
|
170 |
+
*/
|
171 |
+
public function __toString()
|
172 |
+
{
|
173 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
174 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
175 |
+
} else {
|
176 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
vendor/square/connect/lib/Model/CatalogItemVariation.php
CHANGED
@@ -36,7 +36,9 @@ class CatalogItemVariation implements ArrayAccess
|
|
36 |
'inventory_alert_type' => 'string',
|
37 |
'inventory_alert_threshold' => 'int',
|
38 |
'user_data' => 'string',
|
39 |
-
'service_duration' => 'int'
|
|
|
|
|
40 |
);
|
41 |
|
42 |
/**
|
@@ -56,7 +58,9 @@ class CatalogItemVariation implements ArrayAccess
|
|
56 |
'inventory_alert_type' => 'inventory_alert_type',
|
57 |
'inventory_alert_threshold' => 'inventory_alert_threshold',
|
58 |
'user_data' => 'user_data',
|
59 |
-
'service_duration' => 'service_duration'
|
|
|
|
|
60 |
);
|
61 |
|
62 |
/**
|
@@ -76,7 +80,9 @@ class CatalogItemVariation implements ArrayAccess
|
|
76 |
'inventory_alert_type' => 'setInventoryAlertType',
|
77 |
'inventory_alert_threshold' => 'setInventoryAlertThreshold',
|
78 |
'user_data' => 'setUserData',
|
79 |
-
'service_duration' => 'setServiceDuration'
|
|
|
|
|
80 |
);
|
81 |
|
82 |
/**
|
@@ -96,7 +102,9 @@ class CatalogItemVariation implements ArrayAccess
|
|
96 |
'inventory_alert_type' => 'getInventoryAlertType',
|
97 |
'inventory_alert_threshold' => 'getInventoryAlertThreshold',
|
98 |
'user_data' => 'getUserData',
|
99 |
-
'service_duration' => 'getServiceDuration'
|
|
|
|
|
100 |
);
|
101 |
|
102 |
/**
|
@@ -164,6 +172,16 @@ class CatalogItemVariation implements ArrayAccess
|
|
164 |
* @var int
|
165 |
*/
|
166 |
protected $service_duration;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
/**
|
169 |
* Constructor
|
@@ -237,6 +255,16 @@ class CatalogItemVariation implements ArrayAccess
|
|
237 |
} else {
|
238 |
$this->service_duration = null;
|
239 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
}
|
241 |
}
|
242 |
/**
|
@@ -486,6 +514,44 @@ class CatalogItemVariation implements ArrayAccess
|
|
486 |
$this->service_duration = $service_duration;
|
487 |
return $this;
|
488 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
/**
|
490 |
* Returns true if offset exists. False otherwise.
|
491 |
* @param integer $offset Offset
|
36 |
'inventory_alert_type' => 'string',
|
37 |
'inventory_alert_threshold' => 'int',
|
38 |
'user_data' => 'string',
|
39 |
+
'service_duration' => 'int',
|
40 |
+
'item_option_values' => '\SquareConnect\Model\CatalogItemOptionValueForItemVariation[]',
|
41 |
+
'measurement_unit_id' => 'string'
|
42 |
);
|
43 |
|
44 |
/**
|
58 |
'inventory_alert_type' => 'inventory_alert_type',
|
59 |
'inventory_alert_threshold' => 'inventory_alert_threshold',
|
60 |
'user_data' => 'user_data',
|
61 |
+
'service_duration' => 'service_duration',
|
62 |
+
'item_option_values' => 'item_option_values',
|
63 |
+
'measurement_unit_id' => 'measurement_unit_id'
|
64 |
);
|
65 |
|
66 |
/**
|
80 |
'inventory_alert_type' => 'setInventoryAlertType',
|
81 |
'inventory_alert_threshold' => 'setInventoryAlertThreshold',
|
82 |
'user_data' => 'setUserData',
|
83 |
+
'service_duration' => 'setServiceDuration',
|
84 |
+
'item_option_values' => 'setItemOptionValues',
|
85 |
+
'measurement_unit_id' => 'setMeasurementUnitId'
|
86 |
);
|
87 |
|
88 |
/**
|
102 |
'inventory_alert_type' => 'getInventoryAlertType',
|
103 |
'inventory_alert_threshold' => 'getInventoryAlertThreshold',
|
104 |
'user_data' => 'getUserData',
|
105 |
+
'service_duration' => 'getServiceDuration',
|
106 |
+
'item_option_values' => 'getItemOptionValues',
|
107 |
+
'measurement_unit_id' => 'getMeasurementUnitId'
|
108 |
);
|
109 |
|
110 |
/**
|
172 |
* @var int
|
173 |
*/
|
174 |
protected $service_duration;
|
175 |
+
/**
|
176 |
+
* $item_option_values List of item option values associated with this item variation. Listed in the same order as the item options of the parent item.
|
177 |
+
* @var \SquareConnect\Model\CatalogItemOptionValueForItemVariation[]
|
178 |
+
*/
|
179 |
+
protected $item_option_values;
|
180 |
+
/**
|
181 |
+
* $measurement_unit_id ID of the ‘CatalogMeasurementUnit’ that is used to measure the quantity sold of this item variation. If left unset, the item will be sold in whole quantities.
|
182 |
+
* @var string
|
183 |
+
*/
|
184 |
+
protected $measurement_unit_id;
|
185 |
|
186 |
/**
|
187 |
* Constructor
|
255 |
} else {
|
256 |
$this->service_duration = null;
|
257 |
}
|
258 |
+
if (isset($data["item_option_values"])) {
|
259 |
+
$this->item_option_values = $data["item_option_values"];
|
260 |
+
} else {
|
261 |
+
$this->item_option_values = null;
|
262 |
+
}
|
263 |
+
if (isset($data["measurement_unit_id"])) {
|
264 |
+
$this->measurement_unit_id = $data["measurement_unit_id"];
|
265 |
+
} else {
|
266 |
+
$this->measurement_unit_id = null;
|
267 |
+
}
|
268 |
}
|
269 |
}
|
270 |
/**
|
514 |
$this->service_duration = $service_duration;
|
515 |
return $this;
|
516 |
}
|
517 |
+
/**
|
518 |
+
* Gets item_option_values
|
519 |
+
* @return \SquareConnect\Model\CatalogItemOptionValueForItemVariation[]
|
520 |
+
*/
|
521 |
+
public function getItemOptionValues()
|
522 |
+
{
|
523 |
+
return $this->item_option_values;
|
524 |
+
}
|
525 |
+
|
526 |
+
/**
|
527 |
+
* Sets item_option_values
|
528 |
+
* @param \SquareConnect\Model\CatalogItemOptionValueForItemVariation[] $item_option_values List of item option values associated with this item variation. Listed in the same order as the item options of the parent item.
|
529 |
+
* @return $this
|
530 |
+
*/
|
531 |
+
public function setItemOptionValues($item_option_values)
|
532 |
+
{
|
533 |
+
$this->item_option_values = $item_option_values;
|
534 |
+
return $this;
|
535 |
+
}
|
536 |
+
/**
|
537 |
+
* Gets measurement_unit_id
|
538 |
+
* @return string
|
539 |
+
*/
|
540 |
+
public function getMeasurementUnitId()
|
541 |
+
{
|
542 |
+
return $this->measurement_unit_id;
|
543 |
+
}
|
544 |
+
|
545 |
+
/**
|
546 |
+
* Sets measurement_unit_id
|
547 |
+
* @param string $measurement_unit_id ID of the ‘CatalogMeasurementUnit’ that is used to measure the quantity sold of this item variation. If left unset, the item will be sold in whole quantities.
|
548 |
+
* @return $this
|
549 |
+
*/
|
550 |
+
public function setMeasurementUnitId($measurement_unit_id)
|
551 |
+
{
|
552 |
+
$this->measurement_unit_id = $measurement_unit_id;
|
553 |
+
return $this;
|
554 |
+
}
|
555 |
/**
|
556 |
* Returns true if offset exists. False otherwise.
|
557 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/CatalogMeasurementUnit.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CatalogMeasurementUnit Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CatalogMeasurementUnit implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'measurement_unit' => '\SquareConnect\Model\MeasurementUnit',
|
28 |
+
'precision' => 'int'
|
29 |
+
);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
33 |
+
* @var string[]
|
34 |
+
*/
|
35 |
+
static $attributeMap = array(
|
36 |
+
'measurement_unit' => 'measurement_unit',
|
37 |
+
'precision' => 'precision'
|
38 |
+
);
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
42 |
+
* @var string[]
|
43 |
+
*/
|
44 |
+
static $setters = array(
|
45 |
+
'measurement_unit' => 'setMeasurementUnit',
|
46 |
+
'precision' => 'setPrecision'
|
47 |
+
);
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of attributes to getter functions (for serialization of requests)
|
51 |
+
* @var string[]
|
52 |
+
*/
|
53 |
+
static $getters = array(
|
54 |
+
'measurement_unit' => 'getMeasurementUnit',
|
55 |
+
'precision' => 'getPrecision'
|
56 |
+
);
|
57 |
+
|
58 |
+
/**
|
59 |
+
* $measurement_unit Indicates the unit used to measure the quantity of a catalog item variation.
|
60 |
+
* @var \SquareConnect\Model\MeasurementUnit
|
61 |
+
*/
|
62 |
+
protected $measurement_unit;
|
63 |
+
/**
|
64 |
+
* $precision Represents the maximum number of positions allowed after the decimal in quantities measured with this unit. For example, if the precision is 2, then an itemization’s quantity can be 0.01, 0.12, etc. Min: 0 Max: 5 Default: 3
|
65 |
+
* @var int
|
66 |
+
*/
|
67 |
+
protected $precision;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Constructor
|
71 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
72 |
+
*/
|
73 |
+
public function __construct(array $data = null)
|
74 |
+
{
|
75 |
+
if ($data != null) {
|
76 |
+
if (isset($data["measurement_unit"])) {
|
77 |
+
$this->measurement_unit = $data["measurement_unit"];
|
78 |
+
} else {
|
79 |
+
$this->measurement_unit = null;
|
80 |
+
}
|
81 |
+
if (isset($data["precision"])) {
|
82 |
+
$this->precision = $data["precision"];
|
83 |
+
} else {
|
84 |
+
$this->precision = null;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Gets measurement_unit
|
90 |
+
* @return \SquareConnect\Model\MeasurementUnit
|
91 |
+
*/
|
92 |
+
public function getMeasurementUnit()
|
93 |
+
{
|
94 |
+
return $this->measurement_unit;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Sets measurement_unit
|
99 |
+
* @param \SquareConnect\Model\MeasurementUnit $measurement_unit Indicates the unit used to measure the quantity of a catalog item variation.
|
100 |
+
* @return $this
|
101 |
+
*/
|
102 |
+
public function setMeasurementUnit($measurement_unit)
|
103 |
+
{
|
104 |
+
$this->measurement_unit = $measurement_unit;
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
/**
|
108 |
+
* Gets precision
|
109 |
+
* @return int
|
110 |
+
*/
|
111 |
+
public function getPrecision()
|
112 |
+
{
|
113 |
+
return $this->precision;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Sets precision
|
118 |
+
* @param int $precision Represents the maximum number of positions allowed after the decimal in quantities measured with this unit. For example, if the precision is 2, then an itemization’s quantity can be 0.01, 0.12, etc. Min: 0 Max: 5 Default: 3
|
119 |
+
* @return $this
|
120 |
+
*/
|
121 |
+
public function setPrecision($precision)
|
122 |
+
{
|
123 |
+
$this->precision = $precision;
|
124 |
+
return $this;
|
125 |
+
}
|
126 |
+
/**
|
127 |
+
* Returns true if offset exists. False otherwise.
|
128 |
+
* @param integer $offset Offset
|
129 |
+
* @return boolean
|
130 |
+
*/
|
131 |
+
public function offsetExists($offset)
|
132 |
+
{
|
133 |
+
return isset($this->$offset);
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Gets offset.
|
138 |
+
* @param integer $offset Offset
|
139 |
+
* @return mixed
|
140 |
+
*/
|
141 |
+
public function offsetGet($offset)
|
142 |
+
{
|
143 |
+
return $this->$offset;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Sets value based on offset.
|
148 |
+
* @param integer $offset Offset
|
149 |
+
* @param mixed $value Value to be set
|
150 |
+
* @return void
|
151 |
+
*/
|
152 |
+
public function offsetSet($offset, $value)
|
153 |
+
{
|
154 |
+
$this->$offset = $value;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Unsets offset.
|
159 |
+
* @param integer $offset Offset
|
160 |
+
* @return void
|
161 |
+
*/
|
162 |
+
public function offsetUnset($offset)
|
163 |
+
{
|
164 |
+
unset($this->$offset);
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Gets the string presentation of the object
|
169 |
+
* @return string
|
170 |
+
*/
|
171 |
+
public function __toString()
|
172 |
+
{
|
173 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
174 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
175 |
+
} else {
|
176 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
vendor/square/connect/lib/Model/CatalogObject.php
CHANGED
@@ -41,7 +41,13 @@ class CatalogObject implements ArrayAccess
|
|
41 |
'discount_data' => '\SquareConnect\Model\CatalogDiscount',
|
42 |
'modifier_list_data' => '\SquareConnect\Model\CatalogModifierList',
|
43 |
'modifier_data' => '\SquareConnect\Model\CatalogModifier',
|
44 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
);
|
46 |
|
47 |
/**
|
@@ -66,7 +72,13 @@ class CatalogObject implements ArrayAccess
|
|
66 |
'discount_data' => 'discount_data',
|
67 |
'modifier_list_data' => 'modifier_list_data',
|
68 |
'modifier_data' => 'modifier_data',
|
69 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
);
|
71 |
|
72 |
/**
|
@@ -91,7 +103,13 @@ class CatalogObject implements ArrayAccess
|
|
91 |
'discount_data' => 'setDiscountData',
|
92 |
'modifier_list_data' => 'setModifierListData',
|
93 |
'modifier_data' => 'setModifierData',
|
94 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
);
|
96 |
|
97 |
/**
|
@@ -116,7 +134,13 @@ class CatalogObject implements ArrayAccess
|
|
116 |
'discount_data' => 'getDiscountData',
|
117 |
'modifier_list_data' => 'getModifierListData',
|
118 |
'modifier_data' => 'getModifierData',
|
119 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
);
|
121 |
|
122 |
/**
|
@@ -204,11 +228,41 @@ class CatalogObject implements ArrayAccess
|
|
204 |
* @var \SquareConnect\Model\CatalogModifier
|
205 |
*/
|
206 |
protected $modifier_data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
/**
|
208 |
* $image_data Structured data for a [CatalogImage](#type-catalogimage), set for CatalogObjects of type `IMAGE`.
|
209 |
* @var \SquareConnect\Model\CatalogImage
|
210 |
*/
|
211 |
protected $image_data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
|
213 |
/**
|
214 |
* Constructor
|
@@ -302,11 +356,41 @@ class CatalogObject implements ArrayAccess
|
|
302 |
} else {
|
303 |
$this->modifier_data = null;
|
304 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
if (isset($data["image_data"])) {
|
306 |
$this->image_data = $data["image_data"];
|
307 |
} else {
|
308 |
$this->image_data = null;
|
309 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
}
|
311 |
}
|
312 |
/**
|
@@ -632,6 +716,63 @@ class CatalogObject implements ArrayAccess
|
|
632 |
$this->modifier_data = $modifier_data;
|
633 |
return $this;
|
634 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
635 |
/**
|
636 |
* Gets image_data
|
637 |
* @return \SquareConnect\Model\CatalogImage
|
@@ -651,6 +792,63 @@ class CatalogObject implements ArrayAccess
|
|
651 |
$this->image_data = $image_data;
|
652 |
return $this;
|
653 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
654 |
/**
|
655 |
* Returns true if offset exists. False otherwise.
|
656 |
* @param integer $offset Offset
|
41 |
'discount_data' => '\SquareConnect\Model\CatalogDiscount',
|
42 |
'modifier_list_data' => '\SquareConnect\Model\CatalogModifierList',
|
43 |
'modifier_data' => '\SquareConnect\Model\CatalogModifier',
|
44 |
+
'time_period_data' => '\SquareConnect\Model\CatalogTimePeriod',
|
45 |
+
'product_set_data' => '\SquareConnect\Model\CatalogProductSet',
|
46 |
+
'pricing_rule_data' => '\SquareConnect\Model\CatalogPricingRule',
|
47 |
+
'image_data' => '\SquareConnect\Model\CatalogImage',
|
48 |
+
'measurement_unit_data' => '\SquareConnect\Model\CatalogMeasurementUnit',
|
49 |
+
'item_option_data' => '\SquareConnect\Model\CatalogItemOption',
|
50 |
+
'item_option_value_data' => '\SquareConnect\Model\CatalogItemOptionValue'
|
51 |
);
|
52 |
|
53 |
/**
|
72 |
'discount_data' => 'discount_data',
|
73 |
'modifier_list_data' => 'modifier_list_data',
|
74 |
'modifier_data' => 'modifier_data',
|
75 |
+
'time_period_data' => 'time_period_data',
|
76 |
+
'product_set_data' => 'product_set_data',
|
77 |
+
'pricing_rule_data' => 'pricing_rule_data',
|
78 |
+
'image_data' => 'image_data',
|
79 |
+
'measurement_unit_data' => 'measurement_unit_data',
|
80 |
+
'item_option_data' => 'item_option_data',
|
81 |
+
'item_option_value_data' => 'item_option_value_data'
|
82 |
);
|
83 |
|
84 |
/**
|
103 |
'discount_data' => 'setDiscountData',
|
104 |
'modifier_list_data' => 'setModifierListData',
|
105 |
'modifier_data' => 'setModifierData',
|
106 |
+
'time_period_data' => 'setTimePeriodData',
|
107 |
+
'product_set_data' => 'setProductSetData',
|
108 |
+
'pricing_rule_data' => 'setPricingRuleData',
|
109 |
+
'image_data' => 'setImageData',
|
110 |
+
'measurement_unit_data' => 'setMeasurementUnitData',
|
111 |
+
'item_option_data' => 'setItemOptionData',
|
112 |
+
'item_option_value_data' => 'setItemOptionValueData'
|
113 |
);
|
114 |
|
115 |
/**
|
134 |
'discount_data' => 'getDiscountData',
|
135 |
'modifier_list_data' => 'getModifierListData',
|
136 |
'modifier_data' => 'getModifierData',
|
137 |
+
'time_period_data' => 'getTimePeriodData',
|
138 |
+
'product_set_data' => 'getProductSetData',
|
139 |
+
'pricing_rule_data' => 'getPricingRuleData',
|
140 |
+
'image_data' => 'getImageData',
|
141 |
+
'measurement_unit_data' => 'getMeasurementUnitData',
|
142 |
+
'item_option_data' => 'getItemOptionData',
|
143 |
+
'item_option_value_data' => 'getItemOptionValueData'
|
144 |
);
|
145 |
|
146 |
/**
|
228 |
* @var \SquareConnect\Model\CatalogModifier
|
229 |
*/
|
230 |
protected $modifier_data;
|
231 |
+
/**
|
232 |
+
* $time_period_data Structured data for a [CatalogTimePeriod](#type-catalogtimeperiod), set for CatalogObjects of type `TIME_PERIOD`.
|
233 |
+
* @var \SquareConnect\Model\CatalogTimePeriod
|
234 |
+
*/
|
235 |
+
protected $time_period_data;
|
236 |
+
/**
|
237 |
+
* $product_set_data Structured data for a [CatalogProductSet](#type-catalogproductset), set for CatalogObjects of type `PRODUCT_SET`.
|
238 |
+
* @var \SquareConnect\Model\CatalogProductSet
|
239 |
+
*/
|
240 |
+
protected $product_set_data;
|
241 |
+
/**
|
242 |
+
* $pricing_rule_data Structured data for a [CatalogPricingRule](#type-catalogpricingrule), set for CatalogObjects of type `PRICING_RULE`.
|
243 |
+
* @var \SquareConnect\Model\CatalogPricingRule
|
244 |
+
*/
|
245 |
+
protected $pricing_rule_data;
|
246 |
/**
|
247 |
* $image_data Structured data for a [CatalogImage](#type-catalogimage), set for CatalogObjects of type `IMAGE`.
|
248 |
* @var \SquareConnect\Model\CatalogImage
|
249 |
*/
|
250 |
protected $image_data;
|
251 |
+
/**
|
252 |
+
* $measurement_unit_data Structured data for a [CatalogMeasurementUnit](#type-catalogmeasurementunit), set for CatalogObjects of type `MEASUREMENT_UNIT`.
|
253 |
+
* @var \SquareConnect\Model\CatalogMeasurementUnit
|
254 |
+
*/
|
255 |
+
protected $measurement_unit_data;
|
256 |
+
/**
|
257 |
+
* $item_option_data Structured data for a [CatalogItemOption](#type-catalogitemoption), set for CatalogObjects of type `ITEM_OPTION`.
|
258 |
+
* @var \SquareConnect\Model\CatalogItemOption
|
259 |
+
*/
|
260 |
+
protected $item_option_data;
|
261 |
+
/**
|
262 |
+
* $item_option_value_data Structured data for a [CatalogItemOptionValue](#type-catalogitemoptionvalue), set for CatalogObjects of type `ITEM_OPTION_VAL`.
|
263 |
+
* @var \SquareConnect\Model\CatalogItemOptionValue
|
264 |
+
*/
|
265 |
+
protected $item_option_value_data;
|
266 |
|
267 |
/**
|
268 |
* Constructor
|
356 |
} else {
|
357 |
$this->modifier_data = null;
|
358 |
}
|
359 |
+
if (isset($data["time_period_data"])) {
|
360 |
+
$this->time_period_data = $data["time_period_data"];
|
361 |
+
} else {
|
362 |
+
$this->time_period_data = null;
|
363 |
+
}
|
364 |
+
if (isset($data["product_set_data"])) {
|
365 |
+
$this->product_set_data = $data["product_set_data"];
|
366 |
+
} else {
|
367 |
+
$this->product_set_data = null;
|
368 |
+
}
|
369 |
+
if (isset($data["pricing_rule_data"])) {
|
370 |
+
$this->pricing_rule_data = $data["pricing_rule_data"];
|
371 |
+
} else {
|
372 |
+
$this->pricing_rule_data = null;
|
373 |
+
}
|
374 |
if (isset($data["image_data"])) {
|
375 |
$this->image_data = $data["image_data"];
|
376 |
} else {
|
377 |
$this->image_data = null;
|
378 |
}
|
379 |
+
if (isset($data["measurement_unit_data"])) {
|
380 |
+
$this->measurement_unit_data = $data["measurement_unit_data"];
|
381 |
+
} else {
|
382 |
+
$this->measurement_unit_data = null;
|
383 |
+
}
|
384 |
+
if (isset($data["item_option_data"])) {
|
385 |
+
$this->item_option_data = $data["item_option_data"];
|
386 |
+
} else {
|
387 |
+
$this->item_option_data = null;
|
388 |
+
}
|
389 |
+
if (isset($data["item_option_value_data"])) {
|
390 |
+
$this->item_option_value_data = $data["item_option_value_data"];
|
391 |
+
} else {
|
392 |
+
$this->item_option_value_data = null;
|
393 |
+
}
|
394 |
}
|
395 |
}
|
396 |
/**
|
716 |
$this->modifier_data = $modifier_data;
|
717 |
return $this;
|
718 |
}
|
719 |
+
/**
|
720 |
+
* Gets time_period_data
|
721 |
+
* @return \SquareConnect\Model\CatalogTimePeriod
|
722 |
+
*/
|
723 |
+
public function getTimePeriodData()
|
724 |
+
{
|
725 |
+
return $this->time_period_data;
|
726 |
+
}
|
727 |
+
|
728 |
+
/**
|
729 |
+
* Sets time_period_data
|
730 |
+
* @param \SquareConnect\Model\CatalogTimePeriod $time_period_data Structured data for a [CatalogTimePeriod](#type-catalogtimeperiod), set for CatalogObjects of type `TIME_PERIOD`.
|
731 |
+
* @return $this
|
732 |
+
*/
|
733 |
+
public function setTimePeriodData($time_period_data)
|
734 |
+
{
|
735 |
+
$this->time_period_data = $time_period_data;
|
736 |
+
return $this;
|
737 |
+
}
|
738 |
+
/**
|
739 |
+
* Gets product_set_data
|
740 |
+
* @return \SquareConnect\Model\CatalogProductSet
|
741 |
+
*/
|
742 |
+
public function getProductSetData()
|
743 |
+
{
|
744 |
+
return $this->product_set_data;
|
745 |
+
}
|
746 |
+
|
747 |
+
/**
|
748 |
+
* Sets product_set_data
|
749 |
+
* @param \SquareConnect\Model\CatalogProductSet $product_set_data Structured data for a [CatalogProductSet](#type-catalogproductset), set for CatalogObjects of type `PRODUCT_SET`.
|
750 |
+
* @return $this
|
751 |
+
*/
|
752 |
+
public function setProductSetData($product_set_data)
|
753 |
+
{
|
754 |
+
$this->product_set_data = $product_set_data;
|
755 |
+
return $this;
|
756 |
+
}
|
757 |
+
/**
|
758 |
+
* Gets pricing_rule_data
|
759 |
+
* @return \SquareConnect\Model\CatalogPricingRule
|
760 |
+
*/
|
761 |
+
public function getPricingRuleData()
|
762 |
+
{
|
763 |
+
return $this->pricing_rule_data;
|
764 |
+
}
|
765 |
+
|
766 |
+
/**
|
767 |
+
* Sets pricing_rule_data
|
768 |
+
* @param \SquareConnect\Model\CatalogPricingRule $pricing_rule_data Structured data for a [CatalogPricingRule](#type-catalogpricingrule), set for CatalogObjects of type `PRICING_RULE`.
|
769 |
+
* @return $this
|
770 |
+
*/
|
771 |
+
public function setPricingRuleData($pricing_rule_data)
|
772 |
+
{
|
773 |
+
$this->pricing_rule_data = $pricing_rule_data;
|
774 |
+
return $this;
|
775 |
+
}
|
776 |
/**
|
777 |
* Gets image_data
|
778 |
* @return \SquareConnect\Model\CatalogImage
|
792 |
$this->image_data = $image_data;
|
793 |
return $this;
|
794 |
}
|
795 |
+
/**
|
796 |
+
* Gets measurement_unit_data
|
797 |
+
* @return \SquareConnect\Model\CatalogMeasurementUnit
|
798 |
+
*/
|
799 |
+
public function getMeasurementUnitData()
|
800 |
+
{
|
801 |
+
return $this->measurement_unit_data;
|
802 |
+
}
|
803 |
+
|
804 |
+
/**
|
805 |
+
* Sets measurement_unit_data
|
806 |
+
* @param \SquareConnect\Model\CatalogMeasurementUnit $measurement_unit_data Structured data for a [CatalogMeasurementUnit](#type-catalogmeasurementunit), set for CatalogObjects of type `MEASUREMENT_UNIT`.
|
807 |
+
* @return $this
|
808 |
+
*/
|
809 |
+
public function setMeasurementUnitData($measurement_unit_data)
|
810 |
+
{
|
811 |
+
$this->measurement_unit_data = $measurement_unit_data;
|
812 |
+
return $this;
|
813 |
+
}
|
814 |
+
/**
|
815 |
+
* Gets item_option_data
|
816 |
+
* @return \SquareConnect\Model\CatalogItemOption
|
817 |
+
*/
|
818 |
+
public function getItemOptionData()
|
819 |
+
{
|
820 |
+
return $this->item_option_data;
|
821 |
+
}
|
822 |
+
|
823 |
+
/**
|
824 |
+
* Sets item_option_data
|
825 |
+
* @param \SquareConnect\Model\CatalogItemOption $item_option_data Structured data for a [CatalogItemOption](#type-catalogitemoption), set for CatalogObjects of type `ITEM_OPTION`.
|
826 |
+
* @return $this
|
827 |
+
*/
|
828 |
+
public function setItemOptionData($item_option_data)
|
829 |
+
{
|
830 |
+
$this->item_option_data = $item_option_data;
|
831 |
+
return $this;
|
832 |
+
}
|
833 |
+
/**
|
834 |
+
* Gets item_option_value_data
|
835 |
+
* @return \SquareConnect\Model\CatalogItemOptionValue
|
836 |
+
*/
|
837 |
+
public function getItemOptionValueData()
|
838 |
+
{
|
839 |
+
return $this->item_option_value_data;
|
840 |
+
}
|
841 |
+
|
842 |
+
/**
|
843 |
+
* Sets item_option_value_data
|
844 |
+
* @param \SquareConnect\Model\CatalogItemOptionValue $item_option_value_data Structured data for a [CatalogItemOptionValue](#type-catalogitemoptionvalue), set for CatalogObjects of type `ITEM_OPTION_VAL`.
|
845 |
+
* @return $this
|
846 |
+
*/
|
847 |
+
public function setItemOptionValueData($item_option_value_data)
|
848 |
+
{
|
849 |
+
$this->item_option_value_data = $item_option_value_data;
|
850 |
+
return $this;
|
851 |
+
}
|
852 |
/**
|
853 |
* Returns true if offset exists. False otherwise.
|
854 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/CatalogPricingRule.php
ADDED
@@ -0,0 +1,443 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CatalogPricingRule Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CatalogPricingRule implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'name' => 'string',
|
28 |
+
'time_period_ids' => 'string[]',
|
29 |
+
'discount_id' => 'string',
|
30 |
+
'match_products_id' => 'string',
|
31 |
+
'apply_products_id' => 'string',
|
32 |
+
'exclude_products_id' => 'string',
|
33 |
+
'valid_from_date' => 'string',
|
34 |
+
'valid_from_local_time' => 'string',
|
35 |
+
'valid_until_date' => 'string',
|
36 |
+
'valid_until_local_time' => 'string'
|
37 |
+
);
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
41 |
+
* @var string[]
|
42 |
+
*/
|
43 |
+
static $attributeMap = array(
|
44 |
+
'name' => 'name',
|
45 |
+
'time_period_ids' => 'time_period_ids',
|
46 |
+
'discount_id' => 'discount_id',
|
47 |
+
'match_products_id' => 'match_products_id',
|
48 |
+
'apply_products_id' => 'apply_products_id',
|
49 |
+
'exclude_products_id' => 'exclude_products_id',
|
50 |
+
'valid_from_date' => 'valid_from_date',
|
51 |
+
'valid_from_local_time' => 'valid_from_local_time',
|
52 |
+
'valid_until_date' => 'valid_until_date',
|
53 |
+
'valid_until_local_time' => 'valid_until_local_time'
|
54 |
+
);
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
58 |
+
* @var string[]
|
59 |
+
*/
|
60 |
+
static $setters = array(
|
61 |
+
'name' => 'setName',
|
62 |
+
'time_period_ids' => 'setTimePeriodIds',
|
63 |
+
'discount_id' => 'setDiscountId',
|
64 |
+
'match_products_id' => 'setMatchProductsId',
|
65 |
+
'apply_products_id' => 'setApplyProductsId',
|
66 |
+
'exclude_products_id' => 'setExcludeProductsId',
|
67 |
+
'valid_from_date' => 'setValidFromDate',
|
68 |
+
'valid_from_local_time' => 'setValidFromLocalTime',
|
69 |
+
'valid_until_date' => 'setValidUntilDate',
|
70 |
+
'valid_until_local_time' => 'setValidUntilLocalTime'
|
71 |
+
);
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Array of attributes to getter functions (for serialization of requests)
|
75 |
+
* @var string[]
|
76 |
+
*/
|
77 |
+
static $getters = array(
|
78 |
+
'name' => 'getName',
|
79 |
+
'time_period_ids' => 'getTimePeriodIds',
|
80 |
+
'discount_id' => 'getDiscountId',
|
81 |
+
'match_products_id' => 'getMatchProductsId',
|
82 |
+
'apply_products_id' => 'getApplyProductsId',
|
83 |
+
'exclude_products_id' => 'getExcludeProductsId',
|
84 |
+
'valid_from_date' => 'getValidFromDate',
|
85 |
+
'valid_from_local_time' => 'getValidFromLocalTime',
|
86 |
+
'valid_until_date' => 'getValidUntilDate',
|
87 |
+
'valid_until_local_time' => 'getValidUntilLocalTime'
|
88 |
+
);
|
89 |
+
|
90 |
+
/**
|
91 |
+
* $name User-defined name for the pricing rule. For example, \"Buy one get one free\" or \"10% off\".
|
92 |
+
* @var string
|
93 |
+
*/
|
94 |
+
protected $name;
|
95 |
+
/**
|
96 |
+
* $time_period_ids Unique ID for the [CatalogTimePeriod](#type-catalogtimeperiod)s when this pricing rule is in effect. If left unset, the pricing rule is always in effect.
|
97 |
+
* @var string[]
|
98 |
+
*/
|
99 |
+
protected $time_period_ids;
|
100 |
+
/**
|
101 |
+
* $discount_id Unique ID for the [CatalogDiscount](#type-catalogdiscount) to take off the price of all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied.
|
102 |
+
* @var string
|
103 |
+
*/
|
104 |
+
protected $discount_id;
|
105 |
+
/**
|
106 |
+
* $match_products_id Unique ID for the [CatalogProductSet](#type-catalogproductset) that will be matched by this rule. A match rule matches within the entire cart.
|
107 |
+
* @var string
|
108 |
+
*/
|
109 |
+
protected $match_products_id;
|
110 |
+
/**
|
111 |
+
* $apply_products_id The [CatalogProductSet](#type-catalogproductset) to apply the pricing rule to within the set of matched products specified by `match_products_id`. An apply rule can only match once within the set of matched products. If left unset, the pricing rule will be applied to all products within the set of matched products.
|
112 |
+
* @var string
|
113 |
+
*/
|
114 |
+
protected $apply_products_id;
|
115 |
+
/**
|
116 |
+
* $exclude_products_id Identifies the [CatalogProductSet](#type-catalogproductset) to exclude from this pricing rule. An exclude rule matches within the subset of the cart that fits the match rules (the match set). An exclude rule can only match once in the match set. If not supplied, the pricing will be applied to all products in the match set. Other products retain their base price, or a price generated by other rules.
|
117 |
+
* @var string
|
118 |
+
*/
|
119 |
+
protected $exclude_products_id;
|
120 |
+
/**
|
121 |
+
* $valid_from_date Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD).
|
122 |
+
* @var string
|
123 |
+
*/
|
124 |
+
protected $valid_from_date;
|
125 |
+
/**
|
126 |
+
* $valid_from_local_time Represents the local time the pricing rule should be valid from. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated.
|
127 |
+
* @var string
|
128 |
+
*/
|
129 |
+
protected $valid_from_local_time;
|
130 |
+
/**
|
131 |
+
* $valid_until_date Represents the date the pricing rule will become inactive. Represented in RFC3339 full-date format (YYYY-MM-DD).
|
132 |
+
* @var string
|
133 |
+
*/
|
134 |
+
protected $valid_until_date;
|
135 |
+
/**
|
136 |
+
* $valid_until_local_time Represents the local time at which the pricing rule will become inactive. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated.
|
137 |
+
* @var string
|
138 |
+
*/
|
139 |
+
protected $valid_until_local_time;
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Constructor
|
143 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
144 |
+
*/
|
145 |
+
public function __construct(array $data = null)
|
146 |
+
{
|
147 |
+
if ($data != null) {
|
148 |
+
if (isset($data["name"])) {
|
149 |
+
$this->name = $data["name"];
|
150 |
+
} else {
|
151 |
+
$this->name = null;
|
152 |
+
}
|
153 |
+
if (isset($data["time_period_ids"])) {
|
154 |
+
$this->time_period_ids = $data["time_period_ids"];
|
155 |
+
} else {
|
156 |
+
$this->time_period_ids = null;
|
157 |
+
}
|
158 |
+
if (isset($data["discount_id"])) {
|
159 |
+
$this->discount_id = $data["discount_id"];
|
160 |
+
} else {
|
161 |
+
$this->discount_id = null;
|
162 |
+
}
|
163 |
+
if (isset($data["match_products_id"])) {
|
164 |
+
$this->match_products_id = $data["match_products_id"];
|
165 |
+
} else {
|
166 |
+
$this->match_products_id = null;
|
167 |
+
}
|
168 |
+
if (isset($data["apply_products_id"])) {
|
169 |
+
$this->apply_products_id = $data["apply_products_id"];
|
170 |
+
} else {
|
171 |
+
$this->apply_products_id = null;
|
172 |
+
}
|
173 |
+
if (isset($data["exclude_products_id"])) {
|
174 |
+
$this->exclude_products_id = $data["exclude_products_id"];
|
175 |
+
} else {
|
176 |
+
$this->exclude_products_id = null;
|
177 |
+
}
|
178 |
+
if (isset($data["valid_from_date"])) {
|
179 |
+
$this->valid_from_date = $data["valid_from_date"];
|
180 |
+
} else {
|
181 |
+
$this->valid_from_date = null;
|
182 |
+
}
|
183 |
+
if (isset($data["valid_from_local_time"])) {
|
184 |
+
$this->valid_from_local_time = $data["valid_from_local_time"];
|
185 |
+
} else {
|
186 |
+
$this->valid_from_local_time = null;
|
187 |
+
}
|
188 |
+
if (isset($data["valid_until_date"])) {
|
189 |
+
$this->valid_until_date = $data["valid_until_date"];
|
190 |
+
} else {
|
191 |
+
$this->valid_until_date = null;
|
192 |
+
}
|
193 |
+
if (isset($data["valid_until_local_time"])) {
|
194 |
+
$this->valid_until_local_time = $data["valid_until_local_time"];
|
195 |
+
} else {
|
196 |
+
$this->valid_until_local_time = null;
|
197 |
+
}
|
198 |
+
}
|
199 |
+
}
|
200 |
+
/**
|
201 |
+
* Gets name
|
202 |
+
* @return string
|
203 |
+
*/
|
204 |
+
public function getName()
|
205 |
+
{
|
206 |
+
return $this->name;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Sets name
|
211 |
+
* @param string $name User-defined name for the pricing rule. For example, \"Buy one get one free\" or \"10% off\".
|
212 |
+
* @return $this
|
213 |
+
*/
|
214 |
+
public function setName($name)
|
215 |
+
{
|
216 |
+
$this->name = $name;
|
217 |
+
return $this;
|
218 |
+
}
|
219 |
+
/**
|
220 |
+
* Gets time_period_ids
|
221 |
+
* @return string[]
|
222 |
+
*/
|
223 |
+
public function getTimePeriodIds()
|
224 |
+
{
|
225 |
+
return $this->time_period_ids;
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Sets time_period_ids
|
230 |
+
* @param string[] $time_period_ids Unique ID for the [CatalogTimePeriod](#type-catalogtimeperiod)s when this pricing rule is in effect. If left unset, the pricing rule is always in effect.
|
231 |
+
* @return $this
|
232 |
+
*/
|
233 |
+
public function setTimePeriodIds($time_period_ids)
|
234 |
+
{
|
235 |
+
$this->time_period_ids = $time_period_ids;
|
236 |
+
return $this;
|
237 |
+
}
|
238 |
+
/**
|
239 |
+
* Gets discount_id
|
240 |
+
* @return string
|
241 |
+
*/
|
242 |
+
public function getDiscountId()
|
243 |
+
{
|
244 |
+
return $this->discount_id;
|
245 |
+
}
|
246 |
+
|
247 |
+
/**
|
248 |
+
* Sets discount_id
|
249 |
+
* @param string $discount_id Unique ID for the [CatalogDiscount](#type-catalogdiscount) to take off the price of all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied.
|
250 |
+
* @return $this
|
251 |
+
*/
|
252 |
+
public function setDiscountId($discount_id)
|
253 |
+
{
|
254 |
+
$this->discount_id = $discount_id;
|
255 |
+
return $this;
|
256 |
+
}
|
257 |
+
/**
|
258 |
+
* Gets match_products_id
|
259 |
+
* @return string
|
260 |
+
*/
|
261 |
+
public function getMatchProductsId()
|
262 |
+
{
|
263 |
+
return $this->match_products_id;
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Sets match_products_id
|
268 |
+
* @param string $match_products_id Unique ID for the [CatalogProductSet](#type-catalogproductset) that will be matched by this rule. A match rule matches within the entire cart.
|
269 |
+
* @return $this
|
270 |
+
*/
|
271 |
+
public function setMatchProductsId($match_products_id)
|
272 |
+
{
|
273 |
+
$this->match_products_id = $match_products_id;
|
274 |
+
return $this;
|
275 |
+
}
|
276 |
+
/**
|
277 |
+
* Gets apply_products_id
|
278 |
+
* @return string
|
279 |
+
*/
|
280 |
+
public function getApplyProductsId()
|
281 |
+
{
|
282 |
+
return $this->apply_products_id;
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Sets apply_products_id
|
287 |
+
* @param string $apply_products_id The [CatalogProductSet](#type-catalogproductset) to apply the pricing rule to within the set of matched products specified by `match_products_id`. An apply rule can only match once within the set of matched products. If left unset, the pricing rule will be applied to all products within the set of matched products.
|
288 |
+
* @return $this
|
289 |
+
*/
|
290 |
+
public function setApplyProductsId($apply_products_id)
|
291 |
+
{
|
292 |
+
$this->apply_products_id = $apply_products_id;
|
293 |
+
return $this;
|
294 |
+
}
|
295 |
+
/**
|
296 |
+
* Gets exclude_products_id
|
297 |
+
* @return string
|
298 |
+
*/
|
299 |
+
public function getExcludeProductsId()
|
300 |
+
{
|
301 |
+
return $this->exclude_products_id;
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Sets exclude_products_id
|
306 |
+
* @param string $exclude_products_id Identifies the [CatalogProductSet](#type-catalogproductset) to exclude from this pricing rule. An exclude rule matches within the subset of the cart that fits the match rules (the match set). An exclude rule can only match once in the match set. If not supplied, the pricing will be applied to all products in the match set. Other products retain their base price, or a price generated by other rules.
|
307 |
+
* @return $this
|
308 |
+
*/
|
309 |
+
public function setExcludeProductsId($exclude_products_id)
|
310 |
+
{
|
311 |
+
$this->exclude_products_id = $exclude_products_id;
|
312 |
+
return $this;
|
313 |
+
}
|
314 |
+
/**
|
315 |
+
* Gets valid_from_date
|
316 |
+
* @return string
|
317 |
+
*/
|
318 |
+
public function getValidFromDate()
|
319 |
+
{
|
320 |
+
return $this->valid_from_date;
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Sets valid_from_date
|
325 |
+
* @param string $valid_from_date Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD).
|
326 |
+
* @return $this
|
327 |
+
*/
|
328 |
+
public function setValidFromDate($valid_from_date)
|
329 |
+
{
|
330 |
+
$this->valid_from_date = $valid_from_date;
|
331 |
+
return $this;
|
332 |
+
}
|
333 |
+
/**
|
334 |
+
* Gets valid_from_local_time
|
335 |
+
* @return string
|
336 |
+
*/
|
337 |
+
public function getValidFromLocalTime()
|
338 |
+
{
|
339 |
+
return $this->valid_from_local_time;
|
340 |
+
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Sets valid_from_local_time
|
344 |
+
* @param string $valid_from_local_time Represents the local time the pricing rule should be valid from. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated.
|
345 |
+
* @return $this
|
346 |
+
*/
|
347 |
+
public function setValidFromLocalTime($valid_from_local_time)
|
348 |
+
{
|
349 |
+
$this->valid_from_local_time = $valid_from_local_time;
|
350 |
+
return $this;
|
351 |
+
}
|
352 |
+
/**
|
353 |
+
* Gets valid_until_date
|
354 |
+
* @return string
|
355 |
+
*/
|
356 |
+
public function getValidUntilDate()
|
357 |
+
{
|
358 |
+
return $this->valid_until_date;
|
359 |
+
}
|
360 |
+
|
361 |
+
/**
|
362 |
+
* Sets valid_until_date
|
363 |
+
* @param string $valid_until_date Represents the date the pricing rule will become inactive. Represented in RFC3339 full-date format (YYYY-MM-DD).
|
364 |
+
* @return $this
|
365 |
+
*/
|
366 |
+
public function setValidUntilDate($valid_until_date)
|
367 |
+
{
|
368 |
+
$this->valid_until_date = $valid_until_date;
|
369 |
+
return $this;
|
370 |
+
}
|
371 |
+
/**
|
372 |
+
* Gets valid_until_local_time
|
373 |
+
* @return string
|
374 |
+
*/
|
375 |
+
public function getValidUntilLocalTime()
|
376 |
+
{
|
377 |
+
return $this->valid_until_local_time;
|
378 |
+
}
|
379 |
+
|
380 |
+
/**
|
381 |
+
* Sets valid_until_local_time
|
382 |
+
* @param string $valid_until_local_time Represents the local time at which the pricing rule will become inactive. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated.
|
383 |
+
* @return $this
|
384 |
+
*/
|
385 |
+
public function setValidUntilLocalTime($valid_until_local_time)
|
386 |
+
{
|
387 |
+
$this->valid_until_local_time = $valid_until_local_time;
|
388 |
+
return $this;
|
389 |
+
}
|
390 |
+
/**
|
391 |
+
* Returns true if offset exists. False otherwise.
|
392 |
+
* @param integer $offset Offset
|
393 |
+
* @return boolean
|
394 |
+
*/
|
395 |
+
public function offsetExists($offset)
|
396 |
+
{
|
397 |
+
return isset($this->$offset);
|
398 |
+
}
|
399 |
+
|
400 |
+
/**
|
401 |
+
* Gets offset.
|
402 |
+
* @param integer $offset Offset
|
403 |
+
* @return mixed
|
404 |
+
*/
|
405 |
+
public function offsetGet($offset)
|
406 |
+
{
|
407 |
+
return $this->$offset;
|
408 |
+
}
|
409 |
+
|
410 |
+
/**
|
411 |
+
* Sets value based on offset.
|
412 |
+
* @param integer $offset Offset
|
413 |
+
* @param mixed $value Value to be set
|
414 |
+
* @return void
|
415 |
+
*/
|
416 |
+
public function offsetSet($offset, $value)
|
417 |
+
{
|
418 |
+
$this->$offset = $value;
|
419 |
+
}
|
420 |
+
|
421 |
+
/**
|
422 |
+
* Unsets offset.
|
423 |
+
* @param integer $offset Offset
|
424 |
+
* @return void
|
425 |
+
*/
|
426 |
+
public function offsetUnset($offset)
|
427 |
+
{
|
428 |
+
unset($this->$offset);
|
429 |
+
}
|
430 |
+
|
431 |
+
/**
|
432 |
+
* Gets the string presentation of the object
|
433 |
+
* @return string
|
434 |
+
*/
|
435 |
+
public function __toString()
|
436 |
+
{
|
437 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
438 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
439 |
+
} else {
|
440 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
441 |
+
}
|
442 |
+
}
|
443 |
+
}
|
vendor/square/connect/lib/Model/CatalogProductSet.php
ADDED
@@ -0,0 +1,344 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CatalogProductSet Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CatalogProductSet implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'name' => 'string',
|
28 |
+
'product_ids_any' => 'string[]',
|
29 |
+
'product_ids_all' => 'string[]',
|
30 |
+
'quantity_exact' => 'int',
|
31 |
+
'quantity_min' => 'int',
|
32 |
+
'quantity_max' => 'int',
|
33 |
+
'all_products' => 'bool'
|
34 |
+
);
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
38 |
+
* @var string[]
|
39 |
+
*/
|
40 |
+
static $attributeMap = array(
|
41 |
+
'name' => 'name',
|
42 |
+
'product_ids_any' => 'product_ids_any',
|
43 |
+
'product_ids_all' => 'product_ids_all',
|
44 |
+
'quantity_exact' => 'quantity_exact',
|
45 |
+
'quantity_min' => 'quantity_min',
|
46 |
+
'quantity_max' => 'quantity_max',
|
47 |
+
'all_products' => 'all_products'
|
48 |
+
);
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
52 |
+
* @var string[]
|
53 |
+
*/
|
54 |
+
static $setters = array(
|
55 |
+
'name' => 'setName',
|
56 |
+
'product_ids_any' => 'setProductIdsAny',
|
57 |
+
'product_ids_all' => 'setProductIdsAll',
|
58 |
+
'quantity_exact' => 'setQuantityExact',
|
59 |
+
'quantity_min' => 'setQuantityMin',
|
60 |
+
'quantity_max' => 'setQuantityMax',
|
61 |
+
'all_products' => 'setAllProducts'
|
62 |
+
);
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Array of attributes to getter functions (for serialization of requests)
|
66 |
+
* @var string[]
|
67 |
+
*/
|
68 |
+
static $getters = array(
|
69 |
+
'name' => 'getName',
|
70 |
+
'product_ids_any' => 'getProductIdsAny',
|
71 |
+
'product_ids_all' => 'getProductIdsAll',
|
72 |
+
'quantity_exact' => 'getQuantityExact',
|
73 |
+
'quantity_min' => 'getQuantityMin',
|
74 |
+
'quantity_max' => 'getQuantityMax',
|
75 |
+
'all_products' => 'getAllProducts'
|
76 |
+
);
|
77 |
+
|
78 |
+
/**
|
79 |
+
* $name User-defined name for the product set. For example, \"Clearance Items\" or \"Winter Sale Items\".
|
80 |
+
* @var string
|
81 |
+
*/
|
82 |
+
protected $name;
|
83 |
+
/**
|
84 |
+
* $product_ids_any Unique IDs for any [CatalogObjects](#type-catalogobject)s to include in this product set. Any number of these catalog objects can be in an order for a pricing rule to apply. This can be used with `product_ids_all` in a parent [CatalogProductSet](#type-catalogproductset) to match groups of products for a bulk discount, such as a discount for an entree and side combo. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs.
|
85 |
+
* @var string[]
|
86 |
+
*/
|
87 |
+
protected $product_ids_any;
|
88 |
+
/**
|
89 |
+
* $product_ids_all Unique IDs for [CatalogObjects](#type-catalogobject) to include in this product set. All objects in this set must be included in an order for a pricing rule to apply. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs.
|
90 |
+
* @var string[]
|
91 |
+
*/
|
92 |
+
protected $product_ids_all;
|
93 |
+
/**
|
94 |
+
* $quantity_exact If set, there must be exactly this many items from `products_any` or `products_all` in the cart for the discount to apply. Cannot be combined with either `quantity_min` or `quantity_max`.
|
95 |
+
* @var int
|
96 |
+
*/
|
97 |
+
protected $quantity_exact;
|
98 |
+
/**
|
99 |
+
* $quantity_min If set, there must be at least this many items from `products_any` or `products_all` in a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if `quantity_exact`, `quantity_min` and `quantity_max` are all unspecified.
|
100 |
+
* @var int
|
101 |
+
*/
|
102 |
+
protected $quantity_min;
|
103 |
+
/**
|
104 |
+
* $quantity_max If set, the pricing rule will apply to a maximum of this many items from `products_any` or `products_all`.
|
105 |
+
* @var int
|
106 |
+
*/
|
107 |
+
protected $quantity_max;
|
108 |
+
/**
|
109 |
+
* $all_products If set to `true`, the product set will include every item in the catalog. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set.
|
110 |
+
* @var bool
|
111 |
+
*/
|
112 |
+
protected $all_products;
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Constructor
|
116 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
117 |
+
*/
|
118 |
+
public function __construct(array $data = null)
|
119 |
+
{
|
120 |
+
if ($data != null) {
|
121 |
+
if (isset($data["name"])) {
|
122 |
+
$this->name = $data["name"];
|
123 |
+
} else {
|
124 |
+
$this->name = null;
|
125 |
+
}
|
126 |
+
if (isset($data["product_ids_any"])) {
|
127 |
+
$this->product_ids_any = $data["product_ids_any"];
|
128 |
+
} else {
|
129 |
+
$this->product_ids_any = null;
|
130 |
+
}
|
131 |
+
if (isset($data["product_ids_all"])) {
|
132 |
+
$this->product_ids_all = $data["product_ids_all"];
|
133 |
+
} else {
|
134 |
+
$this->product_ids_all = null;
|
135 |
+
}
|
136 |
+
if (isset($data["quantity_exact"])) {
|
137 |
+
$this->quantity_exact = $data["quantity_exact"];
|
138 |
+
} else {
|
139 |
+
$this->quantity_exact = null;
|
140 |
+
}
|
141 |
+
if (isset($data["quantity_min"])) {
|
142 |
+
$this->quantity_min = $data["quantity_min"];
|
143 |
+
} else {
|
144 |
+
$this->quantity_min = null;
|
145 |
+
}
|
146 |
+
if (isset($data["quantity_max"])) {
|
147 |
+
$this->quantity_max = $data["quantity_max"];
|
148 |
+
} else {
|
149 |
+
$this->quantity_max = null;
|
150 |
+
}
|
151 |
+
if (isset($data["all_products"])) {
|
152 |
+
$this->all_products = $data["all_products"];
|
153 |
+
} else {
|
154 |
+
$this->all_products = null;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
+
/**
|
159 |
+
* Gets name
|
160 |
+
* @return string
|
161 |
+
*/
|
162 |
+
public function getName()
|
163 |
+
{
|
164 |
+
return $this->name;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Sets name
|
169 |
+
* @param string $name User-defined name for the product set. For example, \"Clearance Items\" or \"Winter Sale Items\".
|
170 |
+
* @return $this
|
171 |
+
*/
|
172 |
+
public function setName($name)
|
173 |
+
{
|
174 |
+
$this->name = $name;
|
175 |
+
return $this;
|
176 |
+
}
|
177 |
+
/**
|
178 |
+
* Gets product_ids_any
|
179 |
+
* @return string[]
|
180 |
+
*/
|
181 |
+
public function getProductIdsAny()
|
182 |
+
{
|
183 |
+
return $this->product_ids_any;
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Sets product_ids_any
|
188 |
+
* @param string[] $product_ids_any Unique IDs for any [CatalogObjects](#type-catalogobject)s to include in this product set. Any number of these catalog objects can be in an order for a pricing rule to apply. This can be used with `product_ids_all` in a parent [CatalogProductSet](#type-catalogproductset) to match groups of products for a bulk discount, such as a discount for an entree and side combo. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs.
|
189 |
+
* @return $this
|
190 |
+
*/
|
191 |
+
public function setProductIdsAny($product_ids_any)
|
192 |
+
{
|
193 |
+
$this->product_ids_any = $product_ids_any;
|
194 |
+
return $this;
|
195 |
+
}
|
196 |
+
/**
|
197 |
+
* Gets product_ids_all
|
198 |
+
* @return string[]
|
199 |
+
*/
|
200 |
+
public function getProductIdsAll()
|
201 |
+
{
|
202 |
+
return $this->product_ids_all;
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Sets product_ids_all
|
207 |
+
* @param string[] $product_ids_all Unique IDs for [CatalogObjects](#type-catalogobject) to include in this product set. All objects in this set must be included in an order for a pricing rule to apply. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs.
|
208 |
+
* @return $this
|
209 |
+
*/
|
210 |
+
public function setProductIdsAll($product_ids_all)
|
211 |
+
{
|
212 |
+
$this->product_ids_all = $product_ids_all;
|
213 |
+
return $this;
|
214 |
+
}
|
215 |
+
/**
|
216 |
+
* Gets quantity_exact
|
217 |
+
* @return int
|
218 |
+
*/
|
219 |
+
public function getQuantityExact()
|
220 |
+
{
|
221 |
+
return $this->quantity_exact;
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Sets quantity_exact
|
226 |
+
* @param int $quantity_exact If set, there must be exactly this many items from `products_any` or `products_all` in the cart for the discount to apply. Cannot be combined with either `quantity_min` or `quantity_max`.
|
227 |
+
* @return $this
|
228 |
+
*/
|
229 |
+
public function setQuantityExact($quantity_exact)
|
230 |
+
{
|
231 |
+
$this->quantity_exact = $quantity_exact;
|
232 |
+
return $this;
|
233 |
+
}
|
234 |
+
/**
|
235 |
+
* Gets quantity_min
|
236 |
+
* @return int
|
237 |
+
*/
|
238 |
+
public function getQuantityMin()
|
239 |
+
{
|
240 |
+
return $this->quantity_min;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Sets quantity_min
|
245 |
+
* @param int $quantity_min If set, there must be at least this many items from `products_any` or `products_all` in a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if `quantity_exact`, `quantity_min` and `quantity_max` are all unspecified.
|
246 |
+
* @return $this
|
247 |
+
*/
|
248 |
+
public function setQuantityMin($quantity_min)
|
249 |
+
{
|
250 |
+
$this->quantity_min = $quantity_min;
|
251 |
+
return $this;
|
252 |
+
}
|
253 |
+
/**
|
254 |
+
* Gets quantity_max
|
255 |
+
* @return int
|
256 |
+
*/
|
257 |
+
public function getQuantityMax()
|
258 |
+
{
|
259 |
+
return $this->quantity_max;
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Sets quantity_max
|
264 |
+
* @param int $quantity_max If set, the pricing rule will apply to a maximum of this many items from `products_any` or `products_all`.
|
265 |
+
* @return $this
|
266 |
+
*/
|
267 |
+
public function setQuantityMax($quantity_max)
|
268 |
+
{
|
269 |
+
$this->quantity_max = $quantity_max;
|
270 |
+
return $this;
|
271 |
+
}
|
272 |
+
/**
|
273 |
+
* Gets all_products
|
274 |
+
* @return bool
|
275 |
+
*/
|
276 |
+
public function getAllProducts()
|
277 |
+
{
|
278 |
+
return $this->all_products;
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Sets all_products
|
283 |
+
* @param bool $all_products If set to `true`, the product set will include every item in the catalog. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set.
|
284 |
+
* @return $this
|
285 |
+
*/
|
286 |
+
public function setAllProducts($all_products)
|
287 |
+
{
|
288 |
+
$this->all_products = $all_products;
|
289 |
+
return $this;
|
290 |
+
}
|
291 |
+
/**
|
292 |
+
* Returns true if offset exists. False otherwise.
|
293 |
+
* @param integer $offset Offset
|
294 |
+
* @return boolean
|
295 |
+
*/
|
296 |
+
public function offsetExists($offset)
|
297 |
+
{
|
298 |
+
return isset($this->$offset);
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Gets offset.
|
303 |
+
* @param integer $offset Offset
|
304 |
+
* @return mixed
|
305 |
+
*/
|
306 |
+
public function offsetGet($offset)
|
307 |
+
{
|
308 |
+
return $this->$offset;
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Sets value based on offset.
|
313 |
+
* @param integer $offset Offset
|
314 |
+
* @param mixed $value Value to be set
|
315 |
+
* @return void
|
316 |
+
*/
|
317 |
+
public function offsetSet($offset, $value)
|
318 |
+
{
|
319 |
+
$this->$offset = $value;
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Unsets offset.
|
324 |
+
* @param integer $offset Offset
|
325 |
+
* @return void
|
326 |
+
*/
|
327 |
+
public function offsetUnset($offset)
|
328 |
+
{
|
329 |
+
unset($this->$offset);
|
330 |
+
}
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Gets the string presentation of the object
|
334 |
+
* @return string
|
335 |
+
*/
|
336 |
+
public function __toString()
|
337 |
+
{
|
338 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
339 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
340 |
+
} else {
|
341 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
342 |
+
}
|
343 |
+
}
|
344 |
+
}
|
vendor/square/connect/lib/Model/CatalogQuery.php
CHANGED
@@ -30,7 +30,9 @@ class CatalogQuery implements ArrayAccess
|
|
30 |
'range_query' => '\SquareConnect\Model\CatalogQueryRange',
|
31 |
'text_query' => '\SquareConnect\Model\CatalogQueryText',
|
32 |
'items_for_tax_query' => '\SquareConnect\Model\CatalogQueryItemsForTax',
|
33 |
-
'items_for_modifier_list_query' => '\SquareConnect\Model\CatalogQueryItemsForModifierList'
|
|
|
|
|
34 |
);
|
35 |
|
36 |
/**
|
@@ -44,7 +46,9 @@ class CatalogQuery implements ArrayAccess
|
|
44 |
'range_query' => 'range_query',
|
45 |
'text_query' => 'text_query',
|
46 |
'items_for_tax_query' => 'items_for_tax_query',
|
47 |
-
'items_for_modifier_list_query' => 'items_for_modifier_list_query'
|
|
|
|
|
48 |
);
|
49 |
|
50 |
/**
|
@@ -58,7 +62,9 @@ class CatalogQuery implements ArrayAccess
|
|
58 |
'range_query' => 'setRangeQuery',
|
59 |
'text_query' => 'setTextQuery',
|
60 |
'items_for_tax_query' => 'setItemsForTaxQuery',
|
61 |
-
'items_for_modifier_list_query' => 'setItemsForModifierListQuery'
|
|
|
|
|
62 |
);
|
63 |
|
64 |
/**
|
@@ -72,7 +78,9 @@ class CatalogQuery implements ArrayAccess
|
|
72 |
'range_query' => 'getRangeQuery',
|
73 |
'text_query' => 'getTextQuery',
|
74 |
'items_for_tax_query' => 'getItemsForTaxQuery',
|
75 |
-
'items_for_modifier_list_query' => 'getItemsForModifierListQuery'
|
|
|
|
|
76 |
);
|
77 |
|
78 |
/**
|
@@ -110,6 +118,16 @@ class CatalogQuery implements ArrayAccess
|
|
110 |
* @var \SquareConnect\Model\CatalogQueryItemsForModifierList
|
111 |
*/
|
112 |
protected $items_for_modifier_list_query;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
/**
|
115 |
* Constructor
|
@@ -153,6 +171,16 @@ class CatalogQuery implements ArrayAccess
|
|
153 |
} else {
|
154 |
$this->items_for_modifier_list_query = null;
|
155 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
157 |
}
|
158 |
/**
|
@@ -288,6 +316,44 @@ class CatalogQuery implements ArrayAccess
|
|
288 |
$this->items_for_modifier_list_query = $items_for_modifier_list_query;
|
289 |
return $this;
|
290 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
/**
|
292 |
* Returns true if offset exists. False otherwise.
|
293 |
* @param integer $offset Offset
|
30 |
'range_query' => '\SquareConnect\Model\CatalogQueryRange',
|
31 |
'text_query' => '\SquareConnect\Model\CatalogQueryText',
|
32 |
'items_for_tax_query' => '\SquareConnect\Model\CatalogQueryItemsForTax',
|
33 |
+
'items_for_modifier_list_query' => '\SquareConnect\Model\CatalogQueryItemsForModifierList',
|
34 |
+
'items_for_item_options_query' => '\SquareConnect\Model\CatalogQueryItemsForItemOptions',
|
35 |
+
'item_variations_for_item_option_values_query' => '\SquareConnect\Model\CatalogQueryItemVariationsForItemOptionValues'
|
36 |
);
|
37 |
|
38 |
/**
|
46 |
'range_query' => 'range_query',
|
47 |
'text_query' => 'text_query',
|
48 |
'items_for_tax_query' => 'items_for_tax_query',
|
49 |
+
'items_for_modifier_list_query' => 'items_for_modifier_list_query',
|
50 |
+
'items_for_item_options_query' => 'items_for_item_options_query',
|
51 |
+
'item_variations_for_item_option_values_query' => 'item_variations_for_item_option_values_query'
|
52 |
);
|
53 |
|
54 |
/**
|
62 |
'range_query' => 'setRangeQuery',
|
63 |
'text_query' => 'setTextQuery',
|
64 |
'items_for_tax_query' => 'setItemsForTaxQuery',
|
65 |
+
'items_for_modifier_list_query' => 'setItemsForModifierListQuery',
|
66 |
+
'items_for_item_options_query' => 'setItemsForItemOptionsQuery',
|
67 |
+
'item_variations_for_item_option_values_query' => 'setItemVariationsForItemOptionValuesQuery'
|
68 |
);
|
69 |
|
70 |
/**
|
78 |
'range_query' => 'getRangeQuery',
|
79 |
'text_query' => 'getTextQuery',
|
80 |
'items_for_tax_query' => 'getItemsForTaxQuery',
|
81 |
+
'items_for_modifier_list_query' => 'getItemsForModifierListQuery',
|
82 |
+
'items_for_item_options_query' => 'getItemsForItemOptionsQuery',
|
83 |
+
'item_variations_for_item_option_values_query' => 'getItemVariationsForItemOptionValuesQuery'
|
84 |
);
|
85 |
|
86 |
/**
|
118 |
* @var \SquareConnect\Model\CatalogQueryItemsForModifierList
|
119 |
*/
|
120 |
protected $items_for_modifier_list_query;
|
121 |
+
/**
|
122 |
+
* $items_for_item_options_query A query that returns all [CatalogItem](#type-catalogitem)s that have all of the given [CatalogItemOption](#type-catalogitemoption)s.
|
123 |
+
* @var \SquareConnect\Model\CatalogQueryItemsForItemOptions
|
124 |
+
*/
|
125 |
+
protected $items_for_item_options_query;
|
126 |
+
/**
|
127 |
+
* $item_variations_for_item_option_values_query A query that returns all [CatalogItemVariation](#type-catalogitemvariations)s that have all of the given [CatalogItemOption](#type-catalogitemoption) values.
|
128 |
+
* @var \SquareConnect\Model\CatalogQueryItemVariationsForItemOptionValues
|
129 |
+
*/
|
130 |
+
protected $item_variations_for_item_option_values_query;
|
131 |
|
132 |
/**
|
133 |
* Constructor
|
171 |
} else {
|
172 |
$this->items_for_modifier_list_query = null;
|
173 |
}
|
174 |
+
if (isset($data["items_for_item_options_query"])) {
|
175 |
+
$this->items_for_item_options_query = $data["items_for_item_options_query"];
|
176 |
+
} else {
|
177 |
+
$this->items_for_item_options_query = null;
|
178 |
+
}
|
179 |
+
if (isset($data["item_variations_for_item_option_values_query"])) {
|
180 |
+
$this->item_variations_for_item_option_values_query = $data["item_variations_for_item_option_values_query"];
|
181 |
+
} else {
|
182 |
+
$this->item_variations_for_item_option_values_query = null;
|
183 |
+
}
|
184 |
}
|
185 |
}
|
186 |
/**
|
316 |
$this->items_for_modifier_list_query = $items_for_modifier_list_query;
|
317 |
return $this;
|
318 |
}
|
319 |
+
/**
|
320 |
+
* Gets items_for_item_options_query
|
321 |
+
* @return \SquareConnect\Model\CatalogQueryItemsForItemOptions
|
322 |
+
*/
|
323 |
+
public function getItemsForItemOptionsQuery()
|
324 |
+
{
|
325 |
+
return $this->items_for_item_options_query;
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Sets items_for_item_options_query
|
330 |
+
* @param \SquareConnect\Model\CatalogQueryItemsForItemOptions $items_for_item_options_query A query that returns all [CatalogItem](#type-catalogitem)s that have all of the given [CatalogItemOption](#type-catalogitemoption)s.
|
331 |
+
* @return $this
|
332 |
+
*/
|
333 |
+
public function setItemsForItemOptionsQuery($items_for_item_options_query)
|
334 |
+
{
|
335 |
+
$this->items_for_item_options_query = $items_for_item_options_query;
|
336 |
+
return $this;
|
337 |
+
}
|
338 |
+
/**
|
339 |
+
* Gets item_variations_for_item_option_values_query
|
340 |
+
* @return \SquareConnect\Model\CatalogQueryItemVariationsForItemOptionValues
|
341 |
+
*/
|
342 |
+
public function getItemVariationsForItemOptionValuesQuery()
|
343 |
+
{
|
344 |
+
return $this->item_variations_for_item_option_values_query;
|
345 |
+
}
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Sets item_variations_for_item_option_values_query
|
349 |
+
* @param \SquareConnect\Model\CatalogQueryItemVariationsForItemOptionValues $item_variations_for_item_option_values_query A query that returns all [CatalogItemVariation](#type-catalogitemvariations)s that have all of the given [CatalogItemOption](#type-catalogitemoption) values.
|
350 |
+
* @return $this
|
351 |
+
*/
|
352 |
+
public function setItemVariationsForItemOptionValuesQuery($item_variations_for_item_option_values_query)
|
353 |
+
{
|
354 |
+
$this->item_variations_for_item_option_values_query = $item_variations_for_item_option_values_query;
|
355 |
+
return $this;
|
356 |
+
}
|
357 |
/**
|
358 |
* Returns true if offset exists. False otherwise.
|
359 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/CatalogQueryItemVariationsForItemOptionValues.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CatalogQueryItemVariationsForItemOptionValues Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CatalogQueryItemVariationsForItemOptionValues implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'item_option_value_ids' => 'string[]'
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
'item_option_value_ids' => 'item_option_value_ids'
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
'item_option_value_ids' => 'setItemOptionValueIds'
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
'item_option_value_ids' => 'getItemOptionValueIds'
|
52 |
+
);
|
53 |
+
|
54 |
+
/**
|
55 |
+
* $item_option_value_ids A set of [CatalogItemOptionValue](#type-catalogitemoptionvalue) IDs to be used to find associated [CatalogItemVariation](#type-catalogitemvariation)s. All ItemVariations that contain all of the given Item Option Values (in any order) will be returned.
|
56 |
+
* @var string[]
|
57 |
+
*/
|
58 |
+
protected $item_option_value_ids;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Constructor
|
62 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
63 |
+
*/
|
64 |
+
public function __construct(array $data = null)
|
65 |
+
{
|
66 |
+
if ($data != null) {
|
67 |
+
if (isset($data["item_option_value_ids"])) {
|
68 |
+
$this->item_option_value_ids = $data["item_option_value_ids"];
|
69 |
+
} else {
|
70 |
+
$this->item_option_value_ids = null;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
/**
|
75 |
+
* Gets item_option_value_ids
|
76 |
+
* @return string[]
|
77 |
+
*/
|
78 |
+
public function getItemOptionValueIds()
|
79 |
+
{
|
80 |
+
return $this->item_option_value_ids;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Sets item_option_value_ids
|
85 |
+
* @param string[] $item_option_value_ids A set of [CatalogItemOptionValue](#type-catalogitemoptionvalue) IDs to be used to find associated [CatalogItemVariation](#type-catalogitemvariation)s. All ItemVariations that contain all of the given Item Option Values (in any order) will be returned.
|
86 |
+
* @return $this
|
87 |
+
*/
|
88 |
+
public function setItemOptionValueIds($item_option_value_ids)
|
89 |
+
{
|
90 |
+
$this->item_option_value_ids = $item_option_value_ids;
|
91 |
+
return $this;
|
92 |
+
}
|
93 |
+
/**
|
94 |
+
* Returns true if offset exists. False otherwise.
|
95 |
+
* @param integer $offset Offset
|
96 |
+
* @return boolean
|
97 |
+
*/
|
98 |
+
public function offsetExists($offset)
|
99 |
+
{
|
100 |
+
return isset($this->$offset);
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Gets offset.
|
105 |
+
* @param integer $offset Offset
|
106 |
+
* @return mixed
|
107 |
+
*/
|
108 |
+
public function offsetGet($offset)
|
109 |
+
{
|
110 |
+
return $this->$offset;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Sets value based on offset.
|
115 |
+
* @param integer $offset Offset
|
116 |
+
* @param mixed $value Value to be set
|
117 |
+
* @return void
|
118 |
+
*/
|
119 |
+
public function offsetSet($offset, $value)
|
120 |
+
{
|
121 |
+
$this->$offset = $value;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Unsets offset.
|
126 |
+
* @param integer $offset Offset
|
127 |
+
* @return void
|
128 |
+
*/
|
129 |
+
public function offsetUnset($offset)
|
130 |
+
{
|
131 |
+
unset($this->$offset);
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Gets the string presentation of the object
|
136 |
+
* @return string
|
137 |
+
*/
|
138 |
+
public function __toString()
|
139 |
+
{
|
140 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
141 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
142 |
+
} else {
|
143 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
vendor/square/connect/lib/Model/CatalogQueryItemsForItemOptions.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CatalogQueryItemsForItemOptions Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CatalogQueryItemsForItemOptions implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'item_option_ids' => 'string[]'
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
'item_option_ids' => 'item_option_ids'
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
'item_option_ids' => 'setItemOptionIds'
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
'item_option_ids' => 'getItemOptionIds'
|
52 |
+
);
|
53 |
+
|
54 |
+
/**
|
55 |
+
* $item_option_ids A set of [CatalogItemOption](#type-catalogitemoption) IDs to be used to find associated [CatalogItem](#type-catalogitem)s. All Items that contain all of the given Item Options (in any order) will be returned.
|
56 |
+
* @var string[]
|
57 |
+
*/
|
58 |
+
protected $item_option_ids;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Constructor
|
62 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
63 |
+
*/
|
64 |
+
public function __construct(array $data = null)
|
65 |
+
{
|
66 |
+
if ($data != null) {
|
67 |
+
if (isset($data["item_option_ids"])) {
|
68 |
+
$this->item_option_ids = $data["item_option_ids"];
|
69 |
+
} else {
|
70 |
+
$this->item_option_ids = null;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
/**
|
75 |
+
* Gets item_option_ids
|
76 |
+
* @return string[]
|
77 |
+
*/
|
78 |
+
public function getItemOptionIds()
|
79 |
+
{
|
80 |
+
return $this->item_option_ids;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Sets item_option_ids
|
85 |
+
* @param string[] $item_option_ids A set of [CatalogItemOption](#type-catalogitemoption) IDs to be used to find associated [CatalogItem](#type-catalogitem)s. All Items that contain all of the given Item Options (in any order) will be returned.
|
86 |
+
* @return $this
|
87 |
+
*/
|
88 |
+
public function setItemOptionIds($item_option_ids)
|
89 |
+
{
|
90 |
+
$this->item_option_ids = $item_option_ids;
|
91 |
+
return $this;
|
92 |
+
}
|
93 |
+
/**
|
94 |
+
* Returns true if offset exists. False otherwise.
|
95 |
+
* @param integer $offset Offset
|
96 |
+
* @return boolean
|
97 |
+
*/
|
98 |
+
public function offsetExists($offset)
|
99 |
+
{
|
100 |
+
return isset($this->$offset);
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Gets offset.
|
105 |
+
* @param integer $offset Offset
|
106 |
+
* @return mixed
|
107 |
+
*/
|
108 |
+
public function offsetGet($offset)
|
109 |
+
{
|
110 |
+
return $this->$offset;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Sets value based on offset.
|
115 |
+
* @param integer $offset Offset
|
116 |
+
* @param mixed $value Value to be set
|
117 |
+
* @return void
|
118 |
+
*/
|
119 |
+
public function offsetSet($offset, $value)
|
120 |
+
{
|
121 |
+
$this->$offset = $value;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Unsets offset.
|
126 |
+
* @param integer $offset Offset
|
127 |
+
* @return void
|
128 |
+
*/
|
129 |
+
public function offsetUnset($offset)
|
130 |
+
{
|
131 |
+
unset($this->$offset);
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Gets the string presentation of the object
|
136 |
+
* @return string
|
137 |
+
*/
|
138 |
+
public function __toString()
|
139 |
+
{
|
140 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
141 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
142 |
+
} else {
|
143 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
vendor/square/connect/lib/Model/CatalogTimePeriod.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CatalogTimePeriod Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CatalogTimePeriod implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'event' => 'string'
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
'event' => 'event'
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
'event' => 'setEvent'
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
'event' => 'getEvent'
|
52 |
+
);
|
53 |
+
|
54 |
+
/**
|
55 |
+
* $event An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them.
|
56 |
+
* @var string
|
57 |
+
*/
|
58 |
+
protected $event;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Constructor
|
62 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
63 |
+
*/
|
64 |
+
public function __construct(array $data = null)
|
65 |
+
{
|
66 |
+
if ($data != null) {
|
67 |
+
if (isset($data["event"])) {
|
68 |
+
$this->event = $data["event"];
|
69 |
+
} else {
|
70 |
+
$this->event = null;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
/**
|
75 |
+
* Gets event
|
76 |
+
* @return string
|
77 |
+
*/
|
78 |
+
public function getEvent()
|
79 |
+
{
|
80 |
+
return $this->event;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Sets event
|
85 |
+
* @param string $event An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them.
|
86 |
+
* @return $this
|
87 |
+
*/
|
88 |
+
public function setEvent($event)
|
89 |
+
{
|
90 |
+
$this->event = $event;
|
91 |
+
return $this;
|
92 |
+
}
|
93 |
+
/**
|
94 |
+
* Returns true if offset exists. False otherwise.
|
95 |
+
* @param integer $offset Offset
|
96 |
+
* @return boolean
|
97 |
+
*/
|
98 |
+
public function offsetExists($offset)
|
99 |
+
{
|
100 |
+
return isset($this->$offset);
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Gets offset.
|
105 |
+
* @param integer $offset Offset
|
106 |
+
* @return mixed
|
107 |
+
*/
|
108 |
+
public function offsetGet($offset)
|
109 |
+
{
|
110 |
+
return $this->$offset;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Sets value based on offset.
|
115 |
+
* @param integer $offset Offset
|
116 |
+
* @param mixed $value Value to be set
|
117 |
+
* @return void
|
118 |
+
*/
|
119 |
+
public function offsetSet($offset, $value)
|
120 |
+
{
|
121 |
+
$this->$offset = $value;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Unsets offset.
|
126 |
+
* @param integer $offset Offset
|
127 |
+
* @return void
|
128 |
+
*/
|
129 |
+
public function offsetUnset($offset)
|
130 |
+
{
|
131 |
+
unset($this->$offset);
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Gets the string presentation of the object
|
136 |
+
* @return string
|
137 |
+
*/
|
138 |
+
public function __toString()
|
139 |
+
{
|
140 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
141 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
142 |
+
} else {
|
143 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
vendor/square/connect/lib/Model/ChargeRequest.php
CHANGED
@@ -36,7 +36,8 @@ class ChargeRequest implements ArrayAccess
|
|
36 |
'shipping_address' => '\SquareConnect\Model\Address',
|
37 |
'buyer_email_address' => 'string',
|
38 |
'order_id' => 'string',
|
39 |
-
'additional_recipients' => '\SquareConnect\Model\AdditionalRecipient[]'
|
|
|
40 |
);
|
41 |
|
42 |
/**
|
@@ -56,7 +57,8 @@ class ChargeRequest implements ArrayAccess
|
|
56 |
'shipping_address' => 'shipping_address',
|
57 |
'buyer_email_address' => 'buyer_email_address',
|
58 |
'order_id' => 'order_id',
|
59 |
-
'additional_recipients' => 'additional_recipients'
|
|
|
60 |
);
|
61 |
|
62 |
/**
|
@@ -76,7 +78,8 @@ class ChargeRequest implements ArrayAccess
|
|
76 |
'shipping_address' => 'setShippingAddress',
|
77 |
'buyer_email_address' => 'setBuyerEmailAddress',
|
78 |
'order_id' => 'setOrderId',
|
79 |
-
'additional_recipients' => 'setAdditionalRecipients'
|
|
|
80 |
);
|
81 |
|
82 |
/**
|
@@ -96,7 +99,8 @@ class ChargeRequest implements ArrayAccess
|
|
96 |
'shipping_address' => 'getShippingAddress',
|
97 |
'buyer_email_address' => 'getBuyerEmailAddress',
|
98 |
'order_id' => 'getOrderId',
|
99 |
-
'additional_recipients' => 'getAdditionalRecipients'
|
|
|
100 |
);
|
101 |
|
102 |
/**
|
@@ -164,6 +168,11 @@ class ChargeRequest implements ArrayAccess
|
|
164 |
* @var \SquareConnect\Model\AdditionalRecipient[]
|
165 |
*/
|
166 |
protected $additional_recipients;
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
/**
|
169 |
* Constructor
|
@@ -237,6 +246,11 @@ class ChargeRequest implements ArrayAccess
|
|
237 |
} else {
|
238 |
$this->additional_recipients = null;
|
239 |
}
|
|
|
|
|
|
|
|
|
|
|
240 |
}
|
241 |
}
|
242 |
/**
|
@@ -486,6 +500,25 @@ class ChargeRequest implements ArrayAccess
|
|
486 |
$this->additional_recipients = $additional_recipients;
|
487 |
return $this;
|
488 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
/**
|
490 |
* Returns true if offset exists. False otherwise.
|
491 |
* @param integer $offset Offset
|
36 |
'shipping_address' => '\SquareConnect\Model\Address',
|
37 |
'buyer_email_address' => 'string',
|
38 |
'order_id' => 'string',
|
39 |
+
'additional_recipients' => '\SquareConnect\Model\AdditionalRecipient[]',
|
40 |
+
'verification_token' => 'string'
|
41 |
);
|
42 |
|
43 |
/**
|
57 |
'shipping_address' => 'shipping_address',
|
58 |
'buyer_email_address' => 'buyer_email_address',
|
59 |
'order_id' => 'order_id',
|
60 |
+
'additional_recipients' => 'additional_recipients',
|
61 |
+
'verification_token' => 'verification_token'
|
62 |
);
|
63 |
|
64 |
/**
|
78 |
'shipping_address' => 'setShippingAddress',
|
79 |
'buyer_email_address' => 'setBuyerEmailAddress',
|
80 |
'order_id' => 'setOrderId',
|
81 |
+
'additional_recipients' => 'setAdditionalRecipients',
|
82 |
+
'verification_token' => 'setVerificationToken'
|
83 |
);
|
84 |
|
85 |
/**
|
99 |
'shipping_address' => 'getShippingAddress',
|
100 |
'buyer_email_address' => 'getBuyerEmailAddress',
|
101 |
'order_id' => 'getOrderId',
|
102 |
+
'additional_recipients' => 'getAdditionalRecipients',
|
103 |
+
'verification_token' => 'getVerificationToken'
|
104 |
);
|
105 |
|
106 |
/**
|
168 |
* @var \SquareConnect\Model\AdditionalRecipient[]
|
169 |
*/
|
170 |
protected $additional_recipients;
|
171 |
+
/**
|
172 |
+
* $verification_token An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity.
|
173 |
+
* @var string
|
174 |
+
*/
|
175 |
+
protected $verification_token;
|
176 |
|
177 |
/**
|
178 |
* Constructor
|
246 |
} else {
|
247 |
$this->additional_recipients = null;
|
248 |
}
|
249 |
+
if (isset($data["verification_token"])) {
|
250 |
+
$this->verification_token = $data["verification_token"];
|
251 |
+
} else {
|
252 |
+
$this->verification_token = null;
|
253 |
+
}
|
254 |
}
|
255 |
}
|
256 |
/**
|
500 |
$this->additional_recipients = $additional_recipients;
|
501 |
return $this;
|
502 |
}
|
503 |
+
/**
|
504 |
+
* Gets verification_token
|
505 |
+
* @return string
|
506 |
+
*/
|
507 |
+
public function getVerificationToken()
|
508 |
+
{
|
509 |
+
return $this->verification_token;
|
510 |
+
}
|
511 |
+
|
512 |
+
/**
|
513 |
+
* Sets verification_token
|
514 |
+
* @param string $verification_token An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity.
|
515 |
+
* @return $this
|
516 |
+
*/
|
517 |
+
public function setVerificationToken($verification_token)
|
518 |
+
{
|
519 |
+
$this->verification_token = $verification_token;
|
520 |
+
return $this;
|
521 |
+
}
|
522 |
/**
|
523 |
* Returns true if offset exists. False otherwise.
|
524 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/CompletePaymentRequest.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CompletePaymentRequest Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CompletePaymentRequest implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
|
52 |
+
);
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Constructor
|
57 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
58 |
+
*/
|
59 |
+
public function __construct(array $data = null)
|
60 |
+
{
|
61 |
+
if ($data != null) {
|
62 |
+
}
|
63 |
+
}
|
64 |
+
/**
|
65 |
+
* Returns true if offset exists. False otherwise.
|
66 |
+
* @param integer $offset Offset
|
67 |
+
* @return boolean
|
68 |
+
*/
|
69 |
+
public function offsetExists($offset)
|
70 |
+
{
|
71 |
+
return isset($this->$offset);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Gets offset.
|
76 |
+
* @param integer $offset Offset
|
77 |
+
* @return mixed
|
78 |
+
*/
|
79 |
+
public function offsetGet($offset)
|
80 |
+
{
|
81 |
+
return $this->$offset;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Sets value based on offset.
|
86 |
+
* @param integer $offset Offset
|
87 |
+
* @param mixed $value Value to be set
|
88 |
+
* @return void
|
89 |
+
*/
|
90 |
+
public function offsetSet($offset, $value)
|
91 |
+
{
|
92 |
+
$this->$offset = $value;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Unsets offset.
|
97 |
+
* @param integer $offset Offset
|
98 |
+
* @return void
|
99 |
+
*/
|
100 |
+
public function offsetUnset($offset)
|
101 |
+
{
|
102 |
+
unset($this->$offset);
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Gets the string presentation of the object
|
107 |
+
* @return string
|
108 |
+
*/
|
109 |
+
public function __toString()
|
110 |
+
{
|
111 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
112 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
113 |
+
} else {
|
114 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
vendor/square/connect/lib/Model/CompletePaymentResponse.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CompletePaymentResponse Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CompletePaymentResponse implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'errors' => '\SquareConnect\Model\Error[]',
|
28 |
+
'payment' => '\SquareConnect\Model\Payment'
|
29 |
+
);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
33 |
+
* @var string[]
|
34 |
+
*/
|
35 |
+
static $attributeMap = array(
|
36 |
+
'errors' => 'errors',
|
37 |
+
'payment' => 'payment'
|
38 |
+
);
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
42 |
+
* @var string[]
|
43 |
+
*/
|
44 |
+
static $setters = array(
|
45 |
+
'errors' => 'setErrors',
|
46 |
+
'payment' => 'setPayment'
|
47 |
+
);
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of attributes to getter functions (for serialization of requests)
|
51 |
+
* @var string[]
|
52 |
+
*/
|
53 |
+
static $getters = array(
|
54 |
+
'errors' => 'getErrors',
|
55 |
+
'payment' => 'getPayment'
|
56 |
+
);
|
57 |
+
|
58 |
+
/**
|
59 |
+
* $errors Information on errors encountered during the request
|
60 |
+
* @var \SquareConnect\Model\Error[]
|
61 |
+
*/
|
62 |
+
protected $errors;
|
63 |
+
/**
|
64 |
+
* $payment The successfully completed `Payment`.
|
65 |
+
* @var \SquareConnect\Model\Payment
|
66 |
+
*/
|
67 |
+
protected $payment;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Constructor
|
71 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
72 |
+
*/
|
73 |
+
public function __construct(array $data = null)
|
74 |
+
{
|
75 |
+
if ($data != null) {
|
76 |
+
if (isset($data["errors"])) {
|
77 |
+
$this->errors = $data["errors"];
|
78 |
+
} else {
|
79 |
+
$this->errors = null;
|
80 |
+
}
|
81 |
+
if (isset($data["payment"])) {
|
82 |
+
$this->payment = $data["payment"];
|
83 |
+
} else {
|
84 |
+
$this->payment = null;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Gets errors
|
90 |
+
* @return \SquareConnect\Model\Error[]
|
91 |
+
*/
|
92 |
+
public function getErrors()
|
93 |
+
{
|
94 |
+
return $this->errors;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Sets errors
|
99 |
+
* @param \SquareConnect\Model\Error[] $errors Information on errors encountered during the request
|
100 |
+
* @return $this
|
101 |
+
*/
|
102 |
+
public function setErrors($errors)
|
103 |
+
{
|
104 |
+
$this->errors = $errors;
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
/**
|
108 |
+
* Gets payment
|
109 |
+
* @return \SquareConnect\Model\Payment
|
110 |
+
*/
|
111 |
+
public function getPayment()
|
112 |
+
{
|
113 |
+
return $this->payment;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Sets payment
|
118 |
+
* @param \SquareConnect\Model\Payment $payment The successfully completed `Payment`.
|
119 |
+
* @return $this
|
120 |
+
*/
|
121 |
+
public function setPayment($payment)
|
122 |
+
{
|
123 |
+
$this->payment = $payment;
|
124 |
+
return $this;
|
125 |
+
}
|
126 |
+
/**
|
127 |
+
* Returns true if offset exists. False otherwise.
|
128 |
+
* @param integer $offset Offset
|
129 |
+
* @return boolean
|
130 |
+
*/
|
131 |
+
public function offsetExists($offset)
|
132 |
+
{
|
133 |
+
return isset($this->$offset);
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Gets offset.
|
138 |
+
* @param integer $offset Offset
|
139 |
+
* @return mixed
|
140 |
+
*/
|
141 |
+
public function offsetGet($offset)
|
142 |
+
{
|
143 |
+
return $this->$offset;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Sets value based on offset.
|
148 |
+
* @param integer $offset Offset
|
149 |
+
* @param mixed $value Value to be set
|
150 |
+
* @return void
|
151 |
+
*/
|
152 |
+
public function offsetSet($offset, $value)
|
153 |
+
{
|
154 |
+
$this->$offset = $value;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Unsets offset.
|
159 |
+
* @param integer $offset Offset
|
160 |
+
* @return void
|
161 |
+
*/
|
162 |
+
public function offsetUnset($offset)
|
163 |
+
{
|
164 |
+
unset($this->$offset);
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Gets the string presentation of the object
|
169 |
+
* @return string
|
170 |
+
*/
|
171 |
+
public function __toString()
|
172 |
+
{
|
173 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
174 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
175 |
+
} else {
|
176 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
vendor/square/connect/lib/Model/Coordinates.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* Coordinates Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class Coordinates implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'latitude' => 'float',
|
28 |
+
'longitude' => 'float'
|
29 |
+
);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
33 |
+
* @var string[]
|
34 |
+
*/
|
35 |
+
static $attributeMap = array(
|
36 |
+
'latitude' => 'latitude',
|
37 |
+
'longitude' => 'longitude'
|
38 |
+
);
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
42 |
+
* @var string[]
|
43 |
+
*/
|
44 |
+
static $setters = array(
|
45 |
+
'latitude' => 'setLatitude',
|
46 |
+
'longitude' => 'setLongitude'
|
47 |
+
);
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of attributes to getter functions (for serialization of requests)
|
51 |
+
* @var string[]
|
52 |
+
*/
|
53 |
+
static $getters = array(
|
54 |
+
'latitude' => 'getLatitude',
|
55 |
+
'longitude' => 'getLongitude'
|
56 |
+
);
|
57 |
+
|
58 |
+
/**
|
59 |
+
* $latitude The coordinate's latitude expressed in degrees.
|
60 |
+
* @var float
|
61 |
+
*/
|
62 |
+
protected $latitude;
|
63 |
+
/**
|
64 |
+
* $longitude The coordinate's longitude expressed in degrees.
|
65 |
+
* @var float
|
66 |
+
*/
|
67 |
+
protected $longitude;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Constructor
|
71 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
72 |
+
*/
|
73 |
+
public function __construct(array $data = null)
|
74 |
+
{
|
75 |
+
if ($data != null) {
|
76 |
+
if (isset($data["latitude"])) {
|
77 |
+
$this->latitude = $data["latitude"];
|
78 |
+
} else {
|
79 |
+
$this->latitude = null;
|
80 |
+
}
|
81 |
+
if (isset($data["longitude"])) {
|
82 |
+
$this->longitude = $data["longitude"];
|
83 |
+
} else {
|
84 |
+
$this->longitude = null;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Gets latitude
|
90 |
+
* @return float
|
91 |
+
*/
|
92 |
+
public function getLatitude()
|
93 |
+
{
|
94 |
+
return $this->latitude;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Sets latitude
|
99 |
+
* @param float $latitude The coordinate's latitude expressed in degrees.
|
100 |
+
* @return $this
|
101 |
+
*/
|
102 |
+
public function setLatitude($latitude)
|
103 |
+
{
|
104 |
+
$this->latitude = $latitude;
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
/**
|
108 |
+
* Gets longitude
|
109 |
+
* @return float
|
110 |
+
*/
|
111 |
+
public function getLongitude()
|
112 |
+
{
|
113 |
+
return $this->longitude;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Sets longitude
|
118 |
+
* @param float $longitude The coordinate's longitude expressed in degrees.
|
119 |
+
* @return $this
|
120 |
+
*/
|
121 |
+
public function setLongitude($longitude)
|
122 |
+
{
|
123 |
+
$this->longitude = $longitude;
|
124 |
+
return $this;
|
125 |
+
}
|
126 |
+
/**
|
127 |
+
* Returns true if offset exists. False otherwise.
|
128 |
+
* @param integer $offset Offset
|
129 |
+
* @return boolean
|
130 |
+
*/
|
131 |
+
public function offsetExists($offset)
|
132 |
+
{
|
133 |
+
return isset($this->$offset);
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Gets offset.
|
138 |
+
* @param integer $offset Offset
|
139 |
+
* @return mixed
|
140 |
+
*/
|
141 |
+
public function offsetGet($offset)
|
142 |
+
{
|
143 |
+
return $this->$offset;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Sets value based on offset.
|
148 |
+
* @param integer $offset Offset
|
149 |
+
* @param mixed $value Value to be set
|
150 |
+
* @return void
|
151 |
+
*/
|
152 |
+
public function offsetSet($offset, $value)
|
153 |
+
{
|
154 |
+
$this->$offset = $value;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Unsets offset.
|
159 |
+
* @param integer $offset Offset
|
160 |
+
* @return void
|
161 |
+
*/
|
162 |
+
public function offsetUnset($offset)
|
163 |
+
{
|
164 |
+
unset($this->$offset);
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Gets the string presentation of the object
|
169 |
+
* @return string
|
170 |
+
*/
|
171 |
+
public function __toString()
|
172 |
+
{
|
173 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
174 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
175 |
+
} else {
|
176 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
vendor/square/connect/lib/Model/CreateCustomerCardRequest.php
CHANGED
@@ -26,7 +26,8 @@ class CreateCustomerCardRequest implements ArrayAccess
|
|
26 |
static $swaggerTypes = array(
|
27 |
'card_nonce' => 'string',
|
28 |
'billing_address' => '\SquareConnect\Model\Address',
|
29 |
-
'cardholder_name' => 'string'
|
|
|
30 |
);
|
31 |
|
32 |
/**
|
@@ -36,7 +37,8 @@ class CreateCustomerCardRequest implements ArrayAccess
|
|
36 |
static $attributeMap = array(
|
37 |
'card_nonce' => 'card_nonce',
|
38 |
'billing_address' => 'billing_address',
|
39 |
-
'cardholder_name' => 'cardholder_name'
|
|
|
40 |
);
|
41 |
|
42 |
/**
|
@@ -46,7 +48,8 @@ class CreateCustomerCardRequest implements ArrayAccess
|
|
46 |
static $setters = array(
|
47 |
'card_nonce' => 'setCardNonce',
|
48 |
'billing_address' => 'setBillingAddress',
|
49 |
-
'cardholder_name' => 'setCardholderName'
|
|
|
50 |
);
|
51 |
|
52 |
/**
|
@@ -56,11 +59,12 @@ class CreateCustomerCardRequest implements ArrayAccess
|
|
56 |
static $getters = array(
|
57 |
'card_nonce' => 'getCardNonce',
|
58 |
'billing_address' => 'getBillingAddress',
|
59 |
-
'cardholder_name' => 'getCardholderName'
|
|
|
60 |
);
|
61 |
|
62 |
/**
|
63 |
-
* $card_nonce A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/
|
64 |
* @var string
|
65 |
*/
|
66 |
protected $card_nonce;
|
@@ -70,10 +74,15 @@ class CreateCustomerCardRequest implements ArrayAccess
|
|
70 |
*/
|
71 |
protected $billing_address;
|
72 |
/**
|
73 |
-
* $cardholder_name The
|
74 |
* @var string
|
75 |
*/
|
76 |
protected $cardholder_name;
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
/**
|
79 |
* Constructor
|
@@ -97,6 +106,11 @@ class CreateCustomerCardRequest implements ArrayAccess
|
|
97 |
} else {
|
98 |
$this->cardholder_name = null;
|
99 |
}
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
101 |
}
|
102 |
/**
|
@@ -110,7 +124,7 @@ class CreateCustomerCardRequest implements ArrayAccess
|
|
110 |
|
111 |
/**
|
112 |
* Sets card_nonce
|
113 |
-
* @param string $card_nonce A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/
|
114 |
* @return $this
|
115 |
*/
|
116 |
public function setCardNonce($card_nonce)
|
@@ -148,7 +162,7 @@ class CreateCustomerCardRequest implements ArrayAccess
|
|
148 |
|
149 |
/**
|
150 |
* Sets cardholder_name
|
151 |
-
* @param string $cardholder_name The
|
152 |
* @return $this
|
153 |
*/
|
154 |
public function setCardholderName($cardholder_name)
|
@@ -156,6 +170,25 @@ class CreateCustomerCardRequest implements ArrayAccess
|
|
156 |
$this->cardholder_name = $cardholder_name;
|
157 |
return $this;
|
158 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
/**
|
160 |
* Returns true if offset exists. False otherwise.
|
161 |
* @param integer $offset Offset
|
26 |
static $swaggerTypes = array(
|
27 |
'card_nonce' => 'string',
|
28 |
'billing_address' => '\SquareConnect\Model\Address',
|
29 |
+
'cardholder_name' => 'string',
|
30 |
+
'verification_token' => 'string'
|
31 |
);
|
32 |
|
33 |
/**
|
37 |
static $attributeMap = array(
|
38 |
'card_nonce' => 'card_nonce',
|
39 |
'billing_address' => 'billing_address',
|
40 |
+
'cardholder_name' => 'cardholder_name',
|
41 |
+
'verification_token' => 'verification_token'
|
42 |
);
|
43 |
|
44 |
/**
|
48 |
static $setters = array(
|
49 |
'card_nonce' => 'setCardNonce',
|
50 |
'billing_address' => 'setBillingAddress',
|
51 |
+
'cardholder_name' => 'setCardholderName',
|
52 |
+
'verification_token' => 'setVerificationToken'
|
53 |
);
|
54 |
|
55 |
/**
|
59 |
static $getters = array(
|
60 |
'card_nonce' => 'getCardNonce',
|
61 |
'billing_address' => 'getBillingAddress',
|
62 |
+
'cardholder_name' => 'getCardholderName',
|
63 |
+
'verification_token' => 'getVerificationToken'
|
64 |
);
|
65 |
|
66 |
/**
|
67 |
+
* $card_nonce A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/payment-form/payment-form-walkthrough) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card.
|
68 |
* @var string
|
69 |
*/
|
70 |
protected $card_nonce;
|
74 |
*/
|
75 |
protected $billing_address;
|
76 |
/**
|
77 |
+
* $cardholder_name The full name printed on the credit card.
|
78 |
* @var string
|
79 |
*/
|
80 |
protected $cardholder_name;
|
81 |
+
/**
|
82 |
+
* $verification_token An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity.
|
83 |
+
* @var string
|
84 |
+
*/
|
85 |
+
protected $verification_token;
|
86 |
|
87 |
/**
|
88 |
* Constructor
|
106 |
} else {
|
107 |
$this->cardholder_name = null;
|
108 |
}
|
109 |
+
if (isset($data["verification_token"])) {
|
110 |
+
$this->verification_token = $data["verification_token"];
|
111 |
+
} else {
|
112 |
+
$this->verification_token = null;
|
113 |
+
}
|
114 |
}
|
115 |
}
|
116 |
/**
|
124 |
|
125 |
/**
|
126 |
* Sets card_nonce
|
127 |
+
* @param string $card_nonce A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/payment-form/payment-form-walkthrough) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card.
|
128 |
* @return $this
|
129 |
*/
|
130 |
public function setCardNonce($card_nonce)
|
162 |
|
163 |
/**
|
164 |
* Sets cardholder_name
|
165 |
+
* @param string $cardholder_name The full name printed on the credit card.
|
166 |
* @return $this
|
167 |
*/
|
168 |
public function setCardholderName($cardholder_name)
|
170 |
$this->cardholder_name = $cardholder_name;
|
171 |
return $this;
|
172 |
}
|
173 |
+
/**
|
174 |
+
* Gets verification_token
|
175 |
+
* @return string
|
176 |
+
*/
|
177 |
+
public function getVerificationToken()
|
178 |
+
{
|
179 |
+
return $this->verification_token;
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Sets verification_token
|
184 |
+
* @param string $verification_token An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity.
|
185 |
+
* @return $this
|
186 |
+
*/
|
187 |
+
public function setVerificationToken($verification_token)
|
188 |
+
{
|
189 |
+
$this->verification_token = $verification_token;
|
190 |
+
return $this;
|
191 |
+
}
|
192 |
/**
|
193 |
* Returns true if offset exists. False otherwise.
|
194 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/CreateOrderRequest.php
CHANGED
@@ -82,7 +82,7 @@ class CreateOrderRequest implements ArrayAccess
|
|
82 |
*/
|
83 |
protected $idempotency_key;
|
84 |
/**
|
85 |
-
* $reference_id __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters.
|
86 |
* @var string
|
87 |
*/
|
88 |
protected $reference_id;
|
@@ -190,7 +190,7 @@ class CreateOrderRequest implements ArrayAccess
|
|
190 |
|
191 |
/**
|
192 |
* Sets reference_id
|
193 |
-
* @param string $reference_id __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters.
|
194 |
* @return $this
|
195 |
*/
|
196 |
public function setReferenceId($reference_id)
|
82 |
*/
|
83 |
protected $idempotency_key;
|
84 |
/**
|
85 |
+
* $reference_id __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters.
|
86 |
* @var string
|
87 |
*/
|
88 |
protected $reference_id;
|
190 |
|
191 |
/**
|
192 |
* Sets reference_id
|
193 |
+
* @param string $reference_id __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters.
|
194 |
* @return $this
|
195 |
*/
|
196 |
public function setReferenceId($reference_id)
|
vendor/square/connect/lib/Model/CreatePaymentRequest.php
ADDED
@@ -0,0 +1,641 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CreatePaymentRequest Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CreatePaymentRequest implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'source_id' => 'string',
|
28 |
+
'idempotency_key' => 'string',
|
29 |
+
'amount_money' => '\SquareConnect\Model\Money',
|
30 |
+
'tip_money' => '\SquareConnect\Model\Money',
|
31 |
+
'app_fee_money' => '\SquareConnect\Model\Money',
|
32 |
+
'autocomplete' => 'bool',
|
33 |
+
'order_id' => 'string',
|
34 |
+
'customer_id' => 'string',
|
35 |
+
'location_id' => 'string',
|
36 |
+
'reference_id' => 'string',
|
37 |
+
'verification_token' => 'string',
|
38 |
+
'accept_partial_authorization' => 'bool',
|
39 |
+
'buyer_email_address' => 'string',
|
40 |
+
'billing_address' => '\SquareConnect\Model\Address',
|
41 |
+
'shipping_address' => '\SquareConnect\Model\Address',
|
42 |
+
'note' => 'string'
|
43 |
+
);
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
47 |
+
* @var string[]
|
48 |
+
*/
|
49 |
+
static $attributeMap = array(
|
50 |
+
'source_id' => 'source_id',
|
51 |
+
'idempotency_key' => 'idempotency_key',
|
52 |
+
'amount_money' => 'amount_money',
|
53 |
+
'tip_money' => 'tip_money',
|
54 |
+
'app_fee_money' => 'app_fee_money',
|
55 |
+
'autocomplete' => 'autocomplete',
|
56 |
+
'order_id' => 'order_id',
|
57 |
+
'customer_id' => 'customer_id',
|
58 |
+
'location_id' => 'location_id',
|
59 |
+
'reference_id' => 'reference_id',
|
60 |
+
'verification_token' => 'verification_token',
|
61 |
+
'accept_partial_authorization' => 'accept_partial_authorization',
|
62 |
+
'buyer_email_address' => 'buyer_email_address',
|
63 |
+
'billing_address' => 'billing_address',
|
64 |
+
'shipping_address' => 'shipping_address',
|
65 |
+
'note' => 'note'
|
66 |
+
);
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
70 |
+
* @var string[]
|
71 |
+
*/
|
72 |
+
static $setters = array(
|
73 |
+
'source_id' => 'setSourceId',
|
74 |
+
'idempotency_key' => 'setIdempotencyKey',
|
75 |
+
'amount_money' => 'setAmountMoney',
|
76 |
+
'tip_money' => 'setTipMoney',
|
77 |
+
'app_fee_money' => 'setAppFeeMoney',
|
78 |
+
'autocomplete' => 'setAutocomplete',
|
79 |
+
'order_id' => 'setOrderId',
|
80 |
+
'customer_id' => 'setCustomerId',
|
81 |
+
'location_id' => 'setLocationId',
|
82 |
+
'reference_id' => 'setReferenceId',
|
83 |
+
'verification_token' => 'setVerificationToken',
|
84 |
+
'accept_partial_authorization' => 'setAcceptPartialAuthorization',
|
85 |
+
'buyer_email_address' => 'setBuyerEmailAddress',
|
86 |
+
'billing_address' => 'setBillingAddress',
|
87 |
+
'shipping_address' => 'setShippingAddress',
|
88 |
+
'note' => 'setNote'
|
89 |
+
);
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Array of attributes to getter functions (for serialization of requests)
|
93 |
+
* @var string[]
|
94 |
+
*/
|
95 |
+
static $getters = array(
|
96 |
+
'source_id' => 'getSourceId',
|
97 |
+
'idempotency_key' => 'getIdempotencyKey',
|
98 |
+
'amount_money' => 'getAmountMoney',
|
99 |
+
'tip_money' => 'getTipMoney',
|
100 |
+
'app_fee_money' => 'getAppFeeMoney',
|
101 |
+
'autocomplete' => 'getAutocomplete',
|
102 |
+
'order_id' => 'getOrderId',
|
103 |
+
'customer_id' => 'getCustomerId',
|
104 |
+
'location_id' => 'getLocationId',
|
105 |
+
'reference_id' => 'getReferenceId',
|
106 |
+
'verification_token' => 'getVerificationToken',
|
107 |
+
'accept_partial_authorization' => 'getAcceptPartialAuthorization',
|
108 |
+
'buyer_email_address' => 'getBuyerEmailAddress',
|
109 |
+
'billing_address' => 'getBillingAddress',
|
110 |
+
'shipping_address' => 'getShippingAddress',
|
111 |
+
'note' => 'getNote'
|
112 |
+
);
|
113 |
+
|
114 |
+
/**
|
115 |
+
* $source_id The ID for the source of funds for this payment. This can be a nonce generated by the Payment Form or a card on file made with the Customers API.
|
116 |
+
* @var string
|
117 |
+
*/
|
118 |
+
protected $source_id;
|
119 |
+
/**
|
120 |
+
* $idempotency_key A unique string that identifies this CreatePayment request. Keys can be any valid string but must be unique for every CreatePayment request. Max: 45 characters See [Idempotency keys](/basics/api101/idempotency) for more information.
|
121 |
+
* @var string
|
122 |
+
*/
|
123 |
+
protected $idempotency_key;
|
124 |
+
/**
|
125 |
+
* $amount_money The amount of money to accept for this payment, not including `tip_money`. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment.
|
126 |
+
* @var \SquareConnect\Model\Money
|
127 |
+
*/
|
128 |
+
protected $amount_money;
|
129 |
+
/**
|
130 |
+
* $tip_money The amount designated as a tip, in addition to `amount_money` Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment.
|
131 |
+
* @var \SquareConnect\Model\Money
|
132 |
+
*/
|
133 |
+
protected $tip_money;
|
134 |
+
/**
|
135 |
+
* $app_fee_money The amount of money the developer is taking as a fee for facilitating the payment on behalf of the seller. Cannot be more than 90% of the total amount of the Payment. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment. For more information about the application fee scenario, see [Collect Fees](/payments-api/take-payments-and-collect-fees).
|
136 |
+
* @var \SquareConnect\Model\Money
|
137 |
+
*/
|
138 |
+
protected $app_fee_money;
|
139 |
+
/**
|
140 |
+
* $autocomplete If set to `true`, this payment will be completed when possible. If set to `false`, this payment will be held in an approved state until either explicitly completed or canceled. For more information, see [Delayed Payments](/payments-api/take-payments#delayed-payments). Default: true
|
141 |
+
* @var bool
|
142 |
+
*/
|
143 |
+
protected $autocomplete;
|
144 |
+
/**
|
145 |
+
* $order_id Associate a previously created order with this payment
|
146 |
+
* @var string
|
147 |
+
*/
|
148 |
+
protected $order_id;
|
149 |
+
/**
|
150 |
+
* $customer_id The ID of the customer associated with the payment. Required if the `source_id` refers to a card on file created using the Customers API.
|
151 |
+
* @var string
|
152 |
+
*/
|
153 |
+
protected $customer_id;
|
154 |
+
/**
|
155 |
+
* $location_id The location ID to associate with the payment. If not specified, the default location is used.
|
156 |
+
* @var string
|
157 |
+
*/
|
158 |
+
protected $location_id;
|
159 |
+
/**
|
160 |
+
* $reference_id A user-defined ID to associate with the payment. You can use this field to associate the payment to an entity in an external system. For example, you might specify an order ID that is generated by a third-party shopping cart. Limit 40 characters.
|
161 |
+
* @var string
|
162 |
+
*/
|
163 |
+
protected $reference_id;
|
164 |
+
/**
|
165 |
+
* $verification_token An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. See the [SCA Overview](/sca-overview) for more.
|
166 |
+
* @var string
|
167 |
+
*/
|
168 |
+
protected $verification_token;
|
169 |
+
/**
|
170 |
+
* $accept_partial_authorization If set to true and charging a Square Gift Card, a payment may be returned with amount_money equal to less than what was requested. Example, a request for $20 when charging a Square Gift Card with balance of $5 wil result in an APPROVED payment of $5. You may choose to prompt the buyer for an additional payment to cover the remainder, or cancel the gift card payment. Cannot be `true` when `autocomplete = true For more information, see [Partial amount with Square gift cards](/payments-api/take-payments#partial-payment-gift-card). Default: false
|
171 |
+
* @var bool
|
172 |
+
*/
|
173 |
+
protected $accept_partial_authorization;
|
174 |
+
/**
|
175 |
+
* $buyer_email_address The buyer's e-mail address
|
176 |
+
* @var string
|
177 |
+
*/
|
178 |
+
protected $buyer_email_address;
|
179 |
+
/**
|
180 |
+
* $billing_address The buyer's billing address.
|
181 |
+
* @var \SquareConnect\Model\Address
|
182 |
+
*/
|
183 |
+
protected $billing_address;
|
184 |
+
/**
|
185 |
+
* $shipping_address The buyer's shipping address.
|
186 |
+
* @var \SquareConnect\Model\Address
|
187 |
+
*/
|
188 |
+
protected $shipping_address;
|
189 |
+
/**
|
190 |
+
* $note An optional note to be entered by the developer when creating a payment Limit 500 characters.
|
191 |
+
* @var string
|
192 |
+
*/
|
193 |
+
protected $note;
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Constructor
|
197 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
198 |
+
*/
|
199 |
+
public function __construct(array $data = null)
|
200 |
+
{
|
201 |
+
if ($data != null) {
|
202 |
+
if (isset($data["source_id"])) {
|
203 |
+
$this->source_id = $data["source_id"];
|
204 |
+
} else {
|
205 |
+
$this->source_id = null;
|
206 |
+
}
|
207 |
+
if (isset($data["idempotency_key"])) {
|
208 |
+
$this->idempotency_key = $data["idempotency_key"];
|
209 |
+
} else {
|
210 |
+
$this->idempotency_key = null;
|
211 |
+
}
|
212 |
+
if (isset($data["amount_money"])) {
|
213 |
+
$this->amount_money = $data["amount_money"];
|
214 |
+
} else {
|
215 |
+
$this->amount_money = null;
|
216 |
+
}
|
217 |
+
if (isset($data["tip_money"])) {
|
218 |
+
$this->tip_money = $data["tip_money"];
|
219 |
+
} else {
|
220 |
+
$this->tip_money = null;
|
221 |
+
}
|
222 |
+
if (isset($data["app_fee_money"])) {
|
223 |
+
$this->app_fee_money = $data["app_fee_money"];
|
224 |
+
} else {
|
225 |
+
$this->app_fee_money = null;
|
226 |
+
}
|
227 |
+
if (isset($data["autocomplete"])) {
|
228 |
+
$this->autocomplete = $data["autocomplete"];
|
229 |
+
} else {
|
230 |
+
$this->autocomplete = null;
|
231 |
+
}
|
232 |
+
if (isset($data["order_id"])) {
|
233 |
+
$this->order_id = $data["order_id"];
|
234 |
+
} else {
|
235 |
+
$this->order_id = null;
|
236 |
+
}
|
237 |
+
if (isset($data["customer_id"])) {
|
238 |
+
$this->customer_id = $data["customer_id"];
|
239 |
+
} else {
|
240 |
+
$this->customer_id = null;
|
241 |
+
}
|
242 |
+
if (isset($data["location_id"])) {
|
243 |
+
$this->location_id = $data["location_id"];
|
244 |
+
} else {
|
245 |
+
$this->location_id = null;
|
246 |
+
}
|
247 |
+
if (isset($data["reference_id"])) {
|
248 |
+
$this->reference_id = $data["reference_id"];
|
249 |
+
} else {
|
250 |
+
$this->reference_id = null;
|
251 |
+
}
|
252 |
+
if (isset($data["verification_token"])) {
|
253 |
+
$this->verification_token = $data["verification_token"];
|
254 |
+
} else {
|
255 |
+
$this->verification_token = null;
|
256 |
+
}
|
257 |
+
if (isset($data["accept_partial_authorization"])) {
|
258 |
+
$this->accept_partial_authorization = $data["accept_partial_authorization"];
|
259 |
+
} else {
|
260 |
+
$this->accept_partial_authorization = null;
|
261 |
+
}
|
262 |
+
if (isset($data["buyer_email_address"])) {
|
263 |
+
$this->buyer_email_address = $data["buyer_email_address"];
|
264 |
+
} else {
|
265 |
+
$this->buyer_email_address = null;
|
266 |
+
}
|
267 |
+
if (isset($data["billing_address"])) {
|
268 |
+
$this->billing_address = $data["billing_address"];
|
269 |
+
} else {
|
270 |
+
$this->billing_address = null;
|
271 |
+
}
|
272 |
+
if (isset($data["shipping_address"])) {
|
273 |
+
$this->shipping_address = $data["shipping_address"];
|
274 |
+
} else {
|
275 |
+
$this->shipping_address = null;
|
276 |
+
}
|
277 |
+
if (isset($data["note"])) {
|
278 |
+
$this->note = $data["note"];
|
279 |
+
} else {
|
280 |
+
$this->note = null;
|
281 |
+
}
|
282 |
+
}
|
283 |
+
}
|
284 |
+
/**
|
285 |
+
* Gets source_id
|
286 |
+
* @return string
|
287 |
+
*/
|
288 |
+
public function getSourceId()
|
289 |
+
{
|
290 |
+
return $this->source_id;
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Sets source_id
|
295 |
+
* @param string $source_id The ID for the source of funds for this payment. This can be a nonce generated by the Payment Form or a card on file made with the Customers API.
|
296 |
+
* @return $this
|
297 |
+
*/
|
298 |
+
public function setSourceId($source_id)
|
299 |
+
{
|
300 |
+
$this->source_id = $source_id;
|
301 |
+
return $this;
|
302 |
+
}
|
303 |
+
/**
|
304 |
+
* Gets idempotency_key
|
305 |
+
* @return string
|
306 |
+
*/
|
307 |
+
public function getIdempotencyKey()
|
308 |
+
{
|
309 |
+
return $this->idempotency_key;
|
310 |
+
}
|
311 |
+
|
312 |
+
/**
|
313 |
+
* Sets idempotency_key
|
314 |
+
* @param string $idempotency_key A unique string that identifies this CreatePayment request. Keys can be any valid string but must be unique for every CreatePayment request. Max: 45 characters See [Idempotency keys](/basics/api101/idempotency) for more information.
|
315 |
+
* @return $this
|
316 |
+
*/
|
317 |
+
public function setIdempotencyKey($idempotency_key)
|
318 |
+
{
|
319 |
+
$this->idempotency_key = $idempotency_key;
|
320 |
+
return $this;
|
321 |
+
}
|
322 |
+
/**
|
323 |
+
* Gets amount_money
|
324 |
+
* @return \SquareConnect\Model\Money
|
325 |
+
*/
|
326 |
+
public function getAmountMoney()
|
327 |
+
{
|
328 |
+
return $this->amount_money;
|
329 |
+
}
|
330 |
+
|
331 |
+
/**
|
332 |
+
* Sets amount_money
|
333 |
+
* @param \SquareConnect\Model\Money $amount_money The amount of money to accept for this payment, not including `tip_money`. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment.
|
334 |
+
* @return $this
|
335 |
+
*/
|
336 |
+
public function setAmountMoney($amount_money)
|
337 |
+
{
|
338 |
+
$this->amount_money = $amount_money;
|
339 |
+
return $this;
|
340 |
+
}
|
341 |
+
/**
|
342 |
+
* Gets tip_money
|
343 |
+
* @return \SquareConnect\Model\Money
|
344 |
+
*/
|
345 |
+
public function getTipMoney()
|
346 |
+
{
|
347 |
+
return $this->tip_money;
|
348 |
+
}
|
349 |
+
|
350 |
+
/**
|
351 |
+
* Sets tip_money
|
352 |
+
* @param \SquareConnect\Model\Money $tip_money The amount designated as a tip, in addition to `amount_money` Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment.
|
353 |
+
* @return $this
|
354 |
+
*/
|
355 |
+
public function setTipMoney($tip_money)
|
356 |
+
{
|
357 |
+
$this->tip_money = $tip_money;
|
358 |
+
return $this;
|
359 |
+
}
|
360 |
+
/**
|
361 |
+
* Gets app_fee_money
|
362 |
+
* @return \SquareConnect\Model\Money
|
363 |
+
*/
|
364 |
+
public function getAppFeeMoney()
|
365 |
+
{
|
366 |
+
return $this->app_fee_money;
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Sets app_fee_money
|
371 |
+
* @param \SquareConnect\Model\Money $app_fee_money The amount of money the developer is taking as a fee for facilitating the payment on behalf of the seller. Cannot be more than 90% of the total amount of the Payment. Must be specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](/build-basics/working-with-monetary-amounts) for details. The currency code must match the currency associated with the business that is accepting the payment. For more information about the application fee scenario, see [Collect Fees](/payments-api/take-payments-and-collect-fees).
|
372 |
+
* @return $this
|
373 |
+
*/
|
374 |
+
public function setAppFeeMoney($app_fee_money)
|
375 |
+
{
|
376 |
+
$this->app_fee_money = $app_fee_money;
|
377 |
+
return $this;
|
378 |
+
}
|
379 |
+
/**
|
380 |
+
* Gets autocomplete
|
381 |
+
* @return bool
|
382 |
+
*/
|
383 |
+
public function getAutocomplete()
|
384 |
+
{
|
385 |
+
return $this->autocomplete;
|
386 |
+
}
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Sets autocomplete
|
390 |
+
* @param bool $autocomplete If set to `true`, this payment will be completed when possible. If set to `false`, this payment will be held in an approved state until either explicitly completed or canceled. For more information, see [Delayed Payments](/payments-api/take-payments#delayed-payments). Default: true
|
391 |
+
* @return $this
|
392 |
+
*/
|
393 |
+
public function setAutocomplete($autocomplete)
|
394 |
+
{
|
395 |
+
$this->autocomplete = $autocomplete;
|
396 |
+
return $this;
|
397 |
+
}
|
398 |
+
/**
|
399 |
+
* Gets order_id
|
400 |
+
* @return string
|
401 |
+
*/
|
402 |
+
public function getOrderId()
|
403 |
+
{
|
404 |
+
return $this->order_id;
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Sets order_id
|
409 |
+
* @param string $order_id Associate a previously created order with this payment
|
410 |
+
* @return $this
|
411 |
+
*/
|
412 |
+
public function setOrderId($order_id)
|
413 |
+
{
|
414 |
+
$this->order_id = $order_id;
|
415 |
+
return $this;
|
416 |
+
}
|
417 |
+
/**
|
418 |
+
* Gets customer_id
|
419 |
+
* @return string
|
420 |
+
*/
|
421 |
+
public function getCustomerId()
|
422 |
+
{
|
423 |
+
return $this->customer_id;
|
424 |
+
}
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Sets customer_id
|
428 |
+
* @param string $customer_id The ID of the customer associated with the payment. Required if the `source_id` refers to a card on file created using the Customers API.
|
429 |
+
* @return $this
|
430 |
+
*/
|
431 |
+
public function setCustomerId($customer_id)
|
432 |
+
{
|
433 |
+
$this->customer_id = $customer_id;
|
434 |
+
return $this;
|
435 |
+
}
|
436 |
+
/**
|
437 |
+
* Gets location_id
|
438 |
+
* @return string
|
439 |
+
*/
|
440 |
+
public function getLocationId()
|
441 |
+
{
|
442 |
+
return $this->location_id;
|
443 |
+
}
|
444 |
+
|
445 |
+
/**
|
446 |
+
* Sets location_id
|
447 |
+
* @param string $location_id The location ID to associate with the payment. If not specified, the default location is used.
|
448 |
+
* @return $this
|
449 |
+
*/
|
450 |
+
public function setLocationId($location_id)
|
451 |
+
{
|
452 |
+
$this->location_id = $location_id;
|
453 |
+
return $this;
|
454 |
+
}
|
455 |
+
/**
|
456 |
+
* Gets reference_id
|
457 |
+
* @return string
|
458 |
+
*/
|
459 |
+
public function getReferenceId()
|
460 |
+
{
|
461 |
+
return $this->reference_id;
|
462 |
+
}
|
463 |
+
|
464 |
+
/**
|
465 |
+
* Sets reference_id
|
466 |
+
* @param string $reference_id A user-defined ID to associate with the payment. You can use this field to associate the payment to an entity in an external system. For example, you might specify an order ID that is generated by a third-party shopping cart. Limit 40 characters.
|
467 |
+
* @return $this
|
468 |
+
*/
|
469 |
+
public function setReferenceId($reference_id)
|
470 |
+
{
|
471 |
+
$this->reference_id = $reference_id;
|
472 |
+
return $this;
|
473 |
+
}
|
474 |
+
/**
|
475 |
+
* Gets verification_token
|
476 |
+
* @return string
|
477 |
+
*/
|
478 |
+
public function getVerificationToken()
|
479 |
+
{
|
480 |
+
return $this->verification_token;
|
481 |
+
}
|
482 |
+
|
483 |
+
/**
|
484 |
+
* Sets verification_token
|
485 |
+
* @param string $verification_token An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. See the [SCA Overview](/sca-overview) for more.
|
486 |
+
* @return $this
|
487 |
+
*/
|
488 |
+
public function setVerificationToken($verification_token)
|
489 |
+
{
|
490 |
+
$this->verification_token = $verification_token;
|
491 |
+
return $this;
|
492 |
+
}
|
493 |
+
/**
|
494 |
+
* Gets accept_partial_authorization
|
495 |
+
* @return bool
|
496 |
+
*/
|
497 |
+
public function getAcceptPartialAuthorization()
|
498 |
+
{
|
499 |
+
return $this->accept_partial_authorization;
|
500 |
+
}
|
501 |
+
|
502 |
+
/**
|
503 |
+
* Sets accept_partial_authorization
|
504 |
+
* @param bool $accept_partial_authorization If set to true and charging a Square Gift Card, a payment may be returned with amount_money equal to less than what was requested. Example, a request for $20 when charging a Square Gift Card with balance of $5 wil result in an APPROVED payment of $5. You may choose to prompt the buyer for an additional payment to cover the remainder, or cancel the gift card payment. Cannot be `true` when `autocomplete = true For more information, see [Partial amount with Square gift cards](/payments-api/take-payments#partial-payment-gift-card). Default: false
|
505 |
+
* @return $this
|
506 |
+
*/
|
507 |
+
public function setAcceptPartialAuthorization($accept_partial_authorization)
|
508 |
+
{
|
509 |
+
$this->accept_partial_authorization = $accept_partial_authorization;
|
510 |
+
return $this;
|
511 |
+
}
|
512 |
+
/**
|
513 |
+
* Gets buyer_email_address
|
514 |
+
* @return string
|
515 |
+
*/
|
516 |
+
public function getBuyerEmailAddress()
|
517 |
+
{
|
518 |
+
return $this->buyer_email_address;
|
519 |
+
}
|
520 |
+
|
521 |
+
/**
|
522 |
+
* Sets buyer_email_address
|
523 |
+
* @param string $buyer_email_address The buyer's e-mail address
|
524 |
+
* @return $this
|
525 |
+
*/
|
526 |
+
public function setBuyerEmailAddress($buyer_email_address)
|
527 |
+
{
|
528 |
+
$this->buyer_email_address = $buyer_email_address;
|
529 |
+
return $this;
|
530 |
+
}
|
531 |
+
/**
|
532 |
+
* Gets billing_address
|
533 |
+
* @return \SquareConnect\Model\Address
|
534 |
+
*/
|
535 |
+
public function getBillingAddress()
|
536 |
+
{
|
537 |
+
return $this->billing_address;
|
538 |
+
}
|
539 |
+
|
540 |
+
/**
|
541 |
+
* Sets billing_address
|
542 |
+
* @param \SquareConnect\Model\Address $billing_address The buyer's billing address.
|
543 |
+
* @return $this
|
544 |
+
*/
|
545 |
+
public function setBillingAddress($billing_address)
|
546 |
+
{
|
547 |
+
$this->billing_address = $billing_address;
|
548 |
+
return $this;
|
549 |
+
}
|
550 |
+
/**
|
551 |
+
* Gets shipping_address
|
552 |
+
* @return \SquareConnect\Model\Address
|
553 |
+
*/
|
554 |
+
public function getShippingAddress()
|
555 |
+
{
|
556 |
+
return $this->shipping_address;
|
557 |
+
}
|
558 |
+
|
559 |
+
/**
|
560 |
+
* Sets shipping_address
|
561 |
+
* @param \SquareConnect\Model\Address $shipping_address The buyer's shipping address.
|
562 |
+
* @return $this
|
563 |
+
*/
|
564 |
+
public function setShippingAddress($shipping_address)
|
565 |
+
{
|
566 |
+
$this->shipping_address = $shipping_address;
|
567 |
+
return $this;
|
568 |
+
}
|
569 |
+
/**
|
570 |
+
* Gets note
|
571 |
+
* @return string
|
572 |
+
*/
|
573 |
+
public function getNote()
|
574 |
+
{
|
575 |
+
return $this->note;
|
576 |
+
}
|
577 |
+
|
578 |
+
/**
|
579 |
+
* Sets note
|
580 |
+
* @param string $note An optional note to be entered by the developer when creating a payment Limit 500 characters.
|
581 |
+
* @return $this
|
582 |
+
*/
|
583 |
+
public function setNote($note)
|
584 |
+
{
|
585 |
+
$this->note = $note;
|
586 |
+
return $this;
|
587 |
+
}
|
588 |
+
/**
|
589 |
+
* Returns true if offset exists. False otherwise.
|
590 |
+
* @param integer $offset Offset
|
591 |
+
* @return boolean
|
592 |
+
*/
|
593 |
+
public function offsetExists($offset)
|
594 |
+
{
|
595 |
+
return isset($this->$offset);
|
596 |
+
}
|
597 |
+
|
598 |
+
/**
|
599 |
+
* Gets offset.
|
600 |
+
* @param integer $offset Offset
|
601 |
+
* @return mixed
|
602 |
+
*/
|
603 |
+
public function offsetGet($offset)
|
604 |
+
{
|
605 |
+
return $this->$offset;
|
606 |
+
}
|
607 |
+
|
608 |
+
/**
|
609 |
+
* Sets value based on offset.
|
610 |
+
* @param integer $offset Offset
|
611 |
+
* @param mixed $value Value to be set
|
612 |
+
* @return void
|
613 |
+
*/
|
614 |
+
public function offsetSet($offset, $value)
|
615 |
+
{
|
616 |
+
$this->$offset = $value;
|
617 |
+
}
|
618 |
+
|
619 |
+
/**
|
620 |
+
* Unsets offset.
|
621 |
+
* @param integer $offset Offset
|
622 |
+
* @return void
|
623 |
+
*/
|
624 |
+
public function offsetUnset($offset)
|
625 |
+
{
|
626 |
+
unset($this->$offset);
|
627 |
+
}
|
628 |
+
|
629 |
+
/**
|
630 |
+
* Gets the string presentation of the object
|
631 |
+
* @return string
|
632 |
+
*/
|
633 |
+
public function __toString()
|
634 |
+
{
|
635 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
636 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
637 |
+
} else {
|
638 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
639 |
+
}
|
640 |
+
}
|
641 |
+
}
|
vendor/square/connect/lib/Model/CreatePaymentResponse.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* CreatePaymentResponse Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class CreatePaymentResponse implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'errors' => '\SquareConnect\Model\Error[]',
|
28 |
+
'payment' => '\SquareConnect\Model\Payment'
|
29 |
+
);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
33 |
+
* @var string[]
|
34 |
+
*/
|
35 |
+
static $attributeMap = array(
|
36 |
+
'errors' => 'errors',
|
37 |
+
'payment' => 'payment'
|
38 |
+
);
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
42 |
+
* @var string[]
|
43 |
+
*/
|
44 |
+
static $setters = array(
|
45 |
+
'errors' => 'setErrors',
|
46 |
+
'payment' => 'setPayment'
|
47 |
+
);
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of attributes to getter functions (for serialization of requests)
|
51 |
+
* @var string[]
|
52 |
+
*/
|
53 |
+
static $getters = array(
|
54 |
+
'errors' => 'getErrors',
|
55 |
+
'payment' => 'getPayment'
|
56 |
+
);
|
57 |
+
|
58 |
+
/**
|
59 |
+
* $errors Information on errors encountered during the request.
|
60 |
+
* @var \SquareConnect\Model\Error[]
|
61 |
+
*/
|
62 |
+
protected $errors;
|
63 |
+
/**
|
64 |
+
* $payment The newly created payment.
|
65 |
+
* @var \SquareConnect\Model\Payment
|
66 |
+
*/
|
67 |
+
protected $payment;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Constructor
|
71 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
72 |
+
*/
|
73 |
+
public function __construct(array $data = null)
|
74 |
+
{
|
75 |
+
if ($data != null) {
|
76 |
+
if (isset($data["errors"])) {
|
77 |
+
$this->errors = $data["errors"];
|
78 |
+
} else {
|
79 |
+
$this->errors = null;
|
80 |
+
}
|
81 |
+
if (isset($data["payment"])) {
|
82 |
+
$this->payment = $data["payment"];
|
83 |
+
} else {
|
84 |
+
$this->payment = null;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Gets errors
|
90 |
+
* @return \SquareConnect\Model\Error[]
|
91 |
+
*/
|
92 |
+
public function getErrors()
|
93 |
+
{
|
94 |
+
return $this->errors;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Sets errors
|
99 |
+
* @param \SquareConnect\Model\Error[] $errors Information on errors encountered during the request.
|
100 |
+
* @return $this
|
101 |
+
*/
|
102 |
+
public function setErrors($errors)
|
103 |
+
{
|
104 |
+
$this->errors = $errors;
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
/**
|
108 |
+
* Gets payment
|
109 |
+
* @return \SquareConnect\Model\Payment
|
110 |
+
*/
|
111 |
+
public function getPayment()
|
112 |
+
{
|
113 |
+
return $this->payment;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Sets payment
|
118 |
+
* @param \SquareConnect\Model\Payment $payment The newly created payment.
|
119 |
+
* @return $this
|
120 |
+
*/
|
121 |
+
public function setPayment($payment)
|
122 |
+
{
|
123 |
+
$this->payment = $payment;
|
124 |
+
return $this;
|
125 |
+
}
|
126 |
+
/**
|
127 |
+
* Returns true if offset exists. False otherwise.
|
128 |
+
* @param integer $offset Offset
|
129 |
+
* @return boolean
|
130 |
+
*/
|
131 |
+
public function offsetExists($offset)
|
132 |
+
{
|
133 |
+
return isset($this->$offset);
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Gets offset.
|
138 |
+
* @param integer $offset Offset
|
139 |
+
* @return mixed
|
140 |
+
*/
|
141 |
+
public function offsetGet($offset)
|
142 |
+
{
|
143 |
+
return $this->$offset;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Sets value based on offset.
|
148 |
+
* @param integer $offset Offset
|
149 |
+
* @param mixed $value Value to be set
|
150 |
+
* @return void
|
151 |
+
*/
|
152 |
+
public function offsetSet($offset, $value)
|
153 |
+
{
|
154 |
+
$this->$offset = $value;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Unsets offset.
|
159 |
+
* @param integer $offset Offset
|
160 |
+
* @return void
|
161 |
+
*/
|
162 |
+
public function offsetUnset($offset)
|
163 |
+
{
|
164 |
+
unset($this->$offset);
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Gets the string presentation of the object
|
169 |
+
* @return string
|
170 |
+
*/
|
171 |
+
public function __toString()
|
172 |
+
{
|
173 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
174 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
175 |
+
} else {
|
176 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
vendor/square/connect/lib/Model/Error.php
CHANGED
@@ -64,12 +64,12 @@ class Error implements ArrayAccess
|
|
64 |
);
|
65 |
|
66 |
/**
|
67 |
-
* $category The
|
68 |
* @var string
|
69 |
*/
|
70 |
protected $category;
|
71 |
/**
|
72 |
-
* $code The
|
73 |
* @var string
|
74 |
*/
|
75 |
protected $code;
|
@@ -79,7 +79,7 @@ class Error implements ArrayAccess
|
|
79 |
*/
|
80 |
protected $detail;
|
81 |
/**
|
82 |
-
* $field The name of the field provided in the original request that the error pertains to
|
83 |
* @var string
|
84 |
*/
|
85 |
protected $field;
|
@@ -124,7 +124,7 @@ class Error implements ArrayAccess
|
|
124 |
|
125 |
/**
|
126 |
* Sets category
|
127 |
-
* @param string $category The
|
128 |
* @return $this
|
129 |
*/
|
130 |
public function setCategory($category)
|
@@ -143,7 +143,7 @@ class Error implements ArrayAccess
|
|
143 |
|
144 |
/**
|
145 |
* Sets code
|
146 |
-
* @param string $code The
|
147 |
* @return $this
|
148 |
*/
|
149 |
public function setCode($code)
|
@@ -181,7 +181,7 @@ class Error implements ArrayAccess
|
|
181 |
|
182 |
/**
|
183 |
* Sets field
|
184 |
-
* @param string $field The name of the field provided in the original request that the error pertains to
|
185 |
* @return $this
|
186 |
*/
|
187 |
public function setField($field)
|
64 |
);
|
65 |
|
66 |
/**
|
67 |
+
* $category The high-level category for the error. See [ErrorCategory](#type-errorcategory) See [ErrorCategory](#type-errorcategory) for possible values
|
68 |
* @var string
|
69 |
*/
|
70 |
protected $category;
|
71 |
/**
|
72 |
+
* $code The specific code of the error. See [ErrorCode](#type-errorcode) for possible See [ErrorCode](#type-errorcode) for possible values
|
73 |
* @var string
|
74 |
*/
|
75 |
protected $code;
|
79 |
*/
|
80 |
protected $detail;
|
81 |
/**
|
82 |
+
* $field The name of the field provided in the original request (if any) that the error pertains to.
|
83 |
* @var string
|
84 |
*/
|
85 |
protected $field;
|
124 |
|
125 |
/**
|
126 |
* Sets category
|
127 |
+
* @param string $category The high-level category for the error. See [ErrorCategory](#type-errorcategory) See [ErrorCategory](#type-errorcategory) for possible values
|
128 |
* @return $this
|
129 |
*/
|
130 |
public function setCategory($category)
|
143 |
|
144 |
/**
|
145 |
* Sets code
|
146 |
+
* @param string $code The specific code of the error. See [ErrorCode](#type-errorcode) for possible See [ErrorCode](#type-errorcode) for possible values
|
147 |
* @return $this
|
148 |
*/
|
149 |
public function setCode($code)
|
181 |
|
182 |
/**
|
183 |
* Sets field
|
184 |
+
* @param string $field The name of the field provided in the original request (if any) that the error pertains to.
|
185 |
* @return $this
|
186 |
*/
|
187 |
public function setField($field)
|
vendor/square/connect/lib/Model/GetPaymentRefundRequest.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* GetPaymentRefundRequest Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class GetPaymentRefundRequest implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
|
52 |
+
);
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Constructor
|
57 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
58 |
+
*/
|
59 |
+
public function __construct(array $data = null)
|
60 |
+
{
|
61 |
+
if ($data != null) {
|
62 |
+
}
|
63 |
+
}
|
64 |
+
/**
|
65 |
+
* Returns true if offset exists. False otherwise.
|
66 |
+
* @param integer $offset Offset
|
67 |
+
* @return boolean
|
68 |
+
*/
|
69 |
+
public function offsetExists($offset)
|
70 |
+
{
|
71 |
+
return isset($this->$offset);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Gets offset.
|
76 |
+
* @param integer $offset Offset
|
77 |
+
* @return mixed
|
78 |
+
*/
|
79 |
+
public function offsetGet($offset)
|
80 |
+
{
|
81 |
+
return $this->$offset;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Sets value based on offset.
|
86 |
+
* @param integer $offset Offset
|
87 |
+
* @param mixed $value Value to be set
|
88 |
+
* @return void
|
89 |
+
*/
|
90 |
+
public function offsetSet($offset, $value)
|
91 |
+
{
|
92 |
+
$this->$offset = $value;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Unsets offset.
|
97 |
+
* @param integer $offset Offset
|
98 |
+
* @return void
|
99 |
+
*/
|
100 |
+
public function offsetUnset($offset)
|
101 |
+
{
|
102 |
+
unset($this->$offset);
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Gets the string presentation of the object
|
107 |
+
* @return string
|
108 |
+
*/
|
109 |
+
public function __toString()
|
110 |
+
{
|
111 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
112 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
113 |
+
} else {
|
114 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
vendor/square/connect/lib/Model/GetPaymentRefundResponse.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* GetPaymentRefundResponse Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class GetPaymentRefundResponse implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'errors' => '\SquareConnect\Model\Error[]',
|
28 |
+
'refund' => '\SquareConnect\Model\PaymentRefund'
|
29 |
+
);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
33 |
+
* @var string[]
|
34 |
+
*/
|
35 |
+
static $attributeMap = array(
|
36 |
+
'errors' => 'errors',
|
37 |
+
'refund' => 'refund'
|
38 |
+
);
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
42 |
+
* @var string[]
|
43 |
+
*/
|
44 |
+
static $setters = array(
|
45 |
+
'errors' => 'setErrors',
|
46 |
+
'refund' => 'setRefund'
|
47 |
+
);
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of attributes to getter functions (for serialization of requests)
|
51 |
+
* @var string[]
|
52 |
+
*/
|
53 |
+
static $getters = array(
|
54 |
+
'errors' => 'getErrors',
|
55 |
+
'refund' => 'getRefund'
|
56 |
+
);
|
57 |
+
|
58 |
+
/**
|
59 |
+
* $errors Information on errors encountered during the request.
|
60 |
+
* @var \SquareConnect\Model\Error[]
|
61 |
+
*/
|
62 |
+
protected $errors;
|
63 |
+
/**
|
64 |
+
* $refund The requested `PaymentRefund`.
|
65 |
+
* @var \SquareConnect\Model\PaymentRefund
|
66 |
+
*/
|
67 |
+
protected $refund;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Constructor
|
71 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
72 |
+
*/
|
73 |
+
public function __construct(array $data = null)
|
74 |
+
{
|
75 |
+
if ($data != null) {
|
76 |
+
if (isset($data["errors"])) {
|
77 |
+
$this->errors = $data["errors"];
|
78 |
+
} else {
|
79 |
+
$this->errors = null;
|
80 |
+
}
|
81 |
+
if (isset($data["refund"])) {
|
82 |
+
$this->refund = $data["refund"];
|
83 |
+
} else {
|
84 |
+
$this->refund = null;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Gets errors
|
90 |
+
* @return \SquareConnect\Model\Error[]
|
91 |
+
*/
|
92 |
+
public function getErrors()
|
93 |
+
{
|
94 |
+
return $this->errors;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Sets errors
|
99 |
+
* @param \SquareConnect\Model\Error[] $errors Information on errors encountered during the request.
|
100 |
+
* @return $this
|
101 |
+
*/
|
102 |
+
public function setErrors($errors)
|
103 |
+
{
|
104 |
+
$this->errors = $errors;
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
/**
|
108 |
+
* Gets refund
|
109 |
+
* @return \SquareConnect\Model\PaymentRefund
|
110 |
+
*/
|
111 |
+
public function getRefund()
|
112 |
+
{
|
113 |
+
return $this->refund;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Sets refund
|
118 |
+
* @param \SquareConnect\Model\PaymentRefund $refund The requested `PaymentRefund`.
|
119 |
+
* @return $this
|
120 |
+
*/
|
121 |
+
public function setRefund($refund)
|
122 |
+
{
|
123 |
+
$this->refund = $refund;
|
124 |
+
return $this;
|
125 |
+
}
|
126 |
+
/**
|
127 |
+
* Returns true if offset exists. False otherwise.
|
128 |
+
* @param integer $offset Offset
|
129 |
+
* @return boolean
|
130 |
+
*/
|
131 |
+
public function offsetExists($offset)
|
132 |
+
{
|
133 |
+
return isset($this->$offset);
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Gets offset.
|
138 |
+
* @param integer $offset Offset
|
139 |
+
* @return mixed
|
140 |
+
*/
|
141 |
+
public function offsetGet($offset)
|
142 |
+
{
|
143 |
+
return $this->$offset;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Sets value based on offset.
|
148 |
+
* @param integer $offset Offset
|
149 |
+
* @param mixed $value Value to be set
|
150 |
+
* @return void
|
151 |
+
*/
|
152 |
+
public function offsetSet($offset, $value)
|
153 |
+
{
|
154 |
+
$this->$offset = $value;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Unsets offset.
|
159 |
+
* @param integer $offset Offset
|
160 |
+
* @return void
|
161 |
+
*/
|
162 |
+
public function offsetUnset($offset)
|
163 |
+
{
|
164 |
+
unset($this->$offset);
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Gets the string presentation of the object
|
169 |
+
* @return string
|
170 |
+
*/
|
171 |
+
public function __toString()
|
172 |
+
{
|
173 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
174 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
175 |
+
} else {
|
176 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
vendor/square/connect/lib/Model/GetPaymentRequest.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* GetPaymentRequest Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class GetPaymentRequest implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
|
52 |
+
);
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Constructor
|
57 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
58 |
+
*/
|
59 |
+
public function __construct(array $data = null)
|
60 |
+
{
|
61 |
+
if ($data != null) {
|
62 |
+
}
|
63 |
+
}
|
64 |
+
/**
|
65 |
+
* Returns true if offset exists. False otherwise.
|
66 |
+
* @param integer $offset Offset
|
67 |
+
* @return boolean
|
68 |
+
*/
|
69 |
+
public function offsetExists($offset)
|
70 |
+
{
|
71 |
+
return isset($this->$offset);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Gets offset.
|
76 |
+
* @param integer $offset Offset
|
77 |
+
* @return mixed
|
78 |
+
*/
|
79 |
+
public function offsetGet($offset)
|
80 |
+
{
|
81 |
+
return $this->$offset;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Sets value based on offset.
|
86 |
+
* @param integer $offset Offset
|
87 |
+
* @param mixed $value Value to be set
|
88 |
+
* @return void
|
89 |
+
*/
|
90 |
+
public function offsetSet($offset, $value)
|
91 |
+
{
|
92 |
+
$this->$offset = $value;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Unsets offset.
|
97 |
+
* @param integer $offset Offset
|
98 |
+
* @return void
|
99 |
+
*/
|
100 |
+
public function offsetUnset($offset)
|
101 |
+
{
|
102 |
+
unset($this->$offset);
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Gets the string presentation of the object
|
107 |
+
* @return string
|
108 |
+
*/
|
109 |
+
public function __toString()
|
110 |
+
{
|
111 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
112 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
113 |
+
} else {
|
114 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
vendor/square/connect/lib/Model/GetPaymentResponse.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* GetPaymentResponse Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class GetPaymentResponse implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'errors' => '\SquareConnect\Model\Error[]',
|
28 |
+
'payment' => '\SquareConnect\Model\Payment'
|
29 |
+
);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
33 |
+
* @var string[]
|
34 |
+
*/
|
35 |
+
static $attributeMap = array(
|
36 |
+
'errors' => 'errors',
|
37 |
+
'payment' => 'payment'
|
38 |
+
);
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
42 |
+
* @var string[]
|
43 |
+
*/
|
44 |
+
static $setters = array(
|
45 |
+
'errors' => 'setErrors',
|
46 |
+
'payment' => 'setPayment'
|
47 |
+
);
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Array of attributes to getter functions (for serialization of requests)
|
51 |
+
* @var string[]
|
52 |
+
*/
|
53 |
+
static $getters = array(
|
54 |
+
'errors' => 'getErrors',
|
55 |
+
'payment' => 'getPayment'
|
56 |
+
);
|
57 |
+
|
58 |
+
/**
|
59 |
+
* $errors Information on errors encountered during the request.
|
60 |
+
* @var \SquareConnect\Model\Error[]
|
61 |
+
*/
|
62 |
+
protected $errors;
|
63 |
+
/**
|
64 |
+
* $payment The requested `Payment`.
|
65 |
+
* @var \SquareConnect\Model\Payment
|
66 |
+
*/
|
67 |
+
protected $payment;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Constructor
|
71 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
72 |
+
*/
|
73 |
+
public function __construct(array $data = null)
|
74 |
+
{
|
75 |
+
if ($data != null) {
|
76 |
+
if (isset($data["errors"])) {
|
77 |
+
$this->errors = $data["errors"];
|
78 |
+
} else {
|
79 |
+
$this->errors = null;
|
80 |
+
}
|
81 |
+
if (isset($data["payment"])) {
|
82 |
+
$this->payment = $data["payment"];
|
83 |
+
} else {
|
84 |
+
$this->payment = null;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Gets errors
|
90 |
+
* @return \SquareConnect\Model\Error[]
|
91 |
+
*/
|
92 |
+
public function getErrors()
|
93 |
+
{
|
94 |
+
return $this->errors;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Sets errors
|
99 |
+
* @param \SquareConnect\Model\Error[] $errors Information on errors encountered during the request.
|
100 |
+
* @return $this
|
101 |
+
*/
|
102 |
+
public function setErrors($errors)
|
103 |
+
{
|
104 |
+
$this->errors = $errors;
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
/**
|
108 |
+
* Gets payment
|
109 |
+
* @return \SquareConnect\Model\Payment
|
110 |
+
*/
|
111 |
+
public function getPayment()
|
112 |
+
{
|
113 |
+
return $this->payment;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Sets payment
|
118 |
+
* @param \SquareConnect\Model\Payment $payment The requested `Payment`.
|
119 |
+
* @return $this
|
120 |
+
*/
|
121 |
+
public function setPayment($payment)
|
122 |
+
{
|
123 |
+
$this->payment = $payment;
|
124 |
+
return $this;
|
125 |
+
}
|
126 |
+
/**
|
127 |
+
* Returns true if offset exists. False otherwise.
|
128 |
+
* @param integer $offset Offset
|
129 |
+
* @return boolean
|
130 |
+
*/
|
131 |
+
public function offsetExists($offset)
|
132 |
+
{
|
133 |
+
return isset($this->$offset);
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Gets offset.
|
138 |
+
* @param integer $offset Offset
|
139 |
+
* @return mixed
|
140 |
+
*/
|
141 |
+
public function offsetGet($offset)
|
142 |
+
{
|
143 |
+
return $this->$offset;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Sets value based on offset.
|
148 |
+
* @param integer $offset Offset
|
149 |
+
* @param mixed $value Value to be set
|
150 |
+
* @return void
|
151 |
+
*/
|
152 |
+
public function offsetSet($offset, $value)
|
153 |
+
{
|
154 |
+
$this->$offset = $value;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Unsets offset.
|
159 |
+
* @param integer $offset Offset
|
160 |
+
* @return void
|
161 |
+
*/
|
162 |
+
public function offsetUnset($offset)
|
163 |
+
{
|
164 |
+
unset($this->$offset);
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Gets the string presentation of the object
|
169 |
+
* @return string
|
170 |
+
*/
|
171 |
+
public function __toString()
|
172 |
+
{
|
173 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
174 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
175 |
+
} else {
|
176 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
vendor/square/connect/lib/Model/InventoryAdjustment.php
CHANGED
@@ -151,7 +151,7 @@ class InventoryAdjustment implements ArrayAccess
|
|
151 |
*/
|
152 |
protected $catalog_object_type;
|
153 |
/**
|
154 |
-
* $quantity The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`.
|
155 |
* @var string
|
156 |
*/
|
157 |
protected $quantity;
|
@@ -439,7 +439,7 @@ class InventoryAdjustment implements ArrayAccess
|
|
439 |
|
440 |
/**
|
441 |
* Sets quantity
|
442 |
-
* @param string $quantity The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`.
|
443 |
* @return $this
|
444 |
*/
|
445 |
public function setQuantity($quantity)
|
151 |
*/
|
152 |
protected $catalog_object_type;
|
153 |
/**
|
154 |
+
* $quantity The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information.
|
155 |
* @var string
|
156 |
*/
|
157 |
protected $quantity;
|
439 |
|
440 |
/**
|
441 |
* Sets quantity
|
442 |
+
* @param string $quantity The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information.
|
443 |
* @return $this
|
444 |
*/
|
445 |
public function setQuantity($quantity)
|
vendor/square/connect/lib/Model/InventoryCount.php
CHANGED
@@ -92,7 +92,7 @@ class InventoryCount implements ArrayAccess
|
|
92 |
*/
|
93 |
protected $location_id;
|
94 |
/**
|
95 |
-
* $quantity The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`.
|
96 |
* @var string
|
97 |
*/
|
98 |
protected $quantity;
|
@@ -228,7 +228,7 @@ class InventoryCount implements ArrayAccess
|
|
228 |
|
229 |
/**
|
230 |
* Sets quantity
|
231 |
-
* @param string $quantity The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`.
|
232 |
* @return $this
|
233 |
*/
|
234 |
public function setQuantity($quantity)
|
92 |
*/
|
93 |
protected $location_id;
|
94 |
/**
|
95 |
+
* $quantity The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information.
|
96 |
* @var string
|
97 |
*/
|
98 |
protected $quantity;
|
228 |
|
229 |
/**
|
230 |
* Sets quantity
|
231 |
+
* @param string $quantity The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information.
|
232 |
* @return $this
|
233 |
*/
|
234 |
public function setQuantity($quantity)
|
vendor/square/connect/lib/Model/InventoryPhysicalCount.php
CHANGED
@@ -122,7 +122,7 @@ class InventoryPhysicalCount implements ArrayAccess
|
|
122 |
*/
|
123 |
protected $location_id;
|
124 |
/**
|
125 |
-
* $quantity The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`.
|
126 |
* @var string
|
127 |
*/
|
128 |
protected $quantity;
|
@@ -336,7 +336,7 @@ class InventoryPhysicalCount implements ArrayAccess
|
|
336 |
|
337 |
/**
|
338 |
* Sets quantity
|
339 |
-
* @param string $quantity The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`.
|
340 |
* @return $this
|
341 |
*/
|
342 |
public function setQuantity($quantity)
|
122 |
*/
|
123 |
protected $location_id;
|
124 |
/**
|
125 |
+
* $quantity The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information.
|
126 |
* @var string
|
127 |
*/
|
128 |
protected $quantity;
|
336 |
|
337 |
/**
|
338 |
* Sets quantity
|
339 |
+
* @param string $quantity The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information.
|
340 |
* @return $this
|
341 |
*/
|
342 |
public function setQuantity($quantity)
|
vendor/square/connect/lib/Model/InventoryTransfer.php
CHANGED
@@ -131,7 +131,7 @@ class InventoryTransfer implements ArrayAccess
|
|
131 |
*/
|
132 |
protected $catalog_object_type;
|
133 |
/**
|
134 |
-
* $quantity The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`.
|
135 |
* @var string
|
136 |
*/
|
137 |
protected $quantity;
|
@@ -369,7 +369,7 @@ class InventoryTransfer implements ArrayAccess
|
|
369 |
|
370 |
/**
|
371 |
* Sets quantity
|
372 |
-
* @param string $quantity The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`.
|
373 |
* @return $this
|
374 |
*/
|
375 |
public function setQuantity($quantity)
|
131 |
*/
|
132 |
protected $catalog_object_type;
|
133 |
/**
|
134 |
+
* $quantity The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information.
|
135 |
* @var string
|
136 |
*/
|
137 |
protected $quantity;
|
369 |
|
370 |
/**
|
371 |
* Sets quantity
|
372 |
+
* @param string $quantity The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information.
|
373 |
* @return $this
|
374 |
*/
|
375 |
public function setQuantity($quantity)
|
vendor/square/connect/lib/Model/ListPaymentRefundsRequest.php
ADDED
@@ -0,0 +1,344 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* ListPaymentRefundsRequest Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class ListPaymentRefundsRequest implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'begin_time' => 'string',
|
28 |
+
'end_time' => 'string',
|
29 |
+
'sort_order' => 'string',
|
30 |
+
'cursor' => 'string',
|
31 |
+
'location_id' => 'string',
|
32 |
+
'status' => 'string',
|
33 |
+
'source_type' => 'string'
|
34 |
+
);
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
38 |
+
* @var string[]
|
39 |
+
*/
|
40 |
+
static $attributeMap = array(
|
41 |
+
'begin_time' => 'begin_time',
|
42 |
+
'end_time' => 'end_time',
|
43 |
+
'sort_order' => 'sort_order',
|
44 |
+
'cursor' => 'cursor',
|
45 |
+
'location_id' => 'location_id',
|
46 |
+
'status' => 'status',
|
47 |
+
'source_type' => 'source_type'
|
48 |
+
);
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
52 |
+
* @var string[]
|
53 |
+
*/
|
54 |
+
static $setters = array(
|
55 |
+
'begin_time' => 'setBeginTime',
|
56 |
+
'end_time' => 'setEndTime',
|
57 |
+
'sort_order' => 'setSortOrder',
|
58 |
+
'cursor' => 'setCursor',
|
59 |
+
'location_id' => 'setLocationId',
|
60 |
+
'status' => 'setStatus',
|
61 |
+
'source_type' => 'setSourceType'
|
62 |
+
);
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Array of attributes to getter functions (for serialization of requests)
|
66 |
+
* @var string[]
|
67 |
+
*/
|
68 |
+
static $getters = array(
|
69 |
+
'begin_time' => 'getBeginTime',
|
70 |
+
'end_time' => 'getEndTime',
|
71 |
+
'sort_order' => 'getSortOrder',
|
72 |
+
'cursor' => 'getCursor',
|
73 |
+
'location_id' => 'getLocationId',
|
74 |
+
'status' => 'getStatus',
|
75 |
+
'source_type' => 'getSourceType'
|
76 |
+
);
|
77 |
+
|
78 |
+
/**
|
79 |
+
* $begin_time Timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year.
|
80 |
+
* @var string
|
81 |
+
*/
|
82 |
+
protected $begin_time;
|
83 |
+
/**
|
84 |
+
* $end_time Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time.
|
85 |
+
* @var string
|
86 |
+
*/
|
87 |
+
protected $end_time;
|
88 |
+
/**
|
89 |
+
* $sort_order The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default).
|
90 |
+
* @var string
|
91 |
+
*/
|
92 |
+
protected $sort_order;
|
93 |
+
/**
|
94 |
+
* $cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information.
|
95 |
+
* @var string
|
96 |
+
*/
|
97 |
+
protected $cursor;
|
98 |
+
/**
|
99 |
+
* $location_id ID of location associated with payment.
|
100 |
+
* @var string
|
101 |
+
*/
|
102 |
+
protected $location_id;
|
103 |
+
/**
|
104 |
+
* $status If provided, only refunds with the given status are returned. For a list of refund status values, see [PaymentRefund](#type-paymentrefund). Default: If omitted refunds are returned regardless of status.
|
105 |
+
* @var string
|
106 |
+
*/
|
107 |
+
protected $status;
|
108 |
+
/**
|
109 |
+
* $source_type If provided, only refunds with the given source type are returned. - `CARD` - List refunds only for payments where card was specified as payment source. Default: If omitted refunds are returned regardless of source type.
|
110 |
+
* @var string
|
111 |
+
*/
|
112 |
+
protected $source_type;
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Constructor
|
116 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
117 |
+
*/
|
118 |
+
public function __construct(array $data = null)
|
119 |
+
{
|
120 |
+
if ($data != null) {
|
121 |
+
if (isset($data["begin_time"])) {
|
122 |
+
$this->begin_time = $data["begin_time"];
|
123 |
+
} else {
|
124 |
+
$this->begin_time = null;
|
125 |
+
}
|
126 |
+
if (isset($data["end_time"])) {
|
127 |
+
$this->end_time = $data["end_time"];
|
128 |
+
} else {
|
129 |
+
$this->end_time = null;
|
130 |
+
}
|
131 |
+
if (isset($data["sort_order"])) {
|
132 |
+
$this->sort_order = $data["sort_order"];
|
133 |
+
} else {
|
134 |
+
$this->sort_order = null;
|
135 |
+
}
|
136 |
+
if (isset($data["cursor"])) {
|
137 |
+
$this->cursor = $data["cursor"];
|
138 |
+
} else {
|
139 |
+
$this->cursor = null;
|
140 |
+
}
|
141 |
+
if (isset($data["location_id"])) {
|
142 |
+
$this->location_id = $data["location_id"];
|
143 |
+
} else {
|
144 |
+
$this->location_id = null;
|
145 |
+
}
|
146 |
+
if (isset($data["status"])) {
|
147 |
+
$this->status = $data["status"];
|
148 |
+
} else {
|
149 |
+
$this->status = null;
|
150 |
+
}
|
151 |
+
if (isset($data["source_type"])) {
|
152 |
+
$this->source_type = $data["source_type"];
|
153 |
+
} else {
|
154 |
+
$this->source_type = null;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
+
/**
|
159 |
+
* Gets begin_time
|
160 |
+
* @return string
|
161 |
+
*/
|
162 |
+
public function getBeginTime()
|
163 |
+
{
|
164 |
+
return $this->begin_time;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Sets begin_time
|
169 |
+
* @param string $begin_time Timestamp for the beginning of the requested reporting period, in RFC 3339 format. Default: The current time minus one year.
|
170 |
+
* @return $this
|
171 |
+
*/
|
172 |
+
public function setBeginTime($begin_time)
|
173 |
+
{
|
174 |
+
$this->begin_time = $begin_time;
|
175 |
+
return $this;
|
176 |
+
}
|
177 |
+
/**
|
178 |
+
* Gets end_time
|
179 |
+
* @return string
|
180 |
+
*/
|
181 |
+
public function getEndTime()
|
182 |
+
{
|
183 |
+
return $this->end_time;
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Sets end_time
|
188 |
+
* @param string $end_time Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time.
|
189 |
+
* @return $this
|
190 |
+
*/
|
191 |
+
public function setEndTime($end_time)
|
192 |
+
{
|
193 |
+
$this->end_time = $end_time;
|
194 |
+
return $this;
|
195 |
+
}
|
196 |
+
/**
|
197 |
+
* Gets sort_order
|
198 |
+
* @return string
|
199 |
+
*/
|
200 |
+
public function getSortOrder()
|
201 |
+
{
|
202 |
+
return $this->sort_order;
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Sets sort_order
|
207 |
+
* @param string $sort_order The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default).
|
208 |
+
* @return $this
|
209 |
+
*/
|
210 |
+
public function setSortOrder($sort_order)
|
211 |
+
{
|
212 |
+
$this->sort_order = $sort_order;
|
213 |
+
return $this;
|
214 |
+
}
|
215 |
+
/**
|
216 |
+
* Gets cursor
|
217 |
+
* @return string
|
218 |
+
*/
|
219 |
+
public function getCursor()
|
220 |
+
{
|
221 |
+
return $this->cursor;
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Sets cursor
|
226 |
+
* @param string $cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information.
|
227 |
+
* @return $this
|
228 |
+
*/
|
229 |
+
public function setCursor($cursor)
|
230 |
+
{
|
231 |
+
$this->cursor = $cursor;
|
232 |
+
return $this;
|
233 |
+
}
|
234 |
+
/**
|
235 |
+
* Gets location_id
|
236 |
+
* @return string
|
237 |
+
*/
|
238 |
+
public function getLocationId()
|
239 |
+
{
|
240 |
+
return $this->location_id;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Sets location_id
|
245 |
+
* @param string $location_id ID of location associated with payment.
|
246 |
+
* @return $this
|
247 |
+
*/
|
248 |
+
public function setLocationId($location_id)
|
249 |
+
{
|
250 |
+
$this->location_id = $location_id;
|
251 |
+
return $this;
|
252 |
+
}
|
253 |
+
/**
|
254 |
+
* Gets status
|
255 |
+
* @return string
|
256 |
+
*/
|
257 |
+
public function getStatus()
|
258 |
+
{
|
259 |
+
return $this->status;
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Sets status
|
264 |
+
* @param string $status If provided, only refunds with the given status are returned. For a list of refund status values, see [PaymentRefund](#type-paymentrefund). Default: If omitted refunds are returned regardless of status.
|
265 |
+
* @return $this
|
266 |
+
*/
|
267 |
+
public function setStatus($status)
|
268 |
+
{
|
269 |
+
$this->status = $status;
|
270 |
+
return $this;
|
271 |
+
}
|
272 |
+
/**
|
273 |
+
* Gets source_type
|
274 |
+
* @return string
|
275 |
+
*/
|
276 |
+
public function getSourceType()
|
277 |
+
{
|
278 |
+
return $this->source_type;
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Sets source_type
|
283 |
+
* @param string $source_type If provided, only refunds with the given source type are returned. - `CARD` - List refunds only for payments where card was specified as payment source. Default: If omitted refunds are returned regardless of source type.
|
284 |
+
* @return $this
|
285 |
+
*/
|
286 |
+
public function setSourceType($source_type)
|
287 |
+
{
|
288 |
+
$this->source_type = $source_type;
|
289 |
+
return $this;
|
290 |
+
}
|
291 |
+
/**
|
292 |
+
* Returns true if offset exists. False otherwise.
|
293 |
+
* @param integer $offset Offset
|
294 |
+
* @return boolean
|
295 |
+
*/
|
296 |
+
public function offsetExists($offset)
|
297 |
+
{
|
298 |
+
return isset($this->$offset);
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Gets offset.
|
303 |
+
* @param integer $offset Offset
|
304 |
+
* @return mixed
|
305 |
+
*/
|
306 |
+
public function offsetGet($offset)
|
307 |
+
{
|
308 |
+
return $this->$offset;
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Sets value based on offset.
|
313 |
+
* @param integer $offset Offset
|
314 |
+
* @param mixed $value Value to be set
|
315 |
+
* @return void
|
316 |
+
*/
|
317 |
+
public function offsetSet($offset, $value)
|
318 |
+
{
|
319 |
+
$this->$offset = $value;
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Unsets offset.
|
324 |
+
* @param integer $offset Offset
|
325 |
+
* @return void
|
326 |
+
*/
|
327 |
+
public function offsetUnset($offset)
|
328 |
+
{
|
329 |
+
unset($this->$offset);
|
330 |
+
}
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Gets the string presentation of the object
|
334 |
+
* @return string
|
335 |
+
*/
|
336 |
+
public function __toString()
|
337 |
+
{
|
338 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
339 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
340 |
+
} else {
|
341 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
342 |
+
}
|
343 |
+
}
|
344 |
+
}
|
vendor/square/connect/lib/Model/ListPaymentRefundsResponse.php
ADDED
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* ListPaymentRefundsResponse Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class ListPaymentRefundsResponse implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'errors' => '\SquareConnect\Model\Error[]',
|
28 |
+
'refunds' => '\SquareConnect\Model\PaymentRefund[]',
|
29 |
+
'cursor' => 'string'
|
30 |
+
);
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
34 |
+
* @var string[]
|
35 |
+
*/
|
36 |
+
static $attributeMap = array(
|
37 |
+
'errors' => 'errors',
|
38 |
+
'refunds' => 'refunds',
|
39 |
+
'cursor' => 'cursor'
|
40 |
+
);
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
44 |
+
* @var string[]
|
45 |
+
*/
|
46 |
+
static $setters = array(
|
47 |
+
'errors' => 'setErrors',
|
48 |
+
'refunds' => 'setRefunds',
|
49 |
+
'cursor' => 'setCursor'
|
50 |
+
);
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Array of attributes to getter functions (for serialization of requests)
|
54 |
+
* @var string[]
|
55 |
+
*/
|
56 |
+
static $getters = array(
|
57 |
+
'errors' => 'getErrors',
|
58 |
+
'refunds' => 'getRefunds',
|
59 |
+
'cursor' => 'getCursor'
|
60 |
+
);
|
61 |
+
|
62 |
+
/**
|
63 |
+
* $errors Information on errors encountered during the request.
|
64 |
+
* @var \SquareConnect\Model\Error[]
|
65 |
+
*/
|
66 |
+
protected $errors;
|
67 |
+
/**
|
68 |
+
* $refunds The list of requested refunds.
|
69 |
+
* @var \SquareConnect\Model\PaymentRefund[]
|
70 |
+
*/
|
71 |
+
protected $refunds;
|
72 |
+
/**
|
73 |
+
* $cursor The pagination cursor to be used in a subsequent request. If empty, this is the final response. See [Pagination](/basics/api101/pagination) for more information.
|
74 |
+
* @var string
|
75 |
+
*/
|
76 |
+
protected $cursor;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Constructor
|
80 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
81 |
+
*/
|
82 |
+
public function __construct(array $data = null)
|
83 |
+
{
|
84 |
+
if ($data != null) {
|
85 |
+
if (isset($data["errors"])) {
|
86 |
+
$this->errors = $data["errors"];
|
87 |
+
} else {
|
88 |
+
$this->errors = null;
|
89 |
+
}
|
90 |
+
if (isset($data["refunds"])) {
|
91 |
+
$this->refunds = $data["refunds"];
|
92 |
+
} else {
|
93 |
+
$this->refunds = null;
|
94 |
+
}
|
95 |
+
if (isset($data["cursor"])) {
|
96 |
+
$this->cursor = $data["cursor"];
|
97 |
+
} else {
|
98 |
+
$this->cursor = null;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
/**
|
103 |
+
* Gets errors
|
104 |
+
* @return \SquareConnect\Model\Error[]
|
105 |
+
*/
|
106 |
+
public function getErrors()
|
107 |
+
{
|
108 |
+
return $this->errors;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Sets errors
|
113 |
+
* @param \SquareConnect\Model\Error[] $errors Information on errors encountered during the request.
|
114 |
+
* @return $this
|
115 |
+
*/
|
116 |
+
public function setErrors($errors)
|
117 |
+
{
|
118 |
+
$this->errors = $errors;
|
119 |
+
return $this;
|
120 |
+
}
|
121 |
+
/**
|
122 |
+
* Gets refunds
|
123 |
+
* @return \SquareConnect\Model\PaymentRefund[]
|
124 |
+
*/
|
125 |
+
public function getRefunds()
|
126 |
+
{
|
127 |
+
return $this->refunds;
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Sets refunds
|
132 |
+
* @param \SquareConnect\Model\PaymentRefund[] $refunds The list of requested refunds.
|
133 |
+
* @return $this
|
134 |
+
*/
|
135 |
+
public function setRefunds($refunds)
|
136 |
+
{
|
137 |
+
$this->refunds = $refunds;
|
138 |
+
return $this;
|
139 |
+
}
|
140 |
+
/**
|
141 |
+
* Gets cursor
|
142 |
+
* @return string
|
143 |
+
*/
|
144 |
+
public function getCursor()
|
145 |
+
{
|
146 |
+
return $this->cursor;
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Sets cursor
|
151 |
+
* @param string $cursor The pagination cursor to be used in a subsequent request. If empty, this is the final response. See [Pagination](/basics/api101/pagination) for more information.
|
152 |
+
* @return $this
|
153 |
+
*/
|
154 |
+
public function setCursor($cursor)
|
155 |
+
{
|
156 |
+
$this->cursor = $cursor;
|
157 |
+
return $this;
|
158 |
+
}
|
159 |
+
/**
|
160 |
+
* Returns true if offset exists. False otherwise.
|
161 |
+
* @param integer $offset Offset
|
162 |
+
* @return boolean
|
163 |
+
*/
|
164 |
+
public function offsetExists($offset)
|
165 |
+
{
|
166 |
+
return isset($this->$offset);
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Gets offset.
|
171 |
+
* @param integer $offset Offset
|
172 |
+
* @return mixed
|
173 |
+
*/
|
174 |
+
public function offsetGet($offset)
|
175 |
+
{
|
176 |
+
return $this->$offset;
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Sets value based on offset.
|
181 |
+
* @param integer $offset Offset
|
182 |
+
* @param mixed $value Value to be set
|
183 |
+
* @return void
|
184 |
+
*/
|
185 |
+
public function offsetSet($offset, $value)
|
186 |
+
{
|
187 |
+
$this->$offset = $value;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Unsets offset.
|
192 |
+
* @param integer $offset Offset
|
193 |
+
* @return void
|
194 |
+
*/
|
195 |
+
public function offsetUnset($offset)
|
196 |
+
{
|
197 |
+
unset($this->$offset);
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Gets the string presentation of the object
|
202 |
+
* @return string
|
203 |
+
*/
|
204 |
+
public function __toString()
|
205 |
+
{
|
206 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
207 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
208 |
+
} else {
|
209 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
210 |
+
}
|
211 |
+
}
|
212 |
+
}
|
vendor/square/connect/lib/Model/ListPaymentsRequest.php
ADDED
@@ -0,0 +1,377 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* ListPaymentsRequest Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class ListPaymentsRequest implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'begin_time' => 'string',
|
28 |
+
'end_time' => 'string',
|
29 |
+
'sort_order' => 'string',
|
30 |
+
'cursor' => 'string',
|
31 |
+
'location_id' => 'string',
|
32 |
+
'total' => 'int',
|
33 |
+
'last_4' => 'string',
|
34 |
+
'card_brand' => 'string'
|
35 |
+
);
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
39 |
+
* @var string[]
|
40 |
+
*/
|
41 |
+
static $attributeMap = array(
|
42 |
+
'begin_time' => 'begin_time',
|
43 |
+
'end_time' => 'end_time',
|
44 |
+
'sort_order' => 'sort_order',
|
45 |
+
'cursor' => 'cursor',
|
46 |
+
'location_id' => 'location_id',
|
47 |
+
'total' => 'total',
|
48 |
+
'last_4' => 'last_4',
|
49 |
+
'card_brand' => 'card_brand'
|
50 |
+
);
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
54 |
+
* @var string[]
|
55 |
+
*/
|
56 |
+
static $setters = array(
|
57 |
+
'begin_time' => 'setBeginTime',
|
58 |
+
'end_time' => 'setEndTime',
|
59 |
+
'sort_order' => 'setSortOrder',
|
60 |
+
'cursor' => 'setCursor',
|
61 |
+
'location_id' => 'setLocationId',
|
62 |
+
'total' => 'setTotal',
|
63 |
+
'last_4' => 'setLast4',
|
64 |
+
'card_brand' => 'setCardBrand'
|
65 |
+
);
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Array of attributes to getter functions (for serialization of requests)
|
69 |
+
* @var string[]
|
70 |
+
*/
|
71 |
+
static $getters = array(
|
72 |
+
'begin_time' => 'getBeginTime',
|
73 |
+
'end_time' => 'getEndTime',
|
74 |
+
'sort_order' => 'getSortOrder',
|
75 |
+
'cursor' => 'getCursor',
|
76 |
+
'location_id' => 'getLocationId',
|
77 |
+
'total' => 'getTotal',
|
78 |
+
'last_4' => 'getLast4',
|
79 |
+
'card_brand' => 'getCardBrand'
|
80 |
+
);
|
81 |
+
|
82 |
+
/**
|
83 |
+
* $begin_time Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year.
|
84 |
+
* @var string
|
85 |
+
*/
|
86 |
+
protected $begin_time;
|
87 |
+
/**
|
88 |
+
* $end_time Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time.
|
89 |
+
* @var string
|
90 |
+
*/
|
91 |
+
protected $end_time;
|
92 |
+
/**
|
93 |
+
* $sort_order The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default).
|
94 |
+
* @var string
|
95 |
+
*/
|
96 |
+
protected $sort_order;
|
97 |
+
/**
|
98 |
+
* $cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information.
|
99 |
+
* @var string
|
100 |
+
*/
|
101 |
+
protected $cursor;
|
102 |
+
/**
|
103 |
+
* $location_id ID of location associated with payment
|
104 |
+
* @var string
|
105 |
+
*/
|
106 |
+
protected $location_id;
|
107 |
+
/**
|
108 |
+
* $total The exact amount in the total_money for a `Payment`.
|
109 |
+
* @var int
|
110 |
+
*/
|
111 |
+
protected $total;
|
112 |
+
/**
|
113 |
+
* $last_4 The last 4 digits of `Payment` card.
|
114 |
+
* @var string
|
115 |
+
*/
|
116 |
+
protected $last_4;
|
117 |
+
/**
|
118 |
+
* $card_brand The brand of `Payment` card. For example, `VISA`
|
119 |
+
* @var string
|
120 |
+
*/
|
121 |
+
protected $card_brand;
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Constructor
|
125 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
126 |
+
*/
|
127 |
+
public function __construct(array $data = null)
|
128 |
+
{
|
129 |
+
if ($data != null) {
|
130 |
+
if (isset($data["begin_time"])) {
|
131 |
+
$this->begin_time = $data["begin_time"];
|
132 |
+
} else {
|
133 |
+
$this->begin_time = null;
|
134 |
+
}
|
135 |
+
if (isset($data["end_time"])) {
|
136 |
+
$this->end_time = $data["end_time"];
|
137 |
+
} else {
|
138 |
+
$this->end_time = null;
|
139 |
+
}
|
140 |
+
if (isset($data["sort_order"])) {
|
141 |
+
$this->sort_order = $data["sort_order"];
|
142 |
+
} else {
|
143 |
+
$this->sort_order = null;
|
144 |
+
}
|
145 |
+
if (isset($data["cursor"])) {
|
146 |
+
$this->cursor = $data["cursor"];
|
147 |
+
} else {
|
148 |
+
$this->cursor = null;
|
149 |
+
}
|
150 |
+
if (isset($data["location_id"])) {
|
151 |
+
$this->location_id = $data["location_id"];
|
152 |
+
} else {
|
153 |
+
$this->location_id = null;
|
154 |
+
}
|
155 |
+
if (isset($data["total"])) {
|
156 |
+
$this->total = $data["total"];
|
157 |
+
} else {
|
158 |
+
$this->total = null;
|
159 |
+
}
|
160 |
+
if (isset($data["last_4"])) {
|
161 |
+
$this->last_4 = $data["last_4"];
|
162 |
+
} else {
|
163 |
+
$this->last_4 = null;
|
164 |
+
}
|
165 |
+
if (isset($data["card_brand"])) {
|
166 |
+
$this->card_brand = $data["card_brand"];
|
167 |
+
} else {
|
168 |
+
$this->card_brand = null;
|
169 |
+
}
|
170 |
+
}
|
171 |
+
}
|
172 |
+
/**
|
173 |
+
* Gets begin_time
|
174 |
+
* @return string
|
175 |
+
*/
|
176 |
+
public function getBeginTime()
|
177 |
+
{
|
178 |
+
return $this->begin_time;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Sets begin_time
|
183 |
+
* @param string $begin_time Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year.
|
184 |
+
* @return $this
|
185 |
+
*/
|
186 |
+
public function setBeginTime($begin_time)
|
187 |
+
{
|
188 |
+
$this->begin_time = $begin_time;
|
189 |
+
return $this;
|
190 |
+
}
|
191 |
+
/**
|
192 |
+
* Gets end_time
|
193 |
+
* @return string
|
194 |
+
*/
|
195 |
+
public function getEndTime()
|
196 |
+
{
|
197 |
+
return $this->end_time;
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Sets end_time
|
202 |
+
* @param string $end_time Timestamp for the end of the requested reporting period, in RFC 3339 format. Default: The current time.
|
203 |
+
* @return $this
|
204 |
+
*/
|
205 |
+
public function setEndTime($end_time)
|
206 |
+
{
|
207 |
+
$this->end_time = $end_time;
|
208 |
+
return $this;
|
209 |
+
}
|
210 |
+
/**
|
211 |
+
* Gets sort_order
|
212 |
+
* @return string
|
213 |
+
*/
|
214 |
+
public function getSortOrder()
|
215 |
+
{
|
216 |
+
return $this->sort_order;
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Sets sort_order
|
221 |
+
* @param string $sort_order The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default).
|
222 |
+
* @return $this
|
223 |
+
*/
|
224 |
+
public function setSortOrder($sort_order)
|
225 |
+
{
|
226 |
+
$this->sort_order = $sort_order;
|
227 |
+
return $this;
|
228 |
+
}
|
229 |
+
/**
|
230 |
+
* Gets cursor
|
231 |
+
* @return string
|
232 |
+
*/
|
233 |
+
public function getCursor()
|
234 |
+
{
|
235 |
+
return $this->cursor;
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Sets cursor
|
240 |
+
* @param string $cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information.
|
241 |
+
* @return $this
|
242 |
+
*/
|
243 |
+
public function setCursor($cursor)
|
244 |
+
{
|
245 |
+
$this->cursor = $cursor;
|
246 |
+
return $this;
|
247 |
+
}
|
248 |
+
/**
|
249 |
+
* Gets location_id
|
250 |
+
* @return string
|
251 |
+
*/
|
252 |
+
public function getLocationId()
|
253 |
+
{
|
254 |
+
return $this->location_id;
|
255 |
+
}
|
256 |
+
|
257 |
+
/**
|
258 |
+
* Sets location_id
|
259 |
+
* @param string $location_id ID of location associated with payment
|
260 |
+
* @return $this
|
261 |
+
*/
|
262 |
+
public function setLocationId($location_id)
|
263 |
+
{
|
264 |
+
$this->location_id = $location_id;
|
265 |
+
return $this;
|
266 |
+
}
|
267 |
+
/**
|
268 |
+
* Gets total
|
269 |
+
* @return int
|
270 |
+
*/
|
271 |
+
public function getTotal()
|
272 |
+
{
|
273 |
+
return $this->total;
|
274 |
+
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
* Sets total
|
278 |
+
* @param int $total The exact amount in the total_money for a `Payment`.
|
279 |
+
* @return $this
|
280 |
+
*/
|
281 |
+
public function setTotal($total)
|
282 |
+
{
|
283 |
+
$this->total = $total;
|
284 |
+
return $this;
|
285 |
+
}
|
286 |
+
/**
|
287 |
+
* Gets last_4
|
288 |
+
* @return string
|
289 |
+
*/
|
290 |
+
public function getLast4()
|
291 |
+
{
|
292 |
+
return $this->last_4;
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Sets last_4
|
297 |
+
* @param string $last_4 The last 4 digits of `Payment` card.
|
298 |
+
* @return $this
|
299 |
+
*/
|
300 |
+
public function setLast4($last_4)
|
301 |
+
{
|
302 |
+
$this->last_4 = $last_4;
|
303 |
+
return $this;
|
304 |
+
}
|
305 |
+
/**
|
306 |
+
* Gets card_brand
|
307 |
+
* @return string
|
308 |
+
*/
|
309 |
+
public function getCardBrand()
|
310 |
+
{
|
311 |
+
return $this->card_brand;
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Sets card_brand
|
316 |
+
* @param string $card_brand The brand of `Payment` card. For example, `VISA`
|
317 |
+
* @return $this
|
318 |
+
*/
|
319 |
+
public function setCardBrand($card_brand)
|
320 |
+
{
|
321 |
+
$this->card_brand = $card_brand;
|
322 |
+
return $this;
|
323 |
+
}
|
324 |
+
/**
|
325 |
+
* Returns true if offset exists. False otherwise.
|
326 |
+
* @param integer $offset Offset
|
327 |
+
* @return boolean
|
328 |
+
*/
|
329 |
+
public function offsetExists($offset)
|
330 |
+
{
|
331 |
+
return isset($this->$offset);
|
332 |
+
}
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Gets offset.
|
336 |
+
* @param integer $offset Offset
|
337 |
+
* @return mixed
|
338 |
+
*/
|
339 |
+
public function offsetGet($offset)
|
340 |
+
{
|
341 |
+
return $this->$offset;
|
342 |
+
}
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Sets value based on offset.
|
346 |
+
* @param integer $offset Offset
|
347 |
+
* @param mixed $value Value to be set
|
348 |
+
* @return void
|
349 |
+
*/
|
350 |
+
public function offsetSet($offset, $value)
|
351 |
+
{
|
352 |
+
$this->$offset = $value;
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Unsets offset.
|
357 |
+
* @param integer $offset Offset
|
358 |
+
* @return void
|
359 |
+
*/
|
360 |
+
public function offsetUnset($offset)
|
361 |
+
{
|
362 |
+
unset($this->$offset);
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Gets the string presentation of the object
|
367 |
+
* @return string
|
368 |
+
*/
|
369 |
+
public function __toString()
|
370 |
+
{
|
371 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
372 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
373 |
+
} else {
|
374 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
375 |
+
}
|
376 |
+
}
|
377 |
+
}
|
vendor/square/connect/lib/Model/ListPaymentsResponse.php
ADDED
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* ListPaymentsResponse Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class ListPaymentsResponse implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'errors' => '\SquareConnect\Model\Error[]',
|
28 |
+
'payments' => '\SquareConnect\Model\Payment[]',
|
29 |
+
'cursor' => 'string'
|
30 |
+
);
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
34 |
+
* @var string[]
|
35 |
+
*/
|
36 |
+
static $attributeMap = array(
|
37 |
+
'errors' => 'errors',
|
38 |
+
'payments' => 'payments',
|
39 |
+
'cursor' => 'cursor'
|
40 |
+
);
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
44 |
+
* @var string[]
|
45 |
+
*/
|
46 |
+
static $setters = array(
|
47 |
+
'errors' => 'setErrors',
|
48 |
+
'payments' => 'setPayments',
|
49 |
+
'cursor' => 'setCursor'
|
50 |
+
);
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Array of attributes to getter functions (for serialization of requests)
|
54 |
+
* @var string[]
|
55 |
+
*/
|
56 |
+
static $getters = array(
|
57 |
+
'errors' => 'getErrors',
|
58 |
+
'payments' => 'getPayments',
|
59 |
+
'cursor' => 'getCursor'
|
60 |
+
);
|
61 |
+
|
62 |
+
/**
|
63 |
+
* $errors Information on errors encountered during the request.
|
64 |
+
* @var \SquareConnect\Model\Error[]
|
65 |
+
*/
|
66 |
+
protected $errors;
|
67 |
+
/**
|
68 |
+
* $payments The requested list of `Payment`s.
|
69 |
+
* @var \SquareConnect\Model\Payment[]
|
70 |
+
*/
|
71 |
+
protected $payments;
|
72 |
+
/**
|
73 |
+
* $cursor The pagination cursor to be used in a subsequent request. If empty, this is the final response. See [Pagination](/basics/api101/pagination) for more information.
|
74 |
+
* @var string
|
75 |
+
*/
|
76 |
+
protected $cursor;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Constructor
|
80 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
81 |
+
*/
|
82 |
+
public function __construct(array $data = null)
|
83 |
+
{
|
84 |
+
if ($data != null) {
|
85 |
+
if (isset($data["errors"])) {
|
86 |
+
$this->errors = $data["errors"];
|
87 |
+
} else {
|
88 |
+
$this->errors = null;
|
89 |
+
}
|
90 |
+
if (isset($data["payments"])) {
|
91 |
+
$this->payments = $data["payments"];
|
92 |
+
} else {
|
93 |
+
$this->payments = null;
|
94 |
+
}
|
95 |
+
if (isset($data["cursor"])) {
|
96 |
+
$this->cursor = $data["cursor"];
|
97 |
+
} else {
|
98 |
+
$this->cursor = null;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
/**
|
103 |
+
* Gets errors
|
104 |
+
* @return \SquareConnect\Model\Error[]
|
105 |
+
*/
|
106 |
+
public function getErrors()
|
107 |
+
{
|
108 |
+
return $this->errors;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Sets errors
|
113 |
+
* @param \SquareConnect\Model\Error[] $errors Information on errors encountered during the request.
|
114 |
+
* @return $this
|
115 |
+
*/
|
116 |
+
public function setErrors($errors)
|
117 |
+
{
|
118 |
+
$this->errors = $errors;
|
119 |
+
return $this;
|
120 |
+
}
|
121 |
+
/**
|
122 |
+
* Gets payments
|
123 |
+
* @return \SquareConnect\Model\Payment[]
|
124 |
+
*/
|
125 |
+
public function getPayments()
|
126 |
+
{
|
127 |
+
return $this->payments;
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Sets payments
|
132 |
+
* @param \SquareConnect\Model\Payment[] $payments The requested list of `Payment`s.
|
133 |
+
* @return $this
|
134 |
+
*/
|
135 |
+
public function setPayments($payments)
|
136 |
+
{
|
137 |
+
$this->payments = $payments;
|
138 |
+
return $this;
|
139 |
+
}
|
140 |
+
/**
|
141 |
+
* Gets cursor
|
142 |
+
* @return string
|
143 |
+
*/
|
144 |
+
public function getCursor()
|
145 |
+
{
|
146 |
+
return $this->cursor;
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Sets cursor
|
151 |
+
* @param string $cursor The pagination cursor to be used in a subsequent request. If empty, this is the final response. See [Pagination](/basics/api101/pagination) for more information.
|
152 |
+
* @return $this
|
153 |
+
*/
|
154 |
+
public function setCursor($cursor)
|
155 |
+
{
|
156 |
+
$this->cursor = $cursor;
|
157 |
+
return $this;
|
158 |
+
}
|
159 |
+
/**
|
160 |
+
* Returns true if offset exists. False otherwise.
|
161 |
+
* @param integer $offset Offset
|
162 |
+
* @return boolean
|
163 |
+
*/
|
164 |
+
public function offsetExists($offset)
|
165 |
+
{
|
166 |
+
return isset($this->$offset);
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Gets offset.
|
171 |
+
* @param integer $offset Offset
|
172 |
+
* @return mixed
|
173 |
+
*/
|
174 |
+
public function offsetGet($offset)
|
175 |
+
{
|
176 |
+
return $this->$offset;
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Sets value based on offset.
|
181 |
+
* @param integer $offset Offset
|
182 |
+
* @param mixed $value Value to be set
|
183 |
+
* @return void
|
184 |
+
*/
|
185 |
+
public function offsetSet($offset, $value)
|
186 |
+
{
|
187 |
+
$this->$offset = $value;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Unsets offset.
|
192 |
+
* @param integer $offset Offset
|
193 |
+
* @return void
|
194 |
+
*/
|
195 |
+
public function offsetUnset($offset)
|
196 |
+
{
|
197 |
+
unset($this->$offset);
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Gets the string presentation of the object
|
202 |
+
* @return string
|
203 |
+
*/
|
204 |
+
public function __toString()
|
205 |
+
{
|
206 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
207 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
208 |
+
} else {
|
209 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
210 |
+
}
|
211 |
+
}
|
212 |
+
}
|
vendor/square/connect/lib/Model/Location.php
CHANGED
@@ -39,7 +39,15 @@ class Location implements ArrayAccess
|
|
39 |
'business_name' => 'string',
|
40 |
'type' => 'string',
|
41 |
'website_url' => 'string',
|
42 |
-
'business_hours' => '\SquareConnect\Model\BusinessHours'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
);
|
44 |
|
45 |
/**
|
@@ -62,7 +70,15 @@ class Location implements ArrayAccess
|
|
62 |
'business_name' => 'business_name',
|
63 |
'type' => 'type',
|
64 |
'website_url' => 'website_url',
|
65 |
-
'business_hours' => 'business_hours'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
);
|
67 |
|
68 |
/**
|
@@ -85,7 +101,15 @@ class Location implements ArrayAccess
|
|
85 |
'business_name' => 'setBusinessName',
|
86 |
'type' => 'setType',
|
87 |
'website_url' => 'setWebsiteUrl',
|
88 |
-
'business_hours' => 'setBusinessHours'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
);
|
90 |
|
91 |
/**
|
@@ -108,7 +132,15 @@ class Location implements ArrayAccess
|
|
108 |
'business_name' => 'getBusinessName',
|
109 |
'type' => 'getType',
|
110 |
'website_url' => 'getWebsiteUrl',
|
111 |
-
'business_hours' => 'getBusinessHours'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
);
|
113 |
|
114 |
/**
|
@@ -191,6 +223,46 @@ class Location implements ArrayAccess
|
|
191 |
* @var \SquareConnect\Model\BusinessHours
|
192 |
*/
|
193 |
protected $business_hours;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
|
195 |
/**
|
196 |
* Constructor
|
@@ -279,6 +351,46 @@ class Location implements ArrayAccess
|
|
279 |
} else {
|
280 |
$this->business_hours = null;
|
281 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
}
|
283 |
}
|
284 |
/**
|
@@ -585,6 +697,158 @@ class Location implements ArrayAccess
|
|
585 |
$this->business_hours = $business_hours;
|
586 |
return $this;
|
587 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
588 |
/**
|
589 |
* Returns true if offset exists. False otherwise.
|
590 |
* @param integer $offset Offset
|
39 |
'business_name' => 'string',
|
40 |
'type' => 'string',
|
41 |
'website_url' => 'string',
|
42 |
+
'business_hours' => '\SquareConnect\Model\BusinessHours',
|
43 |
+
'business_email' => 'string',
|
44 |
+
'description' => 'string',
|
45 |
+
'twitter_username' => 'string',
|
46 |
+
'instagram_username' => 'string',
|
47 |
+
'facebook_url' => 'string',
|
48 |
+
'coordinates' => '\SquareConnect\Model\Coordinates',
|
49 |
+
'logo_url' => 'string',
|
50 |
+
'pos_background_url' => 'string'
|
51 |
);
|
52 |
|
53 |
/**
|
70 |
'business_name' => 'business_name',
|
71 |
'type' => 'type',
|
72 |
'website_url' => 'website_url',
|
73 |
+
'business_hours' => 'business_hours',
|
74 |
+
'business_email' => 'business_email',
|
75 |
+
'description' => 'description',
|
76 |
+
'twitter_username' => 'twitter_username',
|
77 |
+
'instagram_username' => 'instagram_username',
|
78 |
+
'facebook_url' => 'facebook_url',
|
79 |
+
'coordinates' => 'coordinates',
|
80 |
+
'logo_url' => 'logo_url',
|
81 |
+
'pos_background_url' => 'pos_background_url'
|
82 |
);
|
83 |
|
84 |
/**
|
101 |
'business_name' => 'setBusinessName',
|
102 |
'type' => 'setType',
|
103 |
'website_url' => 'setWebsiteUrl',
|
104 |
+
'business_hours' => 'setBusinessHours',
|
105 |
+
'business_email' => 'setBusinessEmail',
|
106 |
+
'description' => 'setDescription',
|
107 |
+
'twitter_username' => 'setTwitterUsername',
|
108 |
+
'instagram_username' => 'setInstagramUsername',
|
109 |
+
'facebook_url' => 'setFacebookUrl',
|
110 |
+
'coordinates' => 'setCoordinates',
|
111 |
+
'logo_url' => 'setLogoUrl',
|
112 |
+
'pos_background_url' => 'setPosBackgroundUrl'
|
113 |
);
|
114 |
|
115 |
/**
|
132 |
'business_name' => 'getBusinessName',
|
133 |
'type' => 'getType',
|
134 |
'website_url' => 'getWebsiteUrl',
|
135 |
+
'business_hours' => 'getBusinessHours',
|
136 |
+
'business_email' => 'getBusinessEmail',
|
137 |
+
'description' => 'getDescription',
|
138 |
+
'twitter_username' => 'getTwitterUsername',
|
139 |
+
'instagram_username' => 'getInstagramUsername',
|
140 |
+
'facebook_url' => 'getFacebookUrl',
|
141 |
+
'coordinates' => 'getCoordinates',
|
142 |
+
'logo_url' => 'getLogoUrl',
|
143 |
+
'pos_background_url' => 'getPosBackgroundUrl'
|
144 |
);
|
145 |
|
146 |
/**
|
223 |
* @var \SquareConnect\Model\BusinessHours
|
224 |
*/
|
225 |
protected $business_hours;
|
226 |
+
/**
|
227 |
+
* $business_email The email of the location.
|
228 |
+
* @var string
|
229 |
+
*/
|
230 |
+
protected $business_email;
|
231 |
+
/**
|
232 |
+
* $description The business description of the location.
|
233 |
+
* @var string
|
234 |
+
*/
|
235 |
+
protected $description;
|
236 |
+
/**
|
237 |
+
* $twitter_username The Twitter username of the location without the '
|
238 |
+
* @var string
|
239 |
+
*/
|
240 |
+
protected $twitter_username;
|
241 |
+
/**
|
242 |
+
* $instagram_username The Instagram username of the location without the '
|
243 |
+
* @var string
|
244 |
+
*/
|
245 |
+
protected $instagram_username;
|
246 |
+
/**
|
247 |
+
* $facebook_url The Facebook profile URL of the location. The URL should begin with 'facebook.com/'.
|
248 |
+
* @var string
|
249 |
+
*/
|
250 |
+
protected $facebook_url;
|
251 |
+
/**
|
252 |
+
* $coordinates The physical coordinates (latitude and longitude) of the location.
|
253 |
+
* @var \SquareConnect\Model\Coordinates
|
254 |
+
*/
|
255 |
+
protected $coordinates;
|
256 |
+
/**
|
257 |
+
* $logo_url The logo image URL of the location.
|
258 |
+
* @var string
|
259 |
+
*/
|
260 |
+
protected $logo_url;
|
261 |
+
/**
|
262 |
+
* $pos_background_url The Point of Sale background image URL of the location.
|
263 |
+
* @var string
|
264 |
+
*/
|
265 |
+
protected $pos_background_url;
|
266 |
|
267 |
/**
|
268 |
* Constructor
|
351 |
} else {
|
352 |
$this->business_hours = null;
|
353 |
}
|
354 |
+
if (isset($data["business_email"])) {
|
355 |
+
$this->business_email = $data["business_email"];
|
356 |
+
} else {
|
357 |
+
$this->business_email = null;
|
358 |
+
}
|
359 |
+
if (isset($data["description"])) {
|
360 |
+
$this->description = $data["description"];
|
361 |
+
} else {
|
362 |
+
$this->description = null;
|
363 |
+
}
|
364 |
+
if (isset($data["twitter_username"])) {
|
365 |
+
$this->twitter_username = $data["twitter_username"];
|
366 |
+
} else {
|
367 |
+
$this->twitter_username = null;
|
368 |
+
}
|
369 |
+
if (isset($data["instagram_username"])) {
|
370 |
+
$this->instagram_username = $data["instagram_username"];
|
371 |
+
} else {
|
372 |
+
$this->instagram_username = null;
|
373 |
+
}
|
374 |
+
if (isset($data["facebook_url"])) {
|
375 |
+
$this->facebook_url = $data["facebook_url"];
|
376 |
+
} else {
|
377 |
+
$this->facebook_url = null;
|
378 |
+
}
|
379 |
+
if (isset($data["coordinates"])) {
|
380 |
+
$this->coordinates = $data["coordinates"];
|
381 |
+
} else {
|
382 |
+
$this->coordinates = null;
|
383 |
+
}
|
384 |
+
if (isset($data["logo_url"])) {
|
385 |
+
$this->logo_url = $data["logo_url"];
|
386 |
+
} else {
|
387 |
+
$this->logo_url = null;
|
388 |
+
}
|
389 |
+
if (isset($data["pos_background_url"])) {
|
390 |
+
$this->pos_background_url = $data["pos_background_url"];
|
391 |
+
} else {
|
392 |
+
$this->pos_background_url = null;
|
393 |
+
}
|
394 |
}
|
395 |
}
|
396 |
/**
|
697 |
$this->business_hours = $business_hours;
|
698 |
return $this;
|
699 |
}
|
700 |
+
/**
|
701 |
+
* Gets business_email
|
702 |
+
* @return string
|
703 |
+
*/
|
704 |
+
public function getBusinessEmail()
|
705 |
+
{
|
706 |
+
return $this->business_email;
|
707 |
+
}
|
708 |
+
|
709 |
+
/**
|
710 |
+
* Sets business_email
|
711 |
+
* @param string $business_email The email of the location.
|
712 |
+
* @return $this
|
713 |
+
*/
|
714 |
+
public function setBusinessEmail($business_email)
|
715 |
+
{
|
716 |
+
$this->business_email = $business_email;
|
717 |
+
return $this;
|
718 |
+
}
|
719 |
+
/**
|
720 |
+
* Gets description
|
721 |
+
* @return string
|
722 |
+
*/
|
723 |
+
public function getDescription()
|
724 |
+
{
|
725 |
+
return $this->description;
|
726 |
+
}
|
727 |
+
|
728 |
+
/**
|
729 |
+
* Sets description
|
730 |
+
* @param string $description The business description of the location.
|
731 |
+
* @return $this
|
732 |
+
*/
|
733 |
+
public function setDescription($description)
|
734 |
+
{
|
735 |
+
$this->description = $description;
|
736 |
+
return $this;
|
737 |
+
}
|
738 |
+
/**
|
739 |
+
* Gets twitter_username
|
740 |
+
* @return string
|
741 |
+
*/
|
742 |
+
public function getTwitterUsername()
|
743 |
+
{
|
744 |
+
return $this->twitter_username;
|
745 |
+
}
|
746 |
+
|
747 |
+
/**
|
748 |
+
* Sets twitter_username
|
749 |
+
* @param string $twitter_username The Twitter username of the location without the '
|
750 |
+
* @return $this
|
751 |
+
*/
|
752 |
+
public function setTwitterUsername($twitter_username)
|
753 |
+
{
|
754 |
+
$this->twitter_username = $twitter_username;
|
755 |
+
return $this;
|
756 |
+
}
|
757 |
+
/**
|
758 |
+
* Gets instagram_username
|
759 |
+
* @return string
|
760 |
+
*/
|
761 |
+
public function getInstagramUsername()
|
762 |
+
{
|
763 |
+
return $this->instagram_username;
|
764 |
+
}
|
765 |
+
|
766 |
+
/**
|
767 |
+
* Sets instagram_username
|
768 |
+
* @param string $instagram_username The Instagram username of the location without the '
|
769 |
+
* @return $this
|
770 |
+
*/
|
771 |
+
public function setInstagramUsername($instagram_username)
|
772 |
+
{
|
773 |
+
$this->instagram_username = $instagram_username;
|
774 |
+
return $this;
|
775 |
+
}
|
776 |
+
/**
|
777 |
+
* Gets facebook_url
|
778 |
+
* @return string
|
779 |
+
*/
|
780 |
+
public function getFacebookUrl()
|
781 |
+
{
|
782 |
+
return $this->facebook_url;
|
783 |
+
}
|
784 |
+
|
785 |
+
/**
|
786 |
+
* Sets facebook_url
|
787 |
+
* @param string $facebook_url The Facebook profile URL of the location. The URL should begin with 'facebook.com/'.
|
788 |
+
* @return $this
|
789 |
+
*/
|
790 |
+
public function setFacebookUrl($facebook_url)
|
791 |
+
{
|
792 |
+
$this->facebook_url = $facebook_url;
|
793 |
+
return $this;
|
794 |
+
}
|
795 |
+
/**
|
796 |
+
* Gets coordinates
|
797 |
+
* @return \SquareConnect\Model\Coordinates
|
798 |
+
*/
|
799 |
+
public function getCoordinates()
|
800 |
+
{
|
801 |
+
return $this->coordinates;
|
802 |
+
}
|
803 |
+
|
804 |
+
/**
|
805 |
+
* Sets coordinates
|
806 |
+
* @param \SquareConnect\Model\Coordinates $coordinates The physical coordinates (latitude and longitude) of the location.
|
807 |
+
* @return $this
|
808 |
+
*/
|
809 |
+
public function setCoordinates($coordinates)
|
810 |
+
{
|
811 |
+
$this->coordinates = $coordinates;
|
812 |
+
return $this;
|
813 |
+
}
|
814 |
+
/**
|
815 |
+
* Gets logo_url
|
816 |
+
* @return string
|
817 |
+
*/
|
818 |
+
public function getLogoUrl()
|
819 |
+
{
|
820 |
+
return $this->logo_url;
|
821 |
+
}
|
822 |
+
|
823 |
+
/**
|
824 |
+
* Sets logo_url
|
825 |
+
* @param string $logo_url The logo image URL of the location.
|
826 |
+
* @return $this
|
827 |
+
*/
|
828 |
+
public function setLogoUrl($logo_url)
|
829 |
+
{
|
830 |
+
$this->logo_url = $logo_url;
|
831 |
+
return $this;
|
832 |
+
}
|
833 |
+
/**
|
834 |
+
* Gets pos_background_url
|
835 |
+
* @return string
|
836 |
+
*/
|
837 |
+
public function getPosBackgroundUrl()
|
838 |
+
{
|
839 |
+
return $this->pos_background_url;
|
840 |
+
}
|
841 |
+
|
842 |
+
/**
|
843 |
+
* Sets pos_background_url
|
844 |
+
* @param string $pos_background_url The Point of Sale background image URL of the location.
|
845 |
+
* @return $this
|
846 |
+
*/
|
847 |
+
public function setPosBackgroundUrl($pos_background_url)
|
848 |
+
{
|
849 |
+
$this->pos_background_url = $pos_background_url;
|
850 |
+
return $this;
|
851 |
+
}
|
852 |
/**
|
853 |
* Returns true if offset exists. False otherwise.
|
854 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/MeasurementUnit.php
CHANGED
@@ -28,7 +28,9 @@ class MeasurementUnit implements ArrayAccess
|
|
28 |
'area_unit' => 'string',
|
29 |
'length_unit' => 'string',
|
30 |
'volume_unit' => 'string',
|
31 |
-
'weight_unit' => 'string'
|
|
|
|
|
32 |
);
|
33 |
|
34 |
/**
|
@@ -40,7 +42,9 @@ class MeasurementUnit implements ArrayAccess
|
|
40 |
'area_unit' => 'area_unit',
|
41 |
'length_unit' => 'length_unit',
|
42 |
'volume_unit' => 'volume_unit',
|
43 |
-
'weight_unit' => 'weight_unit'
|
|
|
|
|
44 |
);
|
45 |
|
46 |
/**
|
@@ -52,7 +56,9 @@ class MeasurementUnit implements ArrayAccess
|
|
52 |
'area_unit' => 'setAreaUnit',
|
53 |
'length_unit' => 'setLengthUnit',
|
54 |
'volume_unit' => 'setVolumeUnit',
|
55 |
-
'weight_unit' => 'setWeightUnit'
|
|
|
|
|
56 |
);
|
57 |
|
58 |
/**
|
@@ -64,7 +70,9 @@ class MeasurementUnit implements ArrayAccess
|
|
64 |
'area_unit' => 'getAreaUnit',
|
65 |
'length_unit' => 'getLengthUnit',
|
66 |
'volume_unit' => 'getVolumeUnit',
|
67 |
-
'weight_unit' => 'getWeightUnit'
|
|
|
|
|
68 |
);
|
69 |
|
70 |
/**
|
@@ -92,6 +100,16 @@ class MeasurementUnit implements ArrayAccess
|
|
92 |
* @var string
|
93 |
*/
|
94 |
protected $weight_unit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
/**
|
97 |
* Constructor
|
@@ -125,6 +143,16 @@ class MeasurementUnit implements ArrayAccess
|
|
125 |
} else {
|
126 |
$this->weight_unit = null;
|
127 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
}
|
130 |
/**
|
@@ -222,6 +250,44 @@ class MeasurementUnit implements ArrayAccess
|
|
222 |
$this->weight_unit = $weight_unit;
|
223 |
return $this;
|
224 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
/**
|
226 |
* Returns true if offset exists. False otherwise.
|
227 |
* @param integer $offset Offset
|
28 |
'area_unit' => 'string',
|
29 |
'length_unit' => 'string',
|
30 |
'volume_unit' => 'string',
|
31 |
+
'weight_unit' => 'string',
|
32 |
+
'generic_unit' => 'string',
|
33 |
+
'type' => 'string'
|
34 |
);
|
35 |
|
36 |
/**
|
42 |
'area_unit' => 'area_unit',
|
43 |
'length_unit' => 'length_unit',
|
44 |
'volume_unit' => 'volume_unit',
|
45 |
+
'weight_unit' => 'weight_unit',
|
46 |
+
'generic_unit' => 'generic_unit',
|
47 |
+
'type' => 'type'
|
48 |
);
|
49 |
|
50 |
/**
|
56 |
'area_unit' => 'setAreaUnit',
|
57 |
'length_unit' => 'setLengthUnit',
|
58 |
'volume_unit' => 'setVolumeUnit',
|
59 |
+
'weight_unit' => 'setWeightUnit',
|
60 |
+
'generic_unit' => 'setGenericUnit',
|
61 |
+
'type' => 'setType'
|
62 |
);
|
63 |
|
64 |
/**
|
70 |
'area_unit' => 'getAreaUnit',
|
71 |
'length_unit' => 'getLengthUnit',
|
72 |
'volume_unit' => 'getVolumeUnit',
|
73 |
+
'weight_unit' => 'getWeightUnit',
|
74 |
+
'generic_unit' => 'getGenericUnit',
|
75 |
+
'type' => 'getType'
|
76 |
);
|
77 |
|
78 |
/**
|
100 |
* @var string
|
101 |
*/
|
102 |
protected $weight_unit;
|
103 |
+
/**
|
104 |
+
* $generic_unit Reserved for API integrations that lack the ability to specify a real measurement unit See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values
|
105 |
+
* @var string
|
106 |
+
*/
|
107 |
+
protected $generic_unit;
|
108 |
+
/**
|
109 |
+
* $type Represents the type of the measurement unit. See [MeasurementUnitUnitType](#type-measurementunitunittype) for possible values
|
110 |
+
* @var string
|
111 |
+
*/
|
112 |
+
protected $type;
|
113 |
|
114 |
/**
|
115 |
* Constructor
|
143 |
} else {
|
144 |
$this->weight_unit = null;
|
145 |
}
|
146 |
+
if (isset($data["generic_unit"])) {
|
147 |
+
$this->generic_unit = $data["generic_unit"];
|
148 |
+
} else {
|
149 |
+
$this->generic_unit = null;
|
150 |
+
}
|
151 |
+
if (isset($data["type"])) {
|
152 |
+
$this->type = $data["type"];
|
153 |
+
} else {
|
154 |
+
$this->type = null;
|
155 |
+
}
|
156 |
}
|
157 |
}
|
158 |
/**
|
250 |
$this->weight_unit = $weight_unit;
|
251 |
return $this;
|
252 |
}
|
253 |
+
/**
|
254 |
+
* Gets generic_unit
|
255 |
+
* @return string
|
256 |
+
*/
|
257 |
+
public function getGenericUnit()
|
258 |
+
{
|
259 |
+
return $this->generic_unit;
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Sets generic_unit
|
264 |
+
* @param string $generic_unit Reserved for API integrations that lack the ability to specify a real measurement unit See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values
|
265 |
+
* @return $this
|
266 |
+
*/
|
267 |
+
public function setGenericUnit($generic_unit)
|
268 |
+
{
|
269 |
+
$this->generic_unit = $generic_unit;
|
270 |
+
return $this;
|
271 |
+
}
|
272 |
+
/**
|
273 |
+
* Gets type
|
274 |
+
* @return string
|
275 |
+
*/
|
276 |
+
public function getType()
|
277 |
+
{
|
278 |
+
return $this->type;
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Sets type
|
283 |
+
* @param string $type Represents the type of the measurement unit. See [MeasurementUnitUnitType](#type-measurementunitunittype) for possible values
|
284 |
+
* @return $this
|
285 |
+
*/
|
286 |
+
public function setType($type)
|
287 |
+
{
|
288 |
+
$this->type = $type;
|
289 |
+
return $this;
|
290 |
+
}
|
291 |
/**
|
292 |
* Returns true if offset exists. False otherwise.
|
293 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/MeasurementUnitGeneric.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* MeasurementUnitGeneric Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class MeasurementUnitGeneric implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
|
52 |
+
);
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Constructor
|
57 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
58 |
+
*/
|
59 |
+
public function __construct(array $data = null)
|
60 |
+
{
|
61 |
+
if ($data != null) {
|
62 |
+
}
|
63 |
+
}
|
64 |
+
/**
|
65 |
+
* Returns true if offset exists. False otherwise.
|
66 |
+
* @param integer $offset Offset
|
67 |
+
* @return boolean
|
68 |
+
*/
|
69 |
+
public function offsetExists($offset)
|
70 |
+
{
|
71 |
+
return isset($this->$offset);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Gets offset.
|
76 |
+
* @param integer $offset Offset
|
77 |
+
* @return mixed
|
78 |
+
*/
|
79 |
+
public function offsetGet($offset)
|
80 |
+
{
|
81 |
+
return $this->$offset;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Sets value based on offset.
|
86 |
+
* @param integer $offset Offset
|
87 |
+
* @param mixed $value Value to be set
|
88 |
+
* @return void
|
89 |
+
*/
|
90 |
+
public function offsetSet($offset, $value)
|
91 |
+
{
|
92 |
+
$this->$offset = $value;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Unsets offset.
|
97 |
+
* @param integer $offset Offset
|
98 |
+
* @return void
|
99 |
+
*/
|
100 |
+
public function offsetUnset($offset)
|
101 |
+
{
|
102 |
+
unset($this->$offset);
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Gets the string presentation of the object
|
107 |
+
* @return string
|
108 |
+
*/
|
109 |
+
public function __toString()
|
110 |
+
{
|
111 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
112 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
113 |
+
} else {
|
114 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
vendor/square/connect/lib/Model/MeasurementUnitUnitType.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* MeasurementUnitUnitType Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class MeasurementUnitUnitType implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
|
52 |
+
);
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Constructor
|
57 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
58 |
+
*/
|
59 |
+
public function __construct(array $data = null)
|
60 |
+
{
|
61 |
+
if ($data != null) {
|
62 |
+
}
|
63 |
+
}
|
64 |
+
/**
|
65 |
+
* Returns true if offset exists. False otherwise.
|
66 |
+
* @param integer $offset Offset
|
67 |
+
* @return boolean
|
68 |
+
*/
|
69 |
+
public function offsetExists($offset)
|
70 |
+
{
|
71 |
+
return isset($this->$offset);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Gets offset.
|
76 |
+
* @param integer $offset Offset
|
77 |
+
* @return mixed
|
78 |
+
*/
|
79 |
+
public function offsetGet($offset)
|
80 |
+
{
|
81 |
+
return $this->$offset;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Sets value based on offset.
|
86 |
+
* @param integer $offset Offset
|
87 |
+
* @param mixed $value Value to be set
|
88 |
+
* @return void
|
89 |
+
*/
|
90 |
+
public function offsetSet($offset, $value)
|
91 |
+
{
|
92 |
+
$this->$offset = $value;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Unsets offset.
|
97 |
+
* @param integer $offset Offset
|
98 |
+
* @return void
|
99 |
+
*/
|
100 |
+
public function offsetUnset($offset)
|
101 |
+
{
|
102 |
+
unset($this->$offset);
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Gets the string presentation of the object
|
107 |
+
* @return string
|
108 |
+
*/
|
109 |
+
public function __toString()
|
110 |
+
{
|
111 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
112 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
113 |
+
} else {
|
114 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
vendor/square/connect/lib/Model/Money.php
CHANGED
@@ -56,12 +56,12 @@ class Money implements ArrayAccess
|
|
56 |
);
|
57 |
|
58 |
/**
|
59 |
-
* $amount The amount of money, in the smallest denomination of the currency indicated by `currency`. For example, when `currency` is `USD`, `amount` is in cents.
|
60 |
* @var int
|
61 |
*/
|
62 |
protected $amount;
|
63 |
/**
|
64 |
-
* $currency The type of currency, in __ISO 4217 format__. For example, the currency code for US dollars is `USD`. See [Currency](#type-currency) for possible values
|
65 |
* @var string
|
66 |
*/
|
67 |
protected $currency;
|
@@ -96,7 +96,7 @@ class Money implements ArrayAccess
|
|
96 |
|
97 |
/**
|
98 |
* Sets amount
|
99 |
-
* @param int $amount The amount of money, in the smallest denomination of the currency indicated by `currency`. For example, when `currency` is `USD`, `amount` is in cents.
|
100 |
* @return $this
|
101 |
*/
|
102 |
public function setAmount($amount)
|
@@ -115,7 +115,7 @@ class Money implements ArrayAccess
|
|
115 |
|
116 |
/**
|
117 |
* Sets currency
|
118 |
-
* @param string $currency The type of currency, in __ISO 4217 format__. For example, the currency code for US dollars is `USD`. See [Currency](#type-currency) for possible values
|
119 |
* @return $this
|
120 |
*/
|
121 |
public function setCurrency($currency)
|
56 |
);
|
57 |
|
58 |
/**
|
59 |
+
* $amount The amount of money, in the smallest denomination of the currency indicated by `currency`. For example, when `currency` is `USD`, `amount` is in cents. Monetary amounts can be positive or negative. See the specific API documentation to determine the meaning of the sign in a particular case.
|
60 |
* @var int
|
61 |
*/
|
62 |
protected $amount;
|
63 |
/**
|
64 |
+
* $currency The type of currency, in __ISO 4217 format__. For example, the currency code for US dollars is `USD`. See [Currency](#type-currency) for possible values. See [Currency](#type-currency) for possible values
|
65 |
* @var string
|
66 |
*/
|
67 |
protected $currency;
|
96 |
|
97 |
/**
|
98 |
* Sets amount
|
99 |
+
* @param int $amount The amount of money, in the smallest denomination of the currency indicated by `currency`. For example, when `currency` is `USD`, `amount` is in cents. Monetary amounts can be positive or negative. See the specific API documentation to determine the meaning of the sign in a particular case.
|
100 |
* @return $this
|
101 |
*/
|
102 |
public function setAmount($amount)
|
115 |
|
116 |
/**
|
117 |
* Sets currency
|
118 |
+
* @param string $currency The type of currency, in __ISO 4217 format__. For example, the currency code for US dollars is `USD`. See [Currency](#type-currency) for possible values. See [Currency](#type-currency) for possible values
|
119 |
* @return $this
|
120 |
*/
|
121 |
public function setCurrency($currency)
|
vendor/square/connect/lib/Model/ObtainTokenResponse.php
CHANGED
@@ -100,12 +100,12 @@ class ObtainTokenResponse implements ArrayAccess
|
|
100 |
*/
|
101 |
protected $merchant_id;
|
102 |
/**
|
103 |
-
* $subscription_id
|
104 |
* @var string
|
105 |
*/
|
106 |
protected $subscription_id;
|
107 |
/**
|
108 |
-
* $plan_id The ID of the
|
109 |
* @var string
|
110 |
*/
|
111 |
protected $plan_id;
|
@@ -256,7 +256,7 @@ class ObtainTokenResponse implements ArrayAccess
|
|
256 |
|
257 |
/**
|
258 |
* Sets subscription_id
|
259 |
-
* @param string $subscription_id
|
260 |
* @return $this
|
261 |
*/
|
262 |
public function setSubscriptionId($subscription_id)
|
@@ -275,7 +275,7 @@ class ObtainTokenResponse implements ArrayAccess
|
|
275 |
|
276 |
/**
|
277 |
* Sets plan_id
|
278 |
-
* @param string $plan_id The ID of the
|
279 |
* @return $this
|
280 |
*/
|
281 |
public function setPlanId($plan_id)
|
100 |
*/
|
101 |
protected $merchant_id;
|
102 |
/**
|
103 |
+
* $subscription_id __LEGACY FIELD__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization.
|
104 |
* @var string
|
105 |
*/
|
106 |
protected $subscription_id;
|
107 |
/**
|
108 |
+
* $plan_id __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization.
|
109 |
* @var string
|
110 |
*/
|
111 |
protected $plan_id;
|
256 |
|
257 |
/**
|
258 |
* Sets subscription_id
|
259 |
+
* @param string $subscription_id __LEGACY FIELD__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization.
|
260 |
* @return $this
|
261 |
*/
|
262 |
public function setSubscriptionId($subscription_id)
|
275 |
|
276 |
/**
|
277 |
* Sets plan_id
|
278 |
+
* @param string $plan_id __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization.
|
279 |
* @return $this
|
280 |
*/
|
281 |
public function setPlanId($plan_id)
|
vendor/square/connect/lib/Model/Order.php
CHANGED
@@ -32,6 +32,7 @@ class Order implements ArrayAccess
|
|
32 |
'line_items' => '\SquareConnect\Model\OrderLineItem[]',
|
33 |
'taxes' => '\SquareConnect\Model\OrderLineItemTax[]',
|
34 |
'discounts' => '\SquareConnect\Model\OrderLineItemDiscount[]',
|
|
|
35 |
'fulfillments' => '\SquareConnect\Model\OrderFulfillment[]',
|
36 |
'returns' => '\SquareConnect\Model\OrderReturn[]',
|
37 |
'return_amounts' => '\SquareConnect\Model\OrderMoneyAmounts',
|
@@ -43,9 +44,11 @@ class Order implements ArrayAccess
|
|
43 |
'updated_at' => 'string',
|
44 |
'closed_at' => 'string',
|
45 |
'state' => 'string',
|
|
|
46 |
'total_money' => '\SquareConnect\Model\Money',
|
47 |
'total_tax_money' => '\SquareConnect\Model\Money',
|
48 |
-
'total_discount_money' => '\SquareConnect\Model\Money'
|
|
|
49 |
);
|
50 |
|
51 |
/**
|
@@ -61,6 +64,7 @@ class Order implements ArrayAccess
|
|
61 |
'line_items' => 'line_items',
|
62 |
'taxes' => 'taxes',
|
63 |
'discounts' => 'discounts',
|
|
|
64 |
'fulfillments' => 'fulfillments',
|
65 |
'returns' => 'returns',
|
66 |
'return_amounts' => 'return_amounts',
|
@@ -72,9 +76,11 @@ class Order implements ArrayAccess
|
|
72 |
'updated_at' => 'updated_at',
|
73 |
'closed_at' => 'closed_at',
|
74 |
'state' => 'state',
|
|
|
75 |
'total_money' => 'total_money',
|
76 |
'total_tax_money' => 'total_tax_money',
|
77 |
-
'total_discount_money' => 'total_discount_money'
|
|
|
78 |
);
|
79 |
|
80 |
/**
|
@@ -90,6 +96,7 @@ class Order implements ArrayAccess
|
|
90 |
'line_items' => 'setLineItems',
|
91 |
'taxes' => 'setTaxes',
|
92 |
'discounts' => 'setDiscounts',
|
|
|
93 |
'fulfillments' => 'setFulfillments',
|
94 |
'returns' => 'setReturns',
|
95 |
'return_amounts' => 'setReturnAmounts',
|
@@ -101,9 +108,11 @@ class Order implements ArrayAccess
|
|
101 |
'updated_at' => 'setUpdatedAt',
|
102 |
'closed_at' => 'setClosedAt',
|
103 |
'state' => 'setState',
|
|
|
104 |
'total_money' => 'setTotalMoney',
|
105 |
'total_tax_money' => 'setTotalTaxMoney',
|
106 |
-
'total_discount_money' => 'setTotalDiscountMoney'
|
|
|
107 |
);
|
108 |
|
109 |
/**
|
@@ -119,6 +128,7 @@ class Order implements ArrayAccess
|
|
119 |
'line_items' => 'getLineItems',
|
120 |
'taxes' => 'getTaxes',
|
121 |
'discounts' => 'getDiscounts',
|
|
|
122 |
'fulfillments' => 'getFulfillments',
|
123 |
'returns' => 'getReturns',
|
124 |
'return_amounts' => 'getReturnAmounts',
|
@@ -130,13 +140,15 @@ class Order implements ArrayAccess
|
|
130 |
'updated_at' => 'getUpdatedAt',
|
131 |
'closed_at' => 'getClosedAt',
|
132 |
'state' => 'getState',
|
|
|
133 |
'total_money' => 'getTotalMoney',
|
134 |
'total_tax_money' => 'getTotalTaxMoney',
|
135 |
-
'total_discount_money' => 'getTotalDiscountMoney'
|
|
|
136 |
);
|
137 |
|
138 |
/**
|
139 |
-
* $id The order's unique ID.
|
140 |
* @var string
|
141 |
*/
|
142 |
protected $id;
|
@@ -166,15 +178,20 @@ class Order implements ArrayAccess
|
|
166 |
*/
|
167 |
protected $line_items;
|
168 |
/**
|
169 |
-
* $taxes
|
170 |
* @var \SquareConnect\Model\OrderLineItemTax[]
|
171 |
*/
|
172 |
protected $taxes;
|
173 |
/**
|
174 |
-
* $discounts
|
175 |
* @var \SquareConnect\Model\OrderLineItemDiscount[]
|
176 |
*/
|
177 |
protected $discounts;
|
|
|
|
|
|
|
|
|
|
|
178 |
/**
|
179 |
* $fulfillments Details on order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API may contain multiple fulfillments.
|
180 |
* @var \SquareConnect\Model\OrderFulfillment[]
|
@@ -201,12 +218,12 @@ class Order implements ArrayAccess
|
|
201 |
*/
|
202 |
protected $rounding_adjustment;
|
203 |
/**
|
204 |
-
* $tenders The Tenders which were used to pay for the Order.
|
205 |
* @var \SquareConnect\Model\Tender[]
|
206 |
*/
|
207 |
protected $tenders;
|
208 |
/**
|
209 |
-
* $refunds The Refunds that are part of this Order.
|
210 |
* @var \SquareConnect\Model\Refund[]
|
211 |
*/
|
212 |
protected $refunds;
|
@@ -230,6 +247,11 @@ class Order implements ArrayAccess
|
|
230 |
* @var string
|
231 |
*/
|
232 |
protected $state;
|
|
|
|
|
|
|
|
|
|
|
233 |
/**
|
234 |
* $total_money The total amount of money to collect for the order.
|
235 |
* @var \SquareConnect\Model\Money
|
@@ -245,6 +267,11 @@ class Order implements ArrayAccess
|
|
245 |
* @var \SquareConnect\Model\Money
|
246 |
*/
|
247 |
protected $total_discount_money;
|
|
|
|
|
|
|
|
|
|
|
248 |
|
249 |
/**
|
250 |
* Constructor
|
@@ -293,6 +320,11 @@ class Order implements ArrayAccess
|
|
293 |
} else {
|
294 |
$this->discounts = null;
|
295 |
}
|
|
|
|
|
|
|
|
|
|
|
296 |
if (isset($data["fulfillments"])) {
|
297 |
$this->fulfillments = $data["fulfillments"];
|
298 |
} else {
|
@@ -348,6 +380,11 @@ class Order implements ArrayAccess
|
|
348 |
} else {
|
349 |
$this->state = null;
|
350 |
}
|
|
|
|
|
|
|
|
|
|
|
351 |
if (isset($data["total_money"])) {
|
352 |
$this->total_money = $data["total_money"];
|
353 |
} else {
|
@@ -363,6 +400,11 @@ class Order implements ArrayAccess
|
|
363 |
} else {
|
364 |
$this->total_discount_money = null;
|
365 |
}
|
|
|
|
|
|
|
|
|
|
|
366 |
}
|
367 |
}
|
368 |
/**
|
@@ -376,7 +418,7 @@ class Order implements ArrayAccess
|
|
376 |
|
377 |
/**
|
378 |
* Sets id
|
379 |
-
* @param string $id The order's unique ID.
|
380 |
* @return $this
|
381 |
*/
|
382 |
public function setId($id)
|
@@ -490,7 +532,7 @@ class Order implements ArrayAccess
|
|
490 |
|
491 |
/**
|
492 |
* Sets taxes
|
493 |
-
* @param \SquareConnect\Model\OrderLineItemTax[] $taxes
|
494 |
* @return $this
|
495 |
*/
|
496 |
public function setTaxes($taxes)
|
@@ -509,7 +551,7 @@ class Order implements ArrayAccess
|
|
509 |
|
510 |
/**
|
511 |
* Sets discounts
|
512 |
-
* @param \SquareConnect\Model\OrderLineItemDiscount[] $discounts
|
513 |
* @return $this
|
514 |
*/
|
515 |
public function setDiscounts($discounts)
|
@@ -517,6 +559,25 @@ class Order implements ArrayAccess
|
|
517 |
$this->discounts = $discounts;
|
518 |
return $this;
|
519 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
520 |
/**
|
521 |
* Gets fulfillments
|
522 |
* @return \SquareConnect\Model\OrderFulfillment[]
|
@@ -623,7 +684,7 @@ class Order implements ArrayAccess
|
|
623 |
|
624 |
/**
|
625 |
* Sets tenders
|
626 |
-
* @param \SquareConnect\Model\Tender[] $tenders The Tenders which were used to pay for the Order.
|
627 |
* @return $this
|
628 |
*/
|
629 |
public function setTenders($tenders)
|
@@ -642,7 +703,7 @@ class Order implements ArrayAccess
|
|
642 |
|
643 |
/**
|
644 |
* Sets refunds
|
645 |
-
* @param \SquareConnect\Model\Refund[] $refunds The Refunds that are part of this Order.
|
646 |
* @return $this
|
647 |
*/
|
648 |
public function setRefunds($refunds)
|
@@ -726,6 +787,25 @@ class Order implements ArrayAccess
|
|
726 |
$this->state = $state;
|
727 |
return $this;
|
728 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
729 |
/**
|
730 |
* Gets total_money
|
731 |
* @return \SquareConnect\Model\Money
|
@@ -783,6 +863,25 @@ class Order implements ArrayAccess
|
|
783 |
$this->total_discount_money = $total_discount_money;
|
784 |
return $this;
|
785 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
786 |
/**
|
787 |
* Returns true if offset exists. False otherwise.
|
788 |
* @param integer $offset Offset
|
32 |
'line_items' => '\SquareConnect\Model\OrderLineItem[]',
|
33 |
'taxes' => '\SquareConnect\Model\OrderLineItemTax[]',
|
34 |
'discounts' => '\SquareConnect\Model\OrderLineItemDiscount[]',
|
35 |
+
'service_charges' => '\SquareConnect\Model\OrderServiceCharge[]',
|
36 |
'fulfillments' => '\SquareConnect\Model\OrderFulfillment[]',
|
37 |
'returns' => '\SquareConnect\Model\OrderReturn[]',
|
38 |
'return_amounts' => '\SquareConnect\Model\OrderMoneyAmounts',
|
44 |
'updated_at' => 'string',
|
45 |
'closed_at' => 'string',
|
46 |
'state' => 'string',
|
47 |
+
'version' => 'int',
|
48 |
'total_money' => '\SquareConnect\Model\Money',
|
49 |
'total_tax_money' => '\SquareConnect\Model\Money',
|
50 |
+
'total_discount_money' => '\SquareConnect\Model\Money',
|
51 |
+
'total_service_charge_money' => '\SquareConnect\Model\Money'
|
52 |
);
|
53 |
|
54 |
/**
|
64 |
'line_items' => 'line_items',
|
65 |
'taxes' => 'taxes',
|
66 |
'discounts' => 'discounts',
|
67 |
+
'service_charges' => 'service_charges',
|
68 |
'fulfillments' => 'fulfillments',
|
69 |
'returns' => 'returns',
|
70 |
'return_amounts' => 'return_amounts',
|
76 |
'updated_at' => 'updated_at',
|
77 |
'closed_at' => 'closed_at',
|
78 |
'state' => 'state',
|
79 |
+
'version' => 'version',
|
80 |
'total_money' => 'total_money',
|
81 |
'total_tax_money' => 'total_tax_money',
|
82 |
+
'total_discount_money' => 'total_discount_money',
|
83 |
+
'total_service_charge_money' => 'total_service_charge_money'
|
84 |
);
|
85 |
|
86 |
/**
|
96 |
'line_items' => 'setLineItems',
|
97 |
'taxes' => 'setTaxes',
|
98 |
'discounts' => 'setDiscounts',
|
99 |
+
'service_charges' => 'setServiceCharges',
|
100 |
'fulfillments' => 'setFulfillments',
|
101 |
'returns' => 'setReturns',
|
102 |
'return_amounts' => 'setReturnAmounts',
|
108 |
'updated_at' => 'setUpdatedAt',
|
109 |
'closed_at' => 'setClosedAt',
|
110 |
'state' => 'setState',
|
111 |
+
'version' => 'setVersion',
|
112 |
'total_money' => 'setTotalMoney',
|
113 |
'total_tax_money' => 'setTotalTaxMoney',
|
114 |
+
'total_discount_money' => 'setTotalDiscountMoney',
|
115 |
+
'total_service_charge_money' => 'setTotalServiceChargeMoney'
|
116 |
);
|
117 |
|
118 |
/**
|
128 |
'line_items' => 'getLineItems',
|
129 |
'taxes' => 'getTaxes',
|
130 |
'discounts' => 'getDiscounts',
|
131 |
+
'service_charges' => 'getServiceCharges',
|
132 |
'fulfillments' => 'getFulfillments',
|
133 |
'returns' => 'getReturns',
|
134 |
'return_amounts' => 'getReturnAmounts',
|
140 |
'updated_at' => 'getUpdatedAt',
|
141 |
'closed_at' => 'getClosedAt',
|
142 |
'state' => 'getState',
|
143 |
+
'version' => 'getVersion',
|
144 |
'total_money' => 'getTotalMoney',
|
145 |
'total_tax_money' => 'getTotalTaxMoney',
|
146 |
+
'total_discount_money' => 'getTotalDiscountMoney',
|
147 |
+
'total_service_charge_money' => 'getTotalServiceChargeMoney'
|
148 |
);
|
149 |
|
150 |
/**
|
151 |
+
* $id The order's unique ID.
|
152 |
* @var string
|
153 |
*/
|
154 |
protected $id;
|
178 |
*/
|
179 |
protected $line_items;
|
180 |
/**
|
181 |
+
* $taxes The list of all taxes associated with the order. Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with `LINE_ITEM` scope, an `OrderLineItemAppliedTax` must be added to each line item that the tax applies to. For taxes with `ORDER` scope, the server will generate an `OrderLineItemAppliedTax` for every line item. On reads, each tax in the list will include the total amount of that tax applied to the order. __IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, usage of the deprecated `line_items.taxes` field will result in an error. Please use `line_items.applied_taxes` instead.
|
182 |
* @var \SquareConnect\Model\OrderLineItemTax[]
|
183 |
*/
|
184 |
protected $taxes;
|
185 |
/**
|
186 |
+
* $discounts The list of all discounts associated with the order. Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For discounts scoped to `LINE_ITEM`, an `OrderLineItemAppliedDiscount` must be added to each line item that the discount applies to. For discounts with `ORDER` scope, the server will generate an `OrderLineItemAppliedDiscount` for every line item. __IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this field, usage of the deprecated `line_items.discounts` field will result in an error. Please use `line_items.applied_discounts` instead.
|
187 |
* @var \SquareConnect\Model\OrderLineItemDiscount[]
|
188 |
*/
|
189 |
protected $discounts;
|
190 |
+
/**
|
191 |
+
* $service_charges A list of service charges applied to the order.
|
192 |
+
* @var \SquareConnect\Model\OrderServiceCharge[]
|
193 |
+
*/
|
194 |
+
protected $service_charges;
|
195 |
/**
|
196 |
* $fulfillments Details on order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API may contain multiple fulfillments.
|
197 |
* @var \SquareConnect\Model\OrderFulfillment[]
|
218 |
*/
|
219 |
protected $rounding_adjustment;
|
220 |
/**
|
221 |
+
* $tenders The Tenders which were used to pay for the Order.
|
222 |
* @var \SquareConnect\Model\Tender[]
|
223 |
*/
|
224 |
protected $tenders;
|
225 |
/**
|
226 |
+
* $refunds The Refunds that are part of this Order.
|
227 |
* @var \SquareConnect\Model\Refund[]
|
228 |
*/
|
229 |
protected $refunds;
|
247 |
* @var string
|
248 |
*/
|
249 |
protected $state;
|
250 |
+
/**
|
251 |
+
* $version Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](/orders-api/manage-orders#update-orders).
|
252 |
+
* @var int
|
253 |
+
*/
|
254 |
+
protected $version;
|
255 |
/**
|
256 |
* $total_money The total amount of money to collect for the order.
|
257 |
* @var \SquareConnect\Model\Money
|
267 |
* @var \SquareConnect\Model\Money
|
268 |
*/
|
269 |
protected $total_discount_money;
|
270 |
+
/**
|
271 |
+
* $total_service_charge_money The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts.
|
272 |
+
* @var \SquareConnect\Model\Money
|
273 |
+
*/
|
274 |
+
protected $total_service_charge_money;
|
275 |
|
276 |
/**
|
277 |
* Constructor
|
320 |
} else {
|
321 |
$this->discounts = null;
|
322 |
}
|
323 |
+
if (isset($data["service_charges"])) {
|
324 |
+
$this->service_charges = $data["service_charges"];
|
325 |
+
} else {
|
326 |
+
$this->service_charges = null;
|
327 |
+
}
|
328 |
if (isset($data["fulfillments"])) {
|
329 |
$this->fulfillments = $data["fulfillments"];
|
330 |
} else {
|
380 |
} else {
|
381 |
$this->state = null;
|
382 |
}
|
383 |
+
if (isset($data["version"])) {
|
384 |
+
$this->version = $data["version"];
|
385 |
+
} else {
|
386 |
+
$this->version = null;
|
387 |
+
}
|
388 |
if (isset($data["total_money"])) {
|
389 |
$this->total_money = $data["total_money"];
|
390 |
} else {
|
400 |
} else {
|
401 |
$this->total_discount_money = null;
|
402 |
}
|
403 |
+
if (isset($data["total_service_charge_money"])) {
|
404 |
+
$this->total_service_charge_money = $data["total_service_charge_money"];
|
405 |
+
} else {
|
406 |
+
$this->total_service_charge_money = null;
|
407 |
+
}
|
408 |
}
|
409 |
}
|
410 |
/**
|
418 |
|
419 |
/**
|
420 |
* Sets id
|
421 |
+
* @param string $id The order's unique ID.
|
422 |
* @return $this
|
423 |
*/
|
424 |
public function setId($id)
|
532 |
|
533 |
/**
|
534 |
* Sets taxes
|
535 |
+
* @param \SquareConnect\Model\OrderLineItemTax[] $taxes The list of all taxes associated with the order. Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with `LINE_ITEM` scope, an `OrderLineItemAppliedTax` must be added to each line item that the tax applies to. For taxes with `ORDER` scope, the server will generate an `OrderLineItemAppliedTax` for every line item. On reads, each tax in the list will include the total amount of that tax applied to the order. __IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, usage of the deprecated `line_items.taxes` field will result in an error. Please use `line_items.applied_taxes` instead.
|
536 |
* @return $this
|
537 |
*/
|
538 |
public function setTaxes($taxes)
|
551 |
|
552 |
/**
|
553 |
* Sets discounts
|
554 |
+
* @param \SquareConnect\Model\OrderLineItemDiscount[] $discounts The list of all discounts associated with the order. Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For discounts scoped to `LINE_ITEM`, an `OrderLineItemAppliedDiscount` must be added to each line item that the discount applies to. For discounts with `ORDER` scope, the server will generate an `OrderLineItemAppliedDiscount` for every line item. __IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this field, usage of the deprecated `line_items.discounts` field will result in an error. Please use `line_items.applied_discounts` instead.
|
555 |
* @return $this
|
556 |
*/
|
557 |
public function setDiscounts($discounts)
|
559 |
$this->discounts = $discounts;
|
560 |
return $this;
|
561 |
}
|
562 |
+
/**
|
563 |
+
* Gets service_charges
|
564 |
+
* @return \SquareConnect\Model\OrderServiceCharge[]
|
565 |
+
*/
|
566 |
+
public function getServiceCharges()
|
567 |
+
{
|
568 |
+
return $this->service_charges;
|
569 |
+
}
|
570 |
+
|
571 |
+
/**
|
572 |
+
* Sets service_charges
|
573 |
+
* @param \SquareConnect\Model\OrderServiceCharge[] $service_charges A list of service charges applied to the order.
|
574 |
+
* @return $this
|
575 |
+
*/
|
576 |
+
public function setServiceCharges($service_charges)
|
577 |
+
{
|
578 |
+
$this->service_charges = $service_charges;
|
579 |
+
return $this;
|
580 |
+
}
|
581 |
/**
|
582 |
* Gets fulfillments
|
583 |
* @return \SquareConnect\Model\OrderFulfillment[]
|
684 |
|
685 |
/**
|
686 |
* Sets tenders
|
687 |
+
* @param \SquareConnect\Model\Tender[] $tenders The Tenders which were used to pay for the Order.
|
688 |
* @return $this
|
689 |
*/
|
690 |
public function setTenders($tenders)
|
703 |
|
704 |
/**
|
705 |
* Sets refunds
|
706 |
+
* @param \SquareConnect\Model\Refund[] $refunds The Refunds that are part of this Order.
|
707 |
* @return $this
|
708 |
*/
|
709 |
public function setRefunds($refunds)
|
787 |
$this->state = $state;
|
788 |
return $this;
|
789 |
}
|
790 |
+
/**
|
791 |
+
* Gets version
|
792 |
+
* @return int
|
793 |
+
*/
|
794 |
+
public function getVersion()
|
795 |
+
{
|
796 |
+
return $this->version;
|
797 |
+
}
|
798 |
+
|
799 |
+
/**
|
800 |
+
* Sets version
|
801 |
+
* @param int $version Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](/orders-api/manage-orders#update-orders).
|
802 |
+
* @return $this
|
803 |
+
*/
|
804 |
+
public function setVersion($version)
|
805 |
+
{
|
806 |
+
$this->version = $version;
|
807 |
+
return $this;
|
808 |
+
}
|
809 |
/**
|
810 |
* Gets total_money
|
811 |
* @return \SquareConnect\Model\Money
|
863 |
$this->total_discount_money = $total_discount_money;
|
864 |
return $this;
|
865 |
}
|
866 |
+
/**
|
867 |
+
* Gets total_service_charge_money
|
868 |
+
* @return \SquareConnect\Model\Money
|
869 |
+
*/
|
870 |
+
public function getTotalServiceChargeMoney()
|
871 |
+
{
|
872 |
+
return $this->total_service_charge_money;
|
873 |
+
}
|
874 |
+
|
875 |
+
/**
|
876 |
+
* Sets total_service_charge_money
|
877 |
+
* @param \SquareConnect\Model\Money $total_service_charge_money The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts.
|
878 |
+
* @return $this
|
879 |
+
*/
|
880 |
+
public function setTotalServiceChargeMoney($total_service_charge_money)
|
881 |
+
{
|
882 |
+
$this->total_service_charge_money = $total_service_charge_money;
|
883 |
+
return $this;
|
884 |
+
}
|
885 |
/**
|
886 |
* Returns true if offset exists. False otherwise.
|
887 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/OrderEntry.php
CHANGED
@@ -25,6 +25,7 @@ class OrderEntry implements ArrayAccess
|
|
25 |
*/
|
26 |
static $swaggerTypes = array(
|
27 |
'order_id' => 'string',
|
|
|
28 |
'location_id' => 'string'
|
29 |
);
|
30 |
|
@@ -34,6 +35,7 @@ class OrderEntry implements ArrayAccess
|
|
34 |
*/
|
35 |
static $attributeMap = array(
|
36 |
'order_id' => 'order_id',
|
|
|
37 |
'location_id' => 'location_id'
|
38 |
);
|
39 |
|
@@ -43,6 +45,7 @@ class OrderEntry implements ArrayAccess
|
|
43 |
*/
|
44 |
static $setters = array(
|
45 |
'order_id' => 'setOrderId',
|
|
|
46 |
'location_id' => 'setLocationId'
|
47 |
);
|
48 |
|
@@ -52,6 +55,7 @@ class OrderEntry implements ArrayAccess
|
|
52 |
*/
|
53 |
static $getters = array(
|
54 |
'order_id' => 'getOrderId',
|
|
|
55 |
'location_id' => 'getLocationId'
|
56 |
);
|
57 |
|
@@ -60,6 +64,11 @@ class OrderEntry implements ArrayAccess
|
|
60 |
* @var string
|
61 |
*/
|
62 |
protected $order_id;
|
|
|
|
|
|
|
|
|
|
|
63 |
/**
|
64 |
* $location_id The location id the Order belongs to.
|
65 |
* @var string
|
@@ -78,6 +87,11 @@ class OrderEntry implements ArrayAccess
|
|
78 |
} else {
|
79 |
$this->order_id = null;
|
80 |
}
|
|
|
|
|
|
|
|
|
|
|
81 |
if (isset($data["location_id"])) {
|
82 |
$this->location_id = $data["location_id"];
|
83 |
} else {
|
@@ -104,6 +118,25 @@ class OrderEntry implements ArrayAccess
|
|
104 |
$this->order_id = $order_id;
|
105 |
return $this;
|
106 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
/**
|
108 |
* Gets location_id
|
109 |
* @return string
|
25 |
*/
|
26 |
static $swaggerTypes = array(
|
27 |
'order_id' => 'string',
|
28 |
+
'version' => 'int',
|
29 |
'location_id' => 'string'
|
30 |
);
|
31 |
|
35 |
*/
|
36 |
static $attributeMap = array(
|
37 |
'order_id' => 'order_id',
|
38 |
+
'version' => 'version',
|
39 |
'location_id' => 'location_id'
|
40 |
);
|
41 |
|
45 |
*/
|
46 |
static $setters = array(
|
47 |
'order_id' => 'setOrderId',
|
48 |
+
'version' => 'setVersion',
|
49 |
'location_id' => 'setLocationId'
|
50 |
);
|
51 |
|
55 |
*/
|
56 |
static $getters = array(
|
57 |
'order_id' => 'getOrderId',
|
58 |
+
'version' => 'getVersion',
|
59 |
'location_id' => 'getLocationId'
|
60 |
);
|
61 |
|
64 |
* @var string
|
65 |
*/
|
66 |
protected $order_id;
|
67 |
+
/**
|
68 |
+
* $version Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](/orders-api/manage-orders#update-orders).
|
69 |
+
* @var int
|
70 |
+
*/
|
71 |
+
protected $version;
|
72 |
/**
|
73 |
* $location_id The location id the Order belongs to.
|
74 |
* @var string
|
87 |
} else {
|
88 |
$this->order_id = null;
|
89 |
}
|
90 |
+
if (isset($data["version"])) {
|
91 |
+
$this->version = $data["version"];
|
92 |
+
} else {
|
93 |
+
$this->version = null;
|
94 |
+
}
|
95 |
if (isset($data["location_id"])) {
|
96 |
$this->location_id = $data["location_id"];
|
97 |
} else {
|
118 |
$this->order_id = $order_id;
|
119 |
return $this;
|
120 |
}
|
121 |
+
/**
|
122 |
+
* Gets version
|
123 |
+
* @return int
|
124 |
+
*/
|
125 |
+
public function getVersion()
|
126 |
+
{
|
127 |
+
return $this->version;
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Sets version
|
132 |
+
* @param int $version Version number which is incremented each time an update is committed to the order. Orders that were not created through the API will not include a version and thus cannot be updated. [Read more about working with versions](/orders-api/manage-orders#update-orders).
|
133 |
+
* @return $this
|
134 |
+
*/
|
135 |
+
public function setVersion($version)
|
136 |
+
{
|
137 |
+
$this->version = $version;
|
138 |
+
return $this;
|
139 |
+
}
|
140 |
/**
|
141 |
* Gets location_id
|
142 |
* @return string
|
vendor/square/connect/lib/Model/OrderFulfillment.php
CHANGED
@@ -24,9 +24,11 @@ class OrderFulfillment implements ArrayAccess
|
|
24 |
* @var string[]
|
25 |
*/
|
26 |
static $swaggerTypes = array(
|
|
|
27 |
'type' => 'string',
|
28 |
'state' => 'string',
|
29 |
-
'pickup_details' => '\SquareConnect\Model\OrderFulfillmentPickupDetails'
|
|
|
30 |
);
|
31 |
|
32 |
/**
|
@@ -34,9 +36,11 @@ class OrderFulfillment implements ArrayAccess
|
|
34 |
* @var string[]
|
35 |
*/
|
36 |
static $attributeMap = array(
|
|
|
37 |
'type' => 'type',
|
38 |
'state' => 'state',
|
39 |
-
'pickup_details' => 'pickup_details'
|
|
|
40 |
);
|
41 |
|
42 |
/**
|
@@ -44,9 +48,11 @@ class OrderFulfillment implements ArrayAccess
|
|
44 |
* @var string[]
|
45 |
*/
|
46 |
static $setters = array(
|
|
|
47 |
'type' => 'setType',
|
48 |
'state' => 'setState',
|
49 |
-
'pickup_details' => 'setPickupDetails'
|
|
|
50 |
);
|
51 |
|
52 |
/**
|
@@ -54,11 +60,18 @@ class OrderFulfillment implements ArrayAccess
|
|
54 |
* @var string[]
|
55 |
*/
|
56 |
static $getters = array(
|
|
|
57 |
'type' => 'getType',
|
58 |
'state' => 'getState',
|
59 |
-
'pickup_details' => 'getPickupDetails'
|
|
|
60 |
);
|
61 |
|
|
|
|
|
|
|
|
|
|
|
62 |
/**
|
63 |
* $type The type of the fulfillment. See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values
|
64 |
* @var string
|
@@ -70,10 +83,15 @@ class OrderFulfillment implements ArrayAccess
|
|
70 |
*/
|
71 |
protected $state;
|
72 |
/**
|
73 |
-
* $pickup_details Contains pickup
|
74 |
* @var \SquareConnect\Model\OrderFulfillmentPickupDetails
|
75 |
*/
|
76 |
protected $pickup_details;
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
/**
|
79 |
* Constructor
|
@@ -82,6 +100,11 @@ class OrderFulfillment implements ArrayAccess
|
|
82 |
public function __construct(array $data = null)
|
83 |
{
|
84 |
if ($data != null) {
|
|
|
|
|
|
|
|
|
|
|
85 |
if (isset($data["type"])) {
|
86 |
$this->type = $data["type"];
|
87 |
} else {
|
@@ -97,8 +120,32 @@ class OrderFulfillment implements ArrayAccess
|
|
97 |
} else {
|
98 |
$this->pickup_details = null;
|
99 |
}
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
101 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
/**
|
103 |
* Gets type
|
104 |
* @return string
|
@@ -148,7 +195,7 @@ class OrderFulfillment implements ArrayAccess
|
|
148 |
|
149 |
/**
|
150 |
* Sets pickup_details
|
151 |
-
* @param \SquareConnect\Model\OrderFulfillmentPickupDetails $pickup_details Contains pickup
|
152 |
* @return $this
|
153 |
*/
|
154 |
public function setPickupDetails($pickup_details)
|
@@ -156,6 +203,25 @@ class OrderFulfillment implements ArrayAccess
|
|
156 |
$this->pickup_details = $pickup_details;
|
157 |
return $this;
|
158 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
/**
|
160 |
* Returns true if offset exists. False otherwise.
|
161 |
* @param integer $offset Offset
|
24 |
* @var string[]
|
25 |
*/
|
26 |
static $swaggerTypes = array(
|
27 |
+
'uid' => 'string',
|
28 |
'type' => 'string',
|
29 |
'state' => 'string',
|
30 |
+
'pickup_details' => '\SquareConnect\Model\OrderFulfillmentPickupDetails',
|
31 |
+
'shipment_details' => '\SquareConnect\Model\OrderFulfillmentShipmentDetails'
|
32 |
);
|
33 |
|
34 |
/**
|
36 |
* @var string[]
|
37 |
*/
|
38 |
static $attributeMap = array(
|
39 |
+
'uid' => 'uid',
|
40 |
'type' => 'type',
|
41 |
'state' => 'state',
|
42 |
+
'pickup_details' => 'pickup_details',
|
43 |
+
'shipment_details' => 'shipment_details'
|
44 |
);
|
45 |
|
46 |
/**
|
48 |
* @var string[]
|
49 |
*/
|
50 |
static $setters = array(
|
51 |
+
'uid' => 'setUid',
|
52 |
'type' => 'setType',
|
53 |
'state' => 'setState',
|
54 |
+
'pickup_details' => 'setPickupDetails',
|
55 |
+
'shipment_details' => 'setShipmentDetails'
|
56 |
);
|
57 |
|
58 |
/**
|
60 |
* @var string[]
|
61 |
*/
|
62 |
static $getters = array(
|
63 |
+
'uid' => 'getUid',
|
64 |
'type' => 'getType',
|
65 |
'state' => 'getState',
|
66 |
+
'pickup_details' => 'getPickupDetails',
|
67 |
+
'shipment_details' => 'getShipmentDetails'
|
68 |
);
|
69 |
|
70 |
+
/**
|
71 |
+
* $uid Unique ID that identifies the fulfillment only within this order.
|
72 |
+
* @var string
|
73 |
+
*/
|
74 |
+
protected $uid;
|
75 |
/**
|
76 |
* $type The type of the fulfillment. See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values
|
77 |
* @var string
|
83 |
*/
|
84 |
protected $state;
|
85 |
/**
|
86 |
+
* $pickup_details Contains details for a pickup fulfillment. Required when fulfillment type is `PICKUP`.
|
87 |
* @var \SquareConnect\Model\OrderFulfillmentPickupDetails
|
88 |
*/
|
89 |
protected $pickup_details;
|
90 |
+
/**
|
91 |
+
* $shipment_details Contains details for a shipment fulfillment. Required when fulfillment type is `SHIPMENT`. A shipment fulfillment's relationship to fulfillment `state`: `PROPOSED`: A shipment is requested. `RESERVED`: Fulfillment accepted. Shipment processing. `PREPARED`: Shipment packaged. Shipping label created. `COMPLETED`: Package has been shipped. `CANCELED`: Shipment has been canceled. `FAILED`: Shipment has failed.
|
92 |
+
* @var \SquareConnect\Model\OrderFulfillmentShipmentDetails
|
93 |
+
*/
|
94 |
+
protected $shipment_details;
|
95 |
|
96 |
/**
|
97 |
* Constructor
|
100 |
public function __construct(array $data = null)
|
101 |
{
|
102 |
if ($data != null) {
|
103 |
+
if (isset($data["uid"])) {
|
104 |
+
$this->uid = $data["uid"];
|
105 |
+
} else {
|
106 |
+
$this->uid = null;
|
107 |
+
}
|
108 |
if (isset($data["type"])) {
|
109 |
$this->type = $data["type"];
|
110 |
} else {
|
120 |
} else {
|
121 |
$this->pickup_details = null;
|
122 |
}
|
123 |
+
if (isset($data["shipment_details"])) {
|
124 |
+
$this->shipment_details = $data["shipment_details"];
|
125 |
+
} else {
|
126 |
+
$this->shipment_details = null;
|
127 |
+
}
|
128 |
}
|
129 |
}
|
130 |
+
/**
|
131 |
+
* Gets uid
|
132 |
+
* @return string
|
133 |
+
*/
|
134 |
+
public function getUid()
|
135 |
+
{
|
136 |
+
return $this->uid;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Sets uid
|
141 |
+
* @param string $uid Unique ID that identifies the fulfillment only within this order.
|
142 |
+
* @return $this
|
143 |
+
*/
|
144 |
+
public function setUid($uid)
|
145 |
+
{
|
146 |
+
$this->uid = $uid;
|
147 |
+
return $this;
|
148 |
+
}
|
149 |
/**
|
150 |
* Gets type
|
151 |
* @return string
|
195 |
|
196 |
/**
|
197 |
* Sets pickup_details
|
198 |
+
* @param \SquareConnect\Model\OrderFulfillmentPickupDetails $pickup_details Contains details for a pickup fulfillment. Required when fulfillment type is `PICKUP`.
|
199 |
* @return $this
|
200 |
*/
|
201 |
public function setPickupDetails($pickup_details)
|
203 |
$this->pickup_details = $pickup_details;
|
204 |
return $this;
|
205 |
}
|
206 |
+
/**
|
207 |
+
* Gets shipment_details
|
208 |
+
* @return \SquareConnect\Model\OrderFulfillmentShipmentDetails
|
209 |
+
*/
|
210 |
+
public function getShipmentDetails()
|
211 |
+
{
|
212 |
+
return $this->shipment_details;
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Sets shipment_details
|
217 |
+
* @param \SquareConnect\Model\OrderFulfillmentShipmentDetails $shipment_details Contains details for a shipment fulfillment. Required when fulfillment type is `SHIPMENT`. A shipment fulfillment's relationship to fulfillment `state`: `PROPOSED`: A shipment is requested. `RESERVED`: Fulfillment accepted. Shipment processing. `PREPARED`: Shipment packaged. Shipping label created. `COMPLETED`: Package has been shipped. `CANCELED`: Shipment has been canceled. `FAILED`: Shipment has failed.
|
218 |
+
* @return $this
|
219 |
+
*/
|
220 |
+
public function setShipmentDetails($shipment_details)
|
221 |
+
{
|
222 |
+
$this->shipment_details = $shipment_details;
|
223 |
+
return $this;
|
224 |
+
}
|
225 |
/**
|
226 |
* Returns true if offset exists. False otherwise.
|
227 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/OrderFulfillmentPickupDetails.php
CHANGED
@@ -112,17 +112,17 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
112 |
);
|
113 |
|
114 |
/**
|
115 |
-
* $recipient
|
116 |
* @var \SquareConnect\Model\OrderFulfillmentRecipient
|
117 |
*/
|
118 |
protected $recipient;
|
119 |
/**
|
120 |
-
* $expires_at The
|
121 |
* @var string
|
122 |
*/
|
123 |
protected $expires_at;
|
124 |
/**
|
125 |
-
* $auto_complete_duration The
|
126 |
* @var string
|
127 |
*/
|
128 |
protected $auto_complete_duration;
|
@@ -132,62 +132,62 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
132 |
*/
|
133 |
protected $schedule_type;
|
134 |
/**
|
135 |
-
* $pickup_at The
|
136 |
* @var string
|
137 |
*/
|
138 |
protected $pickup_at;
|
139 |
/**
|
140 |
-
* $pickup_window_duration The
|
141 |
* @var string
|
142 |
*/
|
143 |
protected $pickup_window_duration;
|
144 |
/**
|
145 |
-
* $prep_time_duration The
|
146 |
* @var string
|
147 |
*/
|
148 |
protected $prep_time_duration;
|
149 |
/**
|
150 |
-
* $note A
|
151 |
* @var string
|
152 |
*/
|
153 |
protected $note;
|
154 |
/**
|
155 |
-
* $placed_at The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\"
|
156 |
* @var string
|
157 |
*/
|
158 |
protected $placed_at;
|
159 |
/**
|
160 |
-
* $accepted_at The [timestamp](#workingwithdates)
|
161 |
* @var string
|
162 |
*/
|
163 |
protected $accepted_at;
|
164 |
/**
|
165 |
-
* $rejected_at The [timestamp](#workingwithdates)
|
166 |
* @var string
|
167 |
*/
|
168 |
protected $rejected_at;
|
169 |
/**
|
170 |
-
* $ready_at The [timestamp](#workingwithdates)
|
171 |
* @var string
|
172 |
*/
|
173 |
protected $ready_at;
|
174 |
/**
|
175 |
-
* $expired_at The [timestamp](#workingwithdates)
|
176 |
* @var string
|
177 |
*/
|
178 |
protected $expired_at;
|
179 |
/**
|
180 |
-
* $picked_up_at The [timestamp](#workingwithdates)
|
181 |
* @var string
|
182 |
*/
|
183 |
protected $picked_up_at;
|
184 |
/**
|
185 |
-
* $canceled_at The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was canceled
|
186 |
* @var string
|
187 |
*/
|
188 |
protected $canceled_at;
|
189 |
/**
|
190 |
-
* $cancel_reason A description of why the pickup was canceled. Max length
|
191 |
* @var string
|
192 |
*/
|
193 |
protected $cancel_reason;
|
@@ -292,7 +292,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
292 |
|
293 |
/**
|
294 |
* Sets recipient
|
295 |
-
* @param \SquareConnect\Model\OrderFulfillmentRecipient $recipient
|
296 |
* @return $this
|
297 |
*/
|
298 |
public function setRecipient($recipient)
|
@@ -311,7 +311,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
311 |
|
312 |
/**
|
313 |
* Sets expires_at
|
314 |
-
* @param string $expires_at The
|
315 |
* @return $this
|
316 |
*/
|
317 |
public function setExpiresAt($expires_at)
|
@@ -330,7 +330,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
330 |
|
331 |
/**
|
332 |
* Sets auto_complete_duration
|
333 |
-
* @param string $auto_complete_duration The
|
334 |
* @return $this
|
335 |
*/
|
336 |
public function setAutoCompleteDuration($auto_complete_duration)
|
@@ -368,7 +368,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
368 |
|
369 |
/**
|
370 |
* Sets pickup_at
|
371 |
-
* @param string $pickup_at The
|
372 |
* @return $this
|
373 |
*/
|
374 |
public function setPickupAt($pickup_at)
|
@@ -387,7 +387,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
387 |
|
388 |
/**
|
389 |
* Sets pickup_window_duration
|
390 |
-
* @param string $pickup_window_duration The
|
391 |
* @return $this
|
392 |
*/
|
393 |
public function setPickupWindowDuration($pickup_window_duration)
|
@@ -406,7 +406,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
406 |
|
407 |
/**
|
408 |
* Sets prep_time_duration
|
409 |
-
* @param string $prep_time_duration The
|
410 |
* @return $this
|
411 |
*/
|
412 |
public function setPrepTimeDuration($prep_time_duration)
|
@@ -425,7 +425,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
425 |
|
426 |
/**
|
427 |
* Sets note
|
428 |
-
* @param string $note A
|
429 |
* @return $this
|
430 |
*/
|
431 |
public function setNote($note)
|
@@ -444,7 +444,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
444 |
|
445 |
/**
|
446 |
* Sets placed_at
|
447 |
-
* @param string $placed_at The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\"
|
448 |
* @return $this
|
449 |
*/
|
450 |
public function setPlacedAt($placed_at)
|
@@ -463,7 +463,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
463 |
|
464 |
/**
|
465 |
* Sets accepted_at
|
466 |
-
* @param string $accepted_at The [timestamp](#workingwithdates)
|
467 |
* @return $this
|
468 |
*/
|
469 |
public function setAcceptedAt($accepted_at)
|
@@ -482,7 +482,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
482 |
|
483 |
/**
|
484 |
* Sets rejected_at
|
485 |
-
* @param string $rejected_at The [timestamp](#workingwithdates)
|
486 |
* @return $this
|
487 |
*/
|
488 |
public function setRejectedAt($rejected_at)
|
@@ -501,7 +501,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
501 |
|
502 |
/**
|
503 |
* Sets ready_at
|
504 |
-
* @param string $ready_at The [timestamp](#workingwithdates)
|
505 |
* @return $this
|
506 |
*/
|
507 |
public function setReadyAt($ready_at)
|
@@ -520,7 +520,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
520 |
|
521 |
/**
|
522 |
* Sets expired_at
|
523 |
-
* @param string $expired_at The [timestamp](#workingwithdates)
|
524 |
* @return $this
|
525 |
*/
|
526 |
public function setExpiredAt($expired_at)
|
@@ -539,7 +539,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
539 |
|
540 |
/**
|
541 |
* Sets picked_up_at
|
542 |
-
* @param string $picked_up_at The [timestamp](#workingwithdates)
|
543 |
* @return $this
|
544 |
*/
|
545 |
public function setPickedUpAt($picked_up_at)
|
@@ -558,7 +558,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
558 |
|
559 |
/**
|
560 |
* Sets canceled_at
|
561 |
-
* @param string $canceled_at The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was canceled
|
562 |
* @return $this
|
563 |
*/
|
564 |
public function setCanceledAt($canceled_at)
|
@@ -577,7 +577,7 @@ class OrderFulfillmentPickupDetails implements ArrayAccess
|
|
577 |
|
578 |
/**
|
579 |
* Sets cancel_reason
|
580 |
-
* @param string $cancel_reason A description of why the pickup was canceled. Max length
|
581 |
* @return $this
|
582 |
*/
|
583 |
public function setCancelReason($cancel_reason)
|
112 |
);
|
113 |
|
114 |
/**
|
115 |
+
* $recipient Information on the person meant to pick up this fulfillment from a physical location.
|
116 |
* @var \SquareConnect\Model\OrderFulfillmentRecipient
|
117 |
*/
|
118 |
protected $recipient;
|
119 |
/**
|
120 |
+
* $expires_at The [timestamp](#workingwithdates) indicating when this fulfillment will expire if it is not accepted. Must be in RFC 3339 format e.g., \"2016-09-04T23:59:33.123Z\". Expiration time can only be set up to 7 days in the future. If `expires_at` is not set, this pickup fulfillment will be automatically accepted when placed.
|
121 |
* @var string
|
122 |
*/
|
123 |
protected $expires_at;
|
124 |
/**
|
125 |
+
* $auto_complete_duration The duration of time after which an open and accepted pickup fulfillment will automatically move to the `COMPLETED` state. Must be in RFC3339 duration format e.g., \"P1W3D\". If not set, this pickup fulfillment will remain accepted until it is canceled or completed.
|
126 |
* @var string
|
127 |
*/
|
128 |
protected $auto_complete_duration;
|
132 |
*/
|
133 |
protected $schedule_type;
|
134 |
/**
|
135 |
+
* $pickup_at The [timestamp](#workingwithdates) that represents the start of the pickup window. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". For fulfillments with the schedule type `ASAP`, this is automatically set to the current time plus the expected duration to prepare the fulfillment.
|
136 |
* @var string
|
137 |
*/
|
138 |
protected $pickup_at;
|
139 |
/**
|
140 |
+
* $pickup_window_duration The window of time in which the order should be picked up after the `pickup_at` timestamp. Must be in RFC3339 duration format, e.g., \"P1W3D\". Can be used as an informational guideline for merchants.
|
141 |
* @var string
|
142 |
*/
|
143 |
protected $pickup_window_duration;
|
144 |
/**
|
145 |
+
* $prep_time_duration The duration of time it takes to prepare this fulfillment. Must be in RFC3339 duration format, e.g., \"P1W3D\".
|
146 |
* @var string
|
147 |
*/
|
148 |
protected $prep_time_duration;
|
149 |
/**
|
150 |
+
* $note A note meant to provide additional instructions about the pickup fulfillment displayed in the Square Point of Sale and set by the API.
|
151 |
* @var string
|
152 |
*/
|
153 |
protected $note;
|
154 |
/**
|
155 |
+
* $placed_at The [timestamp](#workingwithdates) indicating when the fulfillment was placed. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
156 |
* @var string
|
157 |
*/
|
158 |
protected $placed_at;
|
159 |
/**
|
160 |
+
* $accepted_at The [timestamp](#workingwithdates) indicating when the fulfillment was accepted. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
161 |
* @var string
|
162 |
*/
|
163 |
protected $accepted_at;
|
164 |
/**
|
165 |
+
* $rejected_at The [timestamp](#workingwithdates) indicating when the fulfillment was rejected. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
166 |
* @var string
|
167 |
*/
|
168 |
protected $rejected_at;
|
169 |
/**
|
170 |
+
* $ready_at The [timestamp](#workingwithdates) indicating when the fulfillment is marked as ready for pickup. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
171 |
* @var string
|
172 |
*/
|
173 |
protected $ready_at;
|
174 |
/**
|
175 |
+
* $expired_at The [timestamp](#workingwithdates) indicating when the fulfillment expired. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
176 |
* @var string
|
177 |
*/
|
178 |
protected $expired_at;
|
179 |
/**
|
180 |
+
* $picked_up_at The [timestamp](#workingwithdates) indicating when the fulfillment was picked up by the recipient. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
181 |
* @var string
|
182 |
*/
|
183 |
protected $picked_up_at;
|
184 |
/**
|
185 |
+
* $canceled_at The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was canceled.
|
186 |
* @var string
|
187 |
*/
|
188 |
protected $canceled_at;
|
189 |
/**
|
190 |
+
* $cancel_reason A description of why the pickup was canceled. Max length: 100 characters.
|
191 |
* @var string
|
192 |
*/
|
193 |
protected $cancel_reason;
|
292 |
|
293 |
/**
|
294 |
* Sets recipient
|
295 |
+
* @param \SquareConnect\Model\OrderFulfillmentRecipient $recipient Information on the person meant to pick up this fulfillment from a physical location.
|
296 |
* @return $this
|
297 |
*/
|
298 |
public function setRecipient($recipient)
|
311 |
|
312 |
/**
|
313 |
* Sets expires_at
|
314 |
+
* @param string $expires_at The [timestamp](#workingwithdates) indicating when this fulfillment will expire if it is not accepted. Must be in RFC 3339 format e.g., \"2016-09-04T23:59:33.123Z\". Expiration time can only be set up to 7 days in the future. If `expires_at` is not set, this pickup fulfillment will be automatically accepted when placed.
|
315 |
* @return $this
|
316 |
*/
|
317 |
public function setExpiresAt($expires_at)
|
330 |
|
331 |
/**
|
332 |
* Sets auto_complete_duration
|
333 |
+
* @param string $auto_complete_duration The duration of time after which an open and accepted pickup fulfillment will automatically move to the `COMPLETED` state. Must be in RFC3339 duration format e.g., \"P1W3D\". If not set, this pickup fulfillment will remain accepted until it is canceled or completed.
|
334 |
* @return $this
|
335 |
*/
|
336 |
public function setAutoCompleteDuration($auto_complete_duration)
|
368 |
|
369 |
/**
|
370 |
* Sets pickup_at
|
371 |
+
* @param string $pickup_at The [timestamp](#workingwithdates) that represents the start of the pickup window. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". For fulfillments with the schedule type `ASAP`, this is automatically set to the current time plus the expected duration to prepare the fulfillment.
|
372 |
* @return $this
|
373 |
*/
|
374 |
public function setPickupAt($pickup_at)
|
387 |
|
388 |
/**
|
389 |
* Sets pickup_window_duration
|
390 |
+
* @param string $pickup_window_duration The window of time in which the order should be picked up after the `pickup_at` timestamp. Must be in RFC3339 duration format, e.g., \"P1W3D\". Can be used as an informational guideline for merchants.
|
391 |
* @return $this
|
392 |
*/
|
393 |
public function setPickupWindowDuration($pickup_window_duration)
|
406 |
|
407 |
/**
|
408 |
* Sets prep_time_duration
|
409 |
+
* @param string $prep_time_duration The duration of time it takes to prepare this fulfillment. Must be in RFC3339 duration format, e.g., \"P1W3D\".
|
410 |
* @return $this
|
411 |
*/
|
412 |
public function setPrepTimeDuration($prep_time_duration)
|
425 |
|
426 |
/**
|
427 |
* Sets note
|
428 |
+
* @param string $note A note meant to provide additional instructions about the pickup fulfillment displayed in the Square Point of Sale and set by the API.
|
429 |
* @return $this
|
430 |
*/
|
431 |
public function setNote($note)
|
444 |
|
445 |
/**
|
446 |
* Sets placed_at
|
447 |
+
* @param string $placed_at The [timestamp](#workingwithdates) indicating when the fulfillment was placed. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
448 |
* @return $this
|
449 |
*/
|
450 |
public function setPlacedAt($placed_at)
|
463 |
|
464 |
/**
|
465 |
* Sets accepted_at
|
466 |
+
* @param string $accepted_at The [timestamp](#workingwithdates) indicating when the fulfillment was accepted. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
467 |
* @return $this
|
468 |
*/
|
469 |
public function setAcceptedAt($accepted_at)
|
482 |
|
483 |
/**
|
484 |
* Sets rejected_at
|
485 |
+
* @param string $rejected_at The [timestamp](#workingwithdates) indicating when the fulfillment was rejected. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
486 |
* @return $this
|
487 |
*/
|
488 |
public function setRejectedAt($rejected_at)
|
501 |
|
502 |
/**
|
503 |
* Sets ready_at
|
504 |
+
* @param string $ready_at The [timestamp](#workingwithdates) indicating when the fulfillment is marked as ready for pickup. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
505 |
* @return $this
|
506 |
*/
|
507 |
public function setReadyAt($ready_at)
|
520 |
|
521 |
/**
|
522 |
* Sets expired_at
|
523 |
+
* @param string $expired_at The [timestamp](#workingwithdates) indicating when the fulfillment expired. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
524 |
* @return $this
|
525 |
*/
|
526 |
public function setExpiredAt($expired_at)
|
539 |
|
540 |
/**
|
541 |
* Sets picked_up_at
|
542 |
+
* @param string $picked_up_at The [timestamp](#workingwithdates) indicating when the fulfillment was picked up by the recipient. In RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
543 |
* @return $this
|
544 |
*/
|
545 |
public function setPickedUpAt($picked_up_at)
|
558 |
|
559 |
/**
|
560 |
* Sets canceled_at
|
561 |
+
* @param string $canceled_at The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was canceled.
|
562 |
* @return $this
|
563 |
*/
|
564 |
public function setCanceledAt($canceled_at)
|
577 |
|
578 |
/**
|
579 |
* Sets cancel_reason
|
580 |
+
* @param string $cancel_reason A description of why the pickup was canceled. Max length: 100 characters.
|
581 |
* @return $this
|
582 |
*/
|
583 |
public function setCancelReason($cancel_reason)
|
vendor/square/connect/lib/Model/OrderFulfillmentRecipient.php
CHANGED
@@ -27,7 +27,8 @@ class OrderFulfillmentRecipient implements ArrayAccess
|
|
27 |
'customer_id' => 'string',
|
28 |
'display_name' => 'string',
|
29 |
'email_address' => 'string',
|
30 |
-
'phone_number' => 'string'
|
|
|
31 |
);
|
32 |
|
33 |
/**
|
@@ -38,7 +39,8 @@ class OrderFulfillmentRecipient implements ArrayAccess
|
|
38 |
'customer_id' => 'customer_id',
|
39 |
'display_name' => 'display_name',
|
40 |
'email_address' => 'email_address',
|
41 |
-
'phone_number' => 'phone_number'
|
|
|
42 |
);
|
43 |
|
44 |
/**
|
@@ -49,7 +51,8 @@ class OrderFulfillmentRecipient implements ArrayAccess
|
|
49 |
'customer_id' => 'setCustomerId',
|
50 |
'display_name' => 'setDisplayName',
|
51 |
'email_address' => 'setEmailAddress',
|
52 |
-
'phone_number' => 'setPhoneNumber'
|
|
|
53 |
);
|
54 |
|
55 |
/**
|
@@ -60,29 +63,35 @@ class OrderFulfillmentRecipient implements ArrayAccess
|
|
60 |
'customer_id' => 'getCustomerId',
|
61 |
'display_name' => 'getDisplayName',
|
62 |
'email_address' => 'getEmailAddress',
|
63 |
-
'phone_number' => 'getPhoneNumber'
|
|
|
64 |
);
|
65 |
|
66 |
/**
|
67 |
-
* $customer_id The Customer ID of the customer associated with the fulfillment. If customer_id is provided, the
|
68 |
* @var string
|
69 |
*/
|
70 |
protected $customer_id;
|
71 |
/**
|
72 |
-
* $display_name The display name of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id
|
73 |
* @var string
|
74 |
*/
|
75 |
protected $display_name;
|
76 |
/**
|
77 |
-
* $email_address The email address of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id
|
78 |
* @var string
|
79 |
*/
|
80 |
protected $email_address;
|
81 |
/**
|
82 |
-
* $phone_number The phone number of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id
|
83 |
* @var string
|
84 |
*/
|
85 |
protected $phone_number;
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
/**
|
88 |
* Constructor
|
@@ -111,6 +120,11 @@ class OrderFulfillmentRecipient implements ArrayAccess
|
|
111 |
} else {
|
112 |
$this->phone_number = null;
|
113 |
}
|
|
|
|
|
|
|
|
|
|
|
114 |
}
|
115 |
}
|
116 |
/**
|
@@ -124,7 +138,7 @@ class OrderFulfillmentRecipient implements ArrayAccess
|
|
124 |
|
125 |
/**
|
126 |
* Sets customer_id
|
127 |
-
* @param string $customer_id The Customer ID of the customer associated with the fulfillment. If customer_id is provided, the
|
128 |
* @return $this
|
129 |
*/
|
130 |
public function setCustomerId($customer_id)
|
@@ -143,7 +157,7 @@ class OrderFulfillmentRecipient implements ArrayAccess
|
|
143 |
|
144 |
/**
|
145 |
* Sets display_name
|
146 |
-
* @param string $display_name The display name of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id
|
147 |
* @return $this
|
148 |
*/
|
149 |
public function setDisplayName($display_name)
|
@@ -162,7 +176,7 @@ class OrderFulfillmentRecipient implements ArrayAccess
|
|
162 |
|
163 |
/**
|
164 |
* Sets email_address
|
165 |
-
* @param string $email_address The email address of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id
|
166 |
* @return $this
|
167 |
*/
|
168 |
public function setEmailAddress($email_address)
|
@@ -181,7 +195,7 @@ class OrderFulfillmentRecipient implements ArrayAccess
|
|
181 |
|
182 |
/**
|
183 |
* Sets phone_number
|
184 |
-
* @param string $phone_number The phone number of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id
|
185 |
* @return $this
|
186 |
*/
|
187 |
public function setPhoneNumber($phone_number)
|
@@ -189,6 +203,25 @@ class OrderFulfillmentRecipient implements ArrayAccess
|
|
189 |
$this->phone_number = $phone_number;
|
190 |
return $this;
|
191 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
/**
|
193 |
* Returns true if offset exists. False otherwise.
|
194 |
* @param integer $offset Offset
|
27 |
'customer_id' => 'string',
|
28 |
'display_name' => 'string',
|
29 |
'email_address' => 'string',
|
30 |
+
'phone_number' => 'string',
|
31 |
+
'address' => '\SquareConnect\Model\Address'
|
32 |
);
|
33 |
|
34 |
/**
|
39 |
'customer_id' => 'customer_id',
|
40 |
'display_name' => 'display_name',
|
41 |
'email_address' => 'email_address',
|
42 |
+
'phone_number' => 'phone_number',
|
43 |
+
'address' => 'address'
|
44 |
);
|
45 |
|
46 |
/**
|
51 |
'customer_id' => 'setCustomerId',
|
52 |
'display_name' => 'setDisplayName',
|
53 |
'email_address' => 'setEmailAddress',
|
54 |
+
'phone_number' => 'setPhoneNumber',
|
55 |
+
'address' => 'setAddress'
|
56 |
);
|
57 |
|
58 |
/**
|
63 |
'customer_id' => 'getCustomerId',
|
64 |
'display_name' => 'getDisplayName',
|
65 |
'email_address' => 'getEmailAddress',
|
66 |
+
'phone_number' => 'getPhoneNumber',
|
67 |
+
'address' => 'getAddress'
|
68 |
);
|
69 |
|
70 |
/**
|
71 |
+
* $customer_id The Customer ID of the customer associated with the fulfillment. If `customer_id` is provided, the fulfillment recipient's `display_name`, `email_address`, and `phone_number` are automatically populated from the targeted customer profile. If these fields are set in the request, the request values will override the information from the customer profile. If the targeted customer profile does not contain the necessary information and these fields are left unset, the request will result in an error.
|
72 |
* @var string
|
73 |
*/
|
74 |
protected $customer_id;
|
75 |
/**
|
76 |
+
* $display_name The display name of the fulfillment recipient. If provided, overrides the value pulled from the customer profile indicated by `customer_id`.
|
77 |
* @var string
|
78 |
*/
|
79 |
protected $display_name;
|
80 |
/**
|
81 |
+
* $email_address The email address of the fulfillment recipient. If provided, overrides the value pulled from the customer profile indicated by `customer_id`.
|
82 |
* @var string
|
83 |
*/
|
84 |
protected $email_address;
|
85 |
/**
|
86 |
+
* $phone_number The phone number of the fulfillment recipient. If provided, overrides the value pulled from the customer profile indicated by `customer_id`.
|
87 |
* @var string
|
88 |
*/
|
89 |
protected $phone_number;
|
90 |
+
/**
|
91 |
+
* $address The address of the fulfillment recipient. If provided, overrides the value pulled from the customer profile indicated by `customer_id`.
|
92 |
+
* @var \SquareConnect\Model\Address
|
93 |
+
*/
|
94 |
+
protected $address;
|
95 |
|
96 |
/**
|
97 |
* Constructor
|
120 |
} else {
|
121 |
$this->phone_number = null;
|
122 |
}
|
123 |
+
if (isset($data["address"])) {
|
124 |
+
$this->address = $data["address"];
|
125 |
+
} else {
|
126 |
+
$this->address = null;
|
127 |
+
}
|
128 |
}
|
129 |
}
|
130 |
/**
|
138 |
|
139 |
/**
|
140 |
* Sets customer_id
|
141 |
+
* @param string $customer_id The Customer ID of the customer associated with the fulfillment. If `customer_id` is provided, the fulfillment recipient's `display_name`, `email_address`, and `phone_number` are automatically populated from the targeted customer profile. If these fields are set in the request, the request values will override the information from the customer profile. If the targeted customer profile does not contain the necessary information and these fields are left unset, the request will result in an error.
|
142 |
* @return $this
|
143 |
*/
|
144 |
public function setCustomerId($customer_id)
|
157 |
|
158 |
/**
|
159 |
* Sets display_name
|
160 |
+
* @param string $display_name The display name of the fulfillment recipient. If provided, overrides the value pulled from the customer profile indicated by `customer_id`.
|
161 |
* @return $this
|
162 |
*/
|
163 |
public function setDisplayName($display_name)
|
176 |
|
177 |
/**
|
178 |
* Sets email_address
|
179 |
+
* @param string $email_address The email address of the fulfillment recipient. If provided, overrides the value pulled from the customer profile indicated by `customer_id`.
|
180 |
* @return $this
|
181 |
*/
|
182 |
public function setEmailAddress($email_address)
|
195 |
|
196 |
/**
|
197 |
* Sets phone_number
|
198 |
+
* @param string $phone_number The phone number of the fulfillment recipient. If provided, overrides the value pulled from the customer profile indicated by `customer_id`.
|
199 |
* @return $this
|
200 |
*/
|
201 |
public function setPhoneNumber($phone_number)
|
203 |
$this->phone_number = $phone_number;
|
204 |
return $this;
|
205 |
}
|
206 |
+
/**
|
207 |
+
* Gets address
|
208 |
+
* @return \SquareConnect\Model\Address
|
209 |
+
*/
|
210 |
+
public function getAddress()
|
211 |
+
{
|
212 |
+
return $this->address;
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Sets address
|
217 |
+
* @param \SquareConnect\Model\Address $address The address of the fulfillment recipient. If provided, overrides the value pulled from the customer profile indicated by `customer_id`.
|
218 |
+
* @return $this
|
219 |
+
*/
|
220 |
+
public function setAddress($address)
|
221 |
+
{
|
222 |
+
$this->address = $address;
|
223 |
+
return $this;
|
224 |
+
}
|
225 |
/**
|
226 |
* Returns true if offset exists. False otherwise.
|
227 |
* @param integer $offset Offset
|
vendor/square/connect/lib/Model/OrderFulfillmentShipmentDetails.php
ADDED
@@ -0,0 +1,608 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* OrderFulfillmentShipmentDetails Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class OrderFulfillmentShipmentDetails implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'recipient' => '\SquareConnect\Model\OrderFulfillmentRecipient',
|
28 |
+
'carrier' => 'string',
|
29 |
+
'shipping_note' => 'string',
|
30 |
+
'shipping_type' => 'string',
|
31 |
+
'tracking_number' => 'string',
|
32 |
+
'tracking_url' => 'string',
|
33 |
+
'placed_at' => 'string',
|
34 |
+
'in_progress_at' => 'string',
|
35 |
+
'packaged_at' => 'string',
|
36 |
+
'expected_shipped_at' => 'string',
|
37 |
+
'shipped_at' => 'string',
|
38 |
+
'canceled_at' => 'string',
|
39 |
+
'cancel_reason' => 'string',
|
40 |
+
'failed_at' => 'string',
|
41 |
+
'failure_reason' => 'string'
|
42 |
+
);
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
46 |
+
* @var string[]
|
47 |
+
*/
|
48 |
+
static $attributeMap = array(
|
49 |
+
'recipient' => 'recipient',
|
50 |
+
'carrier' => 'carrier',
|
51 |
+
'shipping_note' => 'shipping_note',
|
52 |
+
'shipping_type' => 'shipping_type',
|
53 |
+
'tracking_number' => 'tracking_number',
|
54 |
+
'tracking_url' => 'tracking_url',
|
55 |
+
'placed_at' => 'placed_at',
|
56 |
+
'in_progress_at' => 'in_progress_at',
|
57 |
+
'packaged_at' => 'packaged_at',
|
58 |
+
'expected_shipped_at' => 'expected_shipped_at',
|
59 |
+
'shipped_at' => 'shipped_at',
|
60 |
+
'canceled_at' => 'canceled_at',
|
61 |
+
'cancel_reason' => 'cancel_reason',
|
62 |
+
'failed_at' => 'failed_at',
|
63 |
+
'failure_reason' => 'failure_reason'
|
64 |
+
);
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
68 |
+
* @var string[]
|
69 |
+
*/
|
70 |
+
static $setters = array(
|
71 |
+
'recipient' => 'setRecipient',
|
72 |
+
'carrier' => 'setCarrier',
|
73 |
+
'shipping_note' => 'setShippingNote',
|
74 |
+
'shipping_type' => 'setShippingType',
|
75 |
+
'tracking_number' => 'setTrackingNumber',
|
76 |
+
'tracking_url' => 'setTrackingUrl',
|
77 |
+
'placed_at' => 'setPlacedAt',
|
78 |
+
'in_progress_at' => 'setInProgressAt',
|
79 |
+
'packaged_at' => 'setPackagedAt',
|
80 |
+
'expected_shipped_at' => 'setExpectedShippedAt',
|
81 |
+
'shipped_at' => 'setShippedAt',
|
82 |
+
'canceled_at' => 'setCanceledAt',
|
83 |
+
'cancel_reason' => 'setCancelReason',
|
84 |
+
'failed_at' => 'setFailedAt',
|
85 |
+
'failure_reason' => 'setFailureReason'
|
86 |
+
);
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Array of attributes to getter functions (for serialization of requests)
|
90 |
+
* @var string[]
|
91 |
+
*/
|
92 |
+
static $getters = array(
|
93 |
+
'recipient' => 'getRecipient',
|
94 |
+
'carrier' => 'getCarrier',
|
95 |
+
'shipping_note' => 'getShippingNote',
|
96 |
+
'shipping_type' => 'getShippingType',
|
97 |
+
'tracking_number' => 'getTrackingNumber',
|
98 |
+
'tracking_url' => 'getTrackingUrl',
|
99 |
+
'placed_at' => 'getPlacedAt',
|
100 |
+
'in_progress_at' => 'getInProgressAt',
|
101 |
+
'packaged_at' => 'getPackagedAt',
|
102 |
+
'expected_shipped_at' => 'getExpectedShippedAt',
|
103 |
+
'shipped_at' => 'getShippedAt',
|
104 |
+
'canceled_at' => 'getCanceledAt',
|
105 |
+
'cancel_reason' => 'getCancelReason',
|
106 |
+
'failed_at' => 'getFailedAt',
|
107 |
+
'failure_reason' => 'getFailureReason'
|
108 |
+
);
|
109 |
+
|
110 |
+
/**
|
111 |
+
* $recipient Information on the person meant to receive this shipment fulfillment.
|
112 |
+
* @var \SquareConnect\Model\OrderFulfillmentRecipient
|
113 |
+
*/
|
114 |
+
protected $recipient;
|
115 |
+
/**
|
116 |
+
* $carrier The shipping carrier being used to ship this fulfillment e.g. UPS, FedEx, USPS, etc.
|
117 |
+
* @var string
|
118 |
+
*/
|
119 |
+
protected $carrier;
|
120 |
+
/**
|
121 |
+
* $shipping_note A note with additional information for the shipping carrier.
|
122 |
+
* @var string
|
123 |
+
*/
|
124 |
+
protected $shipping_note;
|
125 |
+
/**
|
126 |
+
* $shipping_type A description of the type of shipping product purchased from the carrier. e.g. First Class, Priority, Express
|
127 |
+
* @var string
|
128 |
+
*/
|
129 |
+
protected $shipping_type;
|
130 |
+
/**
|
131 |
+
* $tracking_number The reference number provided by the carrier to track the shipment's progress.
|
132 |
+
* @var string
|
133 |
+
*/
|
134 |
+
protected $tracking_number;
|
135 |
+
/**
|
136 |
+
* $tracking_url A link to the tracking webpage on the carrier's website.
|
137 |
+
* @var string
|
138 |
+
*/
|
139 |
+
protected $tracking_url;
|
140 |
+
/**
|
141 |
+
* $placed_at The [timestamp](#workingwithdates) indicating when the shipment was requested. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
142 |
+
* @var string
|
143 |
+
*/
|
144 |
+
protected $placed_at;
|
145 |
+
/**
|
146 |
+
* $in_progress_at The [timestamp](#workingwithdates) indicating when this fulfillment was moved to the `RESERVED` state. Indicates that preparation of this shipment has begun. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
147 |
+
* @var string
|
148 |
+
*/
|
149 |
+
protected $in_progress_at;
|
150 |
+
/**
|
151 |
+
* $packaged_at The [timestamp](#workingwithdates) indicating when this fulfillment was moved to the `PREPARED` state. Indicates that the fulfillment is packaged. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
152 |
+
* @var string
|
153 |
+
*/
|
154 |
+
protected $packaged_at;
|
155 |
+
/**
|
156 |
+
* $expected_shipped_at The [timestamp](#workingwithdates) indicating when the shipment is expected to be delivered to the shipping carrier. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
157 |
+
* @var string
|
158 |
+
*/
|
159 |
+
protected $expected_shipped_at;
|
160 |
+
/**
|
161 |
+
* $shipped_at The [timestamp](#workingwithdates) indicating when this fulfillment was moved to the `COMPLETED`state. Indicates that the fulfillment has been given to the shipping carrier. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
162 |
+
* @var string
|
163 |
+
*/
|
164 |
+
protected $shipped_at;
|
165 |
+
/**
|
166 |
+
* $canceled_at The [timestamp](#workingwithdates) indicating the shipment was canceled. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
167 |
+
* @var string
|
168 |
+
*/
|
169 |
+
protected $canceled_at;
|
170 |
+
/**
|
171 |
+
* $cancel_reason A description of why the shipment was canceled.
|
172 |
+
* @var string
|
173 |
+
*/
|
174 |
+
protected $cancel_reason;
|
175 |
+
/**
|
176 |
+
* $failed_at The [timestamp](#workingwithdates) indicating when the shipment failed to be completed. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
177 |
+
* @var string
|
178 |
+
*/
|
179 |
+
protected $failed_at;
|
180 |
+
/**
|
181 |
+
* $failure_reason A description of why the shipment failed to be completed.
|
182 |
+
* @var string
|
183 |
+
*/
|
184 |
+
protected $failure_reason;
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Constructor
|
188 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
189 |
+
*/
|
190 |
+
public function __construct(array $data = null)
|
191 |
+
{
|
192 |
+
if ($data != null) {
|
193 |
+
if (isset($data["recipient"])) {
|
194 |
+
$this->recipient = $data["recipient"];
|
195 |
+
} else {
|
196 |
+
$this->recipient = null;
|
197 |
+
}
|
198 |
+
if (isset($data["carrier"])) {
|
199 |
+
$this->carrier = $data["carrier"];
|
200 |
+
} else {
|
201 |
+
$this->carrier = null;
|
202 |
+
}
|
203 |
+
if (isset($data["shipping_note"])) {
|
204 |
+
$this->shipping_note = $data["shipping_note"];
|
205 |
+
} else {
|
206 |
+
$this->shipping_note = null;
|
207 |
+
}
|
208 |
+
if (isset($data["shipping_type"])) {
|
209 |
+
$this->shipping_type = $data["shipping_type"];
|
210 |
+
} else {
|
211 |
+
$this->shipping_type = null;
|
212 |
+
}
|
213 |
+
if (isset($data["tracking_number"])) {
|
214 |
+
$this->tracking_number = $data["tracking_number"];
|
215 |
+
} else {
|
216 |
+
$this->tracking_number = null;
|
217 |
+
}
|
218 |
+
if (isset($data["tracking_url"])) {
|
219 |
+
$this->tracking_url = $data["tracking_url"];
|
220 |
+
} else {
|
221 |
+
$this->tracking_url = null;
|
222 |
+
}
|
223 |
+
if (isset($data["placed_at"])) {
|
224 |
+
$this->placed_at = $data["placed_at"];
|
225 |
+
} else {
|
226 |
+
$this->placed_at = null;
|
227 |
+
}
|
228 |
+
if (isset($data["in_progress_at"])) {
|
229 |
+
$this->in_progress_at = $data["in_progress_at"];
|
230 |
+
} else {
|
231 |
+
$this->in_progress_at = null;
|
232 |
+
}
|
233 |
+
if (isset($data["packaged_at"])) {
|
234 |
+
$this->packaged_at = $data["packaged_at"];
|
235 |
+
} else {
|
236 |
+
$this->packaged_at = null;
|
237 |
+
}
|
238 |
+
if (isset($data["expected_shipped_at"])) {
|
239 |
+
$this->expected_shipped_at = $data["expected_shipped_at"];
|
240 |
+
} else {
|
241 |
+
$this->expected_shipped_at = null;
|
242 |
+
}
|
243 |
+
if (isset($data["shipped_at"])) {
|
244 |
+
$this->shipped_at = $data["shipped_at"];
|
245 |
+
} else {
|
246 |
+
$this->shipped_at = null;
|
247 |
+
}
|
248 |
+
if (isset($data["canceled_at"])) {
|
249 |
+
$this->canceled_at = $data["canceled_at"];
|
250 |
+
} else {
|
251 |
+
$this->canceled_at = null;
|
252 |
+
}
|
253 |
+
if (isset($data["cancel_reason"])) {
|
254 |
+
$this->cancel_reason = $data["cancel_reason"];
|
255 |
+
} else {
|
256 |
+
$this->cancel_reason = null;
|
257 |
+
}
|
258 |
+
if (isset($data["failed_at"])) {
|
259 |
+
$this->failed_at = $data["failed_at"];
|
260 |
+
} else {
|
261 |
+
$this->failed_at = null;
|
262 |
+
}
|
263 |
+
if (isset($data["failure_reason"])) {
|
264 |
+
$this->failure_reason = $data["failure_reason"];
|
265 |
+
} else {
|
266 |
+
$this->failure_reason = null;
|
267 |
+
}
|
268 |
+
}
|
269 |
+
}
|
270 |
+
/**
|
271 |
+
* Gets recipient
|
272 |
+
* @return \SquareConnect\Model\OrderFulfillmentRecipient
|
273 |
+
*/
|
274 |
+
public function getRecipient()
|
275 |
+
{
|
276 |
+
return $this->recipient;
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Sets recipient
|
281 |
+
* @param \SquareConnect\Model\OrderFulfillmentRecipient $recipient Information on the person meant to receive this shipment fulfillment.
|
282 |
+
* @return $this
|
283 |
+
*/
|
284 |
+
public function setRecipient($recipient)
|
285 |
+
{
|
286 |
+
$this->recipient = $recipient;
|
287 |
+
return $this;
|
288 |
+
}
|
289 |
+
/**
|
290 |
+
* Gets carrier
|
291 |
+
* @return string
|
292 |
+
*/
|
293 |
+
public function getCarrier()
|
294 |
+
{
|
295 |
+
return $this->carrier;
|
296 |
+
}
|
297 |
+
|
298 |
+
/**
|
299 |
+
* Sets carrier
|
300 |
+
* @param string $carrier The shipping carrier being used to ship this fulfillment e.g. UPS, FedEx, USPS, etc.
|
301 |
+
* @return $this
|
302 |
+
*/
|
303 |
+
public function setCarrier($carrier)
|
304 |
+
{
|
305 |
+
$this->carrier = $carrier;
|
306 |
+
return $this;
|
307 |
+
}
|
308 |
+
/**
|
309 |
+
* Gets shipping_note
|
310 |
+
* @return string
|
311 |
+
*/
|
312 |
+
public function getShippingNote()
|
313 |
+
{
|
314 |
+
return $this->shipping_note;
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* Sets shipping_note
|
319 |
+
* @param string $shipping_note A note with additional information for the shipping carrier.
|
320 |
+
* @return $this
|
321 |
+
*/
|
322 |
+
public function setShippingNote($shipping_note)
|
323 |
+
{
|
324 |
+
$this->shipping_note = $shipping_note;
|
325 |
+
return $this;
|
326 |
+
}
|
327 |
+
/**
|
328 |
+
* Gets shipping_type
|
329 |
+
* @return string
|
330 |
+
*/
|
331 |
+
public function getShippingType()
|
332 |
+
{
|
333 |
+
return $this->shipping_type;
|
334 |
+
}
|
335 |
+
|
336 |
+
/**
|
337 |
+
* Sets shipping_type
|
338 |
+
* @param string $shipping_type A description of the type of shipping product purchased from the carrier. e.g. First Class, Priority, Express
|
339 |
+
* @return $this
|
340 |
+
*/
|
341 |
+
public function setShippingType($shipping_type)
|
342 |
+
{
|
343 |
+
$this->shipping_type = $shipping_type;
|
344 |
+
return $this;
|
345 |
+
}
|
346 |
+
/**
|
347 |
+
* Gets tracking_number
|
348 |
+
* @return string
|
349 |
+
*/
|
350 |
+
public function getTrackingNumber()
|
351 |
+
{
|
352 |
+
return $this->tracking_number;
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Sets tracking_number
|
357 |
+
* @param string $tracking_number The reference number provided by the carrier to track the shipment's progress.
|
358 |
+
* @return $this
|
359 |
+
*/
|
360 |
+
public function setTrackingNumber($tracking_number)
|
361 |
+
{
|
362 |
+
$this->tracking_number = $tracking_number;
|
363 |
+
return $this;
|
364 |
+
}
|
365 |
+
/**
|
366 |
+
* Gets tracking_url
|
367 |
+
* @return string
|
368 |
+
*/
|
369 |
+
public function getTrackingUrl()
|
370 |
+
{
|
371 |
+
return $this->tracking_url;
|
372 |
+
}
|
373 |
+
|
374 |
+
/**
|
375 |
+
* Sets tracking_url
|
376 |
+
* @param string $tracking_url A link to the tracking webpage on the carrier's website.
|
377 |
+
* @return $this
|
378 |
+
*/
|
379 |
+
public function setTrackingUrl($tracking_url)
|
380 |
+
{
|
381 |
+
$this->tracking_url = $tracking_url;
|
382 |
+
return $this;
|
383 |
+
}
|
384 |
+
/**
|
385 |
+
* Gets placed_at
|
386 |
+
* @return string
|
387 |
+
*/
|
388 |
+
public function getPlacedAt()
|
389 |
+
{
|
390 |
+
return $this->placed_at;
|
391 |
+
}
|
392 |
+
|
393 |
+
/**
|
394 |
+
* Sets placed_at
|
395 |
+
* @param string $placed_at The [timestamp](#workingwithdates) indicating when the shipment was requested. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
396 |
+
* @return $this
|
397 |
+
*/
|
398 |
+
public function setPlacedAt($placed_at)
|
399 |
+
{
|
400 |
+
$this->placed_at = $placed_at;
|
401 |
+
return $this;
|
402 |
+
}
|
403 |
+
/**
|
404 |
+
* Gets in_progress_at
|
405 |
+
* @return string
|
406 |
+
*/
|
407 |
+
public function getInProgressAt()
|
408 |
+
{
|
409 |
+
return $this->in_progress_at;
|
410 |
+
}
|
411 |
+
|
412 |
+
/**
|
413 |
+
* Sets in_progress_at
|
414 |
+
* @param string $in_progress_at The [timestamp](#workingwithdates) indicating when this fulfillment was moved to the `RESERVED` state. Indicates that preparation of this shipment has begun. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
415 |
+
* @return $this
|
416 |
+
*/
|
417 |
+
public function setInProgressAt($in_progress_at)
|
418 |
+
{
|
419 |
+
$this->in_progress_at = $in_progress_at;
|
420 |
+
return $this;
|
421 |
+
}
|
422 |
+
/**
|
423 |
+
* Gets packaged_at
|
424 |
+
* @return string
|
425 |
+
*/
|
426 |
+
public function getPackagedAt()
|
427 |
+
{
|
428 |
+
return $this->packaged_at;
|
429 |
+
}
|
430 |
+
|
431 |
+
/**
|
432 |
+
* Sets packaged_at
|
433 |
+
* @param string $packaged_at The [timestamp](#workingwithdates) indicating when this fulfillment was moved to the `PREPARED` state. Indicates that the fulfillment is packaged. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
434 |
+
* @return $this
|
435 |
+
*/
|
436 |
+
public function setPackagedAt($packaged_at)
|
437 |
+
{
|
438 |
+
$this->packaged_at = $packaged_at;
|
439 |
+
return $this;
|
440 |
+
}
|
441 |
+
/**
|
442 |
+
* Gets expected_shipped_at
|
443 |
+
* @return string
|
444 |
+
*/
|
445 |
+
public function getExpectedShippedAt()
|
446 |
+
{
|
447 |
+
return $this->expected_shipped_at;
|
448 |
+
}
|
449 |
+
|
450 |
+
/**
|
451 |
+
* Sets expected_shipped_at
|
452 |
+
* @param string $expected_shipped_at The [timestamp](#workingwithdates) indicating when the shipment is expected to be delivered to the shipping carrier. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
453 |
+
* @return $this
|
454 |
+
*/
|
455 |
+
public function setExpectedShippedAt($expected_shipped_at)
|
456 |
+
{
|
457 |
+
$this->expected_shipped_at = $expected_shipped_at;
|
458 |
+
return $this;
|
459 |
+
}
|
460 |
+
/**
|
461 |
+
* Gets shipped_at
|
462 |
+
* @return string
|
463 |
+
*/
|
464 |
+
public function getShippedAt()
|
465 |
+
{
|
466 |
+
return $this->shipped_at;
|
467 |
+
}
|
468 |
+
|
469 |
+
/**
|
470 |
+
* Sets shipped_at
|
471 |
+
* @param string $shipped_at The [timestamp](#workingwithdates) indicating when this fulfillment was moved to the `COMPLETED`state. Indicates that the fulfillment has been given to the shipping carrier. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
472 |
+
* @return $this
|
473 |
+
*/
|
474 |
+
public function setShippedAt($shipped_at)
|
475 |
+
{
|
476 |
+
$this->shipped_at = $shipped_at;
|
477 |
+
return $this;
|
478 |
+
}
|
479 |
+
/**
|
480 |
+
* Gets canceled_at
|
481 |
+
* @return string
|
482 |
+
*/
|
483 |
+
public function getCanceledAt()
|
484 |
+
{
|
485 |
+
return $this->canceled_at;
|
486 |
+
}
|
487 |
+
|
488 |
+
/**
|
489 |
+
* Sets canceled_at
|
490 |
+
* @param string $canceled_at The [timestamp](#workingwithdates) indicating the shipment was canceled. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
491 |
+
* @return $this
|
492 |
+
*/
|
493 |
+
public function setCanceledAt($canceled_at)
|
494 |
+
{
|
495 |
+
$this->canceled_at = $canceled_at;
|
496 |
+
return $this;
|
497 |
+
}
|
498 |
+
/**
|
499 |
+
* Gets cancel_reason
|
500 |
+
* @return string
|
501 |
+
*/
|
502 |
+
public function getCancelReason()
|
503 |
+
{
|
504 |
+
return $this->cancel_reason;
|
505 |
+
}
|
506 |
+
|
507 |
+
/**
|
508 |
+
* Sets cancel_reason
|
509 |
+
* @param string $cancel_reason A description of why the shipment was canceled.
|
510 |
+
* @return $this
|
511 |
+
*/
|
512 |
+
public function setCancelReason($cancel_reason)
|
513 |
+
{
|
514 |
+
$this->cancel_reason = $cancel_reason;
|
515 |
+
return $this;
|
516 |
+
}
|
517 |
+
/**
|
518 |
+
* Gets failed_at
|
519 |
+
* @return string
|
520 |
+
*/
|
521 |
+
public function getFailedAt()
|
522 |
+
{
|
523 |
+
return $this->failed_at;
|
524 |
+
}
|
525 |
+
|
526 |
+
/**
|
527 |
+
* Sets failed_at
|
528 |
+
* @param string $failed_at The [timestamp](#workingwithdates) indicating when the shipment failed to be completed. Must be in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".
|
529 |
+
* @return $this
|
530 |
+
*/
|
531 |
+
public function setFailedAt($failed_at)
|
532 |
+
{
|
533 |
+
$this->failed_at = $failed_at;
|
534 |
+
return $this;
|
535 |
+
}
|
536 |
+
/**
|
537 |
+
* Gets failure_reason
|
538 |
+
* @return string
|
539 |
+
*/
|
540 |
+
public function getFailureReason()
|
541 |
+
{
|
542 |
+
return $this->failure_reason;
|
543 |
+
}
|
544 |
+
|
545 |
+
/**
|
546 |
+
* Sets failure_reason
|
547 |
+
* @param string $failure_reason A description of why the shipment failed to be completed.
|
548 |
+
* @return $this
|
549 |
+
*/
|
550 |
+
public function setFailureReason($failure_reason)
|
551 |
+
{
|
552 |
+
$this->failure_reason = $failure_reason;
|
553 |
+
return $this;
|
554 |
+
}
|
555 |
+
/**
|
556 |
+
* Returns true if offset exists. False otherwise.
|
557 |
+
* @param integer $offset Offset
|
558 |
+
* @return boolean
|
559 |
+
*/
|
560 |
+
public function offsetExists($offset)
|
561 |
+
{
|
562 |
+
return isset($this->$offset);
|
563 |
+
}
|
564 |
+
|
565 |
+
/**
|
566 |
+
* Gets offset.
|
567 |
+
* @param integer $offset Offset
|
568 |
+
* @return mixed
|
569 |
+
*/
|
570 |
+
public function offsetGet($offset)
|
571 |
+
{
|
572 |
+
return $this->$offset;
|
573 |
+
}
|
574 |
+
|
575 |
+
/**
|
576 |
+
* Sets value based on offset.
|
577 |
+
* @param integer $offset Offset
|
578 |
+
* @param mixed $value Value to be set
|
579 |
+
* @return void
|
580 |
+
*/
|
581 |
+
public function offsetSet($offset, $value)
|
582 |
+
{
|
583 |
+
$this->$offset = $value;
|
584 |
+
}
|
585 |
+
|
586 |
+
/**
|
587 |
+
* Unsets offset.
|
588 |
+
* @param integer $offset Offset
|
589 |
+
* @return void
|
590 |
+
*/
|
591 |
+
public function offsetUnset($offset)
|
592 |
+
{
|
593 |
+
unset($this->$offset);
|
594 |
+
}
|
595 |
+
|
596 |
+
/**
|
597 |
+
* Gets the string presentation of the object
|
598 |
+
* @return string
|
599 |
+
*/
|
600 |
+
public function __toString()
|
601 |
+
{
|
602 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
603 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
604 |
+
} else {
|
605 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
606 |
+
}
|
607 |
+
}
|
608 |
+
}
|
vendor/square/connect/lib/Model/OrderLineItem.php
CHANGED
@@ -34,6 +34,8 @@ class OrderLineItem implements ArrayAccess
|
|
34 |
'modifiers' => '\SquareConnect\Model\OrderLineItemModifier[]',
|
35 |
'taxes' => '\SquareConnect\Model\OrderLineItemTax[]',
|
36 |
'discounts' => '\SquareConnect\Model\OrderLineItemDiscount[]',
|
|
|
|
|
37 |
'base_price_money' => '\SquareConnect\Model\Money',
|
38 |
'variation_total_price_money' => '\SquareConnect\Model\Money',
|
39 |
'gross_sales_money' => '\SquareConnect\Model\Money',
|
@@ -57,6 +59,8 @@ class OrderLineItem implements ArrayAccess
|
|
57 |
'modifiers' => 'modifiers',
|
58 |
'taxes' => 'taxes',
|
59 |
'discounts' => 'discounts',
|
|
|
|
|
60 |
'base_price_money' => 'base_price_money',
|
61 |
'variation_total_price_money' => 'variation_total_price_money',
|
62 |
'gross_sales_money' => 'gross_sales_money',
|
@@ -80,6 +84,8 @@ class OrderLineItem implements ArrayAccess
|
|
80 |
'modifiers' => 'setModifiers',
|
81 |
'taxes' => 'setTaxes',
|
82 |
'discounts' => 'setDiscounts',
|
|
|
|
|
83 |
'base_price_money' => 'setBasePriceMoney',
|
84 |
'variation_total_price_money' => 'setVariationTotalPriceMoney',
|
85 |
'gross_sales_money' => 'setGrossSalesMoney',
|
@@ -103,6 +109,8 @@ class OrderLineItem implements ArrayAccess
|
|
103 |
'modifiers' => 'getModifiers',
|
104 |
'taxes' => 'getTaxes',
|
105 |
'discounts' => 'getDiscounts',
|
|
|
|
|
106 |
'base_price_money' => 'getBasePriceMoney',
|
107 |
'variation_total_price_money' => 'getVariationTotalPriceMoney',
|
108 |
'gross_sales_money' => 'getGrossSalesMoney',
|
@@ -112,7 +120,7 @@ class OrderLineItem implements ArrayAccess
|
|
112 |
);
|
113 |
|
114 |
/**
|
115 |
-
* $uid
|
116 |
* @var string
|
117 |
*/
|
118 |
protected $uid;
|
@@ -122,7 +130,7 @@ class OrderLineItem implements ArrayAccess
|
|
122 |
*/
|
123 |
protected $name;
|
124 |
/**
|
125 |
-
* $quantity The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.
|
126 |
* @var string
|
127 |
*/
|
128 |
protected $quantity;
|
@@ -152,15 +160,25 @@ class OrderLineItem implements ArrayAccess
|
|
152 |
*/
|
153 |
protected $modifiers;
|
154 |
/**
|
155 |
-
* $taxes A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list.
|
156 |
* @var \SquareConnect\Model\OrderLineItemTax[]
|
157 |
*/
|
158 |
protected $taxes;
|
159 |
/**
|
160 |
-
* $discounts A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list.
|
161 |
* @var \SquareConnect\Model\OrderLineItemDiscount[]
|
162 |
*/
|
163 |
protected $discounts;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
/**
|
165 |
* $base_price_money The base price for a single unit of the line item.
|
166 |
* @var \SquareConnect\Model\Money
|
@@ -249,6 +267,16 @@ class OrderLineItem implements ArrayAccess
|
|
249 |
} else {
|
250 |
$this->discounts = null;
|
251 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
if (isset($data["base_price_money"])) {
|
253 |
$this->base_price_money = $data["base_price_money"];
|
254 |
} else {
|
@@ -292,7 +320,7 @@ class OrderLineItem implements ArrayAccess
|
|
292 |
|
293 |
/**
|
294 |
* Sets uid
|
295 |
-
* @param string $uid
|
296 |
* @return $this
|
297 |
*/
|
298 |
public function setUid($uid)
|
@@ -330,7 +358,7 @@ class OrderLineItem implements ArrayAccess
|
|
330 |
|
331 |
/**
|
332 |
* Sets quantity
|
333 |
-
* @param string $quantity The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.
|
334 |
* @return $this
|
335 |
*/
|
336 |
public function setQuantity($quantity)
|
@@ -444,7 +472,7 @@ class OrderLineItem implements ArrayAccess
|
|
444 |
|
445 |
/**
|
446 |
* Sets taxes
|
447 |
-
* @param \SquareConnect\Model\OrderLineItemTax[] $taxes A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list.
|
448 |
* @return $this
|
449 |
*/
|
450 |
public function setTaxes($taxes)
|
@@ -463,7 +491,7 @@ class OrderLineItem implements ArrayAccess
|
|
463 |
|
464 |
/**
|
465 |
* Sets discounts
|
466 |
-
* @param \SquareConnect\Model\OrderLineItemDiscount[] $discounts A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list.
|
467 |
* @return $this
|
468 |
*/
|
469 |
public function setDiscounts($discounts)
|
@@ -471,6 +499,44 @@ class OrderLineItem implements ArrayAccess
|
|
471 |
$this->discounts = $discounts;
|
472 |
return $this;
|
473 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
/**
|
475 |
* Gets base_price_money
|
476 |
* @return \SquareConnect\Model\Money
|
34 |
'modifiers' => '\SquareConnect\Model\OrderLineItemModifier[]',
|
35 |
'taxes' => '\SquareConnect\Model\OrderLineItemTax[]',
|
36 |
'discounts' => '\SquareConnect\Model\OrderLineItemDiscount[]',
|
37 |
+
'applied_taxes' => '\SquareConnect\Model\OrderLineItemAppliedTax[]',
|
38 |
+
'applied_discounts' => '\SquareConnect\Model\OrderLineItemAppliedDiscount[]',
|
39 |
'base_price_money' => '\SquareConnect\Model\Money',
|
40 |
'variation_total_price_money' => '\SquareConnect\Model\Money',
|
41 |
'gross_sales_money' => '\SquareConnect\Model\Money',
|
59 |
'modifiers' => 'modifiers',
|
60 |
'taxes' => 'taxes',
|
61 |
'discounts' => 'discounts',
|
62 |
+
'applied_taxes' => 'applied_taxes',
|
63 |
+
'applied_discounts' => 'applied_discounts',
|
64 |
'base_price_money' => 'base_price_money',
|
65 |
'variation_total_price_money' => 'variation_total_price_money',
|
66 |
'gross_sales_money' => 'gross_sales_money',
|
84 |
'modifiers' => 'setModifiers',
|
85 |
'taxes' => 'setTaxes',
|
86 |
'discounts' => 'setDiscounts',
|
87 |
+
'applied_taxes' => 'setAppliedTaxes',
|
88 |
+
'applied_discounts' => 'setAppliedDiscounts',
|
89 |
'base_price_money' => 'setBasePriceMoney',
|
90 |
'variation_total_price_money' => 'setVariationTotalPriceMoney',
|
91 |
'gross_sales_money' => 'setGrossSalesMoney',
|
109 |
'modifiers' => 'getModifiers',
|
110 |
'taxes' => 'getTaxes',
|
111 |
'discounts' => 'getDiscounts',
|
112 |
+
'applied_taxes' => 'getAppliedTaxes',
|
113 |
+
'applied_discounts' => 'getAppliedDiscounts',
|
114 |
'base_price_money' => 'getBasePriceMoney',
|
115 |
'variation_total_price_money' => 'getVariationTotalPriceMoney',
|
116 |
'gross_sales_money' => 'getGrossSalesMoney',
|
120 |
);
|
121 |
|
122 |
/**
|
123 |
+
* $uid Unique ID that identifies the line item only within this order.
|
124 |
* @var string
|
125 |
*/
|
126 |
protected $uid;
|
130 |
*/
|
131 |
protected $name;
|
132 |
/**
|
133 |
+
* $quantity The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.
|
134 |
* @var string
|
135 |
*/
|
136 |
protected $quantity;
|
160 |
*/
|
161 |
protected $modifiers;
|
162 |
/**
|
163 |
+
* $taxes A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error.
|
164 |
* @var \SquareConnect\Model\OrderLineItemTax[]
|
165 |
*/
|
166 |
protected $taxes;
|
167 |
/**
|
168 |
+
* $discounts A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list. This field has been deprecated in favour of `applied_discounts`. Usage of both this field and `applied_discounts` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error.
|
169 |
* @var \SquareConnect\Model\OrderLineItemDiscount[]
|
170 |
*/
|
171 |
protected $discounts;
|
172 |
+
/**
|
173 |
+
* $applied_taxes The list of references to taxes applied to this line item. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every line item for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any line items. To change the amount of a tax, modify the referenced top-level tax.
|
174 |
+
* @var \SquareConnect\Model\OrderLineItemAppliedTax[]
|
175 |
+
*/
|
176 |
+
protected $applied_taxes;
|
177 |
+
/**
|
178 |
+
* $applied_discounts The list of references to discounts applied to this line item. Each `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level `OrderLineItemDiscounts` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedDiscount` will be automatically created on every line item for all `ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records for `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any line items. To change the amount of a discount, modify the referenced top-level discount.
|
179 |
+
* @var \SquareConnect\Model\OrderLineItemAppliedDiscount[]
|
180 |
+
*/
|
181 |
+
protected $applied_discounts;
|
182 |
/**
|
183 |
* $base_price_money The base price for a single unit of the line item.
|
184 |
* @var \SquareConnect\Model\Money
|
267 |
} else {
|
268 |
$this->discounts = null;
|
269 |
}
|
270 |
+
if (isset($data["applied_taxes"])) {
|
271 |
+
$this->applied_taxes = $data["applied_taxes"];
|
272 |
+
} else {
|
273 |
+
$this->applied_taxes = null;
|
274 |
+
}
|
275 |
+
if (isset($data["applied_discounts"])) {
|
276 |
+
$this->applied_discounts = $data["applied_discounts"];
|
277 |
+
} else {
|
278 |
+
$this->applied_discounts = null;
|
279 |
+
}
|
280 |
if (isset($data["base_price_money"])) {
|
281 |
$this->base_price_money = $data["base_price_money"];
|
282 |
} else {
|
320 |
|
321 |
/**
|
322 |
* Sets uid
|
323 |
+
* @param string $uid Unique ID that identifies the line item only within this order.
|
324 |
* @return $this
|
325 |
*/
|
326 |
public function setUid($uid)
|
358 |
|
359 |
/**
|
360 |
* Sets quantity
|
361 |
+
* @param string $quantity The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.
|
362 |
* @return $this
|
363 |
*/
|
364 |
public function setQuantity($quantity)
|
472 |
|
473 |
/**
|
474 |
* Sets taxes
|
475 |
+
* @param \SquareConnect\Model\OrderLineItemTax[] $taxes A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error.
|
476 |
* @return $this
|
477 |
*/
|
478 |
public function setTaxes($taxes)
|
491 |
|
492 |
/**
|
493 |
* Sets discounts
|
494 |
+
* @param \SquareConnect\Model\OrderLineItemDiscount[] $discounts A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list. This field has been deprecated in favour of `applied_discounts`. Usage of both this field and `applied_discounts` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error.
|
495 |
* @return $this
|
496 |
*/
|
497 |
public function setDiscounts($discounts)
|
499 |
$this->discounts = $discounts;
|
500 |
return $this;
|
501 |
}
|
502 |
+
/**
|
503 |
+
* Gets applied_taxes
|
504 |
+
* @return \SquareConnect\Model\OrderLineItemAppliedTax[]
|
505 |
+
*/
|
506 |
+
public function getAppliedTaxes()
|
507 |
+
{
|
508 |
+
return $this->applied_taxes;
|
509 |
+
}
|
510 |
+
|
511 |
+
/**
|
512 |
+
* Sets applied_taxes
|
513 |
+
* @param \SquareConnect\Model\OrderLineItemAppliedTax[] $applied_taxes The list of references to taxes applied to this line item. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every line item for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any line items. To change the amount of a tax, modify the referenced top-level tax.
|
514 |
+
* @return $this
|
515 |
+
*/
|
516 |
+
public function setAppliedTaxes($applied_taxes)
|
517 |
+
{
|
518 |
+
$this->applied_taxes = $applied_taxes;
|
519 |
+
return $this;
|
520 |
+
}
|
521 |
+
/**
|
522 |
+
* Gets applied_discounts
|
523 |
+
* @return \SquareConnect\Model\OrderLineItemAppliedDiscount[]
|
524 |
+
*/
|
525 |
+
public function getAppliedDiscounts()
|
526 |
+
{
|
527 |
+
return $this->applied_discounts;
|
528 |
+
}
|
529 |
+
|
530 |
+
/**
|
531 |
+
* Sets applied_discounts
|
532 |
+
* @param \SquareConnect\Model\OrderLineItemAppliedDiscount[] $applied_discounts The list of references to discounts applied to this line item. Each `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level `OrderLineItemDiscounts` applied to the line item. On reads, the amount applied is populated. An `OrderLineItemAppliedDiscount` will be automatically created on every line item for all `ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records for `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any line items. To change the amount of a discount, modify the referenced top-level discount.
|
533 |
+
* @return $this
|
534 |
+
*/
|
535 |
+
public function setAppliedDiscounts($applied_discounts)
|
536 |
+
{
|
537 |
+
$this->applied_discounts = $applied_discounts;
|
538 |
+
return $this;
|
539 |
+
}
|
540 |
/**
|
541 |
* Gets base_price_money
|
542 |
* @return \SquareConnect\Model\Money
|
vendor/square/connect/lib/Model/OrderLineItemAppliedDiscount.php
ADDED
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* OrderLineItemAppliedDiscount Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class OrderLineItemAppliedDiscount implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'uid' => 'string',
|
28 |
+
'discount_uid' => 'string',
|
29 |
+
'applied_money' => '\SquareConnect\Model\Money'
|
30 |
+
);
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
34 |
+
* @var string[]
|
35 |
+
*/
|
36 |
+
static $attributeMap = array(
|
37 |
+
'uid' => 'uid',
|
38 |
+
'discount_uid' => 'discount_uid',
|
39 |
+
'applied_money' => 'applied_money'
|
40 |
+
);
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
44 |
+
* @var string[]
|
45 |
+
*/
|
46 |
+
static $setters = array(
|
47 |
+
'uid' => 'setUid',
|
48 |
+
'discount_uid' => 'setDiscountUid',
|
49 |
+
'applied_money' => 'setAppliedMoney'
|
50 |
+
);
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Array of attributes to getter functions (for serialization of requests)
|
54 |
+
* @var string[]
|
55 |
+
*/
|
56 |
+
static $getters = array(
|
57 |
+
'uid' => 'getUid',
|
58 |
+
'discount_uid' => 'getDiscountUid',
|
59 |
+
'applied_money' => 'getAppliedMoney'
|
60 |
+
);
|
61 |
+
|
62 |
+
/**
|
63 |
+
* $uid Unique ID that identifies the applied discount only within this order.
|
64 |
+
* @var string
|
65 |
+
*/
|
66 |
+
protected $uid;
|
67 |
+
/**
|
68 |
+
* $discount_uid The `uid` of the discount the applied discount represents. Must reference a discount present in the `order.discounts` field. This field is immutable. To change which discounts apply to a line item, you must delete the discount and re-add it as a new `OrderLineItemAppliedDiscount`.
|
69 |
+
* @var string
|
70 |
+
*/
|
71 |
+
protected $discount_uid;
|
72 |
+
/**
|
73 |
+
* $applied_money The amount of money applied by the discount to the line item.
|
74 |
+
* @var \SquareConnect\Model\Money
|
75 |
+
*/
|
76 |
+
protected $applied_money;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Constructor
|
80 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
81 |
+
*/
|
82 |
+
public function __construct(array $data = null)
|
83 |
+
{
|
84 |
+
if ($data != null) {
|
85 |
+
if (isset($data["uid"])) {
|
86 |
+
$this->uid = $data["uid"];
|
87 |
+
} else {
|
88 |
+
$this->uid = null;
|
89 |
+
}
|
90 |
+
if (isset($data["discount_uid"])) {
|
91 |
+
$this->discount_uid = $data["discount_uid"];
|
92 |
+
} else {
|
93 |
+
$this->discount_uid = null;
|
94 |
+
}
|
95 |
+
if (isset($data["applied_money"])) {
|
96 |
+
$this->applied_money = $data["applied_money"];
|
97 |
+
} else {
|
98 |
+
$this->applied_money = null;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
/**
|
103 |
+
* Gets uid
|
104 |
+
* @return string
|
105 |
+
*/
|
106 |
+
public function getUid()
|
107 |
+
{
|
108 |
+
return $this->uid;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Sets uid
|
113 |
+
* @param string $uid Unique ID that identifies the applied discount only within this order.
|
114 |
+
* @return $this
|
115 |
+
*/
|
116 |
+
public function setUid($uid)
|
117 |
+
{
|
118 |
+
$this->uid = $uid;
|
119 |
+
return $this;
|
120 |
+
}
|
121 |
+
/**
|
122 |
+
* Gets discount_uid
|
123 |
+
* @return string
|
124 |
+
*/
|
125 |
+
public function getDiscountUid()
|
126 |
+
{
|
127 |
+
return $this->discount_uid;
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Sets discount_uid
|
132 |
+
* @param string $discount_uid The `uid` of the discount the applied discount represents. Must reference a discount present in the `order.discounts` field. This field is immutable. To change which discounts apply to a line item, you must delete the discount and re-add it as a new `OrderLineItemAppliedDiscount`.
|
133 |
+
* @return $this
|
134 |
+
*/
|
135 |
+
public function setDiscountUid($discount_uid)
|
136 |
+
{
|
137 |
+
$this->discount_uid = $discount_uid;
|
138 |
+
return $this;
|
139 |
+
}
|
140 |
+
/**
|
141 |
+
* Gets applied_money
|
142 |
+
* @return \SquareConnect\Model\Money
|
143 |
+
*/
|
144 |
+
public function getAppliedMoney()
|
145 |
+
{
|
146 |
+
return $this->applied_money;
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Sets applied_money
|
151 |
+
* @param \SquareConnect\Model\Money $applied_money The amount of money applied by the discount to the line item.
|
152 |
+
* @return $this
|
153 |
+
*/
|
154 |
+
public function setAppliedMoney($applied_money)
|
155 |
+
{
|
156 |
+
$this->applied_money = $applied_money;
|
157 |
+
return $this;
|
158 |
+
}
|
159 |
+
/**
|
160 |
+
* Returns true if offset exists. False otherwise.
|
161 |
+
* @param integer $offset Offset
|
162 |
+
* @return boolean
|
163 |
+
*/
|
164 |
+
public function offsetExists($offset)
|
165 |
+
{
|
166 |
+
return isset($this->$offset);
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Gets offset.
|
171 |
+
* @param integer $offset Offset
|
172 |
+
* @return mixed
|
173 |
+
*/
|
174 |
+
public function offsetGet($offset)
|
175 |
+
{
|
176 |
+
return $this->$offset;
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Sets value based on offset.
|
181 |
+
* @param integer $offset Offset
|
182 |
+
* @param mixed $value Value to be set
|
183 |
+
* @return void
|
184 |
+
*/
|
185 |
+
public function offsetSet($offset, $value)
|
186 |
+
{
|
187 |
+
$this->$offset = $value;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Unsets offset.
|
192 |
+
* @param integer $offset Offset
|
193 |
+
* @return void
|
194 |
+
*/
|
195 |
+
public function offsetUnset($offset)
|
196 |
+
{
|
197 |
+
unset($this->$offset);
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Gets the string presentation of the object
|
202 |
+
* @return string
|
203 |
+
*/
|
204 |
+
public function __toString()
|
205 |
+
{
|
206 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
207 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
208 |
+
} else {
|
209 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
210 |
+
}
|
211 |
+
}
|
212 |
+
}
|
vendor/square/connect/lib/Model/OrderLineItemAppliedTax.php
ADDED
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* OrderLineItemAppliedTax Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class OrderLineItemAppliedTax implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'uid' => 'string',
|
28 |
+
'tax_uid' => 'string',
|
29 |
+
'applied_money' => '\SquareConnect\Model\Money'
|
30 |
+
);
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
34 |
+
* @var string[]
|
35 |
+
*/
|
36 |
+
static $attributeMap = array(
|
37 |
+
'uid' => 'uid',
|
38 |
+
'tax_uid' => 'tax_uid',
|
39 |
+
'applied_money' => 'applied_money'
|
40 |
+
);
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
44 |
+
* @var string[]
|
45 |
+
*/
|
46 |
+
static $setters = array(
|
47 |
+
'uid' => 'setUid',
|
48 |
+
'tax_uid' => 'setTaxUid',
|
49 |
+
'applied_money' => 'setAppliedMoney'
|
50 |
+
);
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Array of attributes to getter functions (for serialization of requests)
|
54 |
+
* @var string[]
|
55 |
+
*/
|
56 |
+
static $getters = array(
|
57 |
+
'uid' => 'getUid',
|
58 |
+
'tax_uid' => 'getTaxUid',
|
59 |
+
'applied_money' => 'getAppliedMoney'
|
60 |
+
);
|
61 |
+
|
62 |
+
/**
|
63 |
+
* $uid Unique ID that identifies the applied tax only within this order.
|
64 |
+
* @var string
|
65 |
+
*/
|
66 |
+
protected $uid;
|
67 |
+
/**
|
68 |
+
* $tax_uid The `uid` of the tax for which this applied tax represents. Must reference a tax present in the `order.taxes` field. This field is immutable. To change which taxes apply to a line item, delete and add new `OrderLineItemAppliedTax`s.
|
69 |
+
* @var string
|
70 |
+
*/
|
71 |
+
protected $tax_uid;
|
72 |
+
/**
|
73 |
+
* $applied_money The amount of money applied by the tax to the line item.
|
74 |
+
* @var \SquareConnect\Model\Money
|
75 |
+
*/
|
76 |
+
protected $applied_money;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Constructor
|
80 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
81 |
+
*/
|
82 |
+
public function __construct(array $data = null)
|
83 |
+
{
|
84 |
+
if ($data != null) {
|
85 |
+
if (isset($data["uid"])) {
|
86 |
+
$this->uid = $data["uid"];
|
87 |
+
} else {
|
88 |
+
$this->uid = null;
|
89 |
+
}
|
90 |
+
if (isset($data["tax_uid"])) {
|
91 |
+
$this->tax_uid = $data["tax_uid"];
|
92 |
+
} else {
|
93 |
+
$this->tax_uid = null;
|
94 |
+
}
|
95 |
+
if (isset($data["applied_money"])) {
|
96 |
+
$this->applied_money = $data["applied_money"];
|
97 |
+
} else {
|
98 |
+
$this->applied_money = null;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
/**
|
103 |
+
* Gets uid
|
104 |
+
* @return string
|
105 |
+
*/
|
106 |
+
public function getUid()
|
107 |
+
{
|
108 |
+
return $this->uid;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Sets uid
|
113 |
+
* @param string $uid Unique ID that identifies the applied tax only within this order.
|
114 |
+
* @return $this
|
115 |
+
*/
|
116 |
+
public function setUid($uid)
|
117 |
+
{
|
118 |
+
$this->uid = $uid;
|
119 |
+
return $this;
|
120 |
+
}
|
121 |
+
/**
|
122 |
+
* Gets tax_uid
|
123 |
+
* @return string
|
124 |
+
*/
|
125 |
+
public function getTaxUid()
|
126 |
+
{
|
127 |
+
return $this->tax_uid;
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Sets tax_uid
|
132 |
+
* @param string $tax_uid The `uid` of the tax for which this applied tax represents. Must reference a tax present in the `order.taxes` field. This field is immutable. To change which taxes apply to a line item, delete and add new `OrderLineItemAppliedTax`s.
|
133 |
+
* @return $this
|
134 |
+
*/
|
135 |
+
public function setTaxUid($tax_uid)
|
136 |
+
{
|
137 |
+
$this->tax_uid = $tax_uid;
|
138 |
+
return $this;
|
139 |
+
}
|
140 |
+
/**
|
141 |
+
* Gets applied_money
|
142 |
+
* @return \SquareConnect\Model\Money
|
143 |
+
*/
|
144 |
+
public function getAppliedMoney()
|
145 |
+
{
|
146 |
+
return $this->applied_money;
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Sets applied_money
|
151 |
+
* @param \SquareConnect\Model\Money $applied_money The amount of money applied by the tax to the line item.
|
152 |
+
* @return $this
|
153 |
+
*/
|
154 |
+
public function setAppliedMoney($applied_money)
|
155 |
+
{
|
156 |
+
$this->applied_money = $applied_money;
|
157 |
+
return $this;
|
158 |
+
}
|
159 |
+
/**
|
160 |
+
* Returns true if offset exists. False otherwise.
|
161 |
+
* @param integer $offset Offset
|
162 |
+
* @return boolean
|
163 |
+
*/
|
164 |
+
public function offsetExists($offset)
|
165 |
+
{
|
166 |
+
return isset($this->$offset);
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Gets offset.
|
171 |
+
* @param integer $offset Offset
|
172 |
+
* @return mixed
|
173 |
+
*/
|
174 |
+
public function offsetGet($offset)
|
175 |
+
{
|
176 |
+
return $this->$offset;
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Sets value based on offset.
|
181 |
+
* @param integer $offset Offset
|
182 |
+
* @param mixed $value Value to be set
|
183 |
+
* @return void
|
184 |
+
*/
|
185 |
+
public function offsetSet($offset, $value)
|
186 |
+
{
|
187 |
+
$this->$offset = $value;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Unsets offset.
|
192 |
+
* @param integer $offset Offset
|
193 |
+
* @return void
|
194 |
+
*/
|
195 |
+
public function offsetUnset($offset)
|
196 |
+
{
|
197 |
+
unset($this->$offset);
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Gets the string presentation of the object
|
202 |
+
* @return string
|
203 |
+
*/
|
204 |
+
public function __toString()
|
205 |
+
{
|
206 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
207 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
208 |
+
} else {
|
209 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
210 |
+
}
|
211 |
+
}
|
212 |
+
}
|
vendor/square/connect/lib/Model/OrderLineItemDiscount.php
CHANGED
@@ -80,7 +80,7 @@ class OrderLineItemDiscount implements ArrayAccess
|
|
80 |
);
|
81 |
|
82 |
/**
|
83 |
-
* $uid
|
84 |
* @var string
|
85 |
*/
|
86 |
protected $uid;
|
@@ -105,17 +105,17 @@ class OrderLineItemDiscount implements ArrayAccess
|
|
105 |
*/
|
106 |
protected $percentage;
|
107 |
/**
|
108 |
-
* $amount_money The total monetary amount of the
|
109 |
* @var \SquareConnect\Model\Money
|
110 |
*/
|
111 |
protected $amount_money;
|
112 |
/**
|
113 |
-
* $applied_money The amount of discount actually applied to
|
114 |
* @var \SquareConnect\Model\Money
|
115 |
*/
|
116 |
protected $applied_money;
|
117 |
/**
|
118 |
-
* $scope Indicates the level at which the discount applies. This field is
|
119 |
* @var string
|
120 |
*/
|
121 |
protected $scope;
|
@@ -180,7 +180,7 @@ class OrderLineItemDiscount implements ArrayAccess
|
|
180 |
|
181 |
/**
|
182 |
* Sets uid
|
183 |
-
* @param string $uid
|
184 |
* @return $this
|
185 |
*/
|
186 |
public function setUid($uid)
|
@@ -275,7 +275,7 @@ class OrderLineItemDiscount implements ArrayAccess
|
|
275 |
|
276 |
/**
|
277 |
* Sets amount_money
|
278 |
-
* @param \SquareConnect\Model\Money $amount_money The total monetary amount of the
|
279 |
* @return $this
|
280 |
*/
|
281 |
public function setAmountMoney($amount_money)
|
@@ -294,7 +294,7 @@ class OrderLineItemDiscount implements ArrayAccess
|
|
294 |
|
295 |
/**
|
296 |
* Sets applied_money
|
297 |
-
* @param \SquareConnect\Model\Money $applied_money The amount of discount actually applied to
|
298 |
* @return $this
|
299 |
*/
|
300 |
public function setAppliedMoney($applied_money)
|
@@ -313,7 +313,7 @@ class OrderLineItemDiscount implements ArrayAccess
|
|
313 |
|
314 |
/**
|
315 |
* Sets scope
|
316 |
-
* @param string $scope Indicates the level at which the discount applies. This field is
|
317 |
* @return $this
|
318 |
*/
|
319 |
public function setScope($scope)
|
80 |
);
|
81 |
|
82 |
/**
|
83 |
+
* $uid Unique ID that identifies the discount only within this order.
|
84 |
* @var string
|
85 |
*/
|
86 |
protected $uid;
|
105 |
*/
|
106 |
protected $percentage;
|
107 |
/**
|
108 |
+
* $amount_money The total declared monetary amount of the discount. `amount_money` is not set for percentage-based discounts.
|
109 |
* @var \SquareConnect\Model\Money
|
110 |
*/
|
111 |
protected $amount_money;
|
112 |
/**
|
113 |
+
* $applied_money The amount of discount actually applied to the line item. Represents the amount of money applied as a line item-scoped discount. When an amount-based discount is scoped to the entire order, the value of `applied_money` is different from `amount_money` because the total amount of the discount is distributed across all line items.
|
114 |
* @var \SquareConnect\Model\Money
|
115 |
*/
|
116 |
protected $applied_money;
|
117 |
/**
|
118 |
+
* $scope Indicates the level at which the discount applies. For `ORDER` scoped discounts, Square generates references in `applied_discounts` on all order line items that do not have them. For `LINE_ITEM` scoped discounts, the discount only applies to line items with a discount reference in their `applied_discounts` field. This field is immutable. To change the scope of a discount you must delete the discount and re-add it as a new discount. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values
|
119 |
* @var string
|
120 |
*/
|
121 |
protected $scope;
|
180 |
|
181 |
/**
|
182 |
* Sets uid
|
183 |
+
* @param string $uid Unique ID that identifies the discount only within this order.
|
184 |
* @return $this
|
185 |
*/
|
186 |
public function setUid($uid)
|
275 |
|
276 |
/**
|
277 |
* Sets amount_money
|
278 |
+
* @param \SquareConnect\Model\Money $amount_money The total declared monetary amount of the discount. `amount_money` is not set for percentage-based discounts.
|
279 |
* @return $this
|
280 |
*/
|
281 |
public function setAmountMoney($amount_money)
|
294 |
|
295 |
/**
|
296 |
* Sets applied_money
|
297 |
+
* @param \SquareConnect\Model\Money $applied_money The amount of discount actually applied to the line item. Represents the amount of money applied as a line item-scoped discount. When an amount-based discount is scoped to the entire order, the value of `applied_money` is different from `amount_money` because the total amount of the discount is distributed across all line items.
|
298 |
* @return $this
|
299 |
*/
|
300 |
public function setAppliedMoney($applied_money)
|
313 |
|
314 |
/**
|
315 |
* Sets scope
|
316 |
+
* @param string $scope Indicates the level at which the discount applies. For `ORDER` scoped discounts, Square generates references in `applied_discounts` on all order line items that do not have them. For `LINE_ITEM` scoped discounts, the discount only applies to line items with a discount reference in their `applied_discounts` field. This field is immutable. To change the scope of a discount you must delete the discount and re-add it as a new discount. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values
|
317 |
* @return $this
|
318 |
*/
|
319 |
public function setScope($scope)
|
vendor/square/connect/lib/Model/OrderLineItemModifier.php
CHANGED
@@ -68,7 +68,7 @@ class OrderLineItemModifier implements ArrayAccess
|
|
68 |
);
|
69 |
|
70 |
/**
|
71 |
-
* $uid
|
72 |
* @var string
|
73 |
*/
|
74 |
protected $uid;
|
@@ -138,7 +138,7 @@ class OrderLineItemModifier implements ArrayAccess
|
|
138 |
|
139 |
/**
|
140 |
* Sets uid
|
141 |
-
* @param string $uid
|
142 |
* @return $this
|
143 |
*/
|
144 |
public function setUid($uid)
|
68 |
);
|
69 |
|
70 |
/**
|
71 |
+
* $uid Unique ID that identifies the modifier only within this order.
|
72 |
* @var string
|
73 |
*/
|
74 |
protected $uid;
|
138 |
|
139 |
/**
|
140 |
* Sets uid
|
141 |
+
* @param string $uid Unique ID that identifies the modifier only within this order.
|
142 |
* @return $this
|
143 |
*/
|
144 |
public function setUid($uid)
|
vendor/square/connect/lib/Model/OrderLineItemTax.php
CHANGED
@@ -76,7 +76,7 @@ class OrderLineItemTax implements ArrayAccess
|
|
76 |
);
|
77 |
|
78 |
/**
|
79 |
-
* $uid
|
80 |
* @var string
|
81 |
*/
|
82 |
protected $uid;
|
@@ -96,17 +96,17 @@ class OrderLineItemTax implements ArrayAccess
|
|
96 |
*/
|
97 |
protected $type;
|
98 |
/**
|
99 |
-
* $percentage The percentage of the tax, as a string representation of a decimal number.
|
100 |
* @var string
|
101 |
*/
|
102 |
protected $percentage;
|
103 |
/**
|
104 |
-
* $applied_money The amount of the money applied by the tax in
|
105 |
* @var \SquareConnect\Model\Money
|
106 |
*/
|
107 |
protected $applied_money;
|
108 |
/**
|
109 |
-
* $scope Indicates the level at which the tax applies. This field is
|
110 |
* @var string
|
111 |
*/
|
112 |
protected $scope;
|
@@ -166,7 +166,7 @@ class OrderLineItemTax implements ArrayAccess
|
|
166 |
|
167 |
/**
|
168 |
* Sets uid
|
169 |
-
* @param string $uid
|
170 |
* @return $this
|
171 |
*/
|
172 |
public function setUid($uid)
|
@@ -242,7 +242,7 @@ class OrderLineItemTax implements ArrayAccess
|
|
242 |
|
243 |
/**
|
244 |
* Sets percentage
|
245 |
-
* @param string $percentage The percentage of the tax, as a string representation of a decimal number.
|
246 |
* @return $this
|
247 |
*/
|
248 |
public function setPercentage($percentage)
|
@@ -261,7 +261,7 @@ class OrderLineItemTax implements ArrayAccess
|
|
261 |
|
262 |
/**
|
263 |
* Sets applied_money
|
264 |
-
* @param \SquareConnect\Model\Money $applied_money The amount of the money applied by the tax in
|
265 |
* @return $this
|
266 |
*/
|
267 |
public function setAppliedMoney($applied_money)
|
@@ -280,7 +280,7 @@ class OrderLineItemTax implements ArrayAccess
|
|
280 |
|
281 |
/**
|
282 |
* Sets scope
|
283 |
-
* @param string $scope Indicates the level at which the tax applies. This field is
|
284 |
* @return $this
|
285 |
*/
|
286 |
public function setScope($scope)
|
76 |
);
|
77 |
|
78 |
/**
|
79 |
+
* $uid Unique ID that identifies the tax only within this order.
|
80 |
* @var string
|
81 |
*/
|
82 |
protected $uid;
|
96 |
*/
|
97 |
protected $type;
|
98 |
/**
|
99 |
+
* $percentage The percentage of the tax, as a string representation of a decimal number. For example, a value of `\"7.25\"` corresponds to a percentage of 7.25%.
|
100 |
* @var string
|
101 |
*/
|
102 |
protected $percentage;
|
103 |
/**
|
104 |
+
* $applied_money The amount of the money applied by the tax in the order.
|
105 |
* @var \SquareConnect\Model\Money
|
106 |
*/
|
107 |
protected $applied_money;
|
108 |
/**
|
109 |
+
* $scope Indicates the level at which the tax applies. For `ORDER` scoped taxes, Square generates references in `applied_taxes` on all order line items that do not have them. For `LINE_ITEM` scoped taxes, the tax will only apply to line items with references in their `applied_taxes` field. This field is immutable. To change the scope, you must delete the tax and re-add it as a new tax. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values
|
110 |
* @var string
|
111 |
*/
|
112 |
protected $scope;
|
166 |
|
167 |
/**
|
168 |
* Sets uid
|
169 |
+
* @param string $uid Unique ID that identifies the tax only within this order.
|
170 |
* @return $this
|
171 |
*/
|
172 |
public function setUid($uid)
|
242 |
|
243 |
/**
|
244 |
* Sets percentage
|
245 |
+
* @param string $percentage The percentage of the tax, as a string representation of a decimal number. For example, a value of `\"7.25\"` corresponds to a percentage of 7.25%.
|
246 |
* @return $this
|
247 |
*/
|
248 |
public function setPercentage($percentage)
|
261 |
|
262 |
/**
|
263 |
* Sets applied_money
|
264 |
+
* @param \SquareConnect\Model\Money $applied_money The amount of the money applied by the tax in the order.
|
265 |
* @return $this
|
266 |
*/
|
267 |
public function setAppliedMoney($applied_money)
|
280 |
|
281 |
/**
|
282 |
* Sets scope
|
283 |
+
* @param string $scope Indicates the level at which the tax applies. For `ORDER` scoped taxes, Square generates references in `applied_taxes` on all order line items that do not have them. For `LINE_ITEM` scoped taxes, the tax will only apply to line items with references in their `applied_taxes` field. This field is immutable. To change the scope, you must delete the tax and re-add it as a new tax. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values
|
284 |
* @return $this
|
285 |
*/
|
286 |
public function setScope($scope)
|
vendor/square/connect/lib/Model/OrderQuantityUnit.php
CHANGED
@@ -61,7 +61,7 @@ class OrderQuantityUnit implements ArrayAccess
|
|
61 |
*/
|
62 |
protected $measurement_unit;
|
63 |
/**
|
64 |
-
* $precision For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5.
|
65 |
* @var int
|
66 |
*/
|
67 |
protected $precision;
|
@@ -115,7 +115,7 @@ class OrderQuantityUnit implements ArrayAccess
|
|
115 |
|
116 |
/**
|
117 |
* Sets precision
|
118 |
-
* @param int $precision For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5.
|
119 |
* @return $this
|
120 |
*/
|
121 |
public function setPrecision($precision)
|
61 |
*/
|
62 |
protected $measurement_unit;
|
63 |
/**
|
64 |
+
* $precision For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5.
|
65 |
* @var int
|
66 |
*/
|
67 |
protected $precision;
|
115 |
|
116 |
/**
|
117 |
* Sets precision
|
118 |
+
* @param int $precision For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5.
|
119 |
* @return $this
|
120 |
*/
|
121 |
public function setPrecision($precision)
|
vendor/square/connect/lib/Model/OrderReturn.php
CHANGED
@@ -27,6 +27,7 @@ class OrderReturn implements ArrayAccess
|
|
27 |
'uid' => 'string',
|
28 |
'source_order_id' => 'string',
|
29 |
'return_line_items' => '\SquareConnect\Model\OrderReturnLineItem[]',
|
|
|
30 |
'return_taxes' => '\SquareConnect\Model\OrderReturnTax[]',
|
31 |
'return_discounts' => '\SquareConnect\Model\OrderReturnDiscount[]',
|
32 |
'rounding_adjustment' => '\SquareConnect\Model\OrderRoundingAdjustment',
|
@@ -41,6 +42,7 @@ class OrderReturn implements ArrayAccess
|
|
41 |
'uid' => 'uid',
|
42 |
'source_order_id' => 'source_order_id',
|
43 |
'return_line_items' => 'return_line_items',
|
|
|
44 |
'return_taxes' => 'return_taxes',
|
45 |
'return_discounts' => 'return_discounts',
|
46 |
'rounding_adjustment' => 'rounding_adjustment',
|
@@ -55,6 +57,7 @@ class OrderReturn implements ArrayAccess
|
|
55 |
'uid' => 'setUid',
|
56 |
'source_order_id' => 'setSourceOrderId',
|
57 |
'return_line_items' => 'setReturnLineItems',
|
|
|
58 |
'return_taxes' => 'setReturnTaxes',
|
59 |
'return_discounts' => 'setReturnDiscounts',
|
60 |
'rounding_adjustment' => 'setRoundingAdjustment',
|
@@ -69,6 +72,7 @@ class OrderReturn implements ArrayAccess
|
|
69 |
'uid' => 'getUid',
|
70 |
'source_order_id' => 'getSourceOrderId',
|
71 |
'return_line_items' => 'getReturnLineItems',
|
|
|
72 |
'return_taxes' => 'getReturnTaxes',
|
73 |
'return_discounts' => 'getReturnDiscounts',
|
74 |
'rounding_adjustment' => 'getRoundingAdjustment',
|
@@ -76,7 +80,7 @@ class OrderReturn implements ArrayAccess
|
|
76 |
);
|
77 |
|
78 |
/**
|
79 |
-
* $uid
|
80 |
* @var string
|
81 |
*/
|
82 |
protected $uid;
|
@@ -91,12 +95,17 @@ class OrderReturn implements ArrayAccess
|
|
91 |
*/
|
92 |
protected $return_line_items;
|
93 |
/**
|
94 |
-
* $
|
|
|
|
|
|
|
|
|
|
|
95 |
* @var \SquareConnect\Model\OrderReturnTax[]
|
96 |
*/
|
97 |
protected $return_taxes;
|
98 |
/**
|
99 |
-
* $return_discounts Collection of
|
100 |
* @var \SquareConnect\Model\OrderReturnDiscount[]
|
101 |
*/
|
102 |
protected $return_discounts;
|
@@ -133,6 +142,11 @@ class OrderReturn implements ArrayAccess
|
|
133 |
} else {
|
134 |
$this->return_line_items = null;
|
135 |
}
|
|
|
|
|
|
|
|
|
|
|
136 |
if (isset($data["return_taxes"])) {
|
137 |
$this->return_taxes = $data["return_taxes"];
|
138 |
} else {
|
@@ -166,7 +180,7 @@ class OrderReturn implements ArrayAccess
|
|
166 |
|
167 |
/**
|
168 |
* Sets uid
|
169 |
-
* @param string $uid
|
170 |
* @return $this
|
171 |
*/
|
172 |
public function setUid($uid)
|
@@ -212,6 +226,25 @@ class OrderReturn implements ArrayAccess
|
|
212 |
$this->return_line_items = $return_line_items;
|
213 |
return $this;
|
214 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
/**
|
216 |
* Gets return_taxes
|
217 |
* @return \SquareConnect\Model\OrderReturnTax[]
|
@@ -223,7 +256,7 @@ class OrderReturn implements ArrayAccess
|
|
223 |
|
224 |
/**
|
225 |
* Sets return_taxes
|
226 |
-
* @param \SquareConnect\Model\OrderReturnTax[] $return_taxes Collection of
|
227 |
* @return $this
|
228 |
*/
|
229 |
public function setReturnTaxes($return_taxes)
|
@@ -242,7 +275,7 @@ class OrderReturn implements ArrayAccess
|
|
242 |
|
243 |
/**
|
244 |
* Sets return_discounts
|
245 |
-
* @param \SquareConnect\Model\OrderReturnDiscount[] $return_discounts Collection of
|
246 |
* @return $this
|
247 |
*/
|
248 |
public function setReturnDiscounts($return_discounts)
|
27 |
'uid' => 'string',
|
28 |
'source_order_id' => 'string',
|
29 |
'return_line_items' => '\SquareConnect\Model\OrderReturnLineItem[]',
|
30 |
+
'return_service_charges' => '\SquareConnect\Model\OrderReturnServiceCharge[]',
|
31 |
'return_taxes' => '\SquareConnect\Model\OrderReturnTax[]',
|
32 |
'return_discounts' => '\SquareConnect\Model\OrderReturnDiscount[]',
|
33 |
'rounding_adjustment' => '\SquareConnect\Model\OrderRoundingAdjustment',
|
42 |
'uid' => 'uid',
|
43 |
'source_order_id' => 'source_order_id',
|
44 |
'return_line_items' => 'return_line_items',
|
45 |
+
'return_service_charges' => 'return_service_charges',
|
46 |
'return_taxes' => 'return_taxes',
|
47 |
'return_discounts' => 'return_discounts',
|
48 |
'rounding_adjustment' => 'rounding_adjustment',
|
57 |
'uid' => 'setUid',
|
58 |
'source_order_id' => 'setSourceOrderId',
|
59 |
'return_line_items' => 'setReturnLineItems',
|
60 |
+
'return_service_charges' => 'setReturnServiceCharges',
|
61 |
'return_taxes' => 'setReturnTaxes',
|
62 |
'return_discounts' => 'setReturnDiscounts',
|
63 |
'rounding_adjustment' => 'setRoundingAdjustment',
|
72 |
'uid' => 'getUid',
|
73 |
'source_order_id' => 'getSourceOrderId',
|
74 |
'return_line_items' => 'getReturnLineItems',
|
75 |
+
'return_service_charges' => 'getReturnServiceCharges',
|
76 |
'return_taxes' => 'getReturnTaxes',
|
77 |
'return_discounts' => 'getReturnDiscounts',
|
78 |
'rounding_adjustment' => 'getRoundingAdjustment',
|
80 |
);
|
81 |
|
82 |
/**
|
83 |
+
* $uid Unique ID that identifies the return only within this order.
|
84 |
* @var string
|
85 |
*/
|
86 |
protected $uid;
|
95 |
*/
|
96 |
protected $return_line_items;
|
97 |
/**
|
98 |
+
* $return_service_charges Collection of service charges which are being returned.
|
99 |
+
* @var \SquareConnect\Model\OrderReturnServiceCharge[]
|
100 |
+
*/
|
101 |
+
protected $return_service_charges;
|
102 |
+
/**
|
103 |
+
* $return_taxes Collection of references to taxes being returned for an order, including the total applied tax amount to be returned. The taxes must reference a top-level tax ID from the source order.
|
104 |
* @var \SquareConnect\Model\OrderReturnTax[]
|
105 |
*/
|
106 |
protected $return_taxes;
|
107 |
/**
|
108 |
+
* $return_discounts Collection of references to discounts being returned for an order, including the total applied discount amount to be returned. The discounts must reference a top-level discount ID from the source order.
|
109 |
* @var \SquareConnect\Model\OrderReturnDiscount[]
|
110 |
*/
|
111 |
protected $return_discounts;
|
142 |
} else {
|
143 |
$this->return_line_items = null;
|
144 |
}
|
145 |
+
if (isset($data["return_service_charges"])) {
|
146 |
+
$this->return_service_charges = $data["return_service_charges"];
|
147 |
+
} else {
|
148 |
+
$this->return_service_charges = null;
|
149 |
+
}
|
150 |
if (isset($data["return_taxes"])) {
|
151 |
$this->return_taxes = $data["return_taxes"];
|
152 |
} else {
|
180 |
|
181 |
/**
|
182 |
* Sets uid
|
183 |
+
* @param string $uid Unique ID that identifies the return only within this order.
|
184 |
* @return $this
|
185 |
*/
|
186 |
public function setUid($uid)
|
226 |
$this->return_line_items = $return_line_items;
|
227 |
return $this;
|
228 |
}
|
229 |
+
/**
|
230 |
+
* Gets return_service_charges
|
231 |
+
* @return \SquareConnect\Model\OrderReturnServiceCharge[]
|
232 |
+
*/
|
233 |
+
public function getReturnServiceCharges()
|
234 |
+
{
|
235 |
+
return $this->return_service_charges;
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Sets return_service_charges
|
240 |
+
* @param \SquareConnect\Model\OrderReturnServiceCharge[] $return_service_charges Collection of service charges which are being returned.
|
241 |
+
* @return $this
|
242 |
+
*/
|
243 |
+
public function setReturnServiceCharges($return_service_charges)
|
244 |
+
{
|
245 |
+
$this->return_service_charges = $return_service_charges;
|
246 |
+
return $this;
|
247 |
+
}
|
248 |
/**
|
249 |
* Gets return_taxes
|
250 |
* @return \SquareConnect\Model\OrderReturnTax[]
|
256 |
|
257 |
/**
|
258 |
* Sets return_taxes
|
259 |
+
* @param \SquareConnect\Model\OrderReturnTax[] $return_taxes Collection of references to taxes being returned for an order, including the total applied tax amount to be returned. The taxes must reference a top-level tax ID from the source order.
|
260 |
* @return $this
|
261 |
*/
|
262 |
public function setReturnTaxes($return_taxes)
|
275 |
|
276 |
/**
|
277 |
* Sets return_discounts
|
278 |
+
* @param \SquareConnect\Model\OrderReturnDiscount[] $return_discounts Collection of references to discounts being returned for an order, including the total applied discount amount to be returned. The discounts must reference a top-level discount ID from the source order.
|
279 |
* @return $this
|
280 |
*/
|
281 |
public function setReturnDiscounts($return_discounts)
|
vendor/square/connect/lib/Model/OrderReturnDiscount.php
CHANGED
@@ -84,7 +84,7 @@ class OrderReturnDiscount implements ArrayAccess
|
|
84 |
);
|
85 |
|
86 |
/**
|
87 |
-
* $uid
|
88 |
* @var string
|
89 |
*/
|
90 |
protected $uid;
|
@@ -114,7 +114,7 @@ class OrderReturnDiscount implements ArrayAccess
|
|
114 |
*/
|
115 |
protected $percentage;
|
116 |
/**
|
117 |
-
* $amount_money The total monetary amount of the
|
118 |
* @var \SquareConnect\Model\Money
|
119 |
*/
|
120 |
protected $amount_money;
|
@@ -124,7 +124,7 @@ class OrderReturnDiscount implements ArrayAccess
|
|
124 |
*/
|
125 |
protected $applied_money;
|
126 |
/**
|
127 |
-
* $scope Indicates the level at which the
|
128 |
* @var string
|
129 |
*/
|
130 |
protected $scope;
|
@@ -194,7 +194,7 @@ class OrderReturnDiscount implements ArrayAccess
|
|
194 |
|
195 |
/**
|
196 |
* Sets uid
|
197 |
-
* @param string $uid
|
198 |
* @return $this
|
199 |
*/
|
200 |
public function setUid($uid)
|
@@ -308,7 +308,7 @@ class OrderReturnDiscount implements ArrayAccess
|
|
308 |
|
309 |
/**
|
310 |
* Sets amount_money
|
311 |
-
* @param \SquareConnect\Model\Money $amount_money The total monetary amount of the
|
312 |
* @return $this
|
313 |
*/
|
314 |
public function setAmountMoney($amount_money)
|
@@ -346,7 +346,7 @@ class OrderReturnDiscount implements ArrayAccess
|
|
346 |
|
347 |
/**
|
348 |
* Sets scope
|
349 |
-
* @param string $scope Indicates the level at which the
|
350 |
* @return $this
|
351 |
*/
|
352 |
public function setScope($scope)
|
84 |
);
|
85 |
|
86 |
/**
|
87 |
+
* $uid Unique ID that identifies the return discount only within this order.
|
88 |
* @var string
|
89 |
*/
|
90 |
protected $uid;
|
114 |
*/
|
115 |
protected $percentage;
|
116 |
/**
|
117 |
+
* $amount_money The total declared monetary amount of the discount. The amount_money won't be set for a percentage-based discount.
|
118 |
* @var \SquareConnect\Model\Money
|
119 |
*/
|
120 |
protected $amount_money;
|
124 |
*/
|
125 |
protected $applied_money;
|
126 |
/**
|
127 |
+
* $scope Indicates the level at which the `OrderReturnDiscount` applies. For `ORDER` scoped discounts, the server will generate references in `applied_discounts` on all `OrderReturnLineItem`s. For `LINE_ITEM` scoped discounts, the discount will only apply to `OrderReturnLineItem`s with references in their `applied_discounts` field. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values
|
128 |
* @var string
|
129 |
*/
|
130 |
protected $scope;
|
194 |
|
195 |
/**
|
196 |
* Sets uid
|
197 |
+
* @param string $uid Unique ID that identifies the return discount only within this order.
|
198 |
* @return $this
|
199 |
*/
|
200 |
public function setUid($uid)
|
308 |
|
309 |
/**
|
310 |
* Sets amount_money
|
311 |
+
* @param \SquareConnect\Model\Money $amount_money The total declared monetary amount of the discount. The amount_money won't be set for a percentage-based discount.
|
312 |
* @return $this
|
313 |
*/
|
314 |
public function setAmountMoney($amount_money)
|
346 |
|
347 |
/**
|
348 |
* Sets scope
|
349 |
+
* @param string $scope Indicates the level at which the `OrderReturnDiscount` applies. For `ORDER` scoped discounts, the server will generate references in `applied_discounts` on all `OrderReturnLineItem`s. For `LINE_ITEM` scoped discounts, the discount will only apply to `OrderReturnLineItem`s with references in their `applied_discounts` field. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values
|
350 |
* @return $this
|
351 |
*/
|
352 |
public function setScope($scope)
|
vendor/square/connect/lib/Model/OrderReturnLineItem.php
CHANGED
@@ -35,6 +35,8 @@ class OrderReturnLineItem implements ArrayAccess
|
|
35 |
'return_modifiers' => '\SquareConnect\Model\OrderReturnLineItemModifier[]',
|
36 |
'return_taxes' => '\SquareConnect\Model\OrderReturnTax[]',
|
37 |
'return_discounts' => '\SquareConnect\Model\OrderReturnDiscount[]',
|
|
|
|
|
38 |
'base_price_money' => '\SquareConnect\Model\Money',
|
39 |
'variation_total_price_money' => '\SquareConnect\Model\Money',
|
40 |
'gross_return_money' => '\SquareConnect\Model\Money',
|
@@ -59,6 +61,8 @@ class OrderReturnLineItem implements ArrayAccess
|
|
59 |
'return_modifiers' => 'return_modifiers',
|
60 |
'return_taxes' => 'return_taxes',
|
61 |
'return_discounts' => 'return_discounts',
|
|
|
|
|
62 |
'base_price_money' => 'base_price_money',
|
63 |
'variation_total_price_money' => 'variation_total_price_money',
|
64 |
'gross_return_money' => 'gross_return_money',
|
@@ -83,6 +87,8 @@ class OrderReturnLineItem implements ArrayAccess
|
|
83 |
'return_modifiers' => 'setReturnModifiers',
|
84 |
'return_taxes' => 'setReturnTaxes',
|
85 |
'return_discounts' => 'setReturnDiscounts',
|
|
|
|
|
86 |
'base_price_money' => 'setBasePriceMoney',
|
87 |
'variation_total_price_money' => 'setVariationTotalPriceMoney',
|
88 |
'gross_return_money' => 'setGrossReturnMoney',
|
@@ -107,6 +113,8 @@ class OrderReturnLineItem implements ArrayAccess
|
|
107 |
'return_modifiers' => 'getReturnModifiers',
|
108 |
'return_taxes' => 'getReturnTaxes',
|
109 |
'return_discounts' => 'getReturnDiscounts',
|
|
|
|
|
110 |
'base_price_money' => 'getBasePriceMoney',
|
111 |
'variation_total_price_money' => 'getVariationTotalPriceMoney',
|
112 |
'gross_return_money' => 'getGrossReturnMoney',
|
@@ -116,7 +124,7 @@ class OrderReturnLineItem implements ArrayAccess
|
|
116 |
);
|
117 |
|
118 |
/**
|
119 |
-
* $uid Unique identifier for this return line item entry.
|
120 |
* @var string
|
121 |
*/
|
122 |
protected $uid;
|
@@ -161,15 +169,25 @@ class OrderReturnLineItem implements ArrayAccess
|
|
161 |
*/
|
162 |
protected $return_modifiers;
|
163 |
/**
|
164 |
-
* $return_taxes A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item.
|
165 |
* @var \SquareConnect\Model\OrderReturnTax[]
|
166 |
*/
|
167 |
protected $return_taxes;
|
168 |
/**
|
169 |
-
* $return_discounts A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any return-level discounts apportioned to this item.
|
170 |
* @var \SquareConnect\Model\OrderReturnDiscount[]
|
171 |
*/
|
172 |
protected $return_discounts;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
/**
|
174 |
* $base_price_money The base price for a single unit of the line item.
|
175 |
* @var \SquareConnect\Model\Money
|
@@ -263,6 +281,16 @@ class OrderReturnLineItem implements ArrayAccess
|
|
263 |
} else {
|
264 |
$this->return_discounts = null;
|
265 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
if (isset($data["base_price_money"])) {
|
267 |
$this->base_price_money = $data["base_price_money"];
|
268 |
} else {
|
@@ -306,7 +334,7 @@ class OrderReturnLineItem implements ArrayAccess
|
|
306 |
|
307 |
/**
|
308 |
* Sets uid
|
309 |
-
* @param string $uid Unique identifier for this return line item entry.
|
310 |
* @return $this
|
311 |
*/
|
312 |
public function setUid($uid)
|
@@ -477,7 +505,7 @@ class OrderReturnLineItem implements ArrayAccess
|
|
477 |
|
478 |
/**
|
479 |
* Sets return_taxes
|
480 |
-
* @param \SquareConnect\Model\OrderReturnTax[] $return_taxes A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item.
|
481 |
* @return $this
|
482 |
*/
|
483 |
public function setReturnTaxes($return_taxes)
|
@@ -496,7 +524,7 @@ class OrderReturnLineItem implements ArrayAccess
|
|
496 |
|
497 |
/**
|
498 |
* Sets return_discounts
|
499 |
-
* @param \SquareConnect\Model\OrderReturnDiscount[] $return_discounts A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any return-level discounts apportioned to this item.
|
500 |
* @return $this
|
501 |
*/
|
502 |
public function setReturnDiscounts($return_discounts)
|
@@ -504,6 +532,44 @@ class OrderReturnLineItem implements ArrayAccess
|
|
504 |
$this->return_discounts = $return_discounts;
|
505 |
return $this;
|
506 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
507 |
/**
|
508 |
* Gets base_price_money
|
509 |
* @return \SquareConnect\Model\Money
|
35 |
'return_modifiers' => '\SquareConnect\Model\OrderReturnLineItemModifier[]',
|
36 |
'return_taxes' => '\SquareConnect\Model\OrderReturnTax[]',
|
37 |
'return_discounts' => '\SquareConnect\Model\OrderReturnDiscount[]',
|
38 |
+
'applied_taxes' => '\SquareConnect\Model\OrderLineItemAppliedTax[]',
|
39 |
+
'applied_discounts' => '\SquareConnect\Model\OrderLineItemAppliedDiscount[]',
|
40 |
'base_price_money' => '\SquareConnect\Model\Money',
|
41 |
'variation_total_price_money' => '\SquareConnect\Model\Money',
|
42 |
'gross_return_money' => '\SquareConnect\Model\Money',
|
61 |
'return_modifiers' => 'return_modifiers',
|
62 |
'return_taxes' => 'return_taxes',
|
63 |
'return_discounts' => 'return_discounts',
|
64 |
+
'applied_taxes' => 'applied_taxes',
|
65 |
+
'applied_discounts' => 'applied_discounts',
|
66 |
'base_price_money' => 'base_price_money',
|
67 |
'variation_total_price_money' => 'variation_total_price_money',
|
68 |
'gross_return_money' => 'gross_return_money',
|
87 |
'return_modifiers' => 'setReturnModifiers',
|
88 |
'return_taxes' => 'setReturnTaxes',
|
89 |
'return_discounts' => 'setReturnDiscounts',
|
90 |
+
'applied_taxes' => 'setAppliedTaxes',
|
91 |
+
'applied_discounts' => 'setAppliedDiscounts',
|
92 |
'base_price_money' => 'setBasePriceMoney',
|
93 |
'variation_total_price_money' => 'setVariationTotalPriceMoney',
|
94 |
'gross_return_money' => 'setGrossReturnMoney',
|
113 |
'return_modifiers' => 'getReturnModifiers',
|
114 |
'return_taxes' => 'getReturnTaxes',
|
115 |
'return_discounts' => 'getReturnDiscounts',
|
116 |
+
'applied_taxes' => 'getAppliedTaxes',
|
117 |
+
'applied_discounts' => 'getAppliedDiscounts',
|
118 |
'base_price_money' => 'getBasePriceMoney',
|
119 |
'variation_total_price_money' => 'getVariationTotalPriceMoney',
|
120 |
'gross_return_money' => 'getGrossReturnMoney',
|
124 |
);
|
125 |
|
126 |
/**
|
127 |
+
* $uid Unique identifier for this return line item entry.
|
128 |
* @var string
|
129 |
*/
|
130 |
protected $uid;
|
169 |
*/
|
170 |
protected $return_modifiers;
|
171 |
/**
|
172 |
+
* $return_taxes A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item. This field has been deprecated in favour of `applied_taxes`.
|
173 |
* @var \SquareConnect\Model\OrderReturnTax[]
|
174 |
*/
|
175 |
protected $return_taxes;
|
176 |
/**
|
177 |
+
* $return_discounts A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any return-level discounts apportioned to this item. This field has been deprecated in favour of `applied_discounts`.
|
178 |
* @var \SquareConnect\Model\OrderReturnDiscount[]
|
179 |
*/
|
180 |
protected $return_discounts;
|
181 |
+
/**
|
182 |
+
* $applied_taxes The list of references to `OrderReturnTax` entities applied to the returned line item. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderReturnTax` applied to the returned line item. On reads, the amount applied is populated.
|
183 |
+
* @var \SquareConnect\Model\OrderLineItemAppliedTax[]
|
184 |
+
*/
|
185 |
+
protected $applied_taxes;
|
186 |
+
/**
|
187 |
+
* $applied_discounts The list of references to `OrderReturnDiscount` entities applied to the returned line item. Each `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level `OrderReturnDiscount` applied to the returned line item. On reads, the amount applied is populated.
|
188 |
+
* @var \SquareConnect\Model\OrderLineItemAppliedDiscount[]
|
189 |
+
*/
|
190 |
+
protected $applied_discounts;
|
191 |
/**
|
192 |
* $base_price_money The base price for a single unit of the line item.
|
193 |
* @var \SquareConnect\Model\Money
|
281 |
} else {
|
282 |
$this->return_discounts = null;
|
283 |
}
|
284 |
+
if (isset($data["applied_taxes"])) {
|
285 |
+
$this->applied_taxes = $data["applied_taxes"];
|
286 |
+
} else {
|
287 |
+
$this->applied_taxes = null;
|
288 |
+
}
|
289 |
+
if (isset($data["applied_discounts"])) {
|
290 |
+
$this->applied_discounts = $data["applied_discounts"];
|
291 |
+
} else {
|
292 |
+
$this->applied_discounts = null;
|
293 |
+
}
|
294 |
if (isset($data["base_price_money"])) {
|
295 |
$this->base_price_money = $data["base_price_money"];
|
296 |
} else {
|
334 |
|
335 |
/**
|
336 |
* Sets uid
|
337 |
+
* @param string $uid Unique identifier for this return line item entry.
|
338 |
* @return $this
|
339 |
*/
|
340 |
public function setUid($uid)
|
505 |
|
506 |
/**
|
507 |
* Sets return_taxes
|
508 |
+
* @param \SquareConnect\Model\OrderReturnTax[] $return_taxes A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item. This field has been deprecated in favour of `applied_taxes`.
|
509 |
* @return $this
|
510 |
*/
|
511 |
public function setReturnTaxes($return_taxes)
|
524 |
|
525 |
/**
|
526 |
* Sets return_discounts
|
527 |
+
* @param \SquareConnect\Model\OrderReturnDiscount[] $return_discounts A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any return-level discounts apportioned to this item. This field has been deprecated in favour of `applied_discounts`.
|
528 |
* @return $this
|
529 |
*/
|
530 |
public function setReturnDiscounts($return_discounts)
|
532 |
$this->return_discounts = $return_discounts;
|
533 |
return $this;
|
534 |
}
|
535 |
+
/**
|
536 |
+
* Gets applied_taxes
|
537 |
+
* @return \SquareConnect\Model\OrderLineItemAppliedTax[]
|
538 |
+
*/
|
539 |
+
public function getAppliedTaxes()
|
540 |
+
{
|
541 |
+
return $this->applied_taxes;
|
542 |
+
}
|
543 |
+
|
544 |
+
/**
|
545 |
+
* Sets applied_taxes
|
546 |
+
* @param \SquareConnect\Model\OrderLineItemAppliedTax[] $applied_taxes The list of references to `OrderReturnTax` entities applied to the returned line item. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderReturnTax` applied to the returned line item. On reads, the amount applied is populated.
|
547 |
+
* @return $this
|
548 |
+
*/
|
549 |
+
public function setAppliedTaxes($applied_taxes)
|
550 |
+
{
|
551 |
+
$this->applied_taxes = $applied_taxes;
|
552 |
+
return $this;
|
553 |
+
}
|
554 |
+
/**
|
555 |
+
* Gets applied_discounts
|
556 |
+
* @return \SquareConnect\Model\OrderLineItemAppliedDiscount[]
|
557 |
+
*/
|
558 |
+
public function getAppliedDiscounts()
|
559 |
+
{
|
560 |
+
return $this->applied_discounts;
|
561 |
+
}
|
562 |
+
|
563 |
+
/**
|
564 |
+
* Sets applied_discounts
|
565 |
+
* @param \SquareConnect\Model\OrderLineItemAppliedDiscount[] $applied_discounts The list of references to `OrderReturnDiscount` entities applied to the returned line item. Each `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level `OrderReturnDiscount` applied to the returned line item. On reads, the amount applied is populated.
|
566 |
+
* @return $this
|
567 |
+
*/
|
568 |
+
public function setAppliedDiscounts($applied_discounts)
|
569 |
+
{
|
570 |
+
$this->applied_discounts = $applied_discounts;
|
571 |
+
return $this;
|
572 |
+
}
|
573 |
/**
|
574 |
* Gets base_price_money
|
575 |
* @return \SquareConnect\Model\Money
|
vendor/square/connect/lib/Model/OrderReturnLineItemModifier.php
CHANGED
@@ -72,7 +72,7 @@ class OrderReturnLineItemModifier implements ArrayAccess
|
|
72 |
);
|
73 |
|
74 |
/**
|
75 |
-
* $uid
|
76 |
* @var string
|
77 |
*/
|
78 |
protected $uid;
|
@@ -152,7 +152,7 @@ class OrderReturnLineItemModifier implements ArrayAccess
|
|
152 |
|
153 |
/**
|
154 |
* Sets uid
|
155 |
-
* @param string $uid
|
156 |
* @return $this
|
157 |
*/
|
158 |
public function setUid($uid)
|
72 |
);
|
73 |
|
74 |
/**
|
75 |
+
* $uid Unique ID that identifies the return modifier only within this order.
|
76 |
* @var string
|
77 |
*/
|
78 |
protected $uid;
|
152 |
|
153 |
/**
|
154 |
* Sets uid
|
155 |
+
* @param string $uid Unique ID that identifies the return modifier only within this order.
|
156 |
* @return $this
|
157 |
*/
|
158 |
public function setUid($uid)
|
vendor/square/connect/lib/Model/OrderReturnServiceCharge.php
ADDED
@@ -0,0 +1,542 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* OrderReturnServiceCharge Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class OrderReturnServiceCharge implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'uid' => 'string',
|
28 |
+
'source_service_charge_uid' => 'string',
|
29 |
+
'name' => 'string',
|
30 |
+
'catalog_object_id' => 'string',
|
31 |
+
'percentage' => 'string',
|
32 |
+
'amount_money' => '\SquareConnect\Model\Money',
|
33 |
+
'applied_money' => '\SquareConnect\Model\Money',
|
34 |
+
'total_money' => '\SquareConnect\Model\Money',
|
35 |
+
'total_tax_money' => '\SquareConnect\Model\Money',
|
36 |
+
'calculation_phase' => 'string',
|
37 |
+
'taxable' => 'bool',
|
38 |
+
'return_taxes' => '\SquareConnect\Model\OrderReturnTax[]',
|
39 |
+
'applied_taxes' => '\SquareConnect\Model\OrderLineItemAppliedTax[]'
|
40 |
+
);
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
44 |
+
* @var string[]
|
45 |
+
*/
|
46 |
+
static $attributeMap = array(
|
47 |
+
'uid' => 'uid',
|
48 |
+
'source_service_charge_uid' => 'source_service_charge_uid',
|
49 |
+
'name' => 'name',
|
50 |
+
'catalog_object_id' => 'catalog_object_id',
|
51 |
+
'percentage' => 'percentage',
|
52 |
+
'amount_money' => 'amount_money',
|
53 |
+
'applied_money' => 'applied_money',
|
54 |
+
'total_money' => 'total_money',
|
55 |
+
'total_tax_money' => 'total_tax_money',
|
56 |
+
'calculation_phase' => 'calculation_phase',
|
57 |
+
'taxable' => 'taxable',
|
58 |
+
'return_taxes' => 'return_taxes',
|
59 |
+
'applied_taxes' => 'applied_taxes'
|
60 |
+
);
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
64 |
+
* @var string[]
|
65 |
+
*/
|
66 |
+
static $setters = array(
|
67 |
+
'uid' => 'setUid',
|
68 |
+
'source_service_charge_uid' => 'setSourceServiceChargeUid',
|
69 |
+
'name' => 'setName',
|
70 |
+
'catalog_object_id' => 'setCatalogObjectId',
|
71 |
+
'percentage' => 'setPercentage',
|
72 |
+
'amount_money' => 'setAmountMoney',
|
73 |
+
'applied_money' => 'setAppliedMoney',
|
74 |
+
'total_money' => 'setTotalMoney',
|
75 |
+
'total_tax_money' => 'setTotalTaxMoney',
|
76 |
+
'calculation_phase' => 'setCalculationPhase',
|
77 |
+
'taxable' => 'setTaxable',
|
78 |
+
'return_taxes' => 'setReturnTaxes',
|
79 |
+
'applied_taxes' => 'setAppliedTaxes'
|
80 |
+
);
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Array of attributes to getter functions (for serialization of requests)
|
84 |
+
* @var string[]
|
85 |
+
*/
|
86 |
+
static $getters = array(
|
87 |
+
'uid' => 'getUid',
|
88 |
+
'source_service_charge_uid' => 'getSourceServiceChargeUid',
|
89 |
+
'name' => 'getName',
|
90 |
+
'catalog_object_id' => 'getCatalogObjectId',
|
91 |
+
'percentage' => 'getPercentage',
|
92 |
+
'amount_money' => 'getAmountMoney',
|
93 |
+
'applied_money' => 'getAppliedMoney',
|
94 |
+
'total_money' => 'getTotalMoney',
|
95 |
+
'total_tax_money' => 'getTotalTaxMoney',
|
96 |
+
'calculation_phase' => 'getCalculationPhase',
|
97 |
+
'taxable' => 'getTaxable',
|
98 |
+
'return_taxes' => 'getReturnTaxes',
|
99 |
+
'applied_taxes' => 'getAppliedTaxes'
|
100 |
+
);
|
101 |
+
|
102 |
+
/**
|
103 |
+
* $uid Unique ID that identifies the return service charge only within this order.
|
104 |
+
* @var string
|
105 |
+
*/
|
106 |
+
protected $uid;
|
107 |
+
/**
|
108 |
+
* $source_service_charge_uid `uid` of the Service Charge from the Order containing the original charge of the service charge. `source_service_charge_uid` is `null` for unlinked returns.
|
109 |
+
* @var string
|
110 |
+
*/
|
111 |
+
protected $source_service_charge_uid;
|
112 |
+
/**
|
113 |
+
* $name The name of the service charge.
|
114 |
+
* @var string
|
115 |
+
*/
|
116 |
+
protected $name;
|
117 |
+
/**
|
118 |
+
* $catalog_object_id The catalog object ID of the associated [CatalogServiceCharge](#type-catalogservicecharge).
|
119 |
+
* @var string
|
120 |
+
*/
|
121 |
+
protected $catalog_object_id;
|
122 |
+
/**
|
123 |
+
* $percentage The percentage of the service charge, as a string representation of a decimal number. For example, a value of `\"7.25\"` corresponds to a percentage of 7.25%. Exactly one of `percentage` or `amount_money` should be set.
|
124 |
+
* @var string
|
125 |
+
*/
|
126 |
+
protected $percentage;
|
127 |
+
/**
|
128 |
+
* $amount_money The amount of a non-percentage based service charge. Exactly one of `percentage` or `amount_money` should be set.
|
129 |
+
* @var \SquareConnect\Model\Money
|
130 |
+
*/
|
131 |
+
protected $amount_money;
|
132 |
+
/**
|
133 |
+
* $applied_money The amount of money applied to the order by the service charge, including any inclusive tax amounts, as calculated by Square. - For fixed-amount service charges, `applied_money` is equal to `amount_money`. - For percentage-based service charges, `applied_money` is the money calculated using the percentage.
|
134 |
+
* @var \SquareConnect\Model\Money
|
135 |
+
*/
|
136 |
+
protected $applied_money;
|
137 |
+
/**
|
138 |
+
* $total_money The total amount of money to collect for the service charge. __NOTE__: if an inclusive tax is applied to the service charge, `total_money` does not equal `applied_money` plus `total_tax_money` since the inclusive tax amount will already be included in both `applied_money` and `total_tax_money`.
|
139 |
+
* @var \SquareConnect\Model\Money
|
140 |
+
*/
|
141 |
+
protected $total_money;
|
142 |
+
/**
|
143 |
+
* $total_tax_money The total amount of tax money to collect for the service charge.
|
144 |
+
* @var \SquareConnect\Model\Money
|
145 |
+
*/
|
146 |
+
protected $total_tax_money;
|
147 |
+
/**
|
148 |
+
* $calculation_phase The calculation phase after which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values
|
149 |
+
* @var string
|
150 |
+
*/
|
151 |
+
protected $calculation_phase;
|
152 |
+
/**
|
153 |
+
* $taxable Indicates whether the surcharge can be taxed. Service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable.
|
154 |
+
* @var bool
|
155 |
+
*/
|
156 |
+
protected $taxable;
|
157 |
+
/**
|
158 |
+
* $return_taxes Taxes applied to the `OrderReturnServiceCharge`. By default, return-level taxes apply to `OrderReturnServiceCharge`s calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item. This field has been deprecated in favour of `applied_taxes`.
|
159 |
+
* @var \SquareConnect\Model\OrderReturnTax[]
|
160 |
+
*/
|
161 |
+
protected $return_taxes;
|
162 |
+
/**
|
163 |
+
* $applied_taxes The list of references to `OrderReturnTax` entities applied to the `OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderReturnTax` that is being applied to the `OrderReturnServiceCharge`. On reads, the amount applied is populated.
|
164 |
+
* @var \SquareConnect\Model\OrderLineItemAppliedTax[]
|
165 |
+
*/
|
166 |
+
protected $applied_taxes;
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Constructor
|
170 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
171 |
+
*/
|
172 |
+
public function __construct(array $data = null)
|
173 |
+
{
|
174 |
+
if ($data != null) {
|
175 |
+
if (isset($data["uid"])) {
|
176 |
+
$this->uid = $data["uid"];
|
177 |
+
} else {
|
178 |
+
$this->uid = null;
|
179 |
+
}
|
180 |
+
if (isset($data["source_service_charge_uid"])) {
|
181 |
+
$this->source_service_charge_uid = $data["source_service_charge_uid"];
|
182 |
+
} else {
|
183 |
+
$this->source_service_charge_uid = null;
|
184 |
+
}
|
185 |
+
if (isset($data["name"])) {
|
186 |
+
$this->name = $data["name"];
|
187 |
+
} else {
|
188 |
+
$this->name = null;
|
189 |
+
}
|
190 |
+
if (isset($data["catalog_object_id"])) {
|
191 |
+
$this->catalog_object_id = $data["catalog_object_id"];
|
192 |
+
} else {
|
193 |
+
$this->catalog_object_id = null;
|
194 |
+
}
|
195 |
+
if (isset($data["percentage"])) {
|
196 |
+
$this->percentage = $data["percentage"];
|
197 |
+
} else {
|
198 |
+
$this->percentage = null;
|
199 |
+
}
|
200 |
+
if (isset($data["amount_money"])) {
|
201 |
+
$this->amount_money = $data["amount_money"];
|
202 |
+
} else {
|
203 |
+
$this->amount_money = null;
|
204 |
+
}
|
205 |
+
if (isset($data["applied_money"])) {
|
206 |
+
$this->applied_money = $data["applied_money"];
|
207 |
+
} else {
|
208 |
+
$this->applied_money = null;
|
209 |
+
}
|
210 |
+
if (isset($data["total_money"])) {
|
211 |
+
$this->total_money = $data["total_money"];
|
212 |
+
} else {
|
213 |
+
$this->total_money = null;
|
214 |
+
}
|
215 |
+
if (isset($data["total_tax_money"])) {
|
216 |
+
$this->total_tax_money = $data["total_tax_money"];
|
217 |
+
} else {
|
218 |
+
$this->total_tax_money = null;
|
219 |
+
}
|
220 |
+
if (isset($data["calculation_phase"])) {
|
221 |
+
$this->calculation_phase = $data["calculation_phase"];
|
222 |
+
} else {
|
223 |
+
$this->calculation_phase = null;
|
224 |
+
}
|
225 |
+
if (isset($data["taxable"])) {
|
226 |
+
$this->taxable = $data["taxable"];
|
227 |
+
} else {
|
228 |
+
$this->taxable = null;
|
229 |
+
}
|
230 |
+
if (isset($data["return_taxes"])) {
|
231 |
+
$this->return_taxes = $data["return_taxes"];
|
232 |
+
} else {
|
233 |
+
$this->return_taxes = null;
|
234 |
+
}
|
235 |
+
if (isset($data["applied_taxes"])) {
|
236 |
+
$this->applied_taxes = $data["applied_taxes"];
|
237 |
+
} else {
|
238 |
+
$this->applied_taxes = null;
|
239 |
+
}
|
240 |
+
}
|
241 |
+
}
|
242 |
+
/**
|
243 |
+
* Gets uid
|
244 |
+
* @return string
|
245 |
+
*/
|
246 |
+
public function getUid()
|
247 |
+
{
|
248 |
+
return $this->uid;
|
249 |
+
}
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Sets uid
|
253 |
+
* @param string $uid Unique ID that identifies the return service charge only within this order.
|
254 |
+
* @return $this
|
255 |
+
*/
|
256 |
+
public function setUid($uid)
|
257 |
+
{
|
258 |
+
$this->uid = $uid;
|
259 |
+
return $this;
|
260 |
+
}
|
261 |
+
/**
|
262 |
+
* Gets source_service_charge_uid
|
263 |
+
* @return string
|
264 |
+
*/
|
265 |
+
public function getSourceServiceChargeUid()
|
266 |
+
{
|
267 |
+
return $this->source_service_charge_uid;
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Sets source_service_charge_uid
|
272 |
+
* @param string $source_service_charge_uid `uid` of the Service Charge from the Order containing the original charge of the service charge. `source_service_charge_uid` is `null` for unlinked returns.
|
273 |
+
* @return $this
|
274 |
+
*/
|
275 |
+
public function setSourceServiceChargeUid($source_service_charge_uid)
|
276 |
+
{
|
277 |
+
$this->source_service_charge_uid = $source_service_charge_uid;
|
278 |
+
return $this;
|
279 |
+
}
|
280 |
+
/**
|
281 |
+
* Gets name
|
282 |
+
* @return string
|
283 |
+
*/
|
284 |
+
public function getName()
|
285 |
+
{
|
286 |
+
return $this->name;
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Sets name
|
291 |
+
* @param string $name The name of the service charge.
|
292 |
+
* @return $this
|
293 |
+
*/
|
294 |
+
public function setName($name)
|
295 |
+
{
|
296 |
+
$this->name = $name;
|
297 |
+
return $this;
|
298 |
+
}
|
299 |
+
/**
|
300 |
+
* Gets catalog_object_id
|
301 |
+
* @return string
|
302 |
+
*/
|
303 |
+
public function getCatalogObjectId()
|
304 |
+
{
|
305 |
+
return $this->catalog_object_id;
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Sets catalog_object_id
|
310 |
+
* @param string $catalog_object_id The catalog object ID of the associated [CatalogServiceCharge](#type-catalogservicecharge).
|
311 |
+
* @return $this
|
312 |
+
*/
|
313 |
+
public function setCatalogObjectId($catalog_object_id)
|
314 |
+
{
|
315 |
+
$this->catalog_object_id = $catalog_object_id;
|
316 |
+
return $this;
|
317 |
+
}
|
318 |
+
/**
|
319 |
+
* Gets percentage
|
320 |
+
* @return string
|
321 |
+
*/
|
322 |
+
public function getPercentage()
|
323 |
+
{
|
324 |
+
return $this->percentage;
|
325 |
+
}
|
326 |
+
|
327 |
+
/**
|
328 |
+
* Sets percentage
|
329 |
+
* @param string $percentage The percentage of the service charge, as a string representation of a decimal number. For example, a value of `\"7.25\"` corresponds to a percentage of 7.25%. Exactly one of `percentage` or `amount_money` should be set.
|
330 |
+
* @return $this
|
331 |
+
*/
|
332 |
+
public function setPercentage($percentage)
|
333 |
+
{
|
334 |
+
$this->percentage = $percentage;
|
335 |
+
return $this;
|
336 |
+
}
|
337 |
+
/**
|
338 |
+
* Gets amount_money
|
339 |
+
* @return \SquareConnect\Model\Money
|
340 |
+
*/
|
341 |
+
public function getAmountMoney()
|
342 |
+
{
|
343 |
+
return $this->amount_money;
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Sets amount_money
|
348 |
+
* @param \SquareConnect\Model\Money $amount_money The amount of a non-percentage based service charge. Exactly one of `percentage` or `amount_money` should be set.
|
349 |
+
* @return $this
|
350 |
+
*/
|
351 |
+
public function setAmountMoney($amount_money)
|
352 |
+
{
|
353 |
+
$this->amount_money = $amount_money;
|
354 |
+
return $this;
|
355 |
+
}
|
356 |
+
/**
|
357 |
+
* Gets applied_money
|
358 |
+
* @return \SquareConnect\Model\Money
|
359 |
+
*/
|
360 |
+
public function getAppliedMoney()
|
361 |
+
{
|
362 |
+
return $this->applied_money;
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Sets applied_money
|
367 |
+
* @param \SquareConnect\Model\Money $applied_money The amount of money applied to the order by the service charge, including any inclusive tax amounts, as calculated by Square. - For fixed-amount service charges, `applied_money` is equal to `amount_money`. - For percentage-based service charges, `applied_money` is the money calculated using the percentage.
|
368 |
+
* @return $this
|
369 |
+
*/
|
370 |
+
public function setAppliedMoney($applied_money)
|
371 |
+
{
|
372 |
+
$this->applied_money = $applied_money;
|
373 |
+
return $this;
|
374 |
+
}
|
375 |
+
/**
|
376 |
+
* Gets total_money
|
377 |
+
* @return \SquareConnect\Model\Money
|
378 |
+
*/
|
379 |
+
public function getTotalMoney()
|
380 |
+
{
|
381 |
+
return $this->total_money;
|
382 |
+
}
|
383 |
+
|
384 |
+
/**
|
385 |
+
* Sets total_money
|
386 |
+
* @param \SquareConnect\Model\Money $total_money The total amount of money to collect for the service charge. __NOTE__: if an inclusive tax is applied to the service charge, `total_money` does not equal `applied_money` plus `total_tax_money` since the inclusive tax amount will already be included in both `applied_money` and `total_tax_money`.
|
387 |
+
* @return $this
|
388 |
+
*/
|
389 |
+
public function setTotalMoney($total_money)
|
390 |
+
{
|
391 |
+
$this->total_money = $total_money;
|
392 |
+
return $this;
|
393 |
+
}
|
394 |
+
/**
|
395 |
+
* Gets total_tax_money
|
396 |
+
* @return \SquareConnect\Model\Money
|
397 |
+
*/
|
398 |
+
public function getTotalTaxMoney()
|
399 |
+
{
|
400 |
+
return $this->total_tax_money;
|
401 |
+
}
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Sets total_tax_money
|
405 |
+
* @param \SquareConnect\Model\Money $total_tax_money The total amount of tax money to collect for the service charge.
|
406 |
+
* @return $this
|
407 |
+
*/
|
408 |
+
public function setTotalTaxMoney($total_tax_money)
|
409 |
+
{
|
410 |
+
$this->total_tax_money = $total_tax_money;
|
411 |
+
return $this;
|
412 |
+
}
|
413 |
+
/**
|
414 |
+
* Gets calculation_phase
|
415 |
+
* @return string
|
416 |
+
*/
|
417 |
+
public function getCalculationPhase()
|
418 |
+
{
|
419 |
+
return $this->calculation_phase;
|
420 |
+
}
|
421 |
+
|
422 |
+
/**
|
423 |
+
* Sets calculation_phase
|
424 |
+
* @param string $calculation_phase The calculation phase after which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values
|
425 |
+
* @return $this
|
426 |
+
*/
|
427 |
+
public function setCalculationPhase($calculation_phase)
|
428 |
+
{
|
429 |
+
$this->calculation_phase = $calculation_phase;
|
430 |
+
return $this;
|
431 |
+
}
|
432 |
+
/**
|
433 |
+
* Gets taxable
|
434 |
+
* @return bool
|
435 |
+
*/
|
436 |
+
public function getTaxable()
|
437 |
+
{
|
438 |
+
return $this->taxable;
|
439 |
+
}
|
440 |
+
|
441 |
+
/**
|
442 |
+
* Sets taxable
|
443 |
+
* @param bool $taxable Indicates whether the surcharge can be taxed. Service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable.
|
444 |
+
* @return $this
|
445 |
+
*/
|
446 |
+
public function setTaxable($taxable)
|
447 |
+
{
|
448 |
+
$this->taxable = $taxable;
|
449 |
+
return $this;
|
450 |
+
}
|
451 |
+
/**
|
452 |
+
* Gets return_taxes
|
453 |
+
* @return \SquareConnect\Model\OrderReturnTax[]
|
454 |
+
*/
|
455 |
+
public function getReturnTaxes()
|
456 |
+
{
|
457 |
+
return $this->return_taxes;
|
458 |
+
}
|
459 |
+
|
460 |
+
/**
|
461 |
+
* Sets return_taxes
|
462 |
+
* @param \SquareConnect\Model\OrderReturnTax[] $return_taxes Taxes applied to the `OrderReturnServiceCharge`. By default, return-level taxes apply to `OrderReturnServiceCharge`s calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item. This field has been deprecated in favour of `applied_taxes`.
|
463 |
+
* @return $this
|
464 |
+
*/
|
465 |
+
public function setReturnTaxes($return_taxes)
|
466 |
+
{
|
467 |
+
$this->return_taxes = $return_taxes;
|
468 |
+
return $this;
|
469 |
+
}
|
470 |
+
/**
|
471 |
+
* Gets applied_taxes
|
472 |
+
* @return \SquareConnect\Model\OrderLineItemAppliedTax[]
|
473 |
+
*/
|
474 |
+
public function getAppliedTaxes()
|
475 |
+
{
|
476 |
+
return $this->applied_taxes;
|
477 |
+
}
|
478 |
+
|
479 |
+
/**
|
480 |
+
* Sets applied_taxes
|
481 |
+
* @param \SquareConnect\Model\OrderLineItemAppliedTax[] $applied_taxes The list of references to `OrderReturnTax` entities applied to the `OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderReturnTax` that is being applied to the `OrderReturnServiceCharge`. On reads, the amount applied is populated.
|
482 |
+
* @return $this
|
483 |
+
*/
|
484 |
+
public function setAppliedTaxes($applied_taxes)
|
485 |
+
{
|
486 |
+
$this->applied_taxes = $applied_taxes;
|
487 |
+
return $this;
|
488 |
+
}
|
489 |
+
/**
|
490 |
+
* Returns true if offset exists. False otherwise.
|
491 |
+
* @param integer $offset Offset
|
492 |
+
* @return boolean
|
493 |
+
*/
|
494 |
+
public function offsetExists($offset)
|
495 |
+
{
|
496 |
+
return isset($this->$offset);
|
497 |
+
}
|
498 |
+
|
499 |
+
/**
|
500 |
+
* Gets offset.
|
501 |
+
* @param integer $offset Offset
|
502 |
+
* @return mixed
|
503 |
+
*/
|
504 |
+
public function offsetGet($offset)
|
505 |
+
{
|
506 |
+
return $this->$offset;
|
507 |
+
}
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Sets value based on offset.
|
511 |
+
* @param integer $offset Offset
|
512 |
+
* @param mixed $value Value to be set
|
513 |
+
* @return void
|
514 |
+
*/
|
515 |
+
public function offsetSet($offset, $value)
|
516 |
+
{
|
517 |
+
$this->$offset = $value;
|
518 |
+
}
|
519 |
+
|
520 |
+
/**
|
521 |
+
* Unsets offset.
|
522 |
+
* @param integer $offset Offset
|
523 |
+
* @return void
|
524 |
+
*/
|
525 |
+
public function offsetUnset($offset)
|
526 |
+
{
|
527 |
+
unset($this->$offset);
|
528 |
+
}
|
529 |
+
|
530 |
+
/**
|
531 |
+
* Gets the string presentation of the object
|
532 |
+
* @return string
|
533 |
+
*/
|
534 |
+
public function __toString()
|
535 |
+
{
|
536 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
537 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
538 |
+
} else {
|
539 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
540 |
+
}
|
541 |
+
}
|
542 |
+
}
|
vendor/square/connect/lib/Model/OrderReturnTax.php
CHANGED
@@ -80,7 +80,7 @@ class OrderReturnTax implements ArrayAccess
|
|
80 |
);
|
81 |
|
82 |
/**
|
83 |
-
* $uid
|
84 |
* @var string
|
85 |
*/
|
86 |
protected $uid;
|
@@ -105,7 +105,7 @@ class OrderReturnTax implements ArrayAccess
|
|
105 |
*/
|
106 |
protected $type;
|
107 |
/**
|
108 |
-
* $percentage The percentage of the tax, as a string representation of a decimal number.
|
109 |
* @var string
|
110 |
*/
|
111 |
protected $percentage;
|
@@ -115,7 +115,7 @@ class OrderReturnTax implements ArrayAccess
|
|
115 |
*/
|
116 |
protected $applied_money;
|
117 |
/**
|
118 |
-
* $scope Indicates the level at which the
|
119 |
* @var string
|
120 |
*/
|
121 |
protected $scope;
|
@@ -180,7 +180,7 @@ class OrderReturnTax implements ArrayAccess
|
|
180 |
|
181 |
/**
|
182 |
* Sets uid
|
183 |
-
* @param string $uid
|
184 |
* @return $this
|
185 |
*/
|
186 |
public function setUid($uid)
|
@@ -275,7 +275,7 @@ class OrderReturnTax implements ArrayAccess
|
|
275 |
|
276 |
/**
|
277 |
* Sets percentage
|
278 |
-
* @param string $percentage The percentage of the tax, as a string representation of a decimal number.
|
279 |
* @return $this
|
280 |
*/
|
281 |
public function setPercentage($percentage)
|
@@ -313,7 +313,7 @@ class OrderReturnTax implements ArrayAccess
|
|
313 |
|
314 |
/**
|
315 |
* Sets scope
|
316 |
-
* @param string $scope Indicates the level at which the
|
317 |
* @return $this
|
318 |
*/
|
319 |
public function setScope($scope)
|
80 |
);
|
81 |
|
82 |
/**
|
83 |
+
* $uid Unique ID that identifies the return tax only within this order.
|
84 |
* @var string
|
85 |
*/
|
86 |
protected $uid;
|
105 |
*/
|
106 |
protected $type;
|
107 |
/**
|
108 |
+
* $percentage The percentage of the tax, as a string representation of a decimal number. For example, a value of `\"7.25\"` corresponds to a percentage of 7.25%.
|
109 |
* @var string
|
110 |
*/
|
111 |
protected $percentage;
|
115 |
*/
|
116 |
protected $applied_money;
|
117 |
/**
|
118 |
+
* $scope Indicates the level at which the `OrderReturnTax` applies. For `ORDER` scoped taxes, Square generates references in `applied_taxes` on all `OrderReturnLineItem`s. For `LINE_ITEM` scoped taxes, the tax will only apply to `OrderReturnLineItem`s with references in their `applied_discounts` field. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values
|
119 |
* @var string
|
120 |
*/
|
121 |
protected $scope;
|
180 |
|
181 |
/**
|
182 |
* Sets uid
|
183 |
+
* @param string $uid Unique ID that identifies the return tax only within this order.
|
184 |
* @return $this
|
185 |
*/
|
186 |
public function setUid($uid)
|
275 |
|
276 |
/**
|
277 |
* Sets percentage
|
278 |
+
* @param string $percentage The percentage of the tax, as a string representation of a decimal number. For example, a value of `\"7.25\"` corresponds to a percentage of 7.25%.
|
279 |
* @return $this
|
280 |
*/
|
281 |
public function setPercentage($percentage)
|
313 |
|
314 |
/**
|
315 |
* Sets scope
|
316 |
+
* @param string $scope Indicates the level at which the `OrderReturnTax` applies. For `ORDER` scoped taxes, Square generates references in `applied_taxes` on all `OrderReturnLineItem`s. For `LINE_ITEM` scoped taxes, the tax will only apply to `OrderReturnLineItem`s with references in their `applied_discounts` field. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values
|
317 |
* @return $this
|
318 |
*/
|
319 |
public function setScope($scope)
|
vendor/square/connect/lib/Model/OrderRoundingAdjustment.php
CHANGED
@@ -60,7 +60,7 @@ class OrderRoundingAdjustment implements ArrayAccess
|
|
60 |
);
|
61 |
|
62 |
/**
|
63 |
-
* $uid
|
64 |
* @var string
|
65 |
*/
|
66 |
protected $uid;
|
@@ -110,7 +110,7 @@ class OrderRoundingAdjustment implements ArrayAccess
|
|
110 |
|
111 |
/**
|
112 |
* Sets uid
|
113 |
-
* @param string $uid
|
114 |
* @return $this
|
115 |
*/
|
116 |
public function setUid($uid)
|
60 |
);
|
61 |
|
62 |
/**
|
63 |
+
* $uid Unique ID that identifies the rounding adjustment only within this order.
|
64 |
* @var string
|
65 |
*/
|
66 |
protected $uid;
|
110 |
|
111 |
/**
|
112 |
* Sets uid
|
113 |
+
* @param string $uid Unique ID that identifies the rounding adjustment only within this order.
|
114 |
* @return $this
|
115 |
*/
|
116 |
public function setUid($uid)
|
vendor/square/connect/lib/Model/OrderServiceCharge.php
ADDED
@@ -0,0 +1,509 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* OrderServiceCharge Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class OrderServiceCharge implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
'uid' => 'string',
|
28 |
+
'name' => 'string',
|
29 |
+
'catalog_object_id' => 'string',
|
30 |
+
'percentage' => 'string',
|
31 |
+
'amount_money' => '\SquareConnect\Model\Money',
|
32 |
+
'applied_money' => '\SquareConnect\Model\Money',
|
33 |
+
'total_money' => '\SquareConnect\Model\Money',
|
34 |
+
'total_tax_money' => '\SquareConnect\Model\Money',
|
35 |
+
'calculation_phase' => 'string',
|
36 |
+
'taxable' => 'bool',
|
37 |
+
'taxes' => '\SquareConnect\Model\OrderLineItemTax[]',
|
38 |
+
'applied_taxes' => '\SquareConnect\Model\OrderLineItemAppliedTax[]'
|
39 |
+
);
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
43 |
+
* @var string[]
|
44 |
+
*/
|
45 |
+
static $attributeMap = array(
|
46 |
+
'uid' => 'uid',
|
47 |
+
'name' => 'name',
|
48 |
+
'catalog_object_id' => 'catalog_object_id',
|
49 |
+
'percentage' => 'percentage',
|
50 |
+
'amount_money' => 'amount_money',
|
51 |
+
'applied_money' => 'applied_money',
|
52 |
+
'total_money' => 'total_money',
|
53 |
+
'total_tax_money' => 'total_tax_money',
|
54 |
+
'calculation_phase' => 'calculation_phase',
|
55 |
+
'taxable' => 'taxable',
|
56 |
+
'taxes' => 'taxes',
|
57 |
+
'applied_taxes' => 'applied_taxes'
|
58 |
+
);
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
62 |
+
* @var string[]
|
63 |
+
*/
|
64 |
+
static $setters = array(
|
65 |
+
'uid' => 'setUid',
|
66 |
+
'name' => 'setName',
|
67 |
+
'catalog_object_id' => 'setCatalogObjectId',
|
68 |
+
'percentage' => 'setPercentage',
|
69 |
+
'amount_money' => 'setAmountMoney',
|
70 |
+
'applied_money' => 'setAppliedMoney',
|
71 |
+
'total_money' => 'setTotalMoney',
|
72 |
+
'total_tax_money' => 'setTotalTaxMoney',
|
73 |
+
'calculation_phase' => 'setCalculationPhase',
|
74 |
+
'taxable' => 'setTaxable',
|
75 |
+
'taxes' => 'setTaxes',
|
76 |
+
'applied_taxes' => 'setAppliedTaxes'
|
77 |
+
);
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Array of attributes to getter functions (for serialization of requests)
|
81 |
+
* @var string[]
|
82 |
+
*/
|
83 |
+
static $getters = array(
|
84 |
+
'uid' => 'getUid',
|
85 |
+
'name' => 'getName',
|
86 |
+
'catalog_object_id' => 'getCatalogObjectId',
|
87 |
+
'percentage' => 'getPercentage',
|
88 |
+
'amount_money' => 'getAmountMoney',
|
89 |
+
'applied_money' => 'getAppliedMoney',
|
90 |
+
'total_money' => 'getTotalMoney',
|
91 |
+
'total_tax_money' => 'getTotalTaxMoney',
|
92 |
+
'calculation_phase' => 'getCalculationPhase',
|
93 |
+
'taxable' => 'getTaxable',
|
94 |
+
'taxes' => 'getTaxes',
|
95 |
+
'applied_taxes' => 'getAppliedTaxes'
|
96 |
+
);
|
97 |
+
|
98 |
+
/**
|
99 |
+
* $uid Unique ID that identifies the service charge only within this order.
|
100 |
+
* @var string
|
101 |
+
*/
|
102 |
+
protected $uid;
|
103 |
+
/**
|
104 |
+
* $name The name of the service charge.
|
105 |
+
* @var string
|
106 |
+
*/
|
107 |
+
protected $name;
|
108 |
+
/**
|
109 |
+
* $catalog_object_id The catalog object ID referencing the service charge [CatalogObject](#type-catalogobject).
|
110 |
+
* @var string
|
111 |
+
*/
|
112 |
+
protected $catalog_object_id;
|
113 |
+
/**
|
114 |
+
* $percentage The service charge percentage as a string representation of a decimal number. For example, `\"7.25\"` indicates a service charge of 7.25%. Exactly 1 of `percentage` or `amount_money` should be set.
|
115 |
+
* @var string
|
116 |
+
*/
|
117 |
+
protected $percentage;
|
118 |
+
/**
|
119 |
+
* $amount_money The amount of a non-percentage based service charge. Exactly one of `percentage` or `amount_money` should be set.
|
120 |
+
* @var \SquareConnect\Model\Money
|
121 |
+
*/
|
122 |
+
protected $amount_money;
|
123 |
+
/**
|
124 |
+
* $applied_money The amount of money applied to the order by the service charge, including any inclusive tax amounts, as calculated by Square. - For fixed-amount service charges, `applied_money` is equal to `amount_money`. - For percentage-based service charges, `applied_money` is the money calculated using the percentage.
|
125 |
+
* @var \SquareConnect\Model\Money
|
126 |
+
*/
|
127 |
+
protected $applied_money;
|
128 |
+
/**
|
129 |
+
* $total_money The total amount of money to collect for the service charge. __Note__: if an inclusive tax is applied to the service charge, `total_money` __does not__ equal `applied_money` plus `total_tax_money` since the inclusive tax amount will already be included in both `applied_money` and `total_tax_money`.
|
130 |
+
* @var \SquareConnect\Model\Money
|
131 |
+
*/
|
132 |
+
protected $total_money;
|
133 |
+
/**
|
134 |
+
* $total_tax_money The total amount of tax money to collect for the service charge.
|
135 |
+
* @var \SquareConnect\Model\Money
|
136 |
+
*/
|
137 |
+
protected $total_tax_money;
|
138 |
+
/**
|
139 |
+
* $calculation_phase The calculation phase at which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values
|
140 |
+
* @var string
|
141 |
+
*/
|
142 |
+
protected $calculation_phase;
|
143 |
+
/**
|
144 |
+
* $taxable Indicates whether the service charge can be taxed. If set to `true`, order-level taxes automatically apply to the service charge. Note that service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable.
|
145 |
+
* @var bool
|
146 |
+
*/
|
147 |
+
protected $taxable;
|
148 |
+
/**
|
149 |
+
* $taxes A list of taxes applied to this service charge. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this service charge. When creating an Order, set your service charge-level taxes in this list. By default, order-level taxes apply to service charges calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error.
|
150 |
+
* @var \SquareConnect\Model\OrderLineItemTax[]
|
151 |
+
*/
|
152 |
+
protected $taxes;
|
153 |
+
/**
|
154 |
+
* $applied_taxes The list of references to taxes applied to this service charge. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` that is being applied to this service charge. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every taxable service charge for all `ORDER` scoped taxes that are added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any taxable service charge. Taxable service charges have the `taxable` field set to true and calculated in the `SUBTOTAL_PHASE`. To change the amount of a tax, modify the referenced top-level tax.
|
155 |
+
* @var \SquareConnect\Model\OrderLineItemAppliedTax[]
|
156 |
+
*/
|
157 |
+
protected $applied_taxes;
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Constructor
|
161 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
162 |
+
*/
|
163 |
+
public function __construct(array $data = null)
|
164 |
+
{
|
165 |
+
if ($data != null) {
|
166 |
+
if (isset($data["uid"])) {
|
167 |
+
$this->uid = $data["uid"];
|
168 |
+
} else {
|
169 |
+
$this->uid = null;
|
170 |
+
}
|
171 |
+
if (isset($data["name"])) {
|
172 |
+
$this->name = $data["name"];
|
173 |
+
} else {
|
174 |
+
$this->name = null;
|
175 |
+
}
|
176 |
+
if (isset($data["catalog_object_id"])) {
|
177 |
+
$this->catalog_object_id = $data["catalog_object_id"];
|
178 |
+
} else {
|
179 |
+
$this->catalog_object_id = null;
|
180 |
+
}
|
181 |
+
if (isset($data["percentage"])) {
|
182 |
+
$this->percentage = $data["percentage"];
|
183 |
+
} else {
|
184 |
+
$this->percentage = null;
|
185 |
+
}
|
186 |
+
if (isset($data["amount_money"])) {
|
187 |
+
$this->amount_money = $data["amount_money"];
|
188 |
+
} else {
|
189 |
+
$this->amount_money = null;
|
190 |
+
}
|
191 |
+
if (isset($data["applied_money"])) {
|
192 |
+
$this->applied_money = $data["applied_money"];
|
193 |
+
} else {
|
194 |
+
$this->applied_money = null;
|
195 |
+
}
|
196 |
+
if (isset($data["total_money"])) {
|
197 |
+
$this->total_money = $data["total_money"];
|
198 |
+
} else {
|
199 |
+
$this->total_money = null;
|
200 |
+
}
|
201 |
+
if (isset($data["total_tax_money"])) {
|
202 |
+
$this->total_tax_money = $data["total_tax_money"];
|
203 |
+
} else {
|
204 |
+
$this->total_tax_money = null;
|
205 |
+
}
|
206 |
+
if (isset($data["calculation_phase"])) {
|
207 |
+
$this->calculation_phase = $data["calculation_phase"];
|
208 |
+
} else {
|
209 |
+
$this->calculation_phase = null;
|
210 |
+
}
|
211 |
+
if (isset($data["taxable"])) {
|
212 |
+
$this->taxable = $data["taxable"];
|
213 |
+
} else {
|
214 |
+
$this->taxable = null;
|
215 |
+
}
|
216 |
+
if (isset($data["taxes"])) {
|
217 |
+
$this->taxes = $data["taxes"];
|
218 |
+
} else {
|
219 |
+
$this->taxes = null;
|
220 |
+
}
|
221 |
+
if (isset($data["applied_taxes"])) {
|
222 |
+
$this->applied_taxes = $data["applied_taxes"];
|
223 |
+
} else {
|
224 |
+
$this->applied_taxes = null;
|
225 |
+
}
|
226 |
+
}
|
227 |
+
}
|
228 |
+
/**
|
229 |
+
* Gets uid
|
230 |
+
* @return string
|
231 |
+
*/
|
232 |
+
public function getUid()
|
233 |
+
{
|
234 |
+
return $this->uid;
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Sets uid
|
239 |
+
* @param string $uid Unique ID that identifies the service charge only within this order.
|
240 |
+
* @return $this
|
241 |
+
*/
|
242 |
+
public function setUid($uid)
|
243 |
+
{
|
244 |
+
$this->uid = $uid;
|
245 |
+
return $this;
|
246 |
+
}
|
247 |
+
/**
|
248 |
+
* Gets name
|
249 |
+
* @return string
|
250 |
+
*/
|
251 |
+
public function getName()
|
252 |
+
{
|
253 |
+
return $this->name;
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Sets name
|
258 |
+
* @param string $name The name of the service charge.
|
259 |
+
* @return $this
|
260 |
+
*/
|
261 |
+
public function setName($name)
|
262 |
+
{
|
263 |
+
$this->name = $name;
|
264 |
+
return $this;
|
265 |
+
}
|
266 |
+
/**
|
267 |
+
* Gets catalog_object_id
|
268 |
+
* @return string
|
269 |
+
*/
|
270 |
+
public function getCatalogObjectId()
|
271 |
+
{
|
272 |
+
return $this->catalog_object_id;
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Sets catalog_object_id
|
277 |
+
* @param string $catalog_object_id The catalog object ID referencing the service charge [CatalogObject](#type-catalogobject).
|
278 |
+
* @return $this
|
279 |
+
*/
|
280 |
+
public function setCatalogObjectId($catalog_object_id)
|
281 |
+
{
|
282 |
+
$this->catalog_object_id = $catalog_object_id;
|
283 |
+
return $this;
|
284 |
+
}
|
285 |
+
/**
|
286 |
+
* Gets percentage
|
287 |
+
* @return string
|
288 |
+
*/
|
289 |
+
public function getPercentage()
|
290 |
+
{
|
291 |
+
return $this->percentage;
|
292 |
+
}
|
293 |
+
|
294 |
+
/**
|
295 |
+
* Sets percentage
|
296 |
+
* @param string $percentage The service charge percentage as a string representation of a decimal number. For example, `\"7.25\"` indicates a service charge of 7.25%. Exactly 1 of `percentage` or `amount_money` should be set.
|
297 |
+
* @return $this
|
298 |
+
*/
|
299 |
+
public function setPercentage($percentage)
|
300 |
+
{
|
301 |
+
$this->percentage = $percentage;
|
302 |
+
return $this;
|
303 |
+
}
|
304 |
+
/**
|
305 |
+
* Gets amount_money
|
306 |
+
* @return \SquareConnect\Model\Money
|
307 |
+
*/
|
308 |
+
public function getAmountMoney()
|
309 |
+
{
|
310 |
+
return $this->amount_money;
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Sets amount_money
|
315 |
+
* @param \SquareConnect\Model\Money $amount_money The amount of a non-percentage based service charge. Exactly one of `percentage` or `amount_money` should be set.
|
316 |
+
* @return $this
|
317 |
+
*/
|
318 |
+
public function setAmountMoney($amount_money)
|
319 |
+
{
|
320 |
+
$this->amount_money = $amount_money;
|
321 |
+
return $this;
|
322 |
+
}
|
323 |
+
/**
|
324 |
+
* Gets applied_money
|
325 |
+
* @return \SquareConnect\Model\Money
|
326 |
+
*/
|
327 |
+
public function getAppliedMoney()
|
328 |
+
{
|
329 |
+
return $this->applied_money;
|
330 |
+
}
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Sets applied_money
|
334 |
+
* @param \SquareConnect\Model\Money $applied_money The amount of money applied to the order by the service charge, including any inclusive tax amounts, as calculated by Square. - For fixed-amount service charges, `applied_money` is equal to `amount_money`. - For percentage-based service charges, `applied_money` is the money calculated using the percentage.
|
335 |
+
* @return $this
|
336 |
+
*/
|
337 |
+
public function setAppliedMoney($applied_money)
|
338 |
+
{
|
339 |
+
$this->applied_money = $applied_money;
|
340 |
+
return $this;
|
341 |
+
}
|
342 |
+
/**
|
343 |
+
* Gets total_money
|
344 |
+
* @return \SquareConnect\Model\Money
|
345 |
+
*/
|
346 |
+
public function getTotalMoney()
|
347 |
+
{
|
348 |
+
return $this->total_money;
|
349 |
+
}
|
350 |
+
|
351 |
+
/**
|
352 |
+
* Sets total_money
|
353 |
+
* @param \SquareConnect\Model\Money $total_money The total amount of money to collect for the service charge. __Note__: if an inclusive tax is applied to the service charge, `total_money` __does not__ equal `applied_money` plus `total_tax_money` since the inclusive tax amount will already be included in both `applied_money` and `total_tax_money`.
|
354 |
+
* @return $this
|
355 |
+
*/
|
356 |
+
public function setTotalMoney($total_money)
|
357 |
+
{
|
358 |
+
$this->total_money = $total_money;
|
359 |
+
return $this;
|
360 |
+
}
|
361 |
+
/**
|
362 |
+
* Gets total_tax_money
|
363 |
+
* @return \SquareConnect\Model\Money
|
364 |
+
*/
|
365 |
+
public function getTotalTaxMoney()
|
366 |
+
{
|
367 |
+
return $this->total_tax_money;
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Sets total_tax_money
|
372 |
+
* @param \SquareConnect\Model\Money $total_tax_money The total amount of tax money to collect for the service charge.
|
373 |
+
* @return $this
|
374 |
+
*/
|
375 |
+
public function setTotalTaxMoney($total_tax_money)
|
376 |
+
{
|
377 |
+
$this->total_tax_money = $total_tax_money;
|
378 |
+
return $this;
|
379 |
+
}
|
380 |
+
/**
|
381 |
+
* Gets calculation_phase
|
382 |
+
* @return string
|
383 |
+
*/
|
384 |
+
public function getCalculationPhase()
|
385 |
+
{
|
386 |
+
return $this->calculation_phase;
|
387 |
+
}
|
388 |
+
|
389 |
+
/**
|
390 |
+
* Sets calculation_phase
|
391 |
+
* @param string $calculation_phase The calculation phase at which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values
|
392 |
+
* @return $this
|
393 |
+
*/
|
394 |
+
public function setCalculationPhase($calculation_phase)
|
395 |
+
{
|
396 |
+
$this->calculation_phase = $calculation_phase;
|
397 |
+
return $this;
|
398 |
+
}
|
399 |
+
/**
|
400 |
+
* Gets taxable
|
401 |
+
* @return bool
|
402 |
+
*/
|
403 |
+
public function getTaxable()
|
404 |
+
{
|
405 |
+
return $this->taxable;
|
406 |
+
}
|
407 |
+
|
408 |
+
/**
|
409 |
+
* Sets taxable
|
410 |
+
* @param bool $taxable Indicates whether the service charge can be taxed. If set to `true`, order-level taxes automatically apply to the service charge. Note that service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable.
|
411 |
+
* @return $this
|
412 |
+
*/
|
413 |
+
public function setTaxable($taxable)
|
414 |
+
{
|
415 |
+
$this->taxable = $taxable;
|
416 |
+
return $this;
|
417 |
+
}
|
418 |
+
/**
|
419 |
+
* Gets taxes
|
420 |
+
* @return \SquareConnect\Model\OrderLineItemTax[]
|
421 |
+
*/
|
422 |
+
public function getTaxes()
|
423 |
+
{
|
424 |
+
return $this->taxes;
|
425 |
+
}
|
426 |
+
|
427 |
+
/**
|
428 |
+
* Sets taxes
|
429 |
+
* @param \SquareConnect\Model\OrderLineItemTax[] $taxes A list of taxes applied to this service charge. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this service charge. When creating an Order, set your service charge-level taxes in this list. By default, order-level taxes apply to service charges calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. This field has been deprecated in favour of `applied_taxes`. Usage of both this field and `applied_taxes` when creating an order will result in an error. Usage of this field when sending requests to the UpdateOrder endpoint will result in an error.
|
430 |
+
* @return $this
|
431 |
+
*/
|
432 |
+
public function setTaxes($taxes)
|
433 |
+
{
|
434 |
+
$this->taxes = $taxes;
|
435 |
+
return $this;
|
436 |
+
}
|
437 |
+
/**
|
438 |
+
* Gets applied_taxes
|
439 |
+
* @return \SquareConnect\Model\OrderLineItemAppliedTax[]
|
440 |
+
*/
|
441 |
+
public function getAppliedTaxes()
|
442 |
+
{
|
443 |
+
return $this->applied_taxes;
|
444 |
+
}
|
445 |
+
|
446 |
+
/**
|
447 |
+
* Sets applied_taxes
|
448 |
+
* @param \SquareConnect\Model\OrderLineItemAppliedTax[] $applied_taxes The list of references to taxes applied to this service charge. Each `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level `OrderLineItemTax` that is being applied to this service charge. On reads, the amount applied is populated. An `OrderLineItemAppliedTax` will be automatically created on every taxable service charge for all `ORDER` scoped taxes that are added to the order. `OrderLineItemAppliedTax` records for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any taxable service charge. Taxable service charges have the `taxable` field set to true and calculated in the `SUBTOTAL_PHASE`. To change the amount of a tax, modify the referenced top-level tax.
|
449 |
+
* @return $this
|
450 |
+
*/
|
451 |
+
public function setAppliedTaxes($applied_taxes)
|
452 |
+
{
|
453 |
+
$this->applied_taxes = $applied_taxes;
|
454 |
+
return $this;
|
455 |
+
}
|
456 |
+
/**
|
457 |
+
* Returns true if offset exists. False otherwise.
|
458 |
+
* @param integer $offset Offset
|
459 |
+
* @return boolean
|
460 |
+
*/
|
461 |
+
public function offsetExists($offset)
|
462 |
+
{
|
463 |
+
return isset($this->$offset);
|
464 |
+
}
|
465 |
+
|
466 |
+
/**
|
467 |
+
* Gets offset.
|
468 |
+
* @param integer $offset Offset
|
469 |
+
* @return mixed
|
470 |
+
*/
|
471 |
+
public function offsetGet($offset)
|
472 |
+
{
|
473 |
+
return $this->$offset;
|
474 |
+
}
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Sets value based on offset.
|
478 |
+
* @param integer $offset Offset
|
479 |
+
* @param mixed $value Value to be set
|
480 |
+
* @return void
|
481 |
+
*/
|
482 |
+
public function offsetSet($offset, $value)
|
483 |
+
{
|
484 |
+
$this->$offset = $value;
|
485 |
+
}
|
486 |
+
|
487 |
+
/**
|
488 |
+
* Unsets offset.
|
489 |
+
* @param integer $offset Offset
|
490 |
+
* @return void
|
491 |
+
*/
|
492 |
+
public function offsetUnset($offset)
|
493 |
+
{
|
494 |
+
unset($this->$offset);
|
495 |
+
}
|
496 |
+
|
497 |
+
/**
|
498 |
+
* Gets the string presentation of the object
|
499 |
+
* @return string
|
500 |
+
*/
|
501 |
+
public function __toString()
|
502 |
+
{
|
503 |
+
if (defined('JSON_PRETTY_PRINT')) {
|
504 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
505 |
+
} else {
|
506 |
+
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
|
507 |
+
}
|
508 |
+
}
|
509 |
+
}
|
vendor/square/connect/lib/Model/OrderServiceChargeCalculationPhase.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* NOTE: This class is auto generated by the swagger code generator program.
|
4 |
+
* https://github.com/swagger-api/swagger-codegen
|
5 |
+
* Do not edit the class manually.
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SquareConnect\Model;
|
9 |
+
|
10 |
+
use \ArrayAccess;
|
11 |
+
/**
|
12 |
+
* OrderServiceChargeCalculationPhase Class Doc Comment
|
13 |
+
*
|
14 |
+
* @category Class
|
15 |
+
* @package SquareConnect
|
16 |
+
* @author Square Inc.
|
17 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
|
18 |
+
* @link https://squareup.com/developers
|
19 |
+
*/
|
20 |
+
class OrderServiceChargeCalculationPhase implements ArrayAccess
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Array of property to type mappings. Used for (de)serialization
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
static $swaggerTypes = array(
|
27 |
+
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Array of attributes where the key is the local name, and the value is the original name
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
static $attributeMap = array(
|
35 |
+
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Array of attributes to setter functions (for deserialization of responses)
|
40 |
+
* @var string[]
|
41 |
+
*/
|
42 |
+
static $setters = array(
|
43 |
+
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of attributes to getter functions (for serialization of requests)
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
static $getters = array(
|
51 |
+
|
52 |
+
);
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Constructor
|
57 |
+
* @param mixed[] $data Associated array of property value initializing the model
|
58 |
+
*/
|
59 |
+
public function __construct(array $data = null)
|
60 |
+
{
|
61 |
+
if ($data != null) {
|
62 |
+
}
|
63 |
+
}
|
64 |
+
/**
|
65 |
+
* Returns true if offset exists. False otherwise.
|
66 |
+
* @param integer $offset Offset
|
67 |
+
* @return boolean
|
68 |
+
*/
|
69 |
+
public function offsetExists($offset)
|
70 |
+
{
|
71 |
+
return isset($this->$offset);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Gets offset.
|
76 |
+
* @param integer $offset Offset
|
77 |
+
* @return mixed
|
78 |
+
*/
|
79 |
+
public function offsetGet($offset)
|
80 |
+
{
|
81 |
+
return $this->$offset;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Sets value based on offset.
|
86 |
+
* @param integer $offset Offset
|
87 |
+
* @param mixed $value Value to be set
|
88 |
+
* @return void
|
89 |
+
*/
|
90 |
+
public function offsetSet($offset, $value)
|
91 |
+
{
|
92 |
+
$this->$offset = $value;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Unsets offset.
|
97 |
+
* @param integer $offset Offset
|
98 |
+
* @return void
|
99 |
+
*/
|
100 |
+
public function offsetUnset($offset)
|
101 |
+
{
|
102 |
+
unset($this->$offset);
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Gets the string presentation of the object
|
107 |
+
* @return string
|
108 |
+
|