square_connect 2.0.2.69 → 2.1.0.beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +133 -21
- data/docs/ChargeRequest.md +1 -1
- data/docs/CheckoutApi.md +8 -6
- data/docs/CustomersApi.md +389 -0
- data/docs/Device.md +11 -0
- data/docs/LocationsApi.md +55 -0
- data/docs/TransactionsApi.md +417 -0
- data/docs/V1AdjustInventoryRequest.md +12 -0
- data/docs/V1BankAccount.md +17 -0
- data/docs/V1CashDrawerEvent.md +15 -0
- data/docs/V1CashDrawerShift.md +28 -0
- data/docs/V1Category.md +11 -0
- data/docs/V1CreateRefundRequest.md +14 -0
- data/docs/V1Discount.md +16 -0
- data/docs/V1Employee.md +21 -0
- data/docs/V1EmployeeRole.md +15 -0
- data/docs/V1EmployeesApi.md +915 -0
- data/docs/V1Fee.md +18 -0
- data/docs/V1InventoryEntry.md +11 -0
- data/docs/V1Item.md +23 -0
- data/docs/V1ItemImage.md +11 -0
- data/docs/V1ItemsApi.md +2297 -0
- data/docs/V1LocationApi.md +102 -0
- data/docs/V1LocationsApi.md +102 -0
- data/docs/V1Merchant.md +26 -0
- data/docs/V1MerchantLocationDetails.md +12 -0
- data/docs/V1ModifierList.md +13 -0
- data/docs/V1ModifierOption.md +15 -0
- data/docs/V1Money.md +13 -0
- data/docs/V1Order.md +34 -0
- data/docs/V1OrderHistoryEntry.md +11 -0
- data/docs/V1Page.md +13 -0
- data/docs/V1PageCell.md +15 -0
- data/docs/V1Payment.md +33 -0
- data/docs/V1PaymentDiscount.md +12 -0
- data/docs/V1PaymentItemDetail.md +13 -0
- data/docs/V1PaymentItemization.md +23 -0
- data/docs/V1PaymentModifier.md +12 -0
- data/docs/V1PaymentTax.md +15 -0
- data/docs/V1PhoneNumber.md +13 -0
- data/docs/V1Refund.md +16 -0
- data/docs/V1Settlement.md +15 -0
- data/docs/V1SettlementEntry.md +13 -0
- data/docs/V1Tender.md +22 -0
- data/docs/V1Timecard.md +20 -0
- data/docs/V1TimecardEvent.md +14 -0
- data/docs/V1TransactionsApi.md +650 -0
- data/docs/V1UpdateModifierListRequest.md +11 -0
- data/docs/V1UpdateOrderRequest.md +14 -0
- data/docs/V1Variation.md +20 -0
- data/lib/.DS_Store +0 -0
- data/lib/square_connect.rb +46 -5
- data/lib/square_connect/.DS_Store +0 -0
- data/lib/square_connect/api/checkout_api.rb +4 -9
- data/lib/square_connect/api/{customer_api.rb → customers_api.rb} +150 -61
- data/lib/square_connect/api/{location_api.rb → locations_api.rb} +7 -12
- data/lib/square_connect/api/{transaction_api.rb → transactions_api.rb} +169 -65
- data/lib/square_connect/api/v1_employees_api.rb +974 -0
- data/lib/square_connect/api/v1_items_api.rb +2365 -0
- data/lib/square_connect/api/v1_locations_api.rb +118 -0
- data/lib/square_connect/api/v1_transactions_api.rb +707 -0
- data/lib/square_connect/api_client.rb +1 -1
- data/lib/square_connect/models/charge_request.rb +1 -1
- data/lib/square_connect/models/device.rb +196 -0
- data/lib/square_connect/models/v1_adjust_inventory_request.rb +206 -0
- data/lib/square_connect/models/v1_bank_account.rb +289 -0
- data/lib/square_connect/models/v1_cash_drawer_event.rb +269 -0
- data/lib/square_connect/models/v1_cash_drawer_shift.rb +403 -0
- data/lib/square_connect/models/v1_category.rb +196 -0
- data/lib/square_connect/models/v1_create_refund_request.rb +274 -0
- data/lib/square_connect/models/v1_discount.rb +291 -0
- data/lib/square_connect/models/v1_employee.rb +323 -0
- data/lib/square_connect/models/v1_employee_role.rb +269 -0
- data/lib/square_connect/models/v1_fee.rb +335 -0
- data/lib/square_connect/models/v1_inventory_entry.rb +196 -0
- data/lib/square_connect/models/v1_item.rb +379 -0
- data/lib/square_connect/models/v1_item_image.rb +196 -0
- data/lib/square_connect/models/v1_merchant.rb +372 -0
- data/lib/square_connect/models/v1_merchant_location_details.rb +186 -0
- data/lib/square_connect/models/v1_modifier_list.rb +251 -0
- data/lib/square_connect/models/v1_modifier_option.rb +236 -0
- data/lib/square_connect/models/v1_money.rb +229 -0
- data/lib/square_connect/models/v1_order.rb +463 -0
- data/lib/square_connect/models/v1_order_history_entry.rb +229 -0
- data/lib/square_connect/models/v1_page.rb +218 -0
- data/lib/square_connect/models/v1_page_cell.rb +261 -0
- data/lib/square_connect/models/v1_payment.rb +423 -0
- data/lib/square_connect/models/v1_payment_discount.rb +206 -0
- data/lib/square_connect/models/v1_payment_item_detail.rb +216 -0
- data/lib/square_connect/models/v1_payment_itemization.rb +355 -0
- data/lib/square_connect/models/v1_payment_modifier.rb +206 -0
- data/lib/square_connect/models/v1_payment_tax.rb +271 -0
- data/lib/square_connect/models/v1_phone_number.rb +206 -0
- data/lib/square_connect/models/v1_refund.rb +279 -0
- data/lib/square_connect/models/v1_settlement.rb +271 -0
- data/lib/square_connect/models/v1_settlement_entry.rb +249 -0
- data/lib/square_connect/models/v1_tender.rb +363 -0
- data/lib/square_connect/models/v1_timecard.rb +271 -0
- data/lib/square_connect/models/v1_timecard_event.rb +259 -0
- data/lib/square_connect/models/v1_update_modifier_list_request.rb +229 -0
- data/lib/square_connect/models/v1_update_order_request.rb +264 -0
- data/lib/square_connect/models/v1_variation.rb +331 -0
- data/lib/square_connect/version.rb +1 -1
- data/spec/.DS_Store +0 -0
- data/spec/api/checkout_api_spec.rb +4 -12
- data/spec/api/{customer_api_spec.rb → customers_api_spec.rb} +39 -41
- data/spec/api/{location_api_spec.rb → locations_api_spec.rb} +9 -15
- data/spec/api/{transaction_api_spec.rb → transactions_api_spec.rb} +43 -41
- data/spec/api/v1_employees_api_spec.rb +250 -0
- data/spec/api/v1_items_api_spec.rb +568 -0
- data/spec/api/v1_locations_api_spec.rb +54 -0
- data/spec/api/v1_transactions_api_spec.rb +186 -0
- data/spec/models/address_spec.rb +22 -81
- data/spec/models/capture_transaction_request_spec.rb +3 -6
- data/spec/models/capture_transaction_response_spec.rb +4 -11
- data/spec/models/card_brand_spec.rb +3 -6
- data/spec/models/card_spec.rb +14 -41
- data/spec/models/charge_request_spec.rb +14 -61
- data/spec/models/charge_response_spec.rb +5 -16
- data/spec/models/checkout_spec.rb +12 -51
- data/spec/models/country_spec.rb +3 -6
- data/spec/models/create_checkout_request_spec.rb +10 -41
- data/spec/models/create_checkout_response_spec.rb +5 -16
- data/spec/models/create_customer_card_request_spec.rb +6 -21
- data/spec/models/create_customer_card_response_spec.rb +5 -16
- data/spec/models/create_customer_request_spec.rb +12 -51
- data/spec/models/create_customer_response_spec.rb +5 -16
- data/spec/models/create_order_request_line_item_spec.rb +6 -21
- data/spec/models/create_order_request_order_spec.rb +5 -16
- data/spec/models/create_order_request_spec.rb +5 -16
- data/spec/models/create_refund_request_spec.rb +7 -26
- data/spec/models/create_refund_response_spec.rb +5 -16
- data/spec/models/currency_spec.rb +3 -6
- data/spec/models/customer_group_info_spec.rb +5 -16
- data/spec/models/customer_preferences_spec.rb +4 -11
- data/spec/models/customer_spec.rb +18 -81
- data/spec/models/delete_customer_card_request_spec.rb +3 -6
- data/spec/models/delete_customer_card_response_spec.rb +4 -11
- data/spec/models/delete_customer_request_spec.rb +3 -6
- data/spec/models/delete_customer_response_spec.rb +4 -11
- data/spec/models/device_spec.rb +45 -0
- data/spec/models/error_category_spec.rb +3 -6
- data/spec/models/error_code_spec.rb +3 -6
- data/spec/models/error_spec.rb +15 -26
- data/spec/models/list_customers_request_spec.rb +4 -11
- data/spec/models/list_customers_response_spec.rb +6 -21
- data/spec/models/list_locations_request_spec.rb +3 -6
- data/spec/models/list_locations_response_spec.rb +5 -16
- data/spec/models/list_refunds_request_spec.rb +11 -26
- data/spec/models/list_refunds_response_spec.rb +6 -21
- data/spec/models/list_transactions_request_spec.rb +11 -26
- data/spec/models/list_transactions_response_spec.rb +6 -21
- data/spec/models/location_capability_spec.rb +3 -6
- data/spec/models/location_spec.rb +12 -31
- data/spec/models/money_spec.rb +9 -16
- data/spec/models/order_line_item_spec.rb +8 -31
- data/spec/models/order_spec.rb +8 -31
- data/spec/models/refund_spec.rb +16 -51
- data/spec/models/refund_status_spec.rb +3 -6
- data/spec/models/retrieve_customer_request_spec.rb +3 -6
- data/spec/models/retrieve_customer_response_spec.rb +5 -16
- data/spec/models/retrieve_transaction_request_spec.rb +3 -6
- data/spec/models/retrieve_transaction_response_spec.rb +5 -16
- data/spec/models/sort_order_spec.rb +3 -6
- data/spec/models/tender_card_details_entry_method_spec.rb +3 -6
- data/spec/models/tender_card_details_spec.rb +14 -21
- data/spec/models/tender_card_details_status_spec.rb +3 -6
- data/spec/models/tender_cash_details_spec.rb +5 -16
- data/spec/models/tender_spec.rb +18 -61
- data/spec/models/tender_type_spec.rb +3 -6
- data/spec/models/transaction_product_spec.rb +3 -6
- data/spec/models/transaction_spec.rb +17 -56
- data/spec/models/update_customer_request_spec.rb +12 -51
- data/spec/models/update_customer_response_spec.rb +5 -16
- data/spec/models/v1_adjust_inventory_request_spec.rb +51 -0
- data/spec/models/v1_bank_account_spec.rb +85 -0
- data/spec/models/v1_cash_drawer_event_spec.rb +73 -0
- data/spec/models/v1_cash_drawer_shift_spec.rb +151 -0
- data/spec/models/v1_category_spec.rb +45 -0
- data/spec/models/v1_create_refund_request_spec.rb +67 -0
- data/spec/models/v1_discount_spec.rb +83 -0
- data/spec/models/v1_employee_role_spec.rb +73 -0
- data/spec/models/v1_employee_spec.rb +97 -0
- data/spec/models/v1_fee_spec.rb +103 -0
- data/spec/models/v1_inventory_entry_spec.rb +45 -0
- data/spec/models/v1_item_image_spec.rb +45 -0
- data/spec/models/v1_item_spec.rb +129 -0
- data/spec/models/v1_merchant_location_details_spec.rb +39 -0
- data/spec/models/v1_merchant_spec.rb +131 -0
- data/spec/models/v1_modifier_list_spec.rb +61 -0
- data/spec/models/v1_modifier_option_spec.rb +69 -0
- data/spec/models/v1_money_spec.rb +49 -0
- data/spec/models/v1_order_history_entry_spec.rb +49 -0
- data/spec/models/v1_order_spec.rb +187 -0
- data/spec/models/v1_page_cell_spec.rb +77 -0
- data/spec/models/v1_page_spec.rb +57 -0
- data/spec/models/v1_payment_discount_spec.rb +51 -0
- data/spec/models/v1_payment_item_detail_spec.rb +57 -0
- data/spec/models/v1_payment_itemization_spec.rb +121 -0
- data/spec/models/v1_payment_modifier_spec.rb +51 -0
- data/spec/models/v1_payment_spec.rb +177 -0
- data/spec/models/v1_payment_tax_spec.rb +73 -0
- data/spec/models/v1_phone_number_spec.rb +45 -0
- data/spec/models/v1_refund_spec.rb +79 -0
- data/spec/models/v1_settlement_entry_spec.rb +61 -0
- data/spec/models/v1_settlement_spec.rb +73 -0
- data/spec/models/v1_tender_spec.rb +123 -0
- data/spec/models/v1_timecard_event_spec.rb +67 -0
- data/spec/models/v1_timecard_spec.rb +87 -0
- data/spec/models/v1_update_modifier_list_request_spec.rb +49 -0
- data/spec/models/v1_update_order_request_spec.rb +67 -0
- data/spec/models/v1_variation_spec.rb +107 -0
- data/spec/models/void_transaction_request_spec.rb +3 -6
- data/spec/models/void_transaction_response_spec.rb +4 -11
- data/spec/spec_helper.rb +10 -0
- data/square_connect-2.0.2.gem +0 -0
- data/square_connect-2.1.0.gem +0 -0
- data/square_connect-2.1.0beta.gem +0 -0
- data/square_connect.gemspec +1 -1
- data/travis-ci/accounts.enc +0 -0
- metadata +197 -26
- data/docs/CustomerApi.md +0 -267
- data/docs/CustomerCardApi.md +0 -116
- data/docs/LocationApi.md +0 -56
- data/docs/RefundApi.md +0 -126
- data/docs/TransactionApi.md +0 -285
- data/lib/square_connect/api/customer_card_api.rb +0 -144
- data/lib/square_connect/api/refund_api.rb +0 -159
- data/spec/api/customer_card_api_spec.rb +0 -71
- data/spec/api/refund_api_spec.rb +0 -75
data/docs/V1Fee.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# SquareConnect::V1Fee
|
|
2
|
+
|
|
3
|
+
### Description
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **String** | The fee's unique ID. | [optional]
|
|
9
|
+
**name** | **String** | The fee's name. | [optional]
|
|
10
|
+
**rate** | **String** | The rate of the fee, as a string representation of a decimal number. A value of 0.07 corresponds to a rate of 7%. | [optional]
|
|
11
|
+
**calculation_phase** | **String** | Forthcoming | [optional]
|
|
12
|
+
**adjustment_type** | **String** | The type of adjustment the fee applies to a payment. Currently, this value is TAX for all fees. | [optional]
|
|
13
|
+
**applies_to_custom_amounts** | **BOOLEAN** | If true, the fee applies to custom amounts entered into Square Register that are not associated with a particular item. | [optional]
|
|
14
|
+
**enabled** | **BOOLEAN** | If true, the fee is applied to all appropriate items. If false, the fee is not applied at all. | [optional]
|
|
15
|
+
**inclusion_type** | **String** | Whether the fee is ADDITIVE or INCLUSIVE. | [optional]
|
|
16
|
+
**type** | **String** | In countries with multiple classifications for sales taxes, indicates which classification the fee falls under. Currently relevant only to Canadian merchants. | [optional]
|
|
17
|
+
|
|
18
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# SquareConnect::V1InventoryEntry
|
|
2
|
+
|
|
3
|
+
### Description
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**variation_id** | **String** | The variation that the entry corresponds to. | [optional]
|
|
9
|
+
**quantity_on_hand** | **Float** | The current available quantity of the item variation. | [optional]
|
|
10
|
+
|
|
11
|
+
|
data/docs/V1Item.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# SquareConnect::V1Item
|
|
2
|
+
|
|
3
|
+
### Description
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **String** | The item's ID. Must be unique among all entity IDs ever provided on behalf of the merchant. You can never reuse an ID. This value can include alphanumeric characters, dashes (-), and underscores (_). | [optional]
|
|
9
|
+
**name** | **String** | The item's name. | [optional]
|
|
10
|
+
**description** | **String** | The item's description. | [optional]
|
|
11
|
+
**type** | **String** | The item's type. This value is NORMAL for almost all items. | [optional]
|
|
12
|
+
**color** | **String** | The color of the discount's display label in Square Register, if not the default color. The default color is 9da2a6. | [optional]
|
|
13
|
+
**abbreviation** | **String** | The text of the item's display label in Square Register. Only up to the first five characters of the string are used. | [optional]
|
|
14
|
+
**visibility** | **String** | Indicates whether the item is viewable from the merchant's online store (PUBLIC) or PRIVATE. | [optional]
|
|
15
|
+
**available_online** | **String** | If true, the item can be added to shipping orders from the merchant's online store. | [optional]
|
|
16
|
+
**master_image** | [**V1ItemImage**](V1ItemImage.md) | The item's master image, if any. | [optional]
|
|
17
|
+
**category** | [**V1Category**](V1Category.md) | The category the item belongs to, if any. | [optional]
|
|
18
|
+
**variations** | [**Array<V1Variation>**](V1Variation.md) | The item's variations. You must specify at least one variation. | [optional]
|
|
19
|
+
**modifier_lists** | [**Array<V1Variation>**](V1Variation.md) | The modifier lists that apply to the item, if any. | [optional]
|
|
20
|
+
**fees** | [**Array<V1Fee>**](V1Fee.md) | The fees that apply to the item, if any. | [optional]
|
|
21
|
+
**taxable** | **BOOLEAN** | Deprecated. This field is not used. | [optional]
|
|
22
|
+
|
|
23
|
+
|
data/docs/V1ItemImage.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# SquareConnect::V1ItemImage
|
|
2
|
+
|
|
3
|
+
### Description
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **String** | The image's unique ID. | [optional]
|
|
9
|
+
**url** | **String** | The image's publicly accessible URL. | [optional]
|
|
10
|
+
|
|
11
|
+
|
data/docs/V1ItemsApi.md
ADDED
|
@@ -0,0 +1,2297 @@
|
|
|
1
|
+
# SquareConnect::V1ItemsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://connect.squareup.com*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**adjust_inventory**](V1ItemsApi.md#adjust_inventory) | **POST** /v1/{location_id}/inventory/{variation_id} | Adjusts an item variation's current available inventory.
|
|
8
|
+
[**apply_fee**](V1ItemsApi.md#apply_fee) | **PUT** /v1/{location_id}/items/{item_id}/fees/{fee_id} | Associates a fee with an item, meaning the fee is automatically applied to the item in Square Register.
|
|
9
|
+
[**apply_modifier_list**](V1ItemsApi.md#apply_modifier_list) | **PUT** /v1/{location_id}/items/{item_id}/modifier-lists/{modifier_list_id} | Associates a modifier list with an item, meaning modifier options from the list can be applied to the item.
|
|
10
|
+
[**create_category**](V1ItemsApi.md#create_category) | **POST** /v1/{location_id}/categories | Creates an item category.
|
|
11
|
+
[**create_discount**](V1ItemsApi.md#create_discount) | **POST** /v1/{location_id}/discounts | Creates a discount.
|
|
12
|
+
[**create_fee**](V1ItemsApi.md#create_fee) | **POST** /v1/{location_id}/fees | Creates a fee (tax).
|
|
13
|
+
[**create_item**](V1ItemsApi.md#create_item) | **POST** /v1/{location_id}/items | Creates an item and at least one variation for it.
|
|
14
|
+
[**create_modifier_list**](V1ItemsApi.md#create_modifier_list) | **POST** /v1/{location_id}/modifier-lists | Creates an item modifier list and at least one modifier option for it.
|
|
15
|
+
[**create_modifier_option**](V1ItemsApi.md#create_modifier_option) | **POST** /v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options | Creates an item modifier option and adds it to a modifier list.
|
|
16
|
+
[**create_page**](V1ItemsApi.md#create_page) | **POST** /v1/{location_id}/pages | Creates a Favorites page in Square Register.
|
|
17
|
+
[**create_variation**](V1ItemsApi.md#create_variation) | **POST** /v1/{location_id}/items/{item_id}/variations | Creates an item variation for an existing item.
|
|
18
|
+
[**delete_category**](V1ItemsApi.md#delete_category) | **DELETE** /v1/{location_id}/categories/{category_id} | Deletes an existing item category.
|
|
19
|
+
[**delete_discount**](V1ItemsApi.md#delete_discount) | **DELETE** /v1/{location_id}/discounts/{discount_id} | Deletes an existing discount.
|
|
20
|
+
[**delete_fee**](V1ItemsApi.md#delete_fee) | **DELETE** /v1/{location_id}/fees/{fee_id} | Deletes an existing fee (tax).
|
|
21
|
+
[**delete_item**](V1ItemsApi.md#delete_item) | **DELETE** /v1/{location_id}/items/{item_id} | Deletes an existing item and all item variations associated with it.
|
|
22
|
+
[**delete_modifier_list**](V1ItemsApi.md#delete_modifier_list) | **DELETE** /v1/{location_id}/modifier-lists/{modifier_list_id} | Deletes an existing item modifier list and all modifier options associated with it.
|
|
23
|
+
[**delete_modifier_option**](V1ItemsApi.md#delete_modifier_option) | **DELETE** /v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options/{modifier_option_id} | Deletes an existing item modifier option from a modifier list.
|
|
24
|
+
[**delete_page**](V1ItemsApi.md#delete_page) | **DELETE** /v1/{location_id}/pages/{page_id} | Deletes an existing Favorites page and all of its cells.
|
|
25
|
+
[**delete_page_cell**](V1ItemsApi.md#delete_page_cell) | **DELETE** /v1/{location_id}/pages/{page_id}/cells | Deletes a cell from a Favorites page in Square Register.
|
|
26
|
+
[**delete_variation**](V1ItemsApi.md#delete_variation) | **DELETE** /v1/{location_id}/items/{item_id}/variations/{variation_id} | Deletes an existing item variation from an item.
|
|
27
|
+
[**list_categories**](V1ItemsApi.md#list_categories) | **GET** /v1/{location_id}/categories | Lists all of a location's item categories.
|
|
28
|
+
[**list_discounts**](V1ItemsApi.md#list_discounts) | **GET** /v1/{location_id}/discounts | Lists all of a location's discounts.
|
|
29
|
+
[**list_fees**](V1ItemsApi.md#list_fees) | **GET** /v1/{location_id}/fees | Lists all of a location's fees (taxes).
|
|
30
|
+
[**list_inventory**](V1ItemsApi.md#list_inventory) | **GET** /v1/{location_id}/inventory | Provides inventory information for all of a merchant's inventory-enabled item variations.
|
|
31
|
+
[**list_items**](V1ItemsApi.md#list_items) | **GET** /v1/{location_id}/items | Provides summary information for all of a location's items.
|
|
32
|
+
[**list_modifier_lists**](V1ItemsApi.md#list_modifier_lists) | **GET** /v1/{location_id}/modifier-lists | Lists all of a location's modifier lists.
|
|
33
|
+
[**list_pages**](V1ItemsApi.md#list_pages) | **GET** /v1/{location_id}/pages | Lists all of a location's Favorites pages in Square Register.
|
|
34
|
+
[**remove_fee**](V1ItemsApi.md#remove_fee) | **DELETE** /v1/{location_id}/items/{item_id}/fees/{fee_id} | Removes a fee assocation from an item, meaning the fee is no longer automatically applied to the item in Square Register.
|
|
35
|
+
[**remove_modifier_list**](V1ItemsApi.md#remove_modifier_list) | **DELETE** /v1/{location_id}/items/{item_id}/modifier-lists/{modifier_list_id} | Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item.
|
|
36
|
+
[**retrieve_item**](V1ItemsApi.md#retrieve_item) | **GET** /v1/{location_id}/items/{item_id} | Provides the details for a single item, including associated modifier lists and fees.
|
|
37
|
+
[**retrieve_modifier_list**](V1ItemsApi.md#retrieve_modifier_list) | **GET** /v1/{location_id}/modifier-lists/{modifier_list_id} | Provides the details for a single modifier list.
|
|
38
|
+
[**update_category**](V1ItemsApi.md#update_category) | **PUT** /v1/{location_id}/categories/{category_id} | Modifies the details of an existing item category.
|
|
39
|
+
[**update_discount**](V1ItemsApi.md#update_discount) | **PUT** /v1/{location_id}/discounts/{discount_id} | Modifies the details of an existing discount.
|
|
40
|
+
[**update_fee**](V1ItemsApi.md#update_fee) | **PUT** /v1/{location_id}/fees/{fee_id} | Modifies the details of an existing fee (tax).
|
|
41
|
+
[**update_item**](V1ItemsApi.md#update_item) | **PUT** /v1/{location_id}/items/{item_id} | Modifies the core details of an existing item.
|
|
42
|
+
[**update_modifier_list**](V1ItemsApi.md#update_modifier_list) | **PUT** /v1/{location_id}/modifier-lists/{modifier_list_id} | Modifies the details of an existing item modifier list.
|
|
43
|
+
[**update_modifier_option**](V1ItemsApi.md#update_modifier_option) | **PUT** /v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options/{modifier_option_id} | Modifies the details of an existing item modifier option.
|
|
44
|
+
[**update_page**](V1ItemsApi.md#update_page) | **PUT** /v1/{location_id}/pages/{page_id} | Modifies the details of a Favorites page in Square Register.
|
|
45
|
+
[**update_page_cell**](V1ItemsApi.md#update_page_cell) | **PUT** /v1/{location_id}/pages/{page_id}/cells | Modifies a cell of a Favorites page in Square Register.
|
|
46
|
+
[**update_variation**](V1ItemsApi.md#update_variation) | **PUT** /v1/{location_id}/items/{item_id}/variations/{variation_id} | Modifies the details of an existing item variation.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# **adjust_inventory**
|
|
50
|
+
> V1InventoryEntry adjust_inventory(location_id, variation_id, body)
|
|
51
|
+
|
|
52
|
+
Adjusts an item variation's current available inventory.
|
|
53
|
+
|
|
54
|
+
Adjusts an item variation's current available inventory.
|
|
55
|
+
|
|
56
|
+
### Example
|
|
57
|
+
```ruby
|
|
58
|
+
# load the gem
|
|
59
|
+
require 'square_connect'
|
|
60
|
+
# setup authorization
|
|
61
|
+
SquareConnect.configure do |config|
|
|
62
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
63
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
67
|
+
|
|
68
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
69
|
+
|
|
70
|
+
variation_id = "variation_id_example" # String | The ID of the variation to adjust inventory information for.
|
|
71
|
+
|
|
72
|
+
body = SquareConnect::V1AdjustInventoryRequest.new # V1AdjustInventoryRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
begin
|
|
76
|
+
#Adjusts an item variation's current available inventory.
|
|
77
|
+
result = api_instance.adjust_inventory(location_id, variation_id, body)
|
|
78
|
+
p result
|
|
79
|
+
rescue SquareConnect::ApiError => e
|
|
80
|
+
puts "Exception when calling V1ItemsApi->adjust_inventory: #{e}"
|
|
81
|
+
end
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Parameters
|
|
85
|
+
|
|
86
|
+
Name | Type | Description | Notes
|
|
87
|
+
------------- | ------------- | ------------- | -------------
|
|
88
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
89
|
+
**variation_id** | **String**| The ID of the variation to adjust inventory information for. |
|
|
90
|
+
**body** | [**V1AdjustInventoryRequest**](V1AdjustInventoryRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
91
|
+
|
|
92
|
+
### Return type
|
|
93
|
+
|
|
94
|
+
[**V1InventoryEntry**](V1InventoryEntry.md)
|
|
95
|
+
|
|
96
|
+
### Authorization
|
|
97
|
+
|
|
98
|
+
[oauth2](../README.md#oauth2)
|
|
99
|
+
|
|
100
|
+
### HTTP request headers
|
|
101
|
+
|
|
102
|
+
- **Content-Type**: application/json
|
|
103
|
+
- **Accept**: application/json
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# **apply_fee**
|
|
108
|
+
> V1Item apply_fee(location_id, item_id, fee_id)
|
|
109
|
+
|
|
110
|
+
Associates a fee with an item, meaning the fee is automatically applied to the item in Square Register.
|
|
111
|
+
|
|
112
|
+
Associates a fee with an item, meaning the fee is automatically applied to the item in Square Register.
|
|
113
|
+
|
|
114
|
+
### Example
|
|
115
|
+
```ruby
|
|
116
|
+
# load the gem
|
|
117
|
+
require 'square_connect'
|
|
118
|
+
# setup authorization
|
|
119
|
+
SquareConnect.configure do |config|
|
|
120
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
121
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
125
|
+
|
|
126
|
+
location_id = "location_id_example" # String | The ID of the fee's associated location.
|
|
127
|
+
|
|
128
|
+
item_id = "item_id_example" # String | The ID of the item to add the fee to.
|
|
129
|
+
|
|
130
|
+
fee_id = "fee_id_example" # String | The ID of the fee to apply.
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
begin
|
|
134
|
+
#Associates a fee with an item, meaning the fee is automatically applied to the item in Square Register.
|
|
135
|
+
result = api_instance.apply_fee(location_id, item_id, fee_id)
|
|
136
|
+
p result
|
|
137
|
+
rescue SquareConnect::ApiError => e
|
|
138
|
+
puts "Exception when calling V1ItemsApi->apply_fee: #{e}"
|
|
139
|
+
end
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Parameters
|
|
143
|
+
|
|
144
|
+
Name | Type | Description | Notes
|
|
145
|
+
------------- | ------------- | ------------- | -------------
|
|
146
|
+
**location_id** | **String**| The ID of the fee's associated location. |
|
|
147
|
+
**item_id** | **String**| The ID of the item to add the fee to. |
|
|
148
|
+
**fee_id** | **String**| The ID of the fee to apply. |
|
|
149
|
+
|
|
150
|
+
### Return type
|
|
151
|
+
|
|
152
|
+
[**V1Item**](V1Item.md)
|
|
153
|
+
|
|
154
|
+
### Authorization
|
|
155
|
+
|
|
156
|
+
[oauth2](../README.md#oauth2)
|
|
157
|
+
|
|
158
|
+
### HTTP request headers
|
|
159
|
+
|
|
160
|
+
- **Content-Type**: application/json
|
|
161
|
+
- **Accept**: application/json
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
# **apply_modifier_list**
|
|
166
|
+
> V1Item apply_modifier_list(location_id, modifier_list_id, item_id)
|
|
167
|
+
|
|
168
|
+
Associates a modifier list with an item, meaning modifier options from the list can be applied to the item.
|
|
169
|
+
|
|
170
|
+
Associates a modifier list with an item, meaning modifier options from the list can be applied to the item.
|
|
171
|
+
|
|
172
|
+
### Example
|
|
173
|
+
```ruby
|
|
174
|
+
# load the gem
|
|
175
|
+
require 'square_connect'
|
|
176
|
+
# setup authorization
|
|
177
|
+
SquareConnect.configure do |config|
|
|
178
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
179
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
183
|
+
|
|
184
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
185
|
+
|
|
186
|
+
modifier_list_id = "modifier_list_id_example" # String | The ID of the modifier list to apply.
|
|
187
|
+
|
|
188
|
+
item_id = "item_id_example" # String | The ID of the item to add the modifier list to.
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
begin
|
|
192
|
+
#Associates a modifier list with an item, meaning modifier options from the list can be applied to the item.
|
|
193
|
+
result = api_instance.apply_modifier_list(location_id, modifier_list_id, item_id)
|
|
194
|
+
p result
|
|
195
|
+
rescue SquareConnect::ApiError => e
|
|
196
|
+
puts "Exception when calling V1ItemsApi->apply_modifier_list: #{e}"
|
|
197
|
+
end
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Parameters
|
|
201
|
+
|
|
202
|
+
Name | Type | Description | Notes
|
|
203
|
+
------------- | ------------- | ------------- | -------------
|
|
204
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
205
|
+
**modifier_list_id** | **String**| The ID of the modifier list to apply. |
|
|
206
|
+
**item_id** | **String**| The ID of the item to add the modifier list to. |
|
|
207
|
+
|
|
208
|
+
### Return type
|
|
209
|
+
|
|
210
|
+
[**V1Item**](V1Item.md)
|
|
211
|
+
|
|
212
|
+
### Authorization
|
|
213
|
+
|
|
214
|
+
[oauth2](../README.md#oauth2)
|
|
215
|
+
|
|
216
|
+
### HTTP request headers
|
|
217
|
+
|
|
218
|
+
- **Content-Type**: application/json
|
|
219
|
+
- **Accept**: application/json
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
# **create_category**
|
|
224
|
+
> V1Category create_category(location_id, body)
|
|
225
|
+
|
|
226
|
+
Creates an item category.
|
|
227
|
+
|
|
228
|
+
Creates an item category.
|
|
229
|
+
|
|
230
|
+
### Example
|
|
231
|
+
```ruby
|
|
232
|
+
# load the gem
|
|
233
|
+
require 'square_connect'
|
|
234
|
+
# setup authorization
|
|
235
|
+
SquareConnect.configure do |config|
|
|
236
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
237
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
241
|
+
|
|
242
|
+
location_id = "location_id_example" # String | The ID of the location to create an item for.
|
|
243
|
+
|
|
244
|
+
body = SquareConnect::V1Category.new # V1Category | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
begin
|
|
248
|
+
#Creates an item category.
|
|
249
|
+
result = api_instance.create_category(location_id, body)
|
|
250
|
+
p result
|
|
251
|
+
rescue SquareConnect::ApiError => e
|
|
252
|
+
puts "Exception when calling V1ItemsApi->create_category: #{e}"
|
|
253
|
+
end
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Parameters
|
|
257
|
+
|
|
258
|
+
Name | Type | Description | Notes
|
|
259
|
+
------------- | ------------- | ------------- | -------------
|
|
260
|
+
**location_id** | **String**| The ID of the location to create an item for. |
|
|
261
|
+
**body** | [**V1Category**](V1Category.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
262
|
+
|
|
263
|
+
### Return type
|
|
264
|
+
|
|
265
|
+
[**V1Category**](V1Category.md)
|
|
266
|
+
|
|
267
|
+
### Authorization
|
|
268
|
+
|
|
269
|
+
[oauth2](../README.md#oauth2)
|
|
270
|
+
|
|
271
|
+
### HTTP request headers
|
|
272
|
+
|
|
273
|
+
- **Content-Type**: application/json
|
|
274
|
+
- **Accept**: application/json
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
# **create_discount**
|
|
279
|
+
> V1Discount create_discount(location_id, body)
|
|
280
|
+
|
|
281
|
+
Creates a discount.
|
|
282
|
+
|
|
283
|
+
Creates a discount.
|
|
284
|
+
|
|
285
|
+
### Example
|
|
286
|
+
```ruby
|
|
287
|
+
# load the gem
|
|
288
|
+
require 'square_connect'
|
|
289
|
+
# setup authorization
|
|
290
|
+
SquareConnect.configure do |config|
|
|
291
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
292
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
296
|
+
|
|
297
|
+
location_id = "location_id_example" # String | The ID of the location to create an item for.
|
|
298
|
+
|
|
299
|
+
body = SquareConnect::V1Discount.new # V1Discount | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
begin
|
|
303
|
+
#Creates a discount.
|
|
304
|
+
result = api_instance.create_discount(location_id, body)
|
|
305
|
+
p result
|
|
306
|
+
rescue SquareConnect::ApiError => e
|
|
307
|
+
puts "Exception when calling V1ItemsApi->create_discount: #{e}"
|
|
308
|
+
end
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### Parameters
|
|
312
|
+
|
|
313
|
+
Name | Type | Description | Notes
|
|
314
|
+
------------- | ------------- | ------------- | -------------
|
|
315
|
+
**location_id** | **String**| The ID of the location to create an item for. |
|
|
316
|
+
**body** | [**V1Discount**](V1Discount.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
317
|
+
|
|
318
|
+
### Return type
|
|
319
|
+
|
|
320
|
+
[**V1Discount**](V1Discount.md)
|
|
321
|
+
|
|
322
|
+
### Authorization
|
|
323
|
+
|
|
324
|
+
[oauth2](../README.md#oauth2)
|
|
325
|
+
|
|
326
|
+
### HTTP request headers
|
|
327
|
+
|
|
328
|
+
- **Content-Type**: application/json
|
|
329
|
+
- **Accept**: application/json
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
# **create_fee**
|
|
334
|
+
> V1Fee create_fee(location_id, body)
|
|
335
|
+
|
|
336
|
+
Creates a fee (tax).
|
|
337
|
+
|
|
338
|
+
Creates a fee (tax).
|
|
339
|
+
|
|
340
|
+
### Example
|
|
341
|
+
```ruby
|
|
342
|
+
# load the gem
|
|
343
|
+
require 'square_connect'
|
|
344
|
+
# setup authorization
|
|
345
|
+
SquareConnect.configure do |config|
|
|
346
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
347
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
351
|
+
|
|
352
|
+
location_id = "location_id_example" # String | The ID of the location to create a fee for.
|
|
353
|
+
|
|
354
|
+
body = SquareConnect::V1Fee.new # V1Fee | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
begin
|
|
358
|
+
#Creates a fee (tax).
|
|
359
|
+
result = api_instance.create_fee(location_id, body)
|
|
360
|
+
p result
|
|
361
|
+
rescue SquareConnect::ApiError => e
|
|
362
|
+
puts "Exception when calling V1ItemsApi->create_fee: #{e}"
|
|
363
|
+
end
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### Parameters
|
|
367
|
+
|
|
368
|
+
Name | Type | Description | Notes
|
|
369
|
+
------------- | ------------- | ------------- | -------------
|
|
370
|
+
**location_id** | **String**| The ID of the location to create a fee for. |
|
|
371
|
+
**body** | [**V1Fee**](V1Fee.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
372
|
+
|
|
373
|
+
### Return type
|
|
374
|
+
|
|
375
|
+
[**V1Fee**](V1Fee.md)
|
|
376
|
+
|
|
377
|
+
### Authorization
|
|
378
|
+
|
|
379
|
+
[oauth2](../README.md#oauth2)
|
|
380
|
+
|
|
381
|
+
### HTTP request headers
|
|
382
|
+
|
|
383
|
+
- **Content-Type**: application/json
|
|
384
|
+
- **Accept**: application/json
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
# **create_item**
|
|
389
|
+
> V1Item create_item(location_id, body)
|
|
390
|
+
|
|
391
|
+
Creates an item and at least one variation for it.
|
|
392
|
+
|
|
393
|
+
Creates an item and at least one variation for it.
|
|
394
|
+
|
|
395
|
+
### Example
|
|
396
|
+
```ruby
|
|
397
|
+
# load the gem
|
|
398
|
+
require 'square_connect'
|
|
399
|
+
# setup authorization
|
|
400
|
+
SquareConnect.configure do |config|
|
|
401
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
402
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
406
|
+
|
|
407
|
+
location_id = "location_id_example" # String | The ID of the location to create an item for.
|
|
408
|
+
|
|
409
|
+
body = SquareConnect::V1Item.new # V1Item | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
begin
|
|
413
|
+
#Creates an item and at least one variation for it.
|
|
414
|
+
result = api_instance.create_item(location_id, body)
|
|
415
|
+
p result
|
|
416
|
+
rescue SquareConnect::ApiError => e
|
|
417
|
+
puts "Exception when calling V1ItemsApi->create_item: #{e}"
|
|
418
|
+
end
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### Parameters
|
|
422
|
+
|
|
423
|
+
Name | Type | Description | Notes
|
|
424
|
+
------------- | ------------- | ------------- | -------------
|
|
425
|
+
**location_id** | **String**| The ID of the location to create an item for. |
|
|
426
|
+
**body** | [**V1Item**](V1Item.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
427
|
+
|
|
428
|
+
### Return type
|
|
429
|
+
|
|
430
|
+
[**V1Item**](V1Item.md)
|
|
431
|
+
|
|
432
|
+
### Authorization
|
|
433
|
+
|
|
434
|
+
[oauth2](../README.md#oauth2)
|
|
435
|
+
|
|
436
|
+
### HTTP request headers
|
|
437
|
+
|
|
438
|
+
- **Content-Type**: application/json
|
|
439
|
+
- **Accept**: application/json
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
# **create_modifier_list**
|
|
444
|
+
> V1ModifierList create_modifier_list(location_id, body)
|
|
445
|
+
|
|
446
|
+
Creates an item modifier list and at least one modifier option for it.
|
|
447
|
+
|
|
448
|
+
Creates an item modifier list and at least one modifier option for it.
|
|
449
|
+
|
|
450
|
+
### Example
|
|
451
|
+
```ruby
|
|
452
|
+
# load the gem
|
|
453
|
+
require 'square_connect'
|
|
454
|
+
# setup authorization
|
|
455
|
+
SquareConnect.configure do |config|
|
|
456
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
457
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
461
|
+
|
|
462
|
+
location_id = "location_id_example" # String | The ID of the location to create a modifier list for.
|
|
463
|
+
|
|
464
|
+
body = SquareConnect::V1ModifierList.new # V1ModifierList | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
begin
|
|
468
|
+
#Creates an item modifier list and at least one modifier option for it.
|
|
469
|
+
result = api_instance.create_modifier_list(location_id, body)
|
|
470
|
+
p result
|
|
471
|
+
rescue SquareConnect::ApiError => e
|
|
472
|
+
puts "Exception when calling V1ItemsApi->create_modifier_list: #{e}"
|
|
473
|
+
end
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
### Parameters
|
|
477
|
+
|
|
478
|
+
Name | Type | Description | Notes
|
|
479
|
+
------------- | ------------- | ------------- | -------------
|
|
480
|
+
**location_id** | **String**| The ID of the location to create a modifier list for. |
|
|
481
|
+
**body** | [**V1ModifierList**](V1ModifierList.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
482
|
+
|
|
483
|
+
### Return type
|
|
484
|
+
|
|
485
|
+
[**V1ModifierList**](V1ModifierList.md)
|
|
486
|
+
|
|
487
|
+
### Authorization
|
|
488
|
+
|
|
489
|
+
[oauth2](../README.md#oauth2)
|
|
490
|
+
|
|
491
|
+
### HTTP request headers
|
|
492
|
+
|
|
493
|
+
- **Content-Type**: application/json
|
|
494
|
+
- **Accept**: application/json
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
# **create_modifier_option**
|
|
499
|
+
> V1ModifierOption create_modifier_option(location_id, modifier_list_id, body)
|
|
500
|
+
|
|
501
|
+
Creates an item modifier option and adds it to a modifier list.
|
|
502
|
+
|
|
503
|
+
Creates an item modifier option and adds it to a modifier list.
|
|
504
|
+
|
|
505
|
+
### Example
|
|
506
|
+
```ruby
|
|
507
|
+
# load the gem
|
|
508
|
+
require 'square_connect'
|
|
509
|
+
# setup authorization
|
|
510
|
+
SquareConnect.configure do |config|
|
|
511
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
512
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
516
|
+
|
|
517
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
518
|
+
|
|
519
|
+
modifier_list_id = "modifier_list_id_example" # String | The ID of the modifier list to edit.
|
|
520
|
+
|
|
521
|
+
body = SquareConnect::V1ModifierOption.new # V1ModifierOption | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
begin
|
|
525
|
+
#Creates an item modifier option and adds it to a modifier list.
|
|
526
|
+
result = api_instance.create_modifier_option(location_id, modifier_list_id, body)
|
|
527
|
+
p result
|
|
528
|
+
rescue SquareConnect::ApiError => e
|
|
529
|
+
puts "Exception when calling V1ItemsApi->create_modifier_option: #{e}"
|
|
530
|
+
end
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
### Parameters
|
|
534
|
+
|
|
535
|
+
Name | Type | Description | Notes
|
|
536
|
+
------------- | ------------- | ------------- | -------------
|
|
537
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
538
|
+
**modifier_list_id** | **String**| The ID of the modifier list to edit. |
|
|
539
|
+
**body** | [**V1ModifierOption**](V1ModifierOption.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
540
|
+
|
|
541
|
+
### Return type
|
|
542
|
+
|
|
543
|
+
[**V1ModifierOption**](V1ModifierOption.md)
|
|
544
|
+
|
|
545
|
+
### Authorization
|
|
546
|
+
|
|
547
|
+
[oauth2](../README.md#oauth2)
|
|
548
|
+
|
|
549
|
+
### HTTP request headers
|
|
550
|
+
|
|
551
|
+
- **Content-Type**: application/json
|
|
552
|
+
- **Accept**: application/json
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
# **create_page**
|
|
557
|
+
> V1Page create_page(location_id, body)
|
|
558
|
+
|
|
559
|
+
Creates a Favorites page in Square Register.
|
|
560
|
+
|
|
561
|
+
Creates a Favorites page in Square Register.
|
|
562
|
+
|
|
563
|
+
### Example
|
|
564
|
+
```ruby
|
|
565
|
+
# load the gem
|
|
566
|
+
require 'square_connect'
|
|
567
|
+
# setup authorization
|
|
568
|
+
SquareConnect.configure do |config|
|
|
569
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
570
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
571
|
+
end
|
|
572
|
+
|
|
573
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
574
|
+
|
|
575
|
+
location_id = "location_id_example" # String | The ID of the location to create an item for.
|
|
576
|
+
|
|
577
|
+
body = SquareConnect::V1Page.new # V1Page | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
begin
|
|
581
|
+
#Creates a Favorites page in Square Register.
|
|
582
|
+
result = api_instance.create_page(location_id, body)
|
|
583
|
+
p result
|
|
584
|
+
rescue SquareConnect::ApiError => e
|
|
585
|
+
puts "Exception when calling V1ItemsApi->create_page: #{e}"
|
|
586
|
+
end
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
### Parameters
|
|
590
|
+
|
|
591
|
+
Name | Type | Description | Notes
|
|
592
|
+
------------- | ------------- | ------------- | -------------
|
|
593
|
+
**location_id** | **String**| The ID of the location to create an item for. |
|
|
594
|
+
**body** | [**V1Page**](V1Page.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
595
|
+
|
|
596
|
+
### Return type
|
|
597
|
+
|
|
598
|
+
[**V1Page**](V1Page.md)
|
|
599
|
+
|
|
600
|
+
### Authorization
|
|
601
|
+
|
|
602
|
+
[oauth2](../README.md#oauth2)
|
|
603
|
+
|
|
604
|
+
### HTTP request headers
|
|
605
|
+
|
|
606
|
+
- **Content-Type**: application/json
|
|
607
|
+
- **Accept**: application/json
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
# **create_variation**
|
|
612
|
+
> V1Variation create_variation(location_id, item_id, body)
|
|
613
|
+
|
|
614
|
+
Creates an item variation for an existing item.
|
|
615
|
+
|
|
616
|
+
Creates an item variation for an existing item.
|
|
617
|
+
|
|
618
|
+
### Example
|
|
619
|
+
```ruby
|
|
620
|
+
# load the gem
|
|
621
|
+
require 'square_connect'
|
|
622
|
+
# setup authorization
|
|
623
|
+
SquareConnect.configure do |config|
|
|
624
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
625
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
626
|
+
end
|
|
627
|
+
|
|
628
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
629
|
+
|
|
630
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
631
|
+
|
|
632
|
+
item_id = "item_id_example" # String | The item's ID.
|
|
633
|
+
|
|
634
|
+
body = SquareConnect::V1Variation.new # V1Variation | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
begin
|
|
638
|
+
#Creates an item variation for an existing item.
|
|
639
|
+
result = api_instance.create_variation(location_id, item_id, body)
|
|
640
|
+
p result
|
|
641
|
+
rescue SquareConnect::ApiError => e
|
|
642
|
+
puts "Exception when calling V1ItemsApi->create_variation: #{e}"
|
|
643
|
+
end
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
### Parameters
|
|
647
|
+
|
|
648
|
+
Name | Type | Description | Notes
|
|
649
|
+
------------- | ------------- | ------------- | -------------
|
|
650
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
651
|
+
**item_id** | **String**| The item's ID. |
|
|
652
|
+
**body** | [**V1Variation**](V1Variation.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
653
|
+
|
|
654
|
+
### Return type
|
|
655
|
+
|
|
656
|
+
[**V1Variation**](V1Variation.md)
|
|
657
|
+
|
|
658
|
+
### Authorization
|
|
659
|
+
|
|
660
|
+
[oauth2](../README.md#oauth2)
|
|
661
|
+
|
|
662
|
+
### HTTP request headers
|
|
663
|
+
|
|
664
|
+
- **Content-Type**: application/json
|
|
665
|
+
- **Accept**: application/json
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
# **delete_category**
|
|
670
|
+
> V1Category delete_category(location_id, category_id)
|
|
671
|
+
|
|
672
|
+
Deletes an existing item category.
|
|
673
|
+
|
|
674
|
+
Deletes an existing item category.
|
|
675
|
+
|
|
676
|
+
### Example
|
|
677
|
+
```ruby
|
|
678
|
+
# load the gem
|
|
679
|
+
require 'square_connect'
|
|
680
|
+
# setup authorization
|
|
681
|
+
SquareConnect.configure do |config|
|
|
682
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
683
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
684
|
+
end
|
|
685
|
+
|
|
686
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
687
|
+
|
|
688
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
689
|
+
|
|
690
|
+
category_id = "category_id_example" # String | The ID of the category to delete.
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
begin
|
|
694
|
+
#Deletes an existing item category.
|
|
695
|
+
result = api_instance.delete_category(location_id, category_id)
|
|
696
|
+
p result
|
|
697
|
+
rescue SquareConnect::ApiError => e
|
|
698
|
+
puts "Exception when calling V1ItemsApi->delete_category: #{e}"
|
|
699
|
+
end
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
### Parameters
|
|
703
|
+
|
|
704
|
+
Name | Type | Description | Notes
|
|
705
|
+
------------- | ------------- | ------------- | -------------
|
|
706
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
707
|
+
**category_id** | **String**| The ID of the category to delete. |
|
|
708
|
+
|
|
709
|
+
### Return type
|
|
710
|
+
|
|
711
|
+
[**V1Category**](V1Category.md)
|
|
712
|
+
|
|
713
|
+
### Authorization
|
|
714
|
+
|
|
715
|
+
[oauth2](../README.md#oauth2)
|
|
716
|
+
|
|
717
|
+
### HTTP request headers
|
|
718
|
+
|
|
719
|
+
- **Content-Type**: application/json
|
|
720
|
+
- **Accept**: application/json
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
# **delete_discount**
|
|
725
|
+
> V1Discount delete_discount(location_id, discount_id)
|
|
726
|
+
|
|
727
|
+
Deletes an existing discount.
|
|
728
|
+
|
|
729
|
+
Deletes an existing discount.
|
|
730
|
+
|
|
731
|
+
### Example
|
|
732
|
+
```ruby
|
|
733
|
+
# load the gem
|
|
734
|
+
require 'square_connect'
|
|
735
|
+
# setup authorization
|
|
736
|
+
SquareConnect.configure do |config|
|
|
737
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
738
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
739
|
+
end
|
|
740
|
+
|
|
741
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
742
|
+
|
|
743
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
744
|
+
|
|
745
|
+
discount_id = "discount_id_example" # String | The ID of the discount to delete.
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
begin
|
|
749
|
+
#Deletes an existing discount.
|
|
750
|
+
result = api_instance.delete_discount(location_id, discount_id)
|
|
751
|
+
p result
|
|
752
|
+
rescue SquareConnect::ApiError => e
|
|
753
|
+
puts "Exception when calling V1ItemsApi->delete_discount: #{e}"
|
|
754
|
+
end
|
|
755
|
+
```
|
|
756
|
+
|
|
757
|
+
### Parameters
|
|
758
|
+
|
|
759
|
+
Name | Type | Description | Notes
|
|
760
|
+
------------- | ------------- | ------------- | -------------
|
|
761
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
762
|
+
**discount_id** | **String**| The ID of the discount to delete. |
|
|
763
|
+
|
|
764
|
+
### Return type
|
|
765
|
+
|
|
766
|
+
[**V1Discount**](V1Discount.md)
|
|
767
|
+
|
|
768
|
+
### Authorization
|
|
769
|
+
|
|
770
|
+
[oauth2](../README.md#oauth2)
|
|
771
|
+
|
|
772
|
+
### HTTP request headers
|
|
773
|
+
|
|
774
|
+
- **Content-Type**: application/json
|
|
775
|
+
- **Accept**: application/json
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
# **delete_fee**
|
|
780
|
+
> V1Fee delete_fee(location_id, fee_id)
|
|
781
|
+
|
|
782
|
+
Deletes an existing fee (tax).
|
|
783
|
+
|
|
784
|
+
Deletes an existing fee (tax).
|
|
785
|
+
|
|
786
|
+
### Example
|
|
787
|
+
```ruby
|
|
788
|
+
# load the gem
|
|
789
|
+
require 'square_connect'
|
|
790
|
+
# setup authorization
|
|
791
|
+
SquareConnect.configure do |config|
|
|
792
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
793
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
794
|
+
end
|
|
795
|
+
|
|
796
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
797
|
+
|
|
798
|
+
location_id = "location_id_example" # String | The ID of the fee's associated location.
|
|
799
|
+
|
|
800
|
+
fee_id = "fee_id_example" # String | The ID of the fee to delete.
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
begin
|
|
804
|
+
#Deletes an existing fee (tax).
|
|
805
|
+
result = api_instance.delete_fee(location_id, fee_id)
|
|
806
|
+
p result
|
|
807
|
+
rescue SquareConnect::ApiError => e
|
|
808
|
+
puts "Exception when calling V1ItemsApi->delete_fee: #{e}"
|
|
809
|
+
end
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
### Parameters
|
|
813
|
+
|
|
814
|
+
Name | Type | Description | Notes
|
|
815
|
+
------------- | ------------- | ------------- | -------------
|
|
816
|
+
**location_id** | **String**| The ID of the fee's associated location. |
|
|
817
|
+
**fee_id** | **String**| The ID of the fee to delete. |
|
|
818
|
+
|
|
819
|
+
### Return type
|
|
820
|
+
|
|
821
|
+
[**V1Fee**](V1Fee.md)
|
|
822
|
+
|
|
823
|
+
### Authorization
|
|
824
|
+
|
|
825
|
+
[oauth2](../README.md#oauth2)
|
|
826
|
+
|
|
827
|
+
### HTTP request headers
|
|
828
|
+
|
|
829
|
+
- **Content-Type**: application/json
|
|
830
|
+
- **Accept**: application/json
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
# **delete_item**
|
|
835
|
+
> V1Item delete_item(location_id, item_id)
|
|
836
|
+
|
|
837
|
+
Deletes an existing item and all item variations associated with it.
|
|
838
|
+
|
|
839
|
+
Deletes an existing item and all item variations associated with it.
|
|
840
|
+
|
|
841
|
+
### Example
|
|
842
|
+
```ruby
|
|
843
|
+
# load the gem
|
|
844
|
+
require 'square_connect'
|
|
845
|
+
# setup authorization
|
|
846
|
+
SquareConnect.configure do |config|
|
|
847
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
848
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
849
|
+
end
|
|
850
|
+
|
|
851
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
852
|
+
|
|
853
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
854
|
+
|
|
855
|
+
item_id = "item_id_example" # String | The ID of the item to modify.
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
begin
|
|
859
|
+
#Deletes an existing item and all item variations associated with it.
|
|
860
|
+
result = api_instance.delete_item(location_id, item_id)
|
|
861
|
+
p result
|
|
862
|
+
rescue SquareConnect::ApiError => e
|
|
863
|
+
puts "Exception when calling V1ItemsApi->delete_item: #{e}"
|
|
864
|
+
end
|
|
865
|
+
```
|
|
866
|
+
|
|
867
|
+
### Parameters
|
|
868
|
+
|
|
869
|
+
Name | Type | Description | Notes
|
|
870
|
+
------------- | ------------- | ------------- | -------------
|
|
871
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
872
|
+
**item_id** | **String**| The ID of the item to modify. |
|
|
873
|
+
|
|
874
|
+
### Return type
|
|
875
|
+
|
|
876
|
+
[**V1Item**](V1Item.md)
|
|
877
|
+
|
|
878
|
+
### Authorization
|
|
879
|
+
|
|
880
|
+
[oauth2](../README.md#oauth2)
|
|
881
|
+
|
|
882
|
+
### HTTP request headers
|
|
883
|
+
|
|
884
|
+
- **Content-Type**: application/json
|
|
885
|
+
- **Accept**: application/json
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
# **delete_modifier_list**
|
|
890
|
+
> V1ModifierList delete_modifier_list(location_id, modifier_list_id)
|
|
891
|
+
|
|
892
|
+
Deletes an existing item modifier list and all modifier options associated with it.
|
|
893
|
+
|
|
894
|
+
Deletes an existing item modifier list and all modifier options associated with it.
|
|
895
|
+
|
|
896
|
+
### Example
|
|
897
|
+
```ruby
|
|
898
|
+
# load the gem
|
|
899
|
+
require 'square_connect'
|
|
900
|
+
# setup authorization
|
|
901
|
+
SquareConnect.configure do |config|
|
|
902
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
903
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
904
|
+
end
|
|
905
|
+
|
|
906
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
907
|
+
|
|
908
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
909
|
+
|
|
910
|
+
modifier_list_id = "modifier_list_id_example" # String | The ID of the modifier list to delete.
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
begin
|
|
914
|
+
#Deletes an existing item modifier list and all modifier options associated with it.
|
|
915
|
+
result = api_instance.delete_modifier_list(location_id, modifier_list_id)
|
|
916
|
+
p result
|
|
917
|
+
rescue SquareConnect::ApiError => e
|
|
918
|
+
puts "Exception when calling V1ItemsApi->delete_modifier_list: #{e}"
|
|
919
|
+
end
|
|
920
|
+
```
|
|
921
|
+
|
|
922
|
+
### Parameters
|
|
923
|
+
|
|
924
|
+
Name | Type | Description | Notes
|
|
925
|
+
------------- | ------------- | ------------- | -------------
|
|
926
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
927
|
+
**modifier_list_id** | **String**| The ID of the modifier list to delete. |
|
|
928
|
+
|
|
929
|
+
### Return type
|
|
930
|
+
|
|
931
|
+
[**V1ModifierList**](V1ModifierList.md)
|
|
932
|
+
|
|
933
|
+
### Authorization
|
|
934
|
+
|
|
935
|
+
[oauth2](../README.md#oauth2)
|
|
936
|
+
|
|
937
|
+
### HTTP request headers
|
|
938
|
+
|
|
939
|
+
- **Content-Type**: application/json
|
|
940
|
+
- **Accept**: application/json
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
# **delete_modifier_option**
|
|
945
|
+
> V1ModifierOption delete_modifier_option(location_id, modifier_list_id, modifier_option_id)
|
|
946
|
+
|
|
947
|
+
Deletes an existing item modifier option from a modifier list.
|
|
948
|
+
|
|
949
|
+
Deletes an existing item modifier option from a modifier list.
|
|
950
|
+
|
|
951
|
+
### Example
|
|
952
|
+
```ruby
|
|
953
|
+
# load the gem
|
|
954
|
+
require 'square_connect'
|
|
955
|
+
# setup authorization
|
|
956
|
+
SquareConnect.configure do |config|
|
|
957
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
958
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
959
|
+
end
|
|
960
|
+
|
|
961
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
962
|
+
|
|
963
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
964
|
+
|
|
965
|
+
modifier_list_id = "modifier_list_id_example" # String | The ID of the modifier list to delete.
|
|
966
|
+
|
|
967
|
+
modifier_option_id = "modifier_option_id_example" # String | The ID of the modifier list to edit.
|
|
968
|
+
|
|
969
|
+
|
|
970
|
+
begin
|
|
971
|
+
#Deletes an existing item modifier option from a modifier list.
|
|
972
|
+
result = api_instance.delete_modifier_option(location_id, modifier_list_id, modifier_option_id)
|
|
973
|
+
p result
|
|
974
|
+
rescue SquareConnect::ApiError => e
|
|
975
|
+
puts "Exception when calling V1ItemsApi->delete_modifier_option: #{e}"
|
|
976
|
+
end
|
|
977
|
+
```
|
|
978
|
+
|
|
979
|
+
### Parameters
|
|
980
|
+
|
|
981
|
+
Name | Type | Description | Notes
|
|
982
|
+
------------- | ------------- | ------------- | -------------
|
|
983
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
984
|
+
**modifier_list_id** | **String**| The ID of the modifier list to delete. |
|
|
985
|
+
**modifier_option_id** | **String**| The ID of the modifier list to edit. |
|
|
986
|
+
|
|
987
|
+
### Return type
|
|
988
|
+
|
|
989
|
+
[**V1ModifierOption**](V1ModifierOption.md)
|
|
990
|
+
|
|
991
|
+
### Authorization
|
|
992
|
+
|
|
993
|
+
[oauth2](../README.md#oauth2)
|
|
994
|
+
|
|
995
|
+
### HTTP request headers
|
|
996
|
+
|
|
997
|
+
- **Content-Type**: application/json
|
|
998
|
+
- **Accept**: application/json
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
# **delete_page**
|
|
1003
|
+
> V1Page delete_page(location_id, page_id)
|
|
1004
|
+
|
|
1005
|
+
Deletes an existing Favorites page and all of its cells.
|
|
1006
|
+
|
|
1007
|
+
Deletes an existing Favorites page and all of its cells.
|
|
1008
|
+
|
|
1009
|
+
### Example
|
|
1010
|
+
```ruby
|
|
1011
|
+
# load the gem
|
|
1012
|
+
require 'square_connect'
|
|
1013
|
+
# setup authorization
|
|
1014
|
+
SquareConnect.configure do |config|
|
|
1015
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1016
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1017
|
+
end
|
|
1018
|
+
|
|
1019
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1020
|
+
|
|
1021
|
+
location_id = "location_id_example" # String | The ID of the Favorites page's associated location.
|
|
1022
|
+
|
|
1023
|
+
page_id = "page_id_example" # String | The ID of the page to delete.
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
begin
|
|
1027
|
+
#Deletes an existing Favorites page and all of its cells.
|
|
1028
|
+
result = api_instance.delete_page(location_id, page_id)
|
|
1029
|
+
p result
|
|
1030
|
+
rescue SquareConnect::ApiError => e
|
|
1031
|
+
puts "Exception when calling V1ItemsApi->delete_page: #{e}"
|
|
1032
|
+
end
|
|
1033
|
+
```
|
|
1034
|
+
|
|
1035
|
+
### Parameters
|
|
1036
|
+
|
|
1037
|
+
Name | Type | Description | Notes
|
|
1038
|
+
------------- | ------------- | ------------- | -------------
|
|
1039
|
+
**location_id** | **String**| The ID of the Favorites page's associated location. |
|
|
1040
|
+
**page_id** | **String**| The ID of the page to delete. |
|
|
1041
|
+
|
|
1042
|
+
### Return type
|
|
1043
|
+
|
|
1044
|
+
[**V1Page**](V1Page.md)
|
|
1045
|
+
|
|
1046
|
+
### Authorization
|
|
1047
|
+
|
|
1048
|
+
[oauth2](../README.md#oauth2)
|
|
1049
|
+
|
|
1050
|
+
### HTTP request headers
|
|
1051
|
+
|
|
1052
|
+
- **Content-Type**: application/json
|
|
1053
|
+
- **Accept**: application/json
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
# **delete_page_cell**
|
|
1058
|
+
> V1Page delete_page_cell(location_id, page_id, opts)
|
|
1059
|
+
|
|
1060
|
+
Deletes a cell from a Favorites page in Square Register.
|
|
1061
|
+
|
|
1062
|
+
Deletes a cell from a Favorites page in Square Register.
|
|
1063
|
+
|
|
1064
|
+
### Example
|
|
1065
|
+
```ruby
|
|
1066
|
+
# load the gem
|
|
1067
|
+
require 'square_connect'
|
|
1068
|
+
# setup authorization
|
|
1069
|
+
SquareConnect.configure do |config|
|
|
1070
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1071
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1072
|
+
end
|
|
1073
|
+
|
|
1074
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1075
|
+
|
|
1076
|
+
location_id = "location_id_example" # String | The ID of the Favorites page's associated location.
|
|
1077
|
+
|
|
1078
|
+
page_id = "page_id_example" # String | The ID of the page to delete.
|
|
1079
|
+
|
|
1080
|
+
opts = {
|
|
1081
|
+
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.
|
|
1082
|
+
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.
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
begin
|
|
1086
|
+
#Deletes a cell from a Favorites page in Square Register.
|
|
1087
|
+
result = api_instance.delete_page_cell(location_id, page_id, opts)
|
|
1088
|
+
p result
|
|
1089
|
+
rescue SquareConnect::ApiError => e
|
|
1090
|
+
puts "Exception when calling V1ItemsApi->delete_page_cell: #{e}"
|
|
1091
|
+
end
|
|
1092
|
+
```
|
|
1093
|
+
|
|
1094
|
+
### Parameters
|
|
1095
|
+
|
|
1096
|
+
Name | Type | Description | Notes
|
|
1097
|
+
------------- | ------------- | ------------- | -------------
|
|
1098
|
+
**location_id** | **String**| The ID of the Favorites page's associated location. |
|
|
1099
|
+
**page_id** | **String**| The ID of the page to delete. |
|
|
1100
|
+
**row** | **String**| The row of the cell to clear. Always an integer between 0 and 4, inclusive. Row 0 is the top row. | [optional]
|
|
1101
|
+
**column** | **String**| The column of the cell to clear. Always an integer between 0 and 4, inclusive. Column 0 is the leftmost column. | [optional]
|
|
1102
|
+
|
|
1103
|
+
### Return type
|
|
1104
|
+
|
|
1105
|
+
[**V1Page**](V1Page.md)
|
|
1106
|
+
|
|
1107
|
+
### Authorization
|
|
1108
|
+
|
|
1109
|
+
[oauth2](../README.md#oauth2)
|
|
1110
|
+
|
|
1111
|
+
### HTTP request headers
|
|
1112
|
+
|
|
1113
|
+
- **Content-Type**: application/json
|
|
1114
|
+
- **Accept**: application/json
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
# **delete_variation**
|
|
1119
|
+
> V1Variation delete_variation(location_id, item_id, variation_id)
|
|
1120
|
+
|
|
1121
|
+
Deletes an existing item variation from an item.
|
|
1122
|
+
|
|
1123
|
+
Deletes an existing item variation from an item.
|
|
1124
|
+
|
|
1125
|
+
### Example
|
|
1126
|
+
```ruby
|
|
1127
|
+
# load the gem
|
|
1128
|
+
require 'square_connect'
|
|
1129
|
+
# setup authorization
|
|
1130
|
+
SquareConnect.configure do |config|
|
|
1131
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1132
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1133
|
+
end
|
|
1134
|
+
|
|
1135
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1136
|
+
|
|
1137
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
1138
|
+
|
|
1139
|
+
item_id = "item_id_example" # String | The ID of the item to delete.
|
|
1140
|
+
|
|
1141
|
+
variation_id = "variation_id_example" # String | The ID of the variation to delete.
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
begin
|
|
1145
|
+
#Deletes an existing item variation from an item.
|
|
1146
|
+
result = api_instance.delete_variation(location_id, item_id, variation_id)
|
|
1147
|
+
p result
|
|
1148
|
+
rescue SquareConnect::ApiError => e
|
|
1149
|
+
puts "Exception when calling V1ItemsApi->delete_variation: #{e}"
|
|
1150
|
+
end
|
|
1151
|
+
```
|
|
1152
|
+
|
|
1153
|
+
### Parameters
|
|
1154
|
+
|
|
1155
|
+
Name | Type | Description | Notes
|
|
1156
|
+
------------- | ------------- | ------------- | -------------
|
|
1157
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
1158
|
+
**item_id** | **String**| The ID of the item to delete. |
|
|
1159
|
+
**variation_id** | **String**| The ID of the variation to delete. |
|
|
1160
|
+
|
|
1161
|
+
### Return type
|
|
1162
|
+
|
|
1163
|
+
[**V1Variation**](V1Variation.md)
|
|
1164
|
+
|
|
1165
|
+
### Authorization
|
|
1166
|
+
|
|
1167
|
+
[oauth2](../README.md#oauth2)
|
|
1168
|
+
|
|
1169
|
+
### HTTP request headers
|
|
1170
|
+
|
|
1171
|
+
- **Content-Type**: application/json
|
|
1172
|
+
- **Accept**: application/json
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
# **list_categories**
|
|
1177
|
+
> Array<V1Category> list_categories(location_id)
|
|
1178
|
+
|
|
1179
|
+
Lists all of a location's item categories.
|
|
1180
|
+
|
|
1181
|
+
Lists all of a location's item categories.
|
|
1182
|
+
|
|
1183
|
+
### Example
|
|
1184
|
+
```ruby
|
|
1185
|
+
# load the gem
|
|
1186
|
+
require 'square_connect'
|
|
1187
|
+
# setup authorization
|
|
1188
|
+
SquareConnect.configure do |config|
|
|
1189
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1190
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1191
|
+
end
|
|
1192
|
+
|
|
1193
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1194
|
+
|
|
1195
|
+
location_id = "location_id_example" # String | The ID of the location to list categories for.
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
begin
|
|
1199
|
+
#Lists all of a location's item categories.
|
|
1200
|
+
result = api_instance.list_categories(location_id)
|
|
1201
|
+
p result
|
|
1202
|
+
rescue SquareConnect::ApiError => e
|
|
1203
|
+
puts "Exception when calling V1ItemsApi->list_categories: #{e}"
|
|
1204
|
+
end
|
|
1205
|
+
```
|
|
1206
|
+
|
|
1207
|
+
### Parameters
|
|
1208
|
+
|
|
1209
|
+
Name | Type | Description | Notes
|
|
1210
|
+
------------- | ------------- | ------------- | -------------
|
|
1211
|
+
**location_id** | **String**| The ID of the location to list categories for. |
|
|
1212
|
+
|
|
1213
|
+
### Return type
|
|
1214
|
+
|
|
1215
|
+
[**Array<V1Category>**](V1Category.md)
|
|
1216
|
+
|
|
1217
|
+
### Authorization
|
|
1218
|
+
|
|
1219
|
+
[oauth2](../README.md#oauth2)
|
|
1220
|
+
|
|
1221
|
+
### HTTP request headers
|
|
1222
|
+
|
|
1223
|
+
- **Content-Type**: application/json
|
|
1224
|
+
- **Accept**: application/json
|
|
1225
|
+
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
# **list_discounts**
|
|
1229
|
+
> Array<V1Discount> list_discounts(location_id)
|
|
1230
|
+
|
|
1231
|
+
Lists all of a location's discounts.
|
|
1232
|
+
|
|
1233
|
+
Lists all of a location's discounts.
|
|
1234
|
+
|
|
1235
|
+
### Example
|
|
1236
|
+
```ruby
|
|
1237
|
+
# load the gem
|
|
1238
|
+
require 'square_connect'
|
|
1239
|
+
# setup authorization
|
|
1240
|
+
SquareConnect.configure do |config|
|
|
1241
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1242
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1243
|
+
end
|
|
1244
|
+
|
|
1245
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1246
|
+
|
|
1247
|
+
location_id = "location_id_example" # String | The ID of the location to list categories for.
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
begin
|
|
1251
|
+
#Lists all of a location's discounts.
|
|
1252
|
+
result = api_instance.list_discounts(location_id)
|
|
1253
|
+
p result
|
|
1254
|
+
rescue SquareConnect::ApiError => e
|
|
1255
|
+
puts "Exception when calling V1ItemsApi->list_discounts: #{e}"
|
|
1256
|
+
end
|
|
1257
|
+
```
|
|
1258
|
+
|
|
1259
|
+
### Parameters
|
|
1260
|
+
|
|
1261
|
+
Name | Type | Description | Notes
|
|
1262
|
+
------------- | ------------- | ------------- | -------------
|
|
1263
|
+
**location_id** | **String**| The ID of the location to list categories for. |
|
|
1264
|
+
|
|
1265
|
+
### Return type
|
|
1266
|
+
|
|
1267
|
+
[**Array<V1Discount>**](V1Discount.md)
|
|
1268
|
+
|
|
1269
|
+
### Authorization
|
|
1270
|
+
|
|
1271
|
+
[oauth2](../README.md#oauth2)
|
|
1272
|
+
|
|
1273
|
+
### HTTP request headers
|
|
1274
|
+
|
|
1275
|
+
- **Content-Type**: application/json
|
|
1276
|
+
- **Accept**: application/json
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
# **list_fees**
|
|
1281
|
+
> Array<V1Fee> list_fees(location_id)
|
|
1282
|
+
|
|
1283
|
+
Lists all of a location's fees (taxes).
|
|
1284
|
+
|
|
1285
|
+
Lists all of a location's fees (taxes).
|
|
1286
|
+
|
|
1287
|
+
### Example
|
|
1288
|
+
```ruby
|
|
1289
|
+
# load the gem
|
|
1290
|
+
require 'square_connect'
|
|
1291
|
+
# setup authorization
|
|
1292
|
+
SquareConnect.configure do |config|
|
|
1293
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1294
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1295
|
+
end
|
|
1296
|
+
|
|
1297
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1298
|
+
|
|
1299
|
+
location_id = "location_id_example" # String | The ID of the location to list fees for.
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
begin
|
|
1303
|
+
#Lists all of a location's fees (taxes).
|
|
1304
|
+
result = api_instance.list_fees(location_id)
|
|
1305
|
+
p result
|
|
1306
|
+
rescue SquareConnect::ApiError => e
|
|
1307
|
+
puts "Exception when calling V1ItemsApi->list_fees: #{e}"
|
|
1308
|
+
end
|
|
1309
|
+
```
|
|
1310
|
+
|
|
1311
|
+
### Parameters
|
|
1312
|
+
|
|
1313
|
+
Name | Type | Description | Notes
|
|
1314
|
+
------------- | ------------- | ------------- | -------------
|
|
1315
|
+
**location_id** | **String**| The ID of the location to list fees for. |
|
|
1316
|
+
|
|
1317
|
+
### Return type
|
|
1318
|
+
|
|
1319
|
+
[**Array<V1Fee>**](V1Fee.md)
|
|
1320
|
+
|
|
1321
|
+
### Authorization
|
|
1322
|
+
|
|
1323
|
+
[oauth2](../README.md#oauth2)
|
|
1324
|
+
|
|
1325
|
+
### HTTP request headers
|
|
1326
|
+
|
|
1327
|
+
- **Content-Type**: application/json
|
|
1328
|
+
- **Accept**: application/json
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
|
|
1332
|
+
# **list_inventory**
|
|
1333
|
+
> Array<V1InventoryEntry> list_inventory(location_id, opts)
|
|
1334
|
+
|
|
1335
|
+
Provides inventory information for all of a merchant's inventory-enabled item variations.
|
|
1336
|
+
|
|
1337
|
+
Provides inventory information for all of a merchant's inventory-enabled item variations.
|
|
1338
|
+
|
|
1339
|
+
### Example
|
|
1340
|
+
```ruby
|
|
1341
|
+
# load the gem
|
|
1342
|
+
require 'square_connect'
|
|
1343
|
+
# setup authorization
|
|
1344
|
+
SquareConnect.configure do |config|
|
|
1345
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1346
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1347
|
+
end
|
|
1348
|
+
|
|
1349
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1350
|
+
|
|
1351
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
1352
|
+
|
|
1353
|
+
opts = {
|
|
1354
|
+
limit: 56 # Integer | The maximum number of inventory entries to return in a single response. This value cannot exceed 1000.
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
begin
|
|
1358
|
+
#Provides inventory information for all of a merchant's inventory-enabled item variations.
|
|
1359
|
+
result = api_instance.list_inventory(location_id, opts)
|
|
1360
|
+
p result
|
|
1361
|
+
rescue SquareConnect::ApiError => e
|
|
1362
|
+
puts "Exception when calling V1ItemsApi->list_inventory: #{e}"
|
|
1363
|
+
end
|
|
1364
|
+
```
|
|
1365
|
+
|
|
1366
|
+
### Parameters
|
|
1367
|
+
|
|
1368
|
+
Name | Type | Description | Notes
|
|
1369
|
+
------------- | ------------- | ------------- | -------------
|
|
1370
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
1371
|
+
**limit** | **Integer**| The maximum number of inventory entries to return in a single response. This value cannot exceed 1000. | [optional]
|
|
1372
|
+
|
|
1373
|
+
### Return type
|
|
1374
|
+
|
|
1375
|
+
[**Array<V1InventoryEntry>**](V1InventoryEntry.md)
|
|
1376
|
+
|
|
1377
|
+
### Authorization
|
|
1378
|
+
|
|
1379
|
+
[oauth2](../README.md#oauth2)
|
|
1380
|
+
|
|
1381
|
+
### HTTP request headers
|
|
1382
|
+
|
|
1383
|
+
- **Content-Type**: application/json
|
|
1384
|
+
- **Accept**: application/json
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
# **list_items**
|
|
1389
|
+
> Array<V1Item> list_items(location_id)
|
|
1390
|
+
|
|
1391
|
+
Provides summary information for all of a location's items.
|
|
1392
|
+
|
|
1393
|
+
Provides summary information for all of a location's items.
|
|
1394
|
+
|
|
1395
|
+
### Example
|
|
1396
|
+
```ruby
|
|
1397
|
+
# load the gem
|
|
1398
|
+
require 'square_connect'
|
|
1399
|
+
# setup authorization
|
|
1400
|
+
SquareConnect.configure do |config|
|
|
1401
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1402
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1403
|
+
end
|
|
1404
|
+
|
|
1405
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1406
|
+
|
|
1407
|
+
location_id = "location_id_example" # String | The ID of the location to list items for.
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
begin
|
|
1411
|
+
#Provides summary information for all of a location's items.
|
|
1412
|
+
result = api_instance.list_items(location_id)
|
|
1413
|
+
p result
|
|
1414
|
+
rescue SquareConnect::ApiError => e
|
|
1415
|
+
puts "Exception when calling V1ItemsApi->list_items: #{e}"
|
|
1416
|
+
end
|
|
1417
|
+
```
|
|
1418
|
+
|
|
1419
|
+
### Parameters
|
|
1420
|
+
|
|
1421
|
+
Name | Type | Description | Notes
|
|
1422
|
+
------------- | ------------- | ------------- | -------------
|
|
1423
|
+
**location_id** | **String**| The ID of the location to list items for. |
|
|
1424
|
+
|
|
1425
|
+
### Return type
|
|
1426
|
+
|
|
1427
|
+
[**Array<V1Item>**](V1Item.md)
|
|
1428
|
+
|
|
1429
|
+
### Authorization
|
|
1430
|
+
|
|
1431
|
+
[oauth2](../README.md#oauth2)
|
|
1432
|
+
|
|
1433
|
+
### HTTP request headers
|
|
1434
|
+
|
|
1435
|
+
- **Content-Type**: application/json
|
|
1436
|
+
- **Accept**: application/json
|
|
1437
|
+
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
# **list_modifier_lists**
|
|
1441
|
+
> Array<V1ModifierList> list_modifier_lists(location_id)
|
|
1442
|
+
|
|
1443
|
+
Lists all of a location's modifier lists.
|
|
1444
|
+
|
|
1445
|
+
Lists all of a location's modifier lists.
|
|
1446
|
+
|
|
1447
|
+
### Example
|
|
1448
|
+
```ruby
|
|
1449
|
+
# load the gem
|
|
1450
|
+
require 'square_connect'
|
|
1451
|
+
# setup authorization
|
|
1452
|
+
SquareConnect.configure do |config|
|
|
1453
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1454
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1455
|
+
end
|
|
1456
|
+
|
|
1457
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1458
|
+
|
|
1459
|
+
location_id = "location_id_example" # String | The ID of the location to list modifier lists for.
|
|
1460
|
+
|
|
1461
|
+
|
|
1462
|
+
begin
|
|
1463
|
+
#Lists all of a location's modifier lists.
|
|
1464
|
+
result = api_instance.list_modifier_lists(location_id)
|
|
1465
|
+
p result
|
|
1466
|
+
rescue SquareConnect::ApiError => e
|
|
1467
|
+
puts "Exception when calling V1ItemsApi->list_modifier_lists: #{e}"
|
|
1468
|
+
end
|
|
1469
|
+
```
|
|
1470
|
+
|
|
1471
|
+
### Parameters
|
|
1472
|
+
|
|
1473
|
+
Name | Type | Description | Notes
|
|
1474
|
+
------------- | ------------- | ------------- | -------------
|
|
1475
|
+
**location_id** | **String**| The ID of the location to list modifier lists for. |
|
|
1476
|
+
|
|
1477
|
+
### Return type
|
|
1478
|
+
|
|
1479
|
+
[**Array<V1ModifierList>**](V1ModifierList.md)
|
|
1480
|
+
|
|
1481
|
+
### Authorization
|
|
1482
|
+
|
|
1483
|
+
[oauth2](../README.md#oauth2)
|
|
1484
|
+
|
|
1485
|
+
### HTTP request headers
|
|
1486
|
+
|
|
1487
|
+
- **Content-Type**: application/json
|
|
1488
|
+
- **Accept**: application/json
|
|
1489
|
+
|
|
1490
|
+
|
|
1491
|
+
|
|
1492
|
+
# **list_pages**
|
|
1493
|
+
> Array<V1Page> list_pages(location_id)
|
|
1494
|
+
|
|
1495
|
+
Lists all of a location's Favorites pages in Square Register.
|
|
1496
|
+
|
|
1497
|
+
Lists all of a location's Favorites pages in Square Register.
|
|
1498
|
+
|
|
1499
|
+
### Example
|
|
1500
|
+
```ruby
|
|
1501
|
+
# load the gem
|
|
1502
|
+
require 'square_connect'
|
|
1503
|
+
# setup authorization
|
|
1504
|
+
SquareConnect.configure do |config|
|
|
1505
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1506
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1507
|
+
end
|
|
1508
|
+
|
|
1509
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1510
|
+
|
|
1511
|
+
location_id = "location_id_example" # String | The ID of the location to list Favorites pages for.
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
begin
|
|
1515
|
+
#Lists all of a location's Favorites pages in Square Register.
|
|
1516
|
+
result = api_instance.list_pages(location_id)
|
|
1517
|
+
p result
|
|
1518
|
+
rescue SquareConnect::ApiError => e
|
|
1519
|
+
puts "Exception when calling V1ItemsApi->list_pages: #{e}"
|
|
1520
|
+
end
|
|
1521
|
+
```
|
|
1522
|
+
|
|
1523
|
+
### Parameters
|
|
1524
|
+
|
|
1525
|
+
Name | Type | Description | Notes
|
|
1526
|
+
------------- | ------------- | ------------- | -------------
|
|
1527
|
+
**location_id** | **String**| The ID of the location to list Favorites pages for. |
|
|
1528
|
+
|
|
1529
|
+
### Return type
|
|
1530
|
+
|
|
1531
|
+
[**Array<V1Page>**](V1Page.md)
|
|
1532
|
+
|
|
1533
|
+
### Authorization
|
|
1534
|
+
|
|
1535
|
+
[oauth2](../README.md#oauth2)
|
|
1536
|
+
|
|
1537
|
+
### HTTP request headers
|
|
1538
|
+
|
|
1539
|
+
- **Content-Type**: application/json
|
|
1540
|
+
- **Accept**: application/json
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
# **remove_fee**
|
|
1545
|
+
> V1Item remove_fee(location_id, item_id, fee_id)
|
|
1546
|
+
|
|
1547
|
+
Removes a fee assocation from an item, meaning the fee is no longer automatically applied to the item in Square Register.
|
|
1548
|
+
|
|
1549
|
+
Removes a fee assocation from an item, meaning the fee is no longer automatically applied to the item in Square Register.
|
|
1550
|
+
|
|
1551
|
+
### Example
|
|
1552
|
+
```ruby
|
|
1553
|
+
# load the gem
|
|
1554
|
+
require 'square_connect'
|
|
1555
|
+
# setup authorization
|
|
1556
|
+
SquareConnect.configure do |config|
|
|
1557
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1558
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1559
|
+
end
|
|
1560
|
+
|
|
1561
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1562
|
+
|
|
1563
|
+
location_id = "location_id_example" # String | The ID of the fee's associated location.
|
|
1564
|
+
|
|
1565
|
+
item_id = "item_id_example" # String | The ID of the item to add the fee to.
|
|
1566
|
+
|
|
1567
|
+
fee_id = "fee_id_example" # String | The ID of the fee to apply.
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
begin
|
|
1571
|
+
#Removes a fee assocation from an item, meaning the fee is no longer automatically applied to the item in Square Register.
|
|
1572
|
+
result = api_instance.remove_fee(location_id, item_id, fee_id)
|
|
1573
|
+
p result
|
|
1574
|
+
rescue SquareConnect::ApiError => e
|
|
1575
|
+
puts "Exception when calling V1ItemsApi->remove_fee: #{e}"
|
|
1576
|
+
end
|
|
1577
|
+
```
|
|
1578
|
+
|
|
1579
|
+
### Parameters
|
|
1580
|
+
|
|
1581
|
+
Name | Type | Description | Notes
|
|
1582
|
+
------------- | ------------- | ------------- | -------------
|
|
1583
|
+
**location_id** | **String**| The ID of the fee's associated location. |
|
|
1584
|
+
**item_id** | **String**| The ID of the item to add the fee to. |
|
|
1585
|
+
**fee_id** | **String**| The ID of the fee to apply. |
|
|
1586
|
+
|
|
1587
|
+
### Return type
|
|
1588
|
+
|
|
1589
|
+
[**V1Item**](V1Item.md)
|
|
1590
|
+
|
|
1591
|
+
### Authorization
|
|
1592
|
+
|
|
1593
|
+
[oauth2](../README.md#oauth2)
|
|
1594
|
+
|
|
1595
|
+
### HTTP request headers
|
|
1596
|
+
|
|
1597
|
+
- **Content-Type**: application/json
|
|
1598
|
+
- **Accept**: application/json
|
|
1599
|
+
|
|
1600
|
+
|
|
1601
|
+
|
|
1602
|
+
# **remove_modifier_list**
|
|
1603
|
+
> V1Item remove_modifier_list(location_id, modifier_list_id, item_id)
|
|
1604
|
+
|
|
1605
|
+
Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item.
|
|
1606
|
+
|
|
1607
|
+
Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item.
|
|
1608
|
+
|
|
1609
|
+
### Example
|
|
1610
|
+
```ruby
|
|
1611
|
+
# load the gem
|
|
1612
|
+
require 'square_connect'
|
|
1613
|
+
# setup authorization
|
|
1614
|
+
SquareConnect.configure do |config|
|
|
1615
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1616
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1617
|
+
end
|
|
1618
|
+
|
|
1619
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1620
|
+
|
|
1621
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
1622
|
+
|
|
1623
|
+
modifier_list_id = "modifier_list_id_example" # String | The ID of the modifier list to remove.
|
|
1624
|
+
|
|
1625
|
+
item_id = "item_id_example" # String | The ID of the item to remove the modifier list from.
|
|
1626
|
+
|
|
1627
|
+
|
|
1628
|
+
begin
|
|
1629
|
+
#Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item.
|
|
1630
|
+
result = api_instance.remove_modifier_list(location_id, modifier_list_id, item_id)
|
|
1631
|
+
p result
|
|
1632
|
+
rescue SquareConnect::ApiError => e
|
|
1633
|
+
puts "Exception when calling V1ItemsApi->remove_modifier_list: #{e}"
|
|
1634
|
+
end
|
|
1635
|
+
```
|
|
1636
|
+
|
|
1637
|
+
### Parameters
|
|
1638
|
+
|
|
1639
|
+
Name | Type | Description | Notes
|
|
1640
|
+
------------- | ------------- | ------------- | -------------
|
|
1641
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
1642
|
+
**modifier_list_id** | **String**| The ID of the modifier list to remove. |
|
|
1643
|
+
**item_id** | **String**| The ID of the item to remove the modifier list from. |
|
|
1644
|
+
|
|
1645
|
+
### Return type
|
|
1646
|
+
|
|
1647
|
+
[**V1Item**](V1Item.md)
|
|
1648
|
+
|
|
1649
|
+
### Authorization
|
|
1650
|
+
|
|
1651
|
+
[oauth2](../README.md#oauth2)
|
|
1652
|
+
|
|
1653
|
+
### HTTP request headers
|
|
1654
|
+
|
|
1655
|
+
- **Content-Type**: application/json
|
|
1656
|
+
- **Accept**: application/json
|
|
1657
|
+
|
|
1658
|
+
|
|
1659
|
+
|
|
1660
|
+
# **retrieve_item**
|
|
1661
|
+
> V1Item retrieve_item(location_id, item_id)
|
|
1662
|
+
|
|
1663
|
+
Provides the details for a single item, including associated modifier lists and fees.
|
|
1664
|
+
|
|
1665
|
+
Provides the details for a single item, including associated modifier lists and fees.
|
|
1666
|
+
|
|
1667
|
+
### Example
|
|
1668
|
+
```ruby
|
|
1669
|
+
# load the gem
|
|
1670
|
+
require 'square_connect'
|
|
1671
|
+
# setup authorization
|
|
1672
|
+
SquareConnect.configure do |config|
|
|
1673
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1674
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1675
|
+
end
|
|
1676
|
+
|
|
1677
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1678
|
+
|
|
1679
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
1680
|
+
|
|
1681
|
+
item_id = "item_id_example" # String | The item's ID.
|
|
1682
|
+
|
|
1683
|
+
|
|
1684
|
+
begin
|
|
1685
|
+
#Provides the details for a single item, including associated modifier lists and fees.
|
|
1686
|
+
result = api_instance.retrieve_item(location_id, item_id)
|
|
1687
|
+
p result
|
|
1688
|
+
rescue SquareConnect::ApiError => e
|
|
1689
|
+
puts "Exception when calling V1ItemsApi->retrieve_item: #{e}"
|
|
1690
|
+
end
|
|
1691
|
+
```
|
|
1692
|
+
|
|
1693
|
+
### Parameters
|
|
1694
|
+
|
|
1695
|
+
Name | Type | Description | Notes
|
|
1696
|
+
------------- | ------------- | ------------- | -------------
|
|
1697
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
1698
|
+
**item_id** | **String**| The item's ID. |
|
|
1699
|
+
|
|
1700
|
+
### Return type
|
|
1701
|
+
|
|
1702
|
+
[**V1Item**](V1Item.md)
|
|
1703
|
+
|
|
1704
|
+
### Authorization
|
|
1705
|
+
|
|
1706
|
+
[oauth2](../README.md#oauth2)
|
|
1707
|
+
|
|
1708
|
+
### HTTP request headers
|
|
1709
|
+
|
|
1710
|
+
- **Content-Type**: application/json
|
|
1711
|
+
- **Accept**: application/json
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
|
|
1715
|
+
# **retrieve_modifier_list**
|
|
1716
|
+
> V1ModifierList retrieve_modifier_list(location_id, modifier_list_id)
|
|
1717
|
+
|
|
1718
|
+
Provides the details for a single modifier list.
|
|
1719
|
+
|
|
1720
|
+
Provides the details for a single modifier list.
|
|
1721
|
+
|
|
1722
|
+
### Example
|
|
1723
|
+
```ruby
|
|
1724
|
+
# load the gem
|
|
1725
|
+
require 'square_connect'
|
|
1726
|
+
# setup authorization
|
|
1727
|
+
SquareConnect.configure do |config|
|
|
1728
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1729
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1730
|
+
end
|
|
1731
|
+
|
|
1732
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1733
|
+
|
|
1734
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
1735
|
+
|
|
1736
|
+
modifier_list_id = "modifier_list_id_example" # String | The modifier list's ID.
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
begin
|
|
1740
|
+
#Provides the details for a single modifier list.
|
|
1741
|
+
result = api_instance.retrieve_modifier_list(location_id, modifier_list_id)
|
|
1742
|
+
p result
|
|
1743
|
+
rescue SquareConnect::ApiError => e
|
|
1744
|
+
puts "Exception when calling V1ItemsApi->retrieve_modifier_list: #{e}"
|
|
1745
|
+
end
|
|
1746
|
+
```
|
|
1747
|
+
|
|
1748
|
+
### Parameters
|
|
1749
|
+
|
|
1750
|
+
Name | Type | Description | Notes
|
|
1751
|
+
------------- | ------------- | ------------- | -------------
|
|
1752
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
1753
|
+
**modifier_list_id** | **String**| The modifier list's ID. |
|
|
1754
|
+
|
|
1755
|
+
### Return type
|
|
1756
|
+
|
|
1757
|
+
[**V1ModifierList**](V1ModifierList.md)
|
|
1758
|
+
|
|
1759
|
+
### Authorization
|
|
1760
|
+
|
|
1761
|
+
[oauth2](../README.md#oauth2)
|
|
1762
|
+
|
|
1763
|
+
### HTTP request headers
|
|
1764
|
+
|
|
1765
|
+
- **Content-Type**: application/json
|
|
1766
|
+
- **Accept**: application/json
|
|
1767
|
+
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
# **update_category**
|
|
1771
|
+
> V1Category update_category(location_id, category_id, body)
|
|
1772
|
+
|
|
1773
|
+
Modifies the details of an existing item category.
|
|
1774
|
+
|
|
1775
|
+
Modifies the details of an existing item category.
|
|
1776
|
+
|
|
1777
|
+
### Example
|
|
1778
|
+
```ruby
|
|
1779
|
+
# load the gem
|
|
1780
|
+
require 'square_connect'
|
|
1781
|
+
# setup authorization
|
|
1782
|
+
SquareConnect.configure do |config|
|
|
1783
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1784
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1785
|
+
end
|
|
1786
|
+
|
|
1787
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1788
|
+
|
|
1789
|
+
location_id = "location_id_example" # String | The ID of the category's associated location.
|
|
1790
|
+
|
|
1791
|
+
category_id = "category_id_example" # String | The ID of the category to edit.
|
|
1792
|
+
|
|
1793
|
+
body = SquareConnect::V1Category.new # V1Category | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
1794
|
+
|
|
1795
|
+
|
|
1796
|
+
begin
|
|
1797
|
+
#Modifies the details of an existing item category.
|
|
1798
|
+
result = api_instance.update_category(location_id, category_id, body)
|
|
1799
|
+
p result
|
|
1800
|
+
rescue SquareConnect::ApiError => e
|
|
1801
|
+
puts "Exception when calling V1ItemsApi->update_category: #{e}"
|
|
1802
|
+
end
|
|
1803
|
+
```
|
|
1804
|
+
|
|
1805
|
+
### Parameters
|
|
1806
|
+
|
|
1807
|
+
Name | Type | Description | Notes
|
|
1808
|
+
------------- | ------------- | ------------- | -------------
|
|
1809
|
+
**location_id** | **String**| The ID of the category's associated location. |
|
|
1810
|
+
**category_id** | **String**| The ID of the category to edit. |
|
|
1811
|
+
**body** | [**V1Category**](V1Category.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
1812
|
+
|
|
1813
|
+
### Return type
|
|
1814
|
+
|
|
1815
|
+
[**V1Category**](V1Category.md)
|
|
1816
|
+
|
|
1817
|
+
### Authorization
|
|
1818
|
+
|
|
1819
|
+
[oauth2](../README.md#oauth2)
|
|
1820
|
+
|
|
1821
|
+
### HTTP request headers
|
|
1822
|
+
|
|
1823
|
+
- **Content-Type**: application/json
|
|
1824
|
+
- **Accept**: application/json
|
|
1825
|
+
|
|
1826
|
+
|
|
1827
|
+
|
|
1828
|
+
# **update_discount**
|
|
1829
|
+
> V1Discount update_discount(location_id, discount_id, body)
|
|
1830
|
+
|
|
1831
|
+
Modifies the details of an existing discount.
|
|
1832
|
+
|
|
1833
|
+
Modifies the details of an existing discount.
|
|
1834
|
+
|
|
1835
|
+
### Example
|
|
1836
|
+
```ruby
|
|
1837
|
+
# load the gem
|
|
1838
|
+
require 'square_connect'
|
|
1839
|
+
# setup authorization
|
|
1840
|
+
SquareConnect.configure do |config|
|
|
1841
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1842
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1843
|
+
end
|
|
1844
|
+
|
|
1845
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1846
|
+
|
|
1847
|
+
location_id = "location_id_example" # String | The ID of the category's associated location.
|
|
1848
|
+
|
|
1849
|
+
discount_id = "discount_id_example" # String | The ID of the discount to edit.
|
|
1850
|
+
|
|
1851
|
+
body = SquareConnect::V1Discount.new # V1Discount | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
begin
|
|
1855
|
+
#Modifies the details of an existing discount.
|
|
1856
|
+
result = api_instance.update_discount(location_id, discount_id, body)
|
|
1857
|
+
p result
|
|
1858
|
+
rescue SquareConnect::ApiError => e
|
|
1859
|
+
puts "Exception when calling V1ItemsApi->update_discount: #{e}"
|
|
1860
|
+
end
|
|
1861
|
+
```
|
|
1862
|
+
|
|
1863
|
+
### Parameters
|
|
1864
|
+
|
|
1865
|
+
Name | Type | Description | Notes
|
|
1866
|
+
------------- | ------------- | ------------- | -------------
|
|
1867
|
+
**location_id** | **String**| The ID of the category's associated location. |
|
|
1868
|
+
**discount_id** | **String**| The ID of the discount to edit. |
|
|
1869
|
+
**body** | [**V1Discount**](V1Discount.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
1870
|
+
|
|
1871
|
+
### Return type
|
|
1872
|
+
|
|
1873
|
+
[**V1Discount**](V1Discount.md)
|
|
1874
|
+
|
|
1875
|
+
### Authorization
|
|
1876
|
+
|
|
1877
|
+
[oauth2](../README.md#oauth2)
|
|
1878
|
+
|
|
1879
|
+
### HTTP request headers
|
|
1880
|
+
|
|
1881
|
+
- **Content-Type**: application/json
|
|
1882
|
+
- **Accept**: application/json
|
|
1883
|
+
|
|
1884
|
+
|
|
1885
|
+
|
|
1886
|
+
# **update_fee**
|
|
1887
|
+
> V1Fee update_fee(location_id, fee_id, body)
|
|
1888
|
+
|
|
1889
|
+
Modifies the details of an existing fee (tax).
|
|
1890
|
+
|
|
1891
|
+
Modifies the details of an existing fee (tax).
|
|
1892
|
+
|
|
1893
|
+
### Example
|
|
1894
|
+
```ruby
|
|
1895
|
+
# load the gem
|
|
1896
|
+
require 'square_connect'
|
|
1897
|
+
# setup authorization
|
|
1898
|
+
SquareConnect.configure do |config|
|
|
1899
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1900
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1901
|
+
end
|
|
1902
|
+
|
|
1903
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1904
|
+
|
|
1905
|
+
location_id = "location_id_example" # String | The ID of the fee's associated location.
|
|
1906
|
+
|
|
1907
|
+
fee_id = "fee_id_example" # String | The ID of the fee to edit.
|
|
1908
|
+
|
|
1909
|
+
body = SquareConnect::V1Fee.new # V1Fee | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
1910
|
+
|
|
1911
|
+
|
|
1912
|
+
begin
|
|
1913
|
+
#Modifies the details of an existing fee (tax).
|
|
1914
|
+
result = api_instance.update_fee(location_id, fee_id, body)
|
|
1915
|
+
p result
|
|
1916
|
+
rescue SquareConnect::ApiError => e
|
|
1917
|
+
puts "Exception when calling V1ItemsApi->update_fee: #{e}"
|
|
1918
|
+
end
|
|
1919
|
+
```
|
|
1920
|
+
|
|
1921
|
+
### Parameters
|
|
1922
|
+
|
|
1923
|
+
Name | Type | Description | Notes
|
|
1924
|
+
------------- | ------------- | ------------- | -------------
|
|
1925
|
+
**location_id** | **String**| The ID of the fee's associated location. |
|
|
1926
|
+
**fee_id** | **String**| The ID of the fee to edit. |
|
|
1927
|
+
**body** | [**V1Fee**](V1Fee.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
1928
|
+
|
|
1929
|
+
### Return type
|
|
1930
|
+
|
|
1931
|
+
[**V1Fee**](V1Fee.md)
|
|
1932
|
+
|
|
1933
|
+
### Authorization
|
|
1934
|
+
|
|
1935
|
+
[oauth2](../README.md#oauth2)
|
|
1936
|
+
|
|
1937
|
+
### HTTP request headers
|
|
1938
|
+
|
|
1939
|
+
- **Content-Type**: application/json
|
|
1940
|
+
- **Accept**: application/json
|
|
1941
|
+
|
|
1942
|
+
|
|
1943
|
+
|
|
1944
|
+
# **update_item**
|
|
1945
|
+
> V1Item update_item(location_id, item_id, body)
|
|
1946
|
+
|
|
1947
|
+
Modifies the core details of an existing item.
|
|
1948
|
+
|
|
1949
|
+
Modifies the core details of an existing item.
|
|
1950
|
+
|
|
1951
|
+
### Example
|
|
1952
|
+
```ruby
|
|
1953
|
+
# load the gem
|
|
1954
|
+
require 'square_connect'
|
|
1955
|
+
# setup authorization
|
|
1956
|
+
SquareConnect.configure do |config|
|
|
1957
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
1958
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
1959
|
+
end
|
|
1960
|
+
|
|
1961
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
1962
|
+
|
|
1963
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
1964
|
+
|
|
1965
|
+
item_id = "item_id_example" # String | The ID of the item to modify.
|
|
1966
|
+
|
|
1967
|
+
body = SquareConnect::V1Item.new # V1Item | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
1968
|
+
|
|
1969
|
+
|
|
1970
|
+
begin
|
|
1971
|
+
#Modifies the core details of an existing item.
|
|
1972
|
+
result = api_instance.update_item(location_id, item_id, body)
|
|
1973
|
+
p result
|
|
1974
|
+
rescue SquareConnect::ApiError => e
|
|
1975
|
+
puts "Exception when calling V1ItemsApi->update_item: #{e}"
|
|
1976
|
+
end
|
|
1977
|
+
```
|
|
1978
|
+
|
|
1979
|
+
### Parameters
|
|
1980
|
+
|
|
1981
|
+
Name | Type | Description | Notes
|
|
1982
|
+
------------- | ------------- | ------------- | -------------
|
|
1983
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
1984
|
+
**item_id** | **String**| The ID of the item to modify. |
|
|
1985
|
+
**body** | [**V1Item**](V1Item.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
1986
|
+
|
|
1987
|
+
### Return type
|
|
1988
|
+
|
|
1989
|
+
[**V1Item**](V1Item.md)
|
|
1990
|
+
|
|
1991
|
+
### Authorization
|
|
1992
|
+
|
|
1993
|
+
[oauth2](../README.md#oauth2)
|
|
1994
|
+
|
|
1995
|
+
### HTTP request headers
|
|
1996
|
+
|
|
1997
|
+
- **Content-Type**: application/json
|
|
1998
|
+
- **Accept**: application/json
|
|
1999
|
+
|
|
2000
|
+
|
|
2001
|
+
|
|
2002
|
+
# **update_modifier_list**
|
|
2003
|
+
> V1ModifierList update_modifier_list(location_id, modifier_list_id, body)
|
|
2004
|
+
|
|
2005
|
+
Modifies the details of an existing item modifier list.
|
|
2006
|
+
|
|
2007
|
+
Modifies the details of an existing item modifier list.
|
|
2008
|
+
|
|
2009
|
+
### Example
|
|
2010
|
+
```ruby
|
|
2011
|
+
# load the gem
|
|
2012
|
+
require 'square_connect'
|
|
2013
|
+
# setup authorization
|
|
2014
|
+
SquareConnect.configure do |config|
|
|
2015
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
2016
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
2017
|
+
end
|
|
2018
|
+
|
|
2019
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
2020
|
+
|
|
2021
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
2022
|
+
|
|
2023
|
+
modifier_list_id = "modifier_list_id_example" # String | The ID of the modifier list to edit.
|
|
2024
|
+
|
|
2025
|
+
body = SquareConnect::V1UpdateModifierListRequest.new # V1UpdateModifierListRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
2026
|
+
|
|
2027
|
+
|
|
2028
|
+
begin
|
|
2029
|
+
#Modifies the details of an existing item modifier list.
|
|
2030
|
+
result = api_instance.update_modifier_list(location_id, modifier_list_id, body)
|
|
2031
|
+
p result
|
|
2032
|
+
rescue SquareConnect::ApiError => e
|
|
2033
|
+
puts "Exception when calling V1ItemsApi->update_modifier_list: #{e}"
|
|
2034
|
+
end
|
|
2035
|
+
```
|
|
2036
|
+
|
|
2037
|
+
### Parameters
|
|
2038
|
+
|
|
2039
|
+
Name | Type | Description | Notes
|
|
2040
|
+
------------- | ------------- | ------------- | -------------
|
|
2041
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
2042
|
+
**modifier_list_id** | **String**| The ID of the modifier list to edit. |
|
|
2043
|
+
**body** | [**V1UpdateModifierListRequest**](V1UpdateModifierListRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
2044
|
+
|
|
2045
|
+
### Return type
|
|
2046
|
+
|
|
2047
|
+
[**V1ModifierList**](V1ModifierList.md)
|
|
2048
|
+
|
|
2049
|
+
### Authorization
|
|
2050
|
+
|
|
2051
|
+
[oauth2](../README.md#oauth2)
|
|
2052
|
+
|
|
2053
|
+
### HTTP request headers
|
|
2054
|
+
|
|
2055
|
+
- **Content-Type**: application/json
|
|
2056
|
+
- **Accept**: application/json
|
|
2057
|
+
|
|
2058
|
+
|
|
2059
|
+
|
|
2060
|
+
# **update_modifier_option**
|
|
2061
|
+
> V1ModifierOption update_modifier_option(location_id, modifier_list_id, modifier_option_id, body)
|
|
2062
|
+
|
|
2063
|
+
Modifies the details of an existing item modifier option.
|
|
2064
|
+
|
|
2065
|
+
Modifies the details of an existing item modifier option.
|
|
2066
|
+
|
|
2067
|
+
### Example
|
|
2068
|
+
```ruby
|
|
2069
|
+
# load the gem
|
|
2070
|
+
require 'square_connect'
|
|
2071
|
+
# setup authorization
|
|
2072
|
+
SquareConnect.configure do |config|
|
|
2073
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
2074
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
2075
|
+
end
|
|
2076
|
+
|
|
2077
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
2078
|
+
|
|
2079
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
2080
|
+
|
|
2081
|
+
modifier_list_id = "modifier_list_id_example" # String | The ID of the modifier list to edit.
|
|
2082
|
+
|
|
2083
|
+
modifier_option_id = "modifier_option_id_example" # String | The ID of the modifier list to edit.
|
|
2084
|
+
|
|
2085
|
+
body = SquareConnect::V1ModifierOption.new # V1ModifierOption | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
2086
|
+
|
|
2087
|
+
|
|
2088
|
+
begin
|
|
2089
|
+
#Modifies the details of an existing item modifier option.
|
|
2090
|
+
result = api_instance.update_modifier_option(location_id, modifier_list_id, modifier_option_id, body)
|
|
2091
|
+
p result
|
|
2092
|
+
rescue SquareConnect::ApiError => e
|
|
2093
|
+
puts "Exception when calling V1ItemsApi->update_modifier_option: #{e}"
|
|
2094
|
+
end
|
|
2095
|
+
```
|
|
2096
|
+
|
|
2097
|
+
### Parameters
|
|
2098
|
+
|
|
2099
|
+
Name | Type | Description | Notes
|
|
2100
|
+
------------- | ------------- | ------------- | -------------
|
|
2101
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
2102
|
+
**modifier_list_id** | **String**| The ID of the modifier list to edit. |
|
|
2103
|
+
**modifier_option_id** | **String**| The ID of the modifier list to edit. |
|
|
2104
|
+
**body** | [**V1ModifierOption**](V1ModifierOption.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
2105
|
+
|
|
2106
|
+
### Return type
|
|
2107
|
+
|
|
2108
|
+
[**V1ModifierOption**](V1ModifierOption.md)
|
|
2109
|
+
|
|
2110
|
+
### Authorization
|
|
2111
|
+
|
|
2112
|
+
[oauth2](../README.md#oauth2)
|
|
2113
|
+
|
|
2114
|
+
### HTTP request headers
|
|
2115
|
+
|
|
2116
|
+
- **Content-Type**: application/json
|
|
2117
|
+
- **Accept**: application/json
|
|
2118
|
+
|
|
2119
|
+
|
|
2120
|
+
|
|
2121
|
+
# **update_page**
|
|
2122
|
+
> V1Page update_page(location_id, page_id, body)
|
|
2123
|
+
|
|
2124
|
+
Modifies the details of a Favorites page in Square Register.
|
|
2125
|
+
|
|
2126
|
+
Modifies the details of a Favorites page in Square Register.
|
|
2127
|
+
|
|
2128
|
+
### Example
|
|
2129
|
+
```ruby
|
|
2130
|
+
# load the gem
|
|
2131
|
+
require 'square_connect'
|
|
2132
|
+
# setup authorization
|
|
2133
|
+
SquareConnect.configure do |config|
|
|
2134
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
2135
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
2136
|
+
end
|
|
2137
|
+
|
|
2138
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
2139
|
+
|
|
2140
|
+
location_id = "location_id_example" # String | The ID of the Favorites page's associated location
|
|
2141
|
+
|
|
2142
|
+
page_id = "page_id_example" # String | The ID of the page to modify.
|
|
2143
|
+
|
|
2144
|
+
body = SquareConnect::V1Page.new # V1Page | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
2145
|
+
|
|
2146
|
+
|
|
2147
|
+
begin
|
|
2148
|
+
#Modifies the details of a Favorites page in Square Register.
|
|
2149
|
+
result = api_instance.update_page(location_id, page_id, body)
|
|
2150
|
+
p result
|
|
2151
|
+
rescue SquareConnect::ApiError => e
|
|
2152
|
+
puts "Exception when calling V1ItemsApi->update_page: #{e}"
|
|
2153
|
+
end
|
|
2154
|
+
```
|
|
2155
|
+
|
|
2156
|
+
### Parameters
|
|
2157
|
+
|
|
2158
|
+
Name | Type | Description | Notes
|
|
2159
|
+
------------- | ------------- | ------------- | -------------
|
|
2160
|
+
**location_id** | **String**| The ID of the Favorites page's associated location |
|
|
2161
|
+
**page_id** | **String**| The ID of the page to modify. |
|
|
2162
|
+
**body** | [**V1Page**](V1Page.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
2163
|
+
|
|
2164
|
+
### Return type
|
|
2165
|
+
|
|
2166
|
+
[**V1Page**](V1Page.md)
|
|
2167
|
+
|
|
2168
|
+
### Authorization
|
|
2169
|
+
|
|
2170
|
+
[oauth2](../README.md#oauth2)
|
|
2171
|
+
|
|
2172
|
+
### HTTP request headers
|
|
2173
|
+
|
|
2174
|
+
- **Content-Type**: application/json
|
|
2175
|
+
- **Accept**: application/json
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
|
|
2179
|
+
# **update_page_cell**
|
|
2180
|
+
> V1Page update_page_cell(location_id, page_id, body)
|
|
2181
|
+
|
|
2182
|
+
Modifies a cell of a Favorites page in Square Register.
|
|
2183
|
+
|
|
2184
|
+
Modifies a cell of a Favorites page in Square Register.
|
|
2185
|
+
|
|
2186
|
+
### Example
|
|
2187
|
+
```ruby
|
|
2188
|
+
# load the gem
|
|
2189
|
+
require 'square_connect'
|
|
2190
|
+
# setup authorization
|
|
2191
|
+
SquareConnect.configure do |config|
|
|
2192
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
2193
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
2194
|
+
end
|
|
2195
|
+
|
|
2196
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
2197
|
+
|
|
2198
|
+
location_id = "location_id_example" # String | The ID of the Favorites page's associated location.
|
|
2199
|
+
|
|
2200
|
+
page_id = "page_id_example" # String | The ID of the page the cell belongs to.
|
|
2201
|
+
|
|
2202
|
+
body = SquareConnect::V1PageCell.new # V1PageCell | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
2203
|
+
|
|
2204
|
+
|
|
2205
|
+
begin
|
|
2206
|
+
#Modifies a cell of a Favorites page in Square Register.
|
|
2207
|
+
result = api_instance.update_page_cell(location_id, page_id, body)
|
|
2208
|
+
p result
|
|
2209
|
+
rescue SquareConnect::ApiError => e
|
|
2210
|
+
puts "Exception when calling V1ItemsApi->update_page_cell: #{e}"
|
|
2211
|
+
end
|
|
2212
|
+
```
|
|
2213
|
+
|
|
2214
|
+
### Parameters
|
|
2215
|
+
|
|
2216
|
+
Name | Type | Description | Notes
|
|
2217
|
+
------------- | ------------- | ------------- | -------------
|
|
2218
|
+
**location_id** | **String**| The ID of the Favorites page's associated location. |
|
|
2219
|
+
**page_id** | **String**| The ID of the page the cell belongs to. |
|
|
2220
|
+
**body** | [**V1PageCell**](V1PageCell.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
2221
|
+
|
|
2222
|
+
### Return type
|
|
2223
|
+
|
|
2224
|
+
[**V1Page**](V1Page.md)
|
|
2225
|
+
|
|
2226
|
+
### Authorization
|
|
2227
|
+
|
|
2228
|
+
[oauth2](../README.md#oauth2)
|
|
2229
|
+
|
|
2230
|
+
### HTTP request headers
|
|
2231
|
+
|
|
2232
|
+
- **Content-Type**: application/json
|
|
2233
|
+
- **Accept**: application/json
|
|
2234
|
+
|
|
2235
|
+
|
|
2236
|
+
|
|
2237
|
+
# **update_variation**
|
|
2238
|
+
> V1Variation update_variation(location_id, item_id, variation_id, body)
|
|
2239
|
+
|
|
2240
|
+
Modifies the details of an existing item variation.
|
|
2241
|
+
|
|
2242
|
+
Modifies the details of an existing item variation.
|
|
2243
|
+
|
|
2244
|
+
### Example
|
|
2245
|
+
```ruby
|
|
2246
|
+
# load the gem
|
|
2247
|
+
require 'square_connect'
|
|
2248
|
+
# setup authorization
|
|
2249
|
+
SquareConnect.configure do |config|
|
|
2250
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
2251
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
2252
|
+
end
|
|
2253
|
+
|
|
2254
|
+
api_instance = SquareConnect::V1ItemsApi.new
|
|
2255
|
+
|
|
2256
|
+
location_id = "location_id_example" # String | The ID of the item's associated location.
|
|
2257
|
+
|
|
2258
|
+
item_id = "item_id_example" # String | The ID of the item to modify.
|
|
2259
|
+
|
|
2260
|
+
variation_id = "variation_id_example" # String | The ID of the variation to modify.
|
|
2261
|
+
|
|
2262
|
+
body = SquareConnect::V1Variation.new # V1Variation | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
2263
|
+
|
|
2264
|
+
|
|
2265
|
+
begin
|
|
2266
|
+
#Modifies the details of an existing item variation.
|
|
2267
|
+
result = api_instance.update_variation(location_id, item_id, variation_id, body)
|
|
2268
|
+
p result
|
|
2269
|
+
rescue SquareConnect::ApiError => e
|
|
2270
|
+
puts "Exception when calling V1ItemsApi->update_variation: #{e}"
|
|
2271
|
+
end
|
|
2272
|
+
```
|
|
2273
|
+
|
|
2274
|
+
### Parameters
|
|
2275
|
+
|
|
2276
|
+
Name | Type | Description | Notes
|
|
2277
|
+
------------- | ------------- | ------------- | -------------
|
|
2278
|
+
**location_id** | **String**| The ID of the item's associated location. |
|
|
2279
|
+
**item_id** | **String**| The ID of the item to modify. |
|
|
2280
|
+
**variation_id** | **String**| The ID of the variation to modify. |
|
|
2281
|
+
**body** | [**V1Variation**](V1Variation.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
|
2282
|
+
|
|
2283
|
+
### Return type
|
|
2284
|
+
|
|
2285
|
+
[**V1Variation**](V1Variation.md)
|
|
2286
|
+
|
|
2287
|
+
### Authorization
|
|
2288
|
+
|
|
2289
|
+
[oauth2](../README.md#oauth2)
|
|
2290
|
+
|
|
2291
|
+
### HTTP request headers
|
|
2292
|
+
|
|
2293
|
+
- **Content-Type**: application/json
|
|
2294
|
+
- **Accept**: application/json
|
|
2295
|
+
|
|
2296
|
+
|
|
2297
|
+
|