square_connect 2.20181212.0.267 → 2.20190213.0.274
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +21 -0
- data/README.md +8 -1
- data/docs/CardBrand.md +1 -1
- data/docs/CatalogCategory.md +1 -1
- data/docs/CatalogDiscount.md +2 -2
- data/docs/CatalogItem.md +4 -4
- data/docs/CatalogItemVariation.md +2 -2
- data/docs/CatalogModifier.md +1 -1
- data/docs/CatalogModifierList.md +1 -1
- data/docs/CatalogObject.md +1 -1
- data/docs/CatalogObjectType.md +1 -1
- data/docs/CatalogTax.md +1 -1
- data/docs/CheckoutApi.md +1 -1
- data/docs/CreateOrderRequest.md +5 -4
- data/docs/CreateOrderRequestDiscount.md +1 -1
- data/docs/CreateOrderRequestLineItem.md +1 -1
- data/docs/CreateOrderRequestModifier.md +1 -1
- data/docs/CreateOrderRequestTax.md +1 -1
- data/docs/ErrorCode.md +1 -0
- data/docs/Order.md +4 -1
- data/docs/OrderFulfillment.md +14 -0
- data/docs/OrderFulfillmentPickupDetails.md +27 -0
- data/docs/OrderFulfillmentPickupDetailsScheduleType.md +13 -0
- data/docs/OrderFulfillmentRecipient.md +15 -0
- data/docs/OrderFulfillmentState.md +17 -0
- data/docs/OrderFulfillmentType.md +12 -0
- data/docs/OrderLineItem.md +2 -2
- data/docs/OrderLineItemDiscount.md +1 -1
- data/docs/OrderLineItemTax.md +1 -0
- data/docs/OrderLineItemTaxScope.md +14 -0
- data/docs/V1Timecard.md +1 -1
- data/lib/square_connect/api/apple_pay_api.rb +1 -1
- data/lib/square_connect/api/catalog_api.rb +11 -11
- data/lib/square_connect/api/checkout_api.rb +3 -3
- data/lib/square_connect/api/customers_api.rb +8 -8
- data/lib/square_connect/api/inventory_api.rb +7 -7
- data/lib/square_connect/api/locations_api.rb +1 -1
- data/lib/square_connect/api/mobile_authorization_api.rb +1 -1
- data/lib/square_connect/api/o_auth_api.rb +3 -3
- data/lib/square_connect/api/orders_api.rb +2 -2
- data/lib/square_connect/api/reporting_api.rb +2 -2
- data/lib/square_connect/api/transactions_api.rb +7 -7
- data/lib/square_connect/api_client.rb +1 -1
- data/lib/square_connect/models/catalog_category.rb +1 -1
- data/lib/square_connect/models/catalog_discount.rb +2 -2
- data/lib/square_connect/models/catalog_item.rb +4 -4
- data/lib/square_connect/models/catalog_item_variation.rb +2 -2
- data/lib/square_connect/models/catalog_modifier.rb +1 -1
- data/lib/square_connect/models/catalog_modifier_list.rb +1 -1
- data/lib/square_connect/models/catalog_object.rb +1 -1
- data/lib/square_connect/models/catalog_tax.rb +1 -1
- data/lib/square_connect/models/create_order_request.rb +15 -10
- data/lib/square_connect/models/create_order_request_discount.rb +1 -1
- data/lib/square_connect/models/create_order_request_line_item.rb +1 -1
- data/lib/square_connect/models/create_order_request_modifier.rb +1 -1
- data/lib/square_connect/models/create_order_request_tax.rb +1 -1
- data/lib/square_connect/models/error.rb +2 -2
- data/lib/square_connect/models/error_code.rb +1 -0
- data/lib/square_connect/models/order.rb +38 -7
- data/lib/square_connect/models/order_fulfillment.rb +251 -0
- data/lib/square_connect/models/order_fulfillment_pickup_details.rb +401 -0
- data/lib/square_connect/models/order_fulfillment_pickup_details_schedule_type.rb +19 -0
- data/lib/square_connect/models/order_fulfillment_recipient.rb +264 -0
- data/lib/square_connect/models/order_fulfillment_state.rb +23 -0
- data/lib/square_connect/models/order_fulfillment_type.rb +18 -0
- data/lib/square_connect/models/order_line_item.rb +2 -2
- data/lib/square_connect/models/order_line_item_discount.rb +1 -1
- data/lib/square_connect/models/order_line_item_tax.rb +26 -4
- data/lib/square_connect/models/order_line_item_tax_scope.rb +20 -0
- data/lib/square_connect/models/v1_timecard.rb +1 -1
- data/lib/square_connect/version.rb +1 -1
- data/lib/square_connect.rb +7 -0
- data/spec/api/checkout_api_spec.rb +1 -1
- data/spec/models/order_fulfillment_pickup_details_schedule_type_spec.rb +33 -0
- data/spec/models/order_fulfillment_pickup_details_spec.rb +133 -0
- data/spec/models/order_fulfillment_recipient_spec.rb +57 -0
- data/spec/models/order_fulfillment_spec.rb +59 -0
- data/spec/models/order_fulfillment_state_spec.rb +33 -0
- data/spec/models/order_fulfillment_type_spec.rb +33 -0
- data/spec/models/order_line_item_tax_scope_spec.rb +33 -0
- metadata +31 -4
@@ -51,7 +51,7 @@ module SquareConnect
|
|
51
51
|
# HTTP header 'Content-Type'
|
52
52
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
53
53
|
|
54
|
-
header_params['Square-Version'] = "
|
54
|
+
header_params['Square-Version'] = "2019-02-13"
|
55
55
|
|
56
56
|
# form parameters
|
57
57
|
form_params = {}
|
@@ -110,7 +110,7 @@ module SquareConnect
|
|
110
110
|
# HTTP header 'Content-Type'
|
111
111
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
112
112
|
|
113
|
-
header_params['Square-Version'] = "
|
113
|
+
header_params['Square-Version'] = "2019-02-13"
|
114
114
|
|
115
115
|
# form parameters
|
116
116
|
form_params = {}
|
@@ -165,7 +165,7 @@ module SquareConnect
|
|
165
165
|
# HTTP header 'Content-Type'
|
166
166
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
167
167
|
|
168
|
-
header_params['Square-Version'] = "
|
168
|
+
header_params['Square-Version'] = "2019-02-13"
|
169
169
|
|
170
170
|
# form parameters
|
171
171
|
form_params = {}
|
@@ -224,7 +224,7 @@ module SquareConnect
|
|
224
224
|
# HTTP header 'Content-Type'
|
225
225
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
226
226
|
|
227
|
-
header_params['Square-Version'] = "
|
227
|
+
header_params['Square-Version'] = "2019-02-13"
|
228
228
|
|
229
229
|
# form parameters
|
230
230
|
form_params = {}
|
@@ -290,7 +290,7 @@ module SquareConnect
|
|
290
290
|
# HTTP header 'Content-Type'
|
291
291
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
292
292
|
|
293
|
-
header_params['Square-Version'] = "
|
293
|
+
header_params['Square-Version'] = "2019-02-13"
|
294
294
|
|
295
295
|
# form parameters
|
296
296
|
form_params = {}
|
@@ -345,7 +345,7 @@ module SquareConnect
|
|
345
345
|
# HTTP header 'Content-Type'
|
346
346
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
347
347
|
|
348
|
-
header_params['Square-Version'] = "
|
348
|
+
header_params['Square-Version'] = "2019-02-13"
|
349
349
|
|
350
350
|
# form parameters
|
351
351
|
form_params = {}
|
@@ -400,7 +400,7 @@ module SquareConnect
|
|
400
400
|
# HTTP header 'Content-Type'
|
401
401
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
402
402
|
|
403
|
-
header_params['Square-Version'] = "
|
403
|
+
header_params['Square-Version'] = "2019-02-13"
|
404
404
|
|
405
405
|
# form parameters
|
406
406
|
form_params = {}
|
@@ -459,7 +459,7 @@ module SquareConnect
|
|
459
459
|
# HTTP header 'Content-Type'
|
460
460
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
461
461
|
|
462
|
-
header_params['Square-Version'] = "
|
462
|
+
header_params['Square-Version'] = "2019-02-13"
|
463
463
|
|
464
464
|
# form parameters
|
465
465
|
form_params = {}
|
@@ -51,7 +51,7 @@ module SquareConnect
|
|
51
51
|
# HTTP header 'Content-Type'
|
52
52
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
53
53
|
|
54
|
-
header_params['Square-Version'] = "
|
54
|
+
header_params['Square-Version'] = "2019-02-13"
|
55
55
|
|
56
56
|
# form parameters
|
57
57
|
form_params = {}
|
@@ -106,7 +106,7 @@ module SquareConnect
|
|
106
106
|
# HTTP header 'Content-Type'
|
107
107
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
108
108
|
|
109
|
-
header_params['Square-Version'] = "
|
109
|
+
header_params['Square-Version'] = "2019-02-13"
|
110
110
|
|
111
111
|
# form parameters
|
112
112
|
form_params = {}
|
@@ -161,7 +161,7 @@ module SquareConnect
|
|
161
161
|
# HTTP header 'Content-Type'
|
162
162
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
163
163
|
|
164
|
-
header_params['Square-Version'] = "
|
164
|
+
header_params['Square-Version'] = "2019-02-13"
|
165
165
|
|
166
166
|
# form parameters
|
167
167
|
form_params = {}
|
@@ -216,7 +216,7 @@ module SquareConnect
|
|
216
216
|
# HTTP header 'Content-Type'
|
217
217
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
218
218
|
|
219
|
-
header_params['Square-Version'] = "
|
219
|
+
header_params['Square-Version'] = "2019-02-13"
|
220
220
|
|
221
221
|
# form parameters
|
222
222
|
form_params = {}
|
@@ -277,7 +277,7 @@ module SquareConnect
|
|
277
277
|
# HTTP header 'Content-Type'
|
278
278
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
279
279
|
|
280
|
-
header_params['Square-Version'] = "
|
280
|
+
header_params['Square-Version'] = "2019-02-13"
|
281
281
|
|
282
282
|
# form parameters
|
283
283
|
form_params = {}
|
@@ -338,7 +338,7 @@ module SquareConnect
|
|
338
338
|
# HTTP header 'Content-Type'
|
339
339
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
340
340
|
|
341
|
-
header_params['Square-Version'] = "
|
341
|
+
header_params['Square-Version'] = "2019-02-13"
|
342
342
|
|
343
343
|
# form parameters
|
344
344
|
form_params = {}
|
@@ -393,7 +393,7 @@ module SquareConnect
|
|
393
393
|
# HTTP header 'Content-Type'
|
394
394
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
395
395
|
|
396
|
-
header_params['Square-Version'] = "
|
396
|
+
header_params['Square-Version'] = "2019-02-13"
|
397
397
|
|
398
398
|
# form parameters
|
399
399
|
form_params = {}
|
@@ -47,7 +47,7 @@ module SquareConnect
|
|
47
47
|
# HTTP header 'Content-Type'
|
48
48
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
49
49
|
|
50
|
-
header_params['Square-Version'] = "
|
50
|
+
header_params['Square-Version'] = "2019-02-13"
|
51
51
|
|
52
52
|
# form parameters
|
53
53
|
form_params = {}
|
@@ -51,7 +51,7 @@ module SquareConnect
|
|
51
51
|
# HTTP header 'Content-Type'
|
52
52
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
53
53
|
|
54
|
-
header_params['Square-Version'] = "
|
54
|
+
header_params['Square-Version'] = "2019-02-13"
|
55
55
|
|
56
56
|
# form parameters
|
57
57
|
form_params = {}
|
@@ -51,7 +51,7 @@ module SquareConnect
|
|
51
51
|
# HTTP header 'Content-Type'
|
52
52
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
53
53
|
|
54
|
-
header_params['Square-Version'] = "
|
54
|
+
header_params['Square-Version'] = "2019-02-13"
|
55
55
|
|
56
56
|
# form parameters
|
57
57
|
form_params = {}
|
@@ -110,7 +110,7 @@ module SquareConnect
|
|
110
110
|
# HTTP header 'Content-Type'
|
111
111
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
112
112
|
|
113
|
-
header_params['Square-Version'] = "
|
113
|
+
header_params['Square-Version'] = "2019-02-13"
|
114
114
|
|
115
115
|
# form parameters
|
116
116
|
form_params = {}
|
@@ -165,7 +165,7 @@ module SquareConnect
|
|
165
165
|
# HTTP header 'Content-Type'
|
166
166
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
167
167
|
|
168
|
-
header_params['Square-Version'] = "
|
168
|
+
header_params['Square-Version'] = "2019-02-13"
|
169
169
|
|
170
170
|
# form parameters
|
171
171
|
form_params = {}
|
@@ -55,7 +55,7 @@ module SquareConnect
|
|
55
55
|
# HTTP header 'Content-Type'
|
56
56
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
57
57
|
|
58
|
-
header_params['Square-Version'] = "
|
58
|
+
header_params['Square-Version'] = "2019-02-13"
|
59
59
|
|
60
60
|
# form parameters
|
61
61
|
form_params = {}
|
@@ -114,7 +114,7 @@ module SquareConnect
|
|
114
114
|
# HTTP header 'Content-Type'
|
115
115
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
116
116
|
|
117
|
-
header_params['Square-Version'] = "
|
117
|
+
header_params['Square-Version'] = "2019-02-13"
|
118
118
|
|
119
119
|
# form parameters
|
120
120
|
form_params = {}
|
@@ -66,7 +66,7 @@ module SquareConnect
|
|
66
66
|
# HTTP header 'Content-Type'
|
67
67
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
68
68
|
|
69
|
-
header_params['Square-Version'] = "
|
69
|
+
header_params['Square-Version'] = "2019-02-13"
|
70
70
|
|
71
71
|
# form parameters
|
72
72
|
form_params = {}
|
@@ -136,7 +136,7 @@ module SquareConnect
|
|
136
136
|
# HTTP header 'Content-Type'
|
137
137
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
138
138
|
|
139
|
-
header_params['Square-Version'] = "
|
139
|
+
header_params['Square-Version'] = "2019-02-13"
|
140
140
|
|
141
141
|
# form parameters
|
142
142
|
form_params = {}
|
@@ -55,7 +55,7 @@ module SquareConnect
|
|
55
55
|
# HTTP header 'Content-Type'
|
56
56
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
57
57
|
|
58
|
-
header_params['Square-Version'] = "
|
58
|
+
header_params['Square-Version'] = "2019-02-13"
|
59
59
|
|
60
60
|
# form parameters
|
61
61
|
form_params = {}
|
@@ -114,7 +114,7 @@ module SquareConnect
|
|
114
114
|
# HTTP header 'Content-Type'
|
115
115
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
116
116
|
|
117
|
-
header_params['Square-Version'] = "
|
117
|
+
header_params['Square-Version'] = "2019-02-13"
|
118
118
|
|
119
119
|
# form parameters
|
120
120
|
form_params = {}
|
@@ -177,7 +177,7 @@ module SquareConnect
|
|
177
177
|
# HTTP header 'Content-Type'
|
178
178
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
179
179
|
|
180
|
-
header_params['Square-Version'] = "
|
180
|
+
header_params['Square-Version'] = "2019-02-13"
|
181
181
|
|
182
182
|
# form parameters
|
183
183
|
form_params = {}
|
@@ -247,7 +247,7 @@ module SquareConnect
|
|
247
247
|
# HTTP header 'Content-Type'
|
248
248
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
249
249
|
|
250
|
-
header_params['Square-Version'] = "
|
250
|
+
header_params['Square-Version'] = "2019-02-13"
|
251
251
|
|
252
252
|
# form parameters
|
253
253
|
form_params = {}
|
@@ -317,7 +317,7 @@ module SquareConnect
|
|
317
317
|
# HTTP header 'Content-Type'
|
318
318
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
319
319
|
|
320
|
-
header_params['Square-Version'] = "
|
320
|
+
header_params['Square-Version'] = "2019-02-13"
|
321
321
|
|
322
322
|
# form parameters
|
323
323
|
form_params = {}
|
@@ -376,7 +376,7 @@ module SquareConnect
|
|
376
376
|
# HTTP header 'Content-Type'
|
377
377
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
378
378
|
|
379
|
-
header_params['Square-Version'] = "
|
379
|
+
header_params['Square-Version'] = "2019-02-13"
|
380
380
|
|
381
381
|
# form parameters
|
382
382
|
form_params = {}
|
@@ -435,7 +435,7 @@ module SquareConnect
|
|
435
435
|
# HTTP header 'Content-Type'
|
436
436
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
437
437
|
|
438
|
-
header_params['Square-Version'] = "
|
438
|
+
header_params['Square-Version'] = "2019-02-13"
|
439
439
|
|
440
440
|
# form parameters
|
441
441
|
form_params = {}
|
@@ -30,7 +30,7 @@ module SquareConnect
|
|
30
30
|
@config = config
|
31
31
|
|
32
32
|
# Construct user agent string. Returns slightly different string for JRuby
|
33
|
-
@user_agent = "Square-Connect-Ruby/2.
|
33
|
+
@user_agent = "Square-Connect-Ruby/2.20190213.0"
|
34
34
|
|
35
35
|
@default_headers = {
|
36
36
|
'Content-Type' => "application/json",
|
@@ -12,7 +12,7 @@ require 'date'
|
|
12
12
|
module SquareConnect
|
13
13
|
# A category to which an [CatalogItem](#type-catalogitem) belongs in the Catalog object model.
|
14
14
|
class CatalogCategory
|
15
|
-
# The category's name. Searchable.
|
15
|
+
# The category's name. Searchable. This field has max length of 255 Unicode code points.
|
16
16
|
attr_accessor :name
|
17
17
|
|
18
18
|
|
@@ -12,7 +12,7 @@ require 'date'
|
|
12
12
|
module SquareConnect
|
13
13
|
# A discount in the Catalog object model.
|
14
14
|
class CatalogDiscount
|
15
|
-
# The discount's name. Searchable.
|
15
|
+
# The discount's name. Searchable. This field has max length of 255 Unicode code points.
|
16
16
|
attr_accessor :name
|
17
17
|
|
18
18
|
# Indicates whether the discount is a fixed amount or percentage, or entered at the time of sale. See [CatalogDiscountType](#type-catalogdiscounttype) for all possible values.
|
@@ -27,7 +27,7 @@ module SquareConnect
|
|
27
27
|
# Indicates whether a mobile staff member needs to enter their PIN to apply the discount to a payment in the Square Point of Sale app.
|
28
28
|
attr_accessor :pin_required
|
29
29
|
|
30
|
-
# The color of the discount's display label in the Square Point of Sale app.
|
30
|
+
# The color of the discount's display label in the Square Point of Sale app. This must be a valid hex color code.
|
31
31
|
attr_accessor :label_color
|
32
32
|
|
33
33
|
class EnumAttributeValidator
|
@@ -12,16 +12,16 @@ require 'date'
|
|
12
12
|
module SquareConnect
|
13
13
|
# An item (i.e., product family) in the Catalog object model.
|
14
14
|
class CatalogItem
|
15
|
-
# The item's name. Searchable.
|
15
|
+
# The item's name. Searchable. This field must not be empty. This field has max length of 512 Unicode code points.
|
16
16
|
attr_accessor :name
|
17
17
|
|
18
|
-
# The item's description. Searchable.
|
18
|
+
# The item's description. Searchable. This field has max length of 4096 Unicode code points.
|
19
19
|
attr_accessor :description
|
20
20
|
|
21
|
-
# The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used.
|
21
|
+
# The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used. Searchable. This field has max length of 24 Unicode code points.
|
22
22
|
attr_accessor :abbreviation
|
23
23
|
|
24
|
-
# The color of the item's display label in the Square Point of Sale app.
|
24
|
+
# The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code.
|
25
25
|
attr_accessor :label_color
|
26
26
|
|
27
27
|
# If `true`, the item can be added to shipping orders from the merchant's online store.
|
@@ -15,7 +15,7 @@ module SquareConnect
|
|
15
15
|
# The ID of the [CatalogItem](#type-catalogitem) associated with this item variation. Searchable.
|
16
16
|
attr_accessor :item_id
|
17
17
|
|
18
|
-
# The item variation's name. Searchable.
|
18
|
+
# The item variation's name. Searchable. This field has max length of 255 Unicode code points.
|
19
19
|
attr_accessor :name
|
20
20
|
|
21
21
|
# The item variation's SKU, if any. Searchable.
|
@@ -45,7 +45,7 @@ module SquareConnect
|
|
45
45
|
# If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type` is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard. This value is always an integer.
|
46
46
|
attr_accessor :inventory_alert_threshold
|
47
47
|
|
48
|
-
# Arbitrary user metadata to associate with the item variation.
|
48
|
+
# Arbitrary user metadata to associate with the item variation. Searchable. This field has max length of 255 Unicode code points.
|
49
49
|
attr_accessor :user_data
|
50
50
|
|
51
51
|
# If the [CatalogItem](#type-catalogitem) that owns this item variation is of type `APPOINTMENTS_SERVICE`, then this is the duration of the service in milliseconds. For example, a 30 minute appointment would have the value `1800000`, which is equal to 30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second).
|
@@ -12,7 +12,7 @@ require 'date'
|
|
12
12
|
module SquareConnect
|
13
13
|
# A modifier in the Catalog object model.
|
14
14
|
class CatalogModifier
|
15
|
-
# The modifier's name. Searchable.
|
15
|
+
# The modifier's name. Searchable. This field has max length of 255 Unicode code points.
|
16
16
|
attr_accessor :name
|
17
17
|
|
18
18
|
# The modifier's price.
|
@@ -12,7 +12,7 @@ require 'date'
|
|
12
12
|
module SquareConnect
|
13
13
|
# A modifier list in the Catalog object model. A [CatalogModifierList](#type-catalogmodifierlist) contains [Modifier](#type-catalogmodifier)s that can be applied to a [CatalogItem](#type-catalogitem) at the time of sale. For example, a modifier list \"Condiments\" that would apply to a \"Hot Dog\" [CatalogItem](#type-catalogitem) might contain [CatalogModifier](#type-catalogmodifier)s \"Ketchup\", \"Mustard\", and \"Relish\". The `selection_type` field specifies whether or not multiple selections from the modifier list are allowed.
|
14
14
|
class CatalogModifierList
|
15
|
-
# The [CatalogModifierList](#type-catalogmodifierlist)'s name. Searchable.
|
15
|
+
# The [CatalogModifierList](#type-catalogmodifierlist)'s name. Searchable. This field has max length of 255 Unicode code points.
|
16
16
|
attr_accessor :name
|
17
17
|
|
18
18
|
# Indicates whether multiple options from the [CatalogModifierList](#type-catalogmodifierlist) can be applied to a single [CatalogItem](#type-catalogitem). See [CatalogModifierListSelectionType](#type-catalogmodifierlistselectiontype) for all possible values.
|
@@ -21,7 +21,7 @@ module SquareConnect
|
|
21
21
|
# Last modification [timestamp](#workingwithdates) in RFC 3339 format, e.g., `\"2016-08-15T23:59:33.123Z\"` would indicate the UTC time (denoted by `Z`) of August 15, 2016 at 23:59:33 and 123 milliseconds.
|
22
22
|
attr_accessor :updated_at
|
23
23
|
|
24
|
-
# The version of the object. When updating an object, the version supplied
|
24
|
+
# The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting.
|
25
25
|
attr_accessor :version
|
26
26
|
|
27
27
|
# If `true`, the object has been deleted from the database. Must be `false` for new objects being inserted. When deleted, the `updated_at` field will equal the deletion time.
|
@@ -12,7 +12,7 @@ require 'date'
|
|
12
12
|
module SquareConnect
|
13
13
|
# A tax in the Catalog object model.
|
14
14
|
class CatalogTax
|
15
|
-
# The tax's name. Searchable.
|
15
|
+
# The tax's name. Searchable. This field has max length of 255 Unicode code points.
|
16
16
|
attr_accessor :name
|
17
17
|
|
18
18
|
# Whether the tax is calculated based on a payment's subtotal or total. See [TaxCalculationPhase](#type-taxcalculationphase) for all possible values.
|
@@ -12,25 +12,29 @@ require 'date'
|
|
12
12
|
module SquareConnect
|
13
13
|
#
|
14
14
|
class CreateOrderRequest
|
15
|
+
# The order to create. If this field is set, then the only other top-level field that can be set is the idempotency_key.
|
16
|
+
attr_accessor :order
|
17
|
+
|
15
18
|
# A value you specify that uniquely identifies this order among orders you've created. If you're unsure whether a particular order was created successfully, you can reattempt it with the same idempotency key without worrying about creating duplicate orders. See [Idempotency keys](#idempotencykeys) for more information.
|
16
19
|
attr_accessor :idempotency_key
|
17
20
|
|
18
|
-
# An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters.
|
21
|
+
# __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters.
|
19
22
|
attr_accessor :reference_id
|
20
23
|
|
21
|
-
# The line items to associate with this order. Each line item represents a different product to include in a purchase.
|
24
|
+
# __Deprecated__: Please set the line_items on the nested [order](#type-order) field instead. The line items to associate with this order. Each line item represents a different product to include in a purchase.
|
22
25
|
attr_accessor :line_items
|
23
26
|
|
24
|
-
# The taxes to include on the order.
|
27
|
+
# __Deprecated__: Please set the taxes on the nested [order](#type-order) field instead. The taxes to include on the order.
|
25
28
|
attr_accessor :taxes
|
26
29
|
|
27
|
-
# The discounts to include on the order.
|
30
|
+
# __Deprecated__: Please set the discounts on the nested [order](#type-order) field instead. The discounts to include on the order.
|
28
31
|
attr_accessor :discounts
|
29
32
|
|
30
33
|
|
31
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
35
|
def self.attribute_map
|
33
36
|
{
|
37
|
+
:'order' => :'order',
|
34
38
|
:'idempotency_key' => :'idempotency_key',
|
35
39
|
:'reference_id' => :'reference_id',
|
36
40
|
:'line_items' => :'line_items',
|
@@ -42,6 +46,7 @@ module SquareConnect
|
|
42
46
|
# Attribute type mapping.
|
43
47
|
def self.swagger_types
|
44
48
|
{
|
49
|
+
:'order' => :'Order',
|
45
50
|
:'idempotency_key' => :'String',
|
46
51
|
:'reference_id' => :'String',
|
47
52
|
:'line_items' => :'Array<CreateOrderRequestLineItem>',
|
@@ -58,6 +63,10 @@ module SquareConnect
|
|
58
63
|
# convert string to symbol for hash key
|
59
64
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
60
65
|
|
66
|
+
if attributes.has_key?(:'order')
|
67
|
+
self.order = attributes[:'order']
|
68
|
+
end
|
69
|
+
|
61
70
|
if attributes.has_key?(:'idempotency_key')
|
62
71
|
self.idempotency_key = attributes[:'idempotency_key']
|
63
72
|
end
|
@@ -98,10 +107,6 @@ module SquareConnect
|
|
98
107
|
invalid_properties.push("invalid value for 'reference_id', the character length must be smaller than or equal to 40.")
|
99
108
|
end
|
100
109
|
|
101
|
-
if @line_items.nil?
|
102
|
-
invalid_properties.push("invalid value for 'line_items', line_items cannot be nil.")
|
103
|
-
end
|
104
|
-
|
105
110
|
return invalid_properties
|
106
111
|
end
|
107
112
|
|
@@ -110,7 +115,6 @@ module SquareConnect
|
|
110
115
|
def valid?
|
111
116
|
return false if !@idempotency_key.nil? && @idempotency_key.to_s.length > 192
|
112
117
|
return false if !@reference_id.nil? && @reference_id.to_s.length > 40
|
113
|
-
return false if @line_items.nil?
|
114
118
|
return true
|
115
119
|
end
|
116
120
|
|
@@ -141,6 +145,7 @@ module SquareConnect
|
|
141
145
|
def ==(o)
|
142
146
|
return true if self.equal?(o)
|
143
147
|
self.class == o.class &&
|
148
|
+
order == o.order &&
|
144
149
|
idempotency_key == o.idempotency_key &&
|
145
150
|
reference_id == o.reference_id &&
|
146
151
|
line_items == o.line_items &&
|
@@ -157,7 +162,7 @@ module SquareConnect
|
|
157
162
|
# Calculates hash code according to all attributes.
|
158
163
|
# @return [Fixnum] Hash code
|
159
164
|
def hash
|
160
|
-
[idempotency_key, reference_id, line_items, taxes, discounts].hash
|
165
|
+
[order, idempotency_key, reference_id, line_items, taxes, discounts].hash
|
161
166
|
end
|
162
167
|
|
163
168
|
# Builds the object from hash
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Represents a discount that can apply to either a single line item or an entire order.
|
13
|
+
# __Deprecated__: Please use the [OrderLineItemDiscount](#type-orderlineitemdiscount) type in the order field of [CreateOrderRequest](#type-createorderrequest) instead. Represents a discount that can apply to either a single line item or an entire order.
|
14
14
|
class CreateOrderRequestDiscount
|
15
15
|
# Only used for catalog discounts. The catalog object ID for an existing [CatalogDiscount](#type-catalogdiscount). Do not provide a value for this field if you provide values in other fields for an ad hoc discount.
|
16
16
|
attr_accessor :catalog_object_id
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Represents a line item to include in an order. Each line item describes a different product to purchase, with its own quantity and price details. Line items can either reference objects from the merchant's catalog, or can alternatively specify a name and price instead.
|
13
|
+
# __Deprecated__: Please use the [OrderLineItem](#type-orderlineitem) type in the order field of [CreateOrderRequest](#type-createorderrequest) instead. Represents a line item to include in an order. Each line item describes a different product to purchase, with its own quantity and price details. Line items can either reference objects from the merchant's catalog, or can alternatively specify a name and price instead.
|
14
14
|
class CreateOrderRequestLineItem
|
15
15
|
# Only used for ad hoc line items. The name of the line item. This value cannot exceed 500 characters. Do not provide a value for this field if you provide a value for `catalog_object_id`.
|
16
16
|
attr_accessor :name
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Represents a modifier applied to a single line item. Modifiers can reference existing objects in a merchant catalog or be constructed ad hoc at the time of purchase by providing a name and price.
|
13
|
+
# __Deprecated__: Please use the [OrderLineItemModifier](#type-orderlineitemmodifier) type instead. Represents a modifier applied to a single line item. Modifiers can reference existing objects in a merchant catalog or be constructed ad hoc at the time of purchase by providing a name and price.
|
14
14
|
class CreateOrderRequestModifier
|
15
15
|
# The catalog object ID of a [CatalogModifier](#type-catalogmodifier).
|
16
16
|
attr_accessor :catalog_object_id
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Represents a tax that can apply to either a single line item or an entire order.
|
13
|
+
# __Deprecated__: Please use the [OrderLineItemTax](#type-orderlineitemtax) type in the order field of [CreateOrderRequest](#type-createorderrequest) instead. Represents a tax that can apply to either a single line item or an entire order.
|
14
14
|
class CreateOrderRequestTax
|
15
15
|
# Only used for catalog taxes. The catalog object ID of an existing [CatalogTax](#type-catalogtax). Do not provide a value for this field if you provide values in other fields for an ad hoc tax.
|
16
16
|
attr_accessor :catalog_object_id
|
@@ -114,7 +114,7 @@ module SquareConnect
|
|
114
114
|
category_validator = EnumAttributeValidator.new('String', ["API_ERROR", "AUTHENTICATION_ERROR", "INVALID_REQUEST_ERROR", "RATE_LIMIT_ERROR", "PAYMENT_METHOD_ERROR", "REFUND_ERROR"])
|
115
115
|
return false unless category_validator.valid?(@category)
|
116
116
|
return false if @code.nil?
|
117
|
-
code_validator = EnumAttributeValidator.new('String', ["INTERNAL_SERVER_ERROR", "UNAUTHORIZED", "ACCESS_TOKEN_EXPIRED", "ACCESS_TOKEN_REVOKED", "FORBIDDEN", "INSUFFICIENT_SCOPES", "APPLICATION_DISABLED", "V1_APPLICATION", "V1_ACCESS_TOKEN", "CARD_PROCESSING_NOT_ENABLED", "BAD_REQUEST", "MISSING_REQUIRED_PARAMETER", "INCORRECT_TYPE", "INVALID_TIME", "INVALID_TIME_RANGE", "INVALID_VALUE", "INVALID_CURSOR", "UNKNOWN_QUERY_PARAMETER", "CONFLICTING_PARAMETERS", "EXPECTED_JSON_BODY", "INVALID_SORT_ORDER", "VALUE_REGEX_MISMATCH", "VALUE_TOO_SHORT", "VALUE_TOO_LONG", "VALUE_TOO_LOW", "VALUE_TOO_HIGH", "VALUE_EMPTY", "ARRAY_LENGTH_TOO_LONG", "ARRAY_LENGTH_TOO_SHORT", "ARRAY_EMPTY", "EXPECTED_BOOLEAN", "EXPECTED_INTEGER", "EXPECTED_FLOAT", "EXPECTED_STRING", "EXPECTED_OBJECT", "EXPECTED_ARRAY", "EXPECTED_MAP", "EXPECTED_BASE64_ENCODED_BYTE_ARRAY", "INVALID_ARRAY_VALUE", "INVALID_ENUM_VALUE", "INVALID_CONTENT_TYPE", "INVALID_FORM_VALUE", "ONE_INSTRUMENT_EXPECTED", "NO_FIELDS_SET", "DEPRECATED_FIELD_SET", "CARD_EXPIRED", "INVALID_EXPIRATION", "INVALID_EXPIRATION_YEAR", "INVALID_EXPIRATION_DATE", "UNSUPPORTED_CARD_BRAND", "UNSUPPORTED_ENTRY_METHOD", "INVALID_ENCRYPTED_CARD", "INVALID_CARD", "DELAYED_TRANSACTION_EXPIRED", "DELAYED_TRANSACTION_CANCELED", "DELAYED_TRANSACTION_CAPTURED", "DELAYED_TRANSACTION_FAILED", "CARD_TOKEN_EXPIRED", "CARD_TOKEN_USED", "AMOUNT_TOO_HIGH", "UNSUPPORTED_INSTRUMENT_TYPE", "REFUND_AMOUNT_INVALID", "REFUND_ALREADY_PENDING", "PAYMENT_NOT_REFUNDABLE", "INVALID_CARD_DATA", "LOCATION_MISMATCH", "IDEMPOTENCY_KEY_REUSED", "UNEXPECTED_VALUE", "SANDBOX_NOT_SUPPORTED", "INVALID_EMAIL_ADDRESS", "INVALID_PHONE_NUMBER", "CHECKOUT_EXPIRED", "BAD_CERTIFICATE", "CARD_DECLINED", "VERIFY_CVV_FAILURE", "VERIFY_AVS_FAILURE", "CARD_DECLINED_CALL_ISSUER", "NOT_FOUND", "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND", "METHOD_NOT_ALLOWED", "REQUEST_TIMEOUT", "CONFLICT", "REQUEST_ENTITY_TOO_LARGE", "UNSUPPORTED_MEDIA_TYPE", "RATE_LIMITED", "NOT_IMPLEMENTED", "SERVICE_UNAVAILABLE", "GATEWAY_TIMEOUT"])
|
117
|
+
code_validator = EnumAttributeValidator.new('String', ["INTERNAL_SERVER_ERROR", "UNAUTHORIZED", "ACCESS_TOKEN_EXPIRED", "ACCESS_TOKEN_REVOKED", "FORBIDDEN", "INSUFFICIENT_SCOPES", "APPLICATION_DISABLED", "V1_APPLICATION", "V1_ACCESS_TOKEN", "CARD_PROCESSING_NOT_ENABLED", "BAD_REQUEST", "MISSING_REQUIRED_PARAMETER", "INCORRECT_TYPE", "INVALID_TIME", "INVALID_TIME_RANGE", "INVALID_VALUE", "INVALID_CURSOR", "UNKNOWN_QUERY_PARAMETER", "CONFLICTING_PARAMETERS", "EXPECTED_JSON_BODY", "INVALID_SORT_ORDER", "VALUE_REGEX_MISMATCH", "VALUE_TOO_SHORT", "VALUE_TOO_LONG", "VALUE_TOO_LOW", "VALUE_TOO_HIGH", "VALUE_EMPTY", "ARRAY_LENGTH_TOO_LONG", "ARRAY_LENGTH_TOO_SHORT", "ARRAY_EMPTY", "EXPECTED_BOOLEAN", "EXPECTED_INTEGER", "EXPECTED_FLOAT", "EXPECTED_STRING", "EXPECTED_OBJECT", "EXPECTED_ARRAY", "EXPECTED_MAP", "EXPECTED_BASE64_ENCODED_BYTE_ARRAY", "INVALID_ARRAY_VALUE", "INVALID_ENUM_VALUE", "INVALID_CONTENT_TYPE", "INVALID_FORM_VALUE", "ONE_INSTRUMENT_EXPECTED", "NO_FIELDS_SET", "DEPRECATED_FIELD_SET", "CARD_EXPIRED", "INVALID_EXPIRATION", "INVALID_EXPIRATION_YEAR", "INVALID_EXPIRATION_DATE", "UNSUPPORTED_CARD_BRAND", "UNSUPPORTED_ENTRY_METHOD", "INVALID_ENCRYPTED_CARD", "INVALID_CARD", "DELAYED_TRANSACTION_EXPIRED", "DELAYED_TRANSACTION_CANCELED", "DELAYED_TRANSACTION_CAPTURED", "DELAYED_TRANSACTION_FAILED", "CARD_TOKEN_EXPIRED", "CARD_TOKEN_USED", "AMOUNT_TOO_HIGH", "UNSUPPORTED_INSTRUMENT_TYPE", "REFUND_AMOUNT_INVALID", "REFUND_ALREADY_PENDING", "PAYMENT_NOT_REFUNDABLE", "INVALID_CARD_DATA", "LOCATION_MISMATCH", "IDEMPOTENCY_KEY_REUSED", "UNEXPECTED_VALUE", "SANDBOX_NOT_SUPPORTED", "INVALID_EMAIL_ADDRESS", "INVALID_PHONE_NUMBER", "CHECKOUT_EXPIRED", "BAD_CERTIFICATE", "CARD_DECLINED", "VERIFY_CVV_FAILURE", "VERIFY_AVS_FAILURE", "CARD_DECLINED_CALL_ISSUER", "NOT_FOUND", "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND", "METHOD_NOT_ALLOWED", "NOT_ACCEPTABLE", "REQUEST_TIMEOUT", "CONFLICT", "REQUEST_ENTITY_TOO_LARGE", "UNSUPPORTED_MEDIA_TYPE", "RATE_LIMITED", "NOT_IMPLEMENTED", "SERVICE_UNAVAILABLE", "GATEWAY_TIMEOUT"])
|
118
118
|
return false unless code_validator.valid?(@code)
|
119
119
|
return true
|
120
120
|
end
|
@@ -132,7 +132,7 @@ module SquareConnect
|
|
132
132
|
# Custom attribute writer method checking allowed values (enum).
|
133
133
|
# @param [Object] code Object to be assigned
|
134
134
|
def code=(code)
|
135
|
-
validator = EnumAttributeValidator.new('String', ["INTERNAL_SERVER_ERROR", "UNAUTHORIZED", "ACCESS_TOKEN_EXPIRED", "ACCESS_TOKEN_REVOKED", "FORBIDDEN", "INSUFFICIENT_SCOPES", "APPLICATION_DISABLED", "V1_APPLICATION", "V1_ACCESS_TOKEN", "CARD_PROCESSING_NOT_ENABLED", "BAD_REQUEST", "MISSING_REQUIRED_PARAMETER", "INCORRECT_TYPE", "INVALID_TIME", "INVALID_TIME_RANGE", "INVALID_VALUE", "INVALID_CURSOR", "UNKNOWN_QUERY_PARAMETER", "CONFLICTING_PARAMETERS", "EXPECTED_JSON_BODY", "INVALID_SORT_ORDER", "VALUE_REGEX_MISMATCH", "VALUE_TOO_SHORT", "VALUE_TOO_LONG", "VALUE_TOO_LOW", "VALUE_TOO_HIGH", "VALUE_EMPTY", "ARRAY_LENGTH_TOO_LONG", "ARRAY_LENGTH_TOO_SHORT", "ARRAY_EMPTY", "EXPECTED_BOOLEAN", "EXPECTED_INTEGER", "EXPECTED_FLOAT", "EXPECTED_STRING", "EXPECTED_OBJECT", "EXPECTED_ARRAY", "EXPECTED_MAP", "EXPECTED_BASE64_ENCODED_BYTE_ARRAY", "INVALID_ARRAY_VALUE", "INVALID_ENUM_VALUE", "INVALID_CONTENT_TYPE", "INVALID_FORM_VALUE", "ONE_INSTRUMENT_EXPECTED", "NO_FIELDS_SET", "DEPRECATED_FIELD_SET", "CARD_EXPIRED", "INVALID_EXPIRATION", "INVALID_EXPIRATION_YEAR", "INVALID_EXPIRATION_DATE", "UNSUPPORTED_CARD_BRAND", "UNSUPPORTED_ENTRY_METHOD", "INVALID_ENCRYPTED_CARD", "INVALID_CARD", "DELAYED_TRANSACTION_EXPIRED", "DELAYED_TRANSACTION_CANCELED", "DELAYED_TRANSACTION_CAPTURED", "DELAYED_TRANSACTION_FAILED", "CARD_TOKEN_EXPIRED", "CARD_TOKEN_USED", "AMOUNT_TOO_HIGH", "UNSUPPORTED_INSTRUMENT_TYPE", "REFUND_AMOUNT_INVALID", "REFUND_ALREADY_PENDING", "PAYMENT_NOT_REFUNDABLE", "INVALID_CARD_DATA", "LOCATION_MISMATCH", "IDEMPOTENCY_KEY_REUSED", "UNEXPECTED_VALUE", "SANDBOX_NOT_SUPPORTED", "INVALID_EMAIL_ADDRESS", "INVALID_PHONE_NUMBER", "CHECKOUT_EXPIRED", "BAD_CERTIFICATE", "CARD_DECLINED", "VERIFY_CVV_FAILURE", "VERIFY_AVS_FAILURE", "CARD_DECLINED_CALL_ISSUER", "NOT_FOUND", "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND", "METHOD_NOT_ALLOWED", "REQUEST_TIMEOUT", "CONFLICT", "REQUEST_ENTITY_TOO_LARGE", "UNSUPPORTED_MEDIA_TYPE", "RATE_LIMITED", "NOT_IMPLEMENTED", "SERVICE_UNAVAILABLE", "GATEWAY_TIMEOUT"])
|
135
|
+
validator = EnumAttributeValidator.new('String', ["INTERNAL_SERVER_ERROR", "UNAUTHORIZED", "ACCESS_TOKEN_EXPIRED", "ACCESS_TOKEN_REVOKED", "FORBIDDEN", "INSUFFICIENT_SCOPES", "APPLICATION_DISABLED", "V1_APPLICATION", "V1_ACCESS_TOKEN", "CARD_PROCESSING_NOT_ENABLED", "BAD_REQUEST", "MISSING_REQUIRED_PARAMETER", "INCORRECT_TYPE", "INVALID_TIME", "INVALID_TIME_RANGE", "INVALID_VALUE", "INVALID_CURSOR", "UNKNOWN_QUERY_PARAMETER", "CONFLICTING_PARAMETERS", "EXPECTED_JSON_BODY", "INVALID_SORT_ORDER", "VALUE_REGEX_MISMATCH", "VALUE_TOO_SHORT", "VALUE_TOO_LONG", "VALUE_TOO_LOW", "VALUE_TOO_HIGH", "VALUE_EMPTY", "ARRAY_LENGTH_TOO_LONG", "ARRAY_LENGTH_TOO_SHORT", "ARRAY_EMPTY", "EXPECTED_BOOLEAN", "EXPECTED_INTEGER", "EXPECTED_FLOAT", "EXPECTED_STRING", "EXPECTED_OBJECT", "EXPECTED_ARRAY", "EXPECTED_MAP", "EXPECTED_BASE64_ENCODED_BYTE_ARRAY", "INVALID_ARRAY_VALUE", "INVALID_ENUM_VALUE", "INVALID_CONTENT_TYPE", "INVALID_FORM_VALUE", "ONE_INSTRUMENT_EXPECTED", "NO_FIELDS_SET", "DEPRECATED_FIELD_SET", "CARD_EXPIRED", "INVALID_EXPIRATION", "INVALID_EXPIRATION_YEAR", "INVALID_EXPIRATION_DATE", "UNSUPPORTED_CARD_BRAND", "UNSUPPORTED_ENTRY_METHOD", "INVALID_ENCRYPTED_CARD", "INVALID_CARD", "DELAYED_TRANSACTION_EXPIRED", "DELAYED_TRANSACTION_CANCELED", "DELAYED_TRANSACTION_CAPTURED", "DELAYED_TRANSACTION_FAILED", "CARD_TOKEN_EXPIRED", "CARD_TOKEN_USED", "AMOUNT_TOO_HIGH", "UNSUPPORTED_INSTRUMENT_TYPE", "REFUND_AMOUNT_INVALID", "REFUND_ALREADY_PENDING", "PAYMENT_NOT_REFUNDABLE", "INVALID_CARD_DATA", "LOCATION_MISMATCH", "IDEMPOTENCY_KEY_REUSED", "UNEXPECTED_VALUE", "SANDBOX_NOT_SUPPORTED", "INVALID_EMAIL_ADDRESS", "INVALID_PHONE_NUMBER", "CHECKOUT_EXPIRED", "BAD_CERTIFICATE", "CARD_DECLINED", "VERIFY_CVV_FAILURE", "VERIFY_AVS_FAILURE", "CARD_DECLINED_CALL_ISSUER", "NOT_FOUND", "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND", "METHOD_NOT_ALLOWED", "NOT_ACCEPTABLE", "REQUEST_TIMEOUT", "CONFLICT", "REQUEST_ENTITY_TOO_LARGE", "UNSUPPORTED_MEDIA_TYPE", "RATE_LIMITED", "NOT_IMPLEMENTED", "SERVICE_UNAVAILABLE", "GATEWAY_TIMEOUT"])
|
136
136
|
unless validator.valid?(code)
|
137
137
|
fail ArgumentError, "invalid value for 'code', must be one of #{validator.allowable_values}."
|
138
138
|
end
|
@@ -92,6 +92,7 @@ module SquareConnect
|
|
92
92
|
NOT_FOUND = "NOT_FOUND".freeze
|
93
93
|
APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND = "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND".freeze
|
94
94
|
METHOD_NOT_ALLOWED = "METHOD_NOT_ALLOWED".freeze
|
95
|
+
NOT_ACCEPTABLE = "NOT_ACCEPTABLE".freeze
|
95
96
|
REQUEST_TIMEOUT = "REQUEST_TIMEOUT".freeze
|
96
97
|
CONFLICT = "CONFLICT".freeze
|
97
98
|
REQUEST_ENTITY_TOO_LARGE = "REQUEST_ENTITY_TOO_LARGE".freeze
|