square_connect 2.20190612.1.314 → 2.20190710.0.321

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +4 -0
  3. data/README.md +1 -2
  4. data/docs/CatalogItem.md +0 -1
  5. data/docs/CatalogItemVariation.md +0 -1
  6. data/docs/CatalogObject.md +3 -0
  7. data/docs/CatalogPricingRule.md +0 -3
  8. data/docs/InventoryAdjustment.md +1 -1
  9. data/docs/InventoryCount.md +1 -1
  10. data/docs/InventoryPhysicalCount.md +1 -1
  11. data/docs/InventoryTransfer.md +1 -1
  12. data/docs/TransactionsApi.md +2 -2
  13. data/lib/square_connect.rb +0 -1
  14. data/lib/square_connect/api/customers_api.rb +0 -6
  15. data/lib/square_connect/api/employees_api.rb +0 -3
  16. data/lib/square_connect/api/reporting_api.rb +0 -6
  17. data/lib/square_connect/api/transactions_api.rb +4 -10
  18. data/lib/square_connect/api/v1_employees_api.rb +0 -15
  19. data/lib/square_connect/api/v1_transactions_api.rb +0 -15
  20. data/lib/square_connect/api_client.rb +1 -1
  21. data/lib/square_connect/models/address.rb +0 -33
  22. data/lib/square_connect/models/batch_retrieve_inventory_changes_request.rb +0 -21
  23. data/lib/square_connect/models/business_hours_period.rb +0 -33
  24. data/lib/square_connect/models/card.rb +0 -33
  25. data/lib/square_connect/models/catalog_discount.rb +0 -33
  26. data/lib/square_connect/models/catalog_item.rb +1 -44
  27. data/lib/square_connect/models/catalog_item_variation.rb +1 -56
  28. data/lib/square_connect/models/catalog_modifier_list.rb +0 -33
  29. data/lib/square_connect/models/catalog_object.rb +31 -34
  30. data/lib/square_connect/models/catalog_pricing_rule.rb +1 -64
  31. data/lib/square_connect/models/catalog_query_sorted_attribute.rb +0 -33
  32. data/lib/square_connect/models/catalog_tax.rb +0 -45
  33. data/lib/square_connect/models/create_order_request_tax.rb +0 -33
  34. data/lib/square_connect/models/customer.rb +0 -33
  35. data/lib/square_connect/models/customer_creation_source_filter.rb +0 -33
  36. data/lib/square_connect/models/customer_sort.rb +0 -45
  37. data/lib/square_connect/models/employee.rb +0 -33
  38. data/lib/square_connect/models/error.rb +0 -45
  39. data/lib/square_connect/models/inventory_adjustment.rb +1 -46
  40. data/lib/square_connect/models/inventory_change.rb +0 -33
  41. data/lib/square_connect/models/inventory_count.rb +1 -34
  42. data/lib/square_connect/models/inventory_physical_count.rb +1 -34
  43. data/lib/square_connect/models/inventory_transfer.rb +1 -34
  44. data/lib/square_connect/models/item_variation_location_overrides.rb +0 -45
  45. data/lib/square_connect/models/list_additional_recipient_receivable_refunds_request.rb +0 -33
  46. data/lib/square_connect/models/list_additional_recipient_receivables_request.rb +0 -33
  47. data/lib/square_connect/models/list_customers_request.rb +0 -45
  48. data/lib/square_connect/models/list_employees_request.rb +0 -33
  49. data/lib/square_connect/models/list_refunds_request.rb +0 -33
  50. data/lib/square_connect/models/list_transactions_request.rb +0 -33
  51. data/lib/square_connect/models/location.rb +0 -69
  52. data/lib/square_connect/models/measurement_unit.rb +0 -81
  53. data/lib/square_connect/models/money.rb +0 -33
  54. data/lib/square_connect/models/order.rb +0 -33
  55. data/lib/square_connect/models/order_fulfillment.rb +0 -45
  56. data/lib/square_connect/models/order_fulfillment_pickup_details.rb +0 -33
  57. data/lib/square_connect/models/order_line_item_discount.rb +0 -45
  58. data/lib/square_connect/models/order_line_item_tax.rb +0 -45
  59. data/lib/square_connect/models/order_return_discount.rb +0 -45
  60. data/lib/square_connect/models/order_return_service_charge.rb +0 -33
  61. data/lib/square_connect/models/order_return_tax.rb +0 -45
  62. data/lib/square_connect/models/order_service_charge.rb +0 -33
  63. data/lib/square_connect/models/refund.rb +0 -33
  64. data/lib/square_connect/models/register_domain_response.rb +0 -33
  65. data/lib/square_connect/models/search_catalog_objects_request.rb +0 -21
  66. data/lib/square_connect/models/search_orders_fulfillment_filter.rb +0 -21
  67. data/lib/square_connect/models/search_orders_sort.rb +0 -45
  68. data/lib/square_connect/models/search_orders_state_filter.rb +0 -21
  69. data/lib/square_connect/models/shift.rb +0 -33
  70. data/lib/square_connect/models/shift_filter.rb +0 -33
  71. data/lib/square_connect/models/shift_sort.rb +0 -45
  72. data/lib/square_connect/models/shift_workday.rb +0 -33
  73. data/lib/square_connect/models/source_application.rb +0 -33
  74. data/lib/square_connect/models/tender.rb +0 -33
  75. data/lib/square_connect/models/tender_card_details.rb +0 -45
  76. data/lib/square_connect/models/transaction.rb +0 -33
  77. data/lib/square_connect/models/v1_adjust_inventory_request.rb +0 -33
  78. data/lib/square_connect/models/v1_bank_account.rb +0 -33
  79. data/lib/square_connect/models/v1_cash_drawer_event.rb +0 -33
  80. data/lib/square_connect/models/v1_cash_drawer_shift.rb +0 -33
  81. data/lib/square_connect/models/v1_create_refund_request.rb +0 -33
  82. data/lib/square_connect/models/v1_discount.rb +0 -45
  83. data/lib/square_connect/models/v1_employee.rb +0 -33
  84. data/lib/square_connect/models/v1_employee_role.rb +0 -21
  85. data/lib/square_connect/models/v1_fee.rb +0 -69
  86. data/lib/square_connect/models/v1_item.rb +0 -57
  87. data/lib/square_connect/models/v1_list_cash_drawer_shifts_request.rb +0 -33
  88. data/lib/square_connect/models/v1_list_employee_roles_request.rb +0 -33
  89. data/lib/square_connect/models/v1_list_employees_request.rb +0 -45
  90. data/lib/square_connect/models/v1_list_orders_request.rb +0 -33
  91. data/lib/square_connect/models/v1_list_payments_request.rb +0 -33
  92. data/lib/square_connect/models/v1_list_refunds_request.rb +0 -33
  93. data/lib/square_connect/models/v1_list_settlements_request.rb +0 -45
  94. data/lib/square_connect/models/v1_list_timecards_request.rb +0 -33
  95. data/lib/square_connect/models/v1_merchant.rb +0 -45
  96. data/lib/square_connect/models/v1_modifier_list.rb +0 -33
  97. data/lib/square_connect/models/v1_money.rb +0 -33
  98. data/lib/square_connect/models/v1_order.rb +0 -33
  99. data/lib/square_connect/models/v1_order_history_entry.rb +0 -33
  100. data/lib/square_connect/models/v1_page_cell.rb +0 -45
  101. data/lib/square_connect/models/v1_payment_itemization.rb +0 -33
  102. data/lib/square_connect/models/v1_payment_surcharge.rb +0 -33
  103. data/lib/square_connect/models/v1_payment_tax.rb +0 -33
  104. data/lib/square_connect/models/v1_refund.rb +0 -33
  105. data/lib/square_connect/models/v1_settlement.rb +0 -33
  106. data/lib/square_connect/models/v1_settlement_entry.rb +0 -33
  107. data/lib/square_connect/models/v1_tender.rb +0 -57
  108. data/lib/square_connect/models/v1_timecard_event.rb +0 -33
  109. data/lib/square_connect/models/v1_update_modifier_list_request.rb +0 -33
  110. data/lib/square_connect/models/v1_update_order_request.rb +0 -33
  111. data/lib/square_connect/models/v1_variation.rb +0 -45
  112. data/lib/square_connect/models/workweek_config.rb +0 -33
  113. data/lib/square_connect/version.rb +1 -1
  114. data/spec/api/catalog_api_spec.rb +0 -1
  115. metadata +2 -6
  116. data/docs/AggregationStrategy.md +0 -15
  117. data/lib/square_connect/models/aggregation_strategy.rb +0 -21
  118. data/spec/models/aggregation_strategy_spec.rb +0 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f99769ad4fa49e3eb63311a9b9822205a5a994d8f235be983a49f7962226c561
4
- data.tar.gz: 5756b2a0574786c95979ffe3dc8d7c9a1aef4998be161becb8c3a4bc8e1a0ea0
3
+ metadata.gz: 18859f855d1baefc2c748115d7ed8c9d36110ac8535f1ccb11973558e40125d7
4
+ data.tar.gz: c52a038d30c7290fba1532f51c9ad82205d51659020f459934952cf103ae0142
5
5
  SHA512:
6
- metadata.gz: a3e43992a4082ab40606ce8de929f9cd7b3df3bc255d4c25efba6f60fe1ba9d3bb7936344eaaef07c002d432d47831d313c9b11efde4f82c17354aa98bb684b4
7
- data.tar.gz: 4286360e7b36a70d452b44ba587e03bfece919f267abd2a070e2ddf688243d542f3873566dc64b07eca07ab206132e91d4cd03fbbdfef3f981155a50d4130efd
6
+ metadata.gz: 88979e2eeb33a34da275418df013e51a070e8c67908b3cc481251ddd6317e800b93cd35630846418614cb419601dd5602c1013e5284b570a45e8fb376a2ce5bd
7
+ data.tar.gz: d73d34bf2c7dc9b4677b4c21ff943ea12b9613c386b977d35cb510b82f5536bb0c32b94a83145de5c8e7a90145c876bf1d8eb004af3fc1de293117ed143efa9f
data/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## Version 2.20190710.0 (2019-07-10)
4
+
5
+ * **Retired functionality** — The `CatalogItem.image_url` field (deprecated under `Square-Version` YYYYMMDD) is retired and no longer included in Connect SDKs.
6
+
3
7
  ## Version 2.20190612.1 (2019-06-26)
4
8
 
5
9
  * **Bug fix**: `Transaction.Charge` and `Customers.CreateCustomerCard` request objects — now include the `verification_token` required for [Strong Customer Authentication](https://developer.squareup.com/docs/sca-overview).
data/README.md CHANGED
@@ -10,7 +10,7 @@ for the specification and template files we used to generate this.
10
10
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
11
11
 
12
12
  - API version: 2.0
13
- - Package version: 2.20190612.1
13
+ - Package version: 2.20190710.0
14
14
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
15
15
 
16
16
  For more information, please visit [https://squareup.com/developers](https://squareup.com/developers)
@@ -221,7 +221,6 @@ Class | Method | HTTP request | Description
221
221
  - [SquareConnect::AdditionalRecipientReceivable](docs/AdditionalRecipientReceivable.md)
222
222
  - [SquareConnect::AdditionalRecipientReceivableRefund](docs/AdditionalRecipientReceivableRefund.md)
223
223
  - [SquareConnect::Address](docs/Address.md)
224
- - [SquareConnect::AggregationStrategy](docs/AggregationStrategy.md)
225
224
  - [SquareConnect::BatchChangeInventoryRequest](docs/BatchChangeInventoryRequest.md)
226
225
  - [SquareConnect::BatchChangeInventoryResponse](docs/BatchChangeInventoryResponse.md)
227
226
  - [SquareConnect::BatchDeleteCatalogObjectsRequest](docs/BatchDeleteCatalogObjectsRequest.md)
data/docs/CatalogItem.md CHANGED
@@ -17,7 +17,6 @@ Name | Type | Description | Notes
17
17
  **category_id** | **String** | The ID of the item's category, if any. | [optional]
18
18
  **tax_ids** | **Array<String>** | A set of IDs indicating the [CatalogTax](#type-catalogtax)es that are enabled for this item. When updating an item, any taxes listed here will be added to the item. [CatalogTax](#type-catalogtax)es may also be added to or deleted from an item using `UpdateItemTaxes`. | [optional]
19
19
  **modifier_list_info** | [**Array<CatalogItemModifierListInfo>**](CatalogItemModifierListInfo.md) | A set of [CatalogItemModifierListInfo](#type-catalogitemmodifierlistinfo) objects representing the modifier lists that apply to this item, along with the overrides and min and max limits that are specific to this item. [CatalogModifierList](#type-catalogmodifierlist)s may also be added to or deleted from an item using `UpdateItemModifierLists`. | [optional]
20
- **image_url** | **String** | __Deprecated__. The URL of an image representing this item. Deprecated in favor of `image_id` in [`CatalogObject`](#type-catalogobject). | [optional]
21
20
  **variations** | [**Array<CatalogObject>**](CatalogObject.md) | A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. Maximum: 250 item variations | [optional]
22
21
  **product_type** | **String** | The product type of the item. May not be changed once an item has been created. Only items of product type `REGULAR` may be created by this API; items with other product types are read-only. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values | [optional]
23
22
  **skip_modifier_screen** | **BOOLEAN** | If `false`, the Square Point of Sale app will present the [CatalogItem](#type-catalogitem)'s details screen immediately, allowing the merchant to choose [CatalogModifier](#type-catalogmodifier)s before adding the item to the cart. This is the default behavior. If `true`, the Square Point of Sale app will immediately add the item to the cart with the pre-selected modifiers, and merchants can edit modifiers by drilling down onto the item's details. Third-party clients are encouraged to implement similar behaviors. | [optional]
@@ -20,7 +20,6 @@ Name | Type | Description | Notes
20
20
  **inventory_alert_threshold** | **Integer** | If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type` is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard. This value is always an integer. | [optional]
21
21
  **user_data** | **String** | Arbitrary user metadata to associate with the item variation. Cannot exceed 255 characters. Searchable. | [optional]
22
22
  **service_duration** | **Integer** | If the [CatalogItem](#type-catalogitem) that owns this item variation is of type `APPOINTMENTS_SERVICE`, then this is the duration of the service in milliseconds. For example, a 30 minute appointment would have the value `1800000`, which is equal to 30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second). | [optional]
23
- **catalog_measurement_unit_id** | **String** | Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities. | [optional]
24
23
  **measurement_unit_id** | **String** | ID of the ‘CatalogMeasurementUnit’ that is used to measure the quantity sold of this item variation. If left unset, the item will be sold in whole quantities. | [optional]
25
24
 
26
25
 
@@ -24,6 +24,9 @@ Name | Type | Description | Notes
24
24
  **discount_data** | [**CatalogDiscount**](CatalogDiscount.md) | Structured data for a [CatalogDiscount](#type-catalogdiscount), set for CatalogObjects of type `DISCOUNT`. | [optional]
25
25
  **modifier_list_data** | [**CatalogModifierList**](CatalogModifierList.md) | Structured data for a [CatalogModifierList](#type-catalogmodifierlist), set for CatalogObjects of type `MODIFIER_LIST`. | [optional]
26
26
  **modifier_data** | [**CatalogModifier**](CatalogModifier.md) | Structured data for a [CatalogModifier](#type-catalogmodifier), set for CatalogObjects of type `MODIFIER`. | [optional]
27
+ **time_period_data** | [**CatalogTimePeriod**](CatalogTimePeriod.md) | Structured data for a [CatalogTimePeriod](#type-catalogtimeperiod), set for CatalogObjects of type `TIME_PERIOD`. | [optional]
28
+ **product_set_data** | [**CatalogProductSet**](CatalogProductSet.md) | Structured data for a [CatalogProductSet](#type-catalogproductset), set for CatalogObjects of type `PRODUCT_SET`. | [optional]
29
+ **pricing_rule_data** | [**CatalogPricingRule**](CatalogPricingRule.md) | Structured data for a [CatalogPricingRule](#type-catalogpricingrule), set for CatalogObjects of type `PRICING_RULE`. | [optional]
27
30
  **image_data** | [**CatalogImage**](CatalogImage.md) | Structured data for a [CatalogImage](#type-catalogimage), set for CatalogObjects of type `IMAGE`. | [optional]
28
31
  **measurement_unit_data** | [**CatalogMeasurementUnit**](CatalogMeasurementUnit.md) | Structured data for a [CatalogMeasurementUnit](#type-catalogmeasurementunit), set for CatalogObjects of type `MEASUREMENT_UNIT`. | [optional]
29
32
 
@@ -9,12 +9,9 @@ Name | Type | Description | Notes
9
9
  ------------ | ------------- | ------------- | -------------
10
10
  **name** | **String** | User-defined name for the pricing rule. For example, \"Buy one get one free\" or \"10% off\". | [optional]
11
11
  **time_period_ids** | **Array<String>** | Unique ID for the [CatalogTimePeriod](#type-catalogtimeperiod)s when this pricing rule is in effect. If left unset, the pricing rule is always in effect. | [optional]
12
- **total_price_money** | [**Money**](Money.md) | The total amount of money to charge for all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. | [optional]
13
- **item_price_money** | [**Money**](Money.md) | The amount of money to charge for each matched item. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. | [optional]
14
12
  **discount_id** | **String** | Unique ID for the [CatalogDiscount](#type-catalogdiscount) to take off the price of all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. | [optional]
15
13
  **match_products_id** | **String** | Unique ID for the [CatalogProductSet](#type-catalogproductset) that will be matched by this rule. A match rule matches within the entire cart. | [optional]
16
14
  **apply_products_id** | **String** | The [CatalogProductSet](#type-catalogproductset) to apply the pricing rule to within the set of matched products specified by `match_products_id`. An apply rule can only match once within the set of matched products. If left unset, the pricing rule will be applied to all products within the set of matched products. | [optional]
17
- **stackable** | **String** | Describes how the pricing rule can be combined with other pricing rules. See [Stackable](#type-stackable) for all possible values. See [AggregationStrategy](#type-aggregationstrategy) for possible values | [optional]
18
15
  **exclude_products_id** | **String** | Identifies the [CatalogProductSet](#type-catalogproductset) to exclude from this pricing rule. An exclude rule matches within the subset of the cart that fits the match rules (the match set). An exclude rule can only match once in the match set. If not supplied, the pricing will be applied to all products in the match set. Other products retain their base price, or a price generated by other rules. | [optional]
19
16
  **valid_from_date** | **String** | Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD). | [optional]
20
17
  **valid_from_local_time** | **String** | Represents the local time the pricing rule should be valid from. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. | [optional]
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
14
14
  **location_id** | **String** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional]
15
15
  **catalog_object_id** | **String** | The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked. | [optional]
16
16
  **catalog_object_type** | **String** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
17
- **quantity** | **String** | The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional]
17
+ **quantity** | **String** | The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. | [optional]
18
18
  **total_price_money** | [**Money**](Money.md) | The read-only total price paid for goods associated with the adjustment. Present if and only if `to_state` is `SOLD`. Always non-negative. | [optional]
19
19
  **occurred_at** | **String** | A client-generated timestamp in RFC 3339 format that indicates when the adjustment took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional]
20
20
  **created_at** | **String** | A read-only timestamp in RFC 3339 format that indicates when Square received the adjustment. | [optional]
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
11
11
  **catalog_object_type** | **String** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
12
12
  **state** | **String** | The current [InventoryState](#type-inventorystate) for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional]
13
13
  **location_id** | **String** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional]
14
- **quantity** | **String** | The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional]
14
+ **quantity** | **String** | The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. | [optional]
15
15
  **calculated_at** | **String** | A read-only timestamp in RFC 3339 format that indicates when Square received the most recent physical count or adjustment that had an affect on the estimated count. | [optional]
16
16
 
17
17
 
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
13
13
  **catalog_object_type** | **String** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
14
14
  **state** | **String** | The current [InventoryState](#type-inventorystate) for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional]
15
15
  **location_id** | **String** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional]
16
- **quantity** | **String** | The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional]
16
+ **quantity** | **String** | The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. | [optional]
17
17
  **source** | [**SourceApplication**](SourceApplication.md) | Read-only information about the application that submitted the physical count. | [optional]
18
18
  **employee_id** | **String** | The Square ID of the [Employee](#type-employee) responsible for the physical count. | [optional]
19
19
  **occurred_at** | **String** | A client-generated timestamp in RFC 3339 format that indicates when the physical count took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional]
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
14
14
  **to_location_id** | **String** | The Square ID of the [Location](#type-location) where the related quantity of items were tracked after the transfer. | [optional]
15
15
  **catalog_object_id** | **String** | The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked. | [optional]
16
16
  **catalog_object_type** | **String** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked.Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
17
- **quantity** | **String** | The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional]
17
+ **quantity** | **String** | The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. | [optional]
18
18
  **occurred_at** | **String** | A client-generated timestamp in RFC 3339 format that indicates when the transfer took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional]
19
19
  **created_at** | **String** | A read-only timestamp in RFC 3339 format that indicates when Square received the transfer request. | [optional]
20
20
  **source** | [**SourceApplication**](SourceApplication.md) | Read-only information about the application that initiated the inventory transfer. | [optional]
@@ -18,7 +18,7 @@ Method | HTTP request | Description
18
18
 
19
19
  CaptureTransaction
20
20
 
21
- Captures a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information.
21
+ Captures a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See the [Delay Capture of Funds](/transactions-api/cookbook/delay-capture) recipe for more information.
22
22
 
23
23
  ### Example
24
24
  ```ruby
@@ -365,7 +365,7 @@ Name | Type | Description | Notes
365
365
 
366
366
  VoidTransaction
367
367
 
368
- Cancels a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information.
368
+ Cancels a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See the [Delay Capture of Funds](/transactions-api/cookbook/delay-capture) recipe for more information.
369
369
 
370
370
  ### Example
371
371
  ```ruby
@@ -18,7 +18,6 @@ require 'square_connect/models/additional_recipient'
18
18
  require 'square_connect/models/additional_recipient_receivable'
19
19
  require 'square_connect/models/additional_recipient_receivable_refund'
20
20
  require 'square_connect/models/address'
21
- require 'square_connect/models/aggregation_strategy'
22
21
  require 'square_connect/models/batch_change_inventory_request'
23
22
  require 'square_connect/models/batch_change_inventory_response'
24
23
  require 'square_connect/models/batch_delete_catalog_objects_request'
@@ -268,12 +268,6 @@ module SquareConnect
268
268
  if @api_client.config.debugging
269
269
  @api_client.config.logger.debug "Calling API: CustomersApi.list_customers ..."
270
270
  end
271
- if opts[:'sort_field'] && !['DEFAULT', 'CREATED_AT'].include?(opts[:'sort_field'])
272
- fail ArgumentError, 'invalid value for "sort_field", must be one of DEFAULT, CREATED_AT'
273
- end
274
- if opts[:'sort_order'] && !['DESC', 'ASC'].include?(opts[:'sort_order'])
275
- fail ArgumentError, 'invalid value for "sort_order", must be one of DESC, ASC'
276
- end
277
271
  # resource path
278
272
  local_var_path = "/v2/customers".sub('{format}','json')
279
273
 
@@ -42,9 +42,6 @@ module SquareConnect
42
42
  if @api_client.config.debugging
43
43
  @api_client.config.logger.debug "Calling API: EmployeesApi.list_employees ..."
44
44
  end
45
- if opts[:'status'] && !['ACTIVE', 'INACTIVE'].include?(opts[:'status'])
46
- fail ArgumentError, 'invalid value for "status", must be one of ACTIVE, INACTIVE'
47
- end
48
45
  # resource path
49
46
  local_var_path = "/v2/employees".sub('{format}','json')
50
47
 
@@ -46,9 +46,6 @@ module SquareConnect
46
46
  end
47
47
  # verify the required parameter 'location_id' is set
48
48
  fail ArgumentError, "Missing the required parameter 'location_id' when calling ReportingApi.list_additional_recipient_receivable_refunds" if location_id.nil?
49
- if opts[:'sort_order'] && !['DESC', 'ASC'].include?(opts[:'sort_order'])
50
- fail ArgumentError, 'invalid value for "sort_order", must be one of DESC, ASC'
51
- end
52
49
  # resource path
53
50
  local_var_path = "/v2/locations/{location_id}/additional-recipient-receivable-refunds".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
54
51
 
@@ -116,9 +113,6 @@ module SquareConnect
116
113
  end
117
114
  # verify the required parameter 'location_id' is set
118
115
  fail ArgumentError, "Missing the required parameter 'location_id' when calling ReportingApi.list_additional_recipient_receivables" if location_id.nil?
119
- if opts[:'sort_order'] && !['DESC', 'ASC'].include?(opts[:'sort_order'])
120
- fail ArgumentError, 'invalid value for "sort_order", must be one of DESC, ASC'
121
- end
122
116
  # resource path
123
117
  local_var_path = "/v2/locations/{location_id}/additional-recipient-receivables".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
124
118
 
@@ -18,7 +18,7 @@ module SquareConnect
18
18
  end
19
19
 
20
20
  # CaptureTransaction
21
- # Captures a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information.
21
+ # Captures a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See the [Delay Capture of Funds](/transactions-api/cookbook/delay-capture) recipe for more information.
22
22
  # @param location_id
23
23
  # @param transaction_id
24
24
  # @param [Hash] opts the optional parameters
@@ -29,7 +29,7 @@ module SquareConnect
29
29
  end
30
30
 
31
31
  # CaptureTransaction
32
- # Captures a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information.
32
+ # Captures a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See the [Delay Capture of Funds](/transactions-api/cookbook/delay-capture) recipe for more information.
33
33
  # @param location_id
34
34
  # @param transaction_id
35
35
  # @param [Hash] opts the optional parameters
@@ -227,9 +227,6 @@ module SquareConnect
227
227
  end
228
228
  # verify the required parameter 'location_id' is set
229
229
  fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionsApi.list_refunds" if location_id.nil?
230
- if opts[:'sort_order'] && !['DESC', 'ASC'].include?(opts[:'sort_order'])
231
- fail ArgumentError, 'invalid value for "sort_order", must be one of DESC, ASC'
232
- end
233
230
  # resource path
234
231
  local_var_path = "/v2/locations/{location_id}/refunds".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
235
232
 
@@ -297,9 +294,6 @@ module SquareConnect
297
294
  end
298
295
  # verify the required parameter 'location_id' is set
299
296
  fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionsApi.list_transactions" if location_id.nil?
300
- if opts[:'sort_order'] && !['DESC', 'ASC'].include?(opts[:'sort_order'])
301
- fail ArgumentError, 'invalid value for "sort_order", must be one of DESC, ASC'
302
- end
303
297
  # resource path
304
298
  local_var_path = "/v2/locations/{location_id}/transactions".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
305
299
 
@@ -398,7 +392,7 @@ module SquareConnect
398
392
  end
399
393
 
400
394
  # VoidTransaction
401
- # Cancels a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information.
395
+ # Cancels a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See the [Delay Capture of Funds](/transactions-api/cookbook/delay-capture) recipe for more information.
402
396
  # @param location_id
403
397
  # @param transaction_id
404
398
  # @param [Hash] opts the optional parameters
@@ -409,7 +403,7 @@ module SquareConnect
409
403
  end
410
404
 
411
405
  # VoidTransaction
412
- # Cancels a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information.
406
+ # Cancels a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See the [Delay Capture of Funds](/transactions-api/cookbook/delay-capture) recipe for more information.
413
407
  # @param location_id
414
408
  # @param transaction_id
415
409
  # @param [Hash] opts the optional parameters
@@ -264,9 +264,6 @@ module SquareConnect
264
264
  end
265
265
  # verify the required parameter 'location_id' is set
266
266
  fail ArgumentError, "Missing the required parameter 'location_id' when calling V1EmployeesApi.list_cash_drawer_shifts" if location_id.nil?
267
- if opts[:'order'] && !['DESC', 'ASC'].include?(opts[:'order'])
268
- fail ArgumentError, 'invalid value for "order", must be one of DESC, ASC'
269
- end
270
267
  # resource path
271
268
  local_var_path = "/v1/{location_id}/cash-drawer-shifts".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
272
269
 
@@ -327,9 +324,6 @@ module SquareConnect
327
324
  if @api_client.config.debugging
328
325
  @api_client.config.logger.debug "Calling API: V1EmployeesApi.list_employee_roles ..."
329
326
  end
330
- if opts[:'order'] && !['DESC', 'ASC'].include?(opts[:'order'])
331
- fail ArgumentError, 'invalid value for "order", must be one of DESC, ASC'
332
- end
333
327
  # resource path
334
328
  local_var_path = "/v1/me/roles".sub('{format}','json')
335
329
 
@@ -402,12 +396,6 @@ module SquareConnect
402
396
  if @api_client.config.debugging
403
397
  @api_client.config.logger.debug "Calling API: V1EmployeesApi.list_employees ..."
404
398
  end
405
- if opts[:'order'] && !['DESC', 'ASC'].include?(opts[:'order'])
406
- fail ArgumentError, 'invalid value for "order", must be one of DESC, ASC'
407
- end
408
- if opts[:'status'] && !['ACTIVE', 'INACTIVE'].include?(opts[:'status'])
409
- fail ArgumentError, 'invalid value for "status", must be one of ACTIVE, INACTIVE'
410
- end
411
399
  # resource path
412
400
  local_var_path = "/v1/me/employees".sub('{format}','json')
413
401
 
@@ -545,9 +533,6 @@ module SquareConnect
545
533
  if @api_client.config.debugging
546
534
  @api_client.config.logger.debug "Calling API: V1EmployeesApi.list_timecards ..."
547
535
  end
548
- if opts[:'order'] && !['DESC', 'ASC'].include?(opts[:'order'])
549
- fail ArgumentError, 'invalid value for "order", must be one of DESC, ASC'
550
- end
551
536
  # resource path
552
537
  local_var_path = "/v1/me/timecards".sub('{format}','json')
553
538
 
@@ -158,9 +158,6 @@ module SquareConnect
158
158
  end
159
159
  # verify the required parameter 'location_id' is set
160
160
  fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_orders" if location_id.nil?
161
- if opts[:'order'] && !['DESC', 'ASC'].include?(opts[:'order'])
162
- fail ArgumentError, 'invalid value for "order", must be one of DESC, ASC'
163
- end
164
161
  # resource path
165
162
  local_var_path = "/v1/{location_id}/orders".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
166
163
 
@@ -231,9 +228,6 @@ module SquareConnect
231
228
  end
232
229
  # verify the required parameter 'location_id' is set
233
230
  fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_payments" if location_id.nil?
234
- if opts[:'order'] && !['DESC', 'ASC'].include?(opts[:'order'])
235
- fail ArgumentError, 'invalid value for "order", must be one of DESC, ASC'
236
- end
237
231
  # resource path
238
232
  local_var_path = "/v1/{location_id}/payments".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
239
233
 
@@ -305,9 +299,6 @@ module SquareConnect
305
299
  end
306
300
  # verify the required parameter 'location_id' is set
307
301
  fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_refunds" if location_id.nil?
308
- if opts[:'order'] && !['DESC', 'ASC'].include?(opts[:'order'])
309
- fail ArgumentError, 'invalid value for "order", must be one of DESC, ASC'
310
- end
311
302
  # resource path
312
303
  local_var_path = "/v1/{location_id}/refunds".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
313
304
 
@@ -380,12 +371,6 @@ module SquareConnect
380
371
  end
381
372
  # verify the required parameter 'location_id' is set
382
373
  fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_settlements" if location_id.nil?
383
- if opts[:'order'] && !['DESC', 'ASC'].include?(opts[:'order'])
384
- fail ArgumentError, 'invalid value for "order", must be one of DESC, ASC'
385
- end
386
- if opts[:'status'] && !['SENT', 'FAILED'].include?(opts[:'status'])
387
- fail ArgumentError, 'invalid value for "status", must be one of SENT, FAILED'
388
- end
389
374
  # resource path
390
375
  local_var_path = "/v1/{location_id}/settlements".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
391
376
 
@@ -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.20190612.1"
33
+ @user_agent = "Square-Connect-Ruby/2.20190710.0"
34
34
 
35
35
  @default_headers = {
36
36
  'Content-Type' => "application/json",
@@ -57,27 +57,6 @@ module SquareConnect
57
57
  # Optional organization name when it's representing recipient.
58
58
  attr_accessor :organization
59
59
 
60
- class EnumAttributeValidator
61
- attr_reader :datatype
62
- attr_reader :allowable_values
63
-
64
- def initialize(datatype, allowable_values)
65
- @allowable_values = allowable_values.map do |value|
66
- case datatype.to_s
67
- when /Integer/i
68
- value.to_i
69
- when /Float/i
70
- value.to_f
71
- else
72
- value
73
- end
74
- end
75
- end
76
-
77
- def valid?(value)
78
- !value || allowable_values.include?(value)
79
- end
80
- end
81
60
 
82
61
  # Attribute mapping from ruby-style variable name to JSON key.
83
62
  def self.attribute_map
@@ -201,21 +180,9 @@ module SquareConnect
201
180
  # Check to see if the all the properties in the model are valid
202
181
  # @return true if the model is valid
203
182
  def valid?
204
- country_validator = EnumAttributeValidator.new('String', ["ZZ", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"])
205
- return false unless country_validator.valid?(@country)
206
183
  return true
207
184
  end
208
185
 
209
- # Custom attribute writer method checking allowed values (enum).
210
- # @param [Object] country Object to be assigned
211
- def country=(country)
212
- validator = EnumAttributeValidator.new('String', ["ZZ", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"])
213
- unless validator.valid?(country)
214
- fail ArgumentError, "invalid value for 'country', must be one of #{validator.allowable_values}."
215
- end
216
- @country = country
217
- end
218
-
219
186
  # Checks equality by comparing each attribute.
220
187
  # @param [Object] Object to be compared
221
188
  def ==(o)
@@ -33,27 +33,6 @@ module SquareConnect
33
33
  # A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information.
34
34
  attr_accessor :cursor
35
35
 
36
- class EnumAttributeValidator
37
- attr_reader :datatype
38
- attr_reader :allowable_values
39
-
40
- def initialize(datatype, allowable_values)
41
- @allowable_values = allowable_values.map do |value|
42
- case datatype.to_s
43
- when /Integer/i
44
- value.to_i
45
- when /Float/i
46
- value.to_f
47
- else
48
- value
49
- end
50
- end
51
- end
52
-
53
- def valid?(value)
54
- !value || allowable_values.include?(value)
55
- end
56
- end
57
36
 
58
37
  # Attribute mapping from ruby-style variable name to JSON key.
59
38
  def self.attribute_map
@@ -21,27 +21,6 @@ module SquareConnect
21
21
  # The end time of a business hours period, specified in local time using partial-time RFC3339 format.
22
22
  attr_accessor :end_local_time
23
23
 
24
- class EnumAttributeValidator
25
- attr_reader :datatype
26
- attr_reader :allowable_values
27
-
28
- def initialize(datatype, allowable_values)
29
- @allowable_values = allowable_values.map do |value|
30
- case datatype.to_s
31
- when /Integer/i
32
- value.to_i
33
- when /Float/i
34
- value.to_f
35
- else
36
- value
37
- end
38
- end
39
- end
40
-
41
- def valid?(value)
42
- !value || allowable_values.include?(value)
43
- end
44
- end
45
24
 
46
25
  # Attribute mapping from ruby-style variable name to JSON key.
47
26
  def self.attribute_map
@@ -93,21 +72,9 @@ module SquareConnect
93
72
  # Check to see if the all the properties in the model are valid
94
73
  # @return true if the model is valid
95
74
  def valid?
96
- day_of_week_validator = EnumAttributeValidator.new('String', ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"])
97
- return false unless day_of_week_validator.valid?(@day_of_week)
98
75
  return true
99
76
  end
100
77
 
101
- # Custom attribute writer method checking allowed values (enum).
102
- # @param [Object] day_of_week Object to be assigned
103
- def day_of_week=(day_of_week)
104
- validator = EnumAttributeValidator.new('String', ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"])
105
- unless validator.valid?(day_of_week)
106
- fail ArgumentError, "invalid value for 'day_of_week', must be one of #{validator.allowable_values}."
107
- end
108
- @day_of_week = day_of_week
109
- end
110
-
111
78
  # Checks equality by comparing each attribute.
112
79
  # @param [Object] Object to be compared
113
80
  def ==(o)