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