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
@@ -18,12 +18,6 @@ module SquareConnect
18
18
  # 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.
19
19
  attr_accessor :time_period_ids
20
20
 
21
- # The total amount of money to charge for all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied.
22
- attr_accessor :total_price_money
23
-
24
- # The amount of money to charge for each matched item. Only one of `total_price_money`, `item_price`, or `discount` can be supplied.
25
- attr_accessor :item_price_money
26
-
27
21
  # 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.
28
22
  attr_accessor :discount_id
29
23
 
@@ -33,9 +27,6 @@ module SquareConnect
33
27
  # 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.
34
28
  attr_accessor :apply_products_id
35
29
 
36
- # 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
37
- attr_accessor :stackable
38
-
39
30
  # 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.
40
31
  attr_accessor :exclude_products_id
41
32
 
@@ -51,39 +42,15 @@ module SquareConnect
51
42
  # Represents the local time at which the pricing rule will become inactive. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated.
52
43
  attr_accessor :valid_until_local_time
53
44
 
54
- class EnumAttributeValidator
55
- attr_reader :datatype
56
- attr_reader :allowable_values
57
-
58
- def initialize(datatype, allowable_values)
59
- @allowable_values = allowable_values.map do |value|
60
- case datatype.to_s
61
- when /Integer/i
62
- value.to_i
63
- when /Float/i
64
- value.to_f
65
- else
66
- value
67
- end
68
- end
69
- end
70
-
71
- def valid?(value)
72
- !value || allowable_values.include?(value)
73
- end
74
- end
75
45
 
76
46
  # Attribute mapping from ruby-style variable name to JSON key.
77
47
  def self.attribute_map
78
48
  {
79
49
  :'name' => :'name',
80
50
  :'time_period_ids' => :'time_period_ids',
81
- :'total_price_money' => :'total_price_money',
82
- :'item_price_money' => :'item_price_money',
83
51
  :'discount_id' => :'discount_id',
84
52
  :'match_products_id' => :'match_products_id',
85
53
  :'apply_products_id' => :'apply_products_id',
86
- :'stackable' => :'stackable',
87
54
  :'exclude_products_id' => :'exclude_products_id',
88
55
  :'valid_from_date' => :'valid_from_date',
89
56
  :'valid_from_local_time' => :'valid_from_local_time',
@@ -97,12 +64,9 @@ module SquareConnect
97
64
  {
98
65
  :'name' => :'String',
99
66
  :'time_period_ids' => :'Array<String>',
100
- :'total_price_money' => :'Money',
101
- :'item_price_money' => :'Money',
102
67
  :'discount_id' => :'String',
103
68
  :'match_products_id' => :'String',
104
69
  :'apply_products_id' => :'String',
105
- :'stackable' => :'String',
106
70
  :'exclude_products_id' => :'String',
107
71
  :'valid_from_date' => :'String',
108
72
  :'valid_from_local_time' => :'String',
@@ -129,14 +93,6 @@ module SquareConnect
129
93
  end
130
94
  end
131
95
 
132
- if attributes.has_key?(:'total_price_money')
133
- self.total_price_money = attributes[:'total_price_money']
134
- end
135
-
136
- if attributes.has_key?(:'item_price_money')
137
- self.item_price_money = attributes[:'item_price_money']
138
- end
139
-
140
96
  if attributes.has_key?(:'discount_id')
141
97
  self.discount_id = attributes[:'discount_id']
142
98
  end
@@ -149,10 +105,6 @@ module SquareConnect
149
105
  self.apply_products_id = attributes[:'apply_products_id']
150
106
  end
151
107
 
152
- if attributes.has_key?(:'stackable')
153
- self.stackable = attributes[:'stackable']
154
- end
155
-
156
108
  if attributes.has_key?(:'exclude_products_id')
157
109
  self.exclude_products_id = attributes[:'exclude_products_id']
158
110
  end
@@ -185,21 +137,9 @@ module SquareConnect
185
137
  # Check to see if the all the properties in the model are valid
186
138
  # @return true if the model is valid
187
139
  def valid?
188
- stackable_validator = EnumAttributeValidator.new('String', ["UNKNOWN", "BASE", "STACKABLE", "EXCLUSIVE"])
189
- return false unless stackable_validator.valid?(@stackable)
190
140
  return true
191
141
  end
192
142
 
193
- # Custom attribute writer method checking allowed values (enum).
194
- # @param [Object] stackable Object to be assigned
195
- def stackable=(stackable)
196
- validator = EnumAttributeValidator.new('String', ["UNKNOWN", "BASE", "STACKABLE", "EXCLUSIVE"])
197
- unless validator.valid?(stackable)
198
- fail ArgumentError, "invalid value for 'stackable', must be one of #{validator.allowable_values}."
199
- end
200
- @stackable = stackable
201
- end
202
-
203
143
  # Checks equality by comparing each attribute.
204
144
  # @param [Object] Object to be compared
205
145
  def ==(o)
@@ -207,12 +147,9 @@ module SquareConnect
207
147
  self.class == o.class &&
208
148
  name == o.name &&
209
149
  time_period_ids == o.time_period_ids &&
210
- total_price_money == o.total_price_money &&
211
- item_price_money == o.item_price_money &&
212
150
  discount_id == o.discount_id &&
213
151
  match_products_id == o.match_products_id &&
214
152
  apply_products_id == o.apply_products_id &&
215
- stackable == o.stackable &&
216
153
  exclude_products_id == o.exclude_products_id &&
217
154
  valid_from_date == o.valid_from_date &&
218
155
  valid_from_local_time == o.valid_from_local_time &&
@@ -229,7 +166,7 @@ module SquareConnect
229
166
  # Calculates hash code according to all attributes.
230
167
  # @return [Fixnum] Hash code
231
168
  def hash
232
- [name, time_period_ids, total_price_money, item_price_money, discount_id, match_products_id, apply_products_id, stackable, exclude_products_id, valid_from_date, valid_from_local_time, valid_until_date, valid_until_local_time].hash
169
+ [name, time_period_ids, discount_id, match_products_id, apply_products_id, exclude_products_id, valid_from_date, valid_from_local_time, valid_until_date, valid_until_local_time].hash
233
170
  end
234
171
 
235
172
  # Builds the object from hash
@@ -21,27 +21,6 @@ module SquareConnect
21
21
  # The desired [SortOrder](#type-sortorder), `\"ASC\"` (ascending) or `\"DESC\"` (descending). See [SortOrder](#type-sortorder) for possible values
22
22
  attr_accessor :sort_order
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
@@ -103,8 +82,6 @@ module SquareConnect
103
82
  def valid?
104
83
  return false if @attribute_name.nil?
105
84
  return false if @attribute_name.to_s.length < 1
106
- sort_order_validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
107
- return false unless sort_order_validator.valid?(@sort_order)
108
85
  return true
109
86
  end
110
87
 
@@ -122,16 +99,6 @@ module SquareConnect
122
99
  @attribute_name = attribute_name
123
100
  end
124
101
 
125
- # Custom attribute writer method checking allowed values (enum).
126
- # @param [Object] sort_order Object to be assigned
127
- def sort_order=(sort_order)
128
- validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
129
- unless validator.valid?(sort_order)
130
- fail ArgumentError, "invalid value for 'sort_order', must be one of #{validator.allowable_values}."
131
- end
132
- @sort_order = sort_order
133
- end
134
-
135
102
  # Checks equality by comparing each attribute.
136
103
  # @param [Object] Object to be compared
137
104
  def ==(o)
@@ -30,27 +30,6 @@ module SquareConnect
30
30
  # If `true`, the tax will be shown as enabled in the Square Point of Sale app.
31
31
  attr_accessor :enabled
32
32
 
33
- class EnumAttributeValidator
34
- attr_reader :datatype
35
- attr_reader :allowable_values
36
-
37
- def initialize(datatype, allowable_values)
38
- @allowable_values = allowable_values.map do |value|
39
- case datatype.to_s
40
- when /Integer/i
41
- value.to_i
42
- when /Float/i
43
- value.to_f
44
- else
45
- value
46
- end
47
- end
48
- end
49
-
50
- def valid?(value)
51
- !value || allowable_values.include?(value)
52
- end
53
- end
54
33
 
55
34
  # Attribute mapping from ruby-style variable name to JSON key.
56
35
  def self.attribute_map
@@ -120,33 +99,9 @@ module SquareConnect
120
99
  # Check to see if the all the properties in the model are valid
121
100
  # @return true if the model is valid
122
101
  def valid?
123
- calculation_phase_validator = EnumAttributeValidator.new('String', ["TAX_SUBTOTAL_PHASE", "TAX_TOTAL_PHASE"])
124
- return false unless calculation_phase_validator.valid?(@calculation_phase)
125
- inclusion_type_validator = EnumAttributeValidator.new('String', ["ADDITIVE", "INCLUSIVE"])
126
- return false unless inclusion_type_validator.valid?(@inclusion_type)
127
102
  return true
128
103
  end
129
104
 
130
- # Custom attribute writer method checking allowed values (enum).
131
- # @param [Object] calculation_phase Object to be assigned
132
- def calculation_phase=(calculation_phase)
133
- validator = EnumAttributeValidator.new('String', ["TAX_SUBTOTAL_PHASE", "TAX_TOTAL_PHASE"])
134
- unless validator.valid?(calculation_phase)
135
- fail ArgumentError, "invalid value for 'calculation_phase', must be one of #{validator.allowable_values}."
136
- end
137
- @calculation_phase = calculation_phase
138
- end
139
-
140
- # Custom attribute writer method checking allowed values (enum).
141
- # @param [Object] inclusion_type Object to be assigned
142
- def inclusion_type=(inclusion_type)
143
- validator = EnumAttributeValidator.new('String', ["ADDITIVE", "INCLUSIVE"])
144
- unless validator.valid?(inclusion_type)
145
- fail ArgumentError, "invalid value for 'inclusion_type', must be one of #{validator.allowable_values}."
146
- end
147
- @inclusion_type = inclusion_type
148
- end
149
-
150
105
  # Checks equality by comparing each attribute.
151
106
  # @param [Object] Object to be compared
152
107
  def ==(o)
@@ -24,27 +24,6 @@ module SquareConnect
24
24
  # Only used for ad hoc taxes. The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. This value range between 0.0 up to 100.0
25
25
  attr_accessor :percentage
26
26
 
27
- class EnumAttributeValidator
28
- attr_reader :datatype
29
- attr_reader :allowable_values
30
-
31
- def initialize(datatype, allowable_values)
32
- @allowable_values = allowable_values.map do |value|
33
- case datatype.to_s
34
- when /Integer/i
35
- value.to_i
36
- when /Float/i
37
- value.to_f
38
- else
39
- value
40
- end
41
- end
42
- end
43
-
44
- def valid?(value)
45
- !value || allowable_values.include?(value)
46
- end
47
- end
48
27
 
49
28
  # Attribute mapping from ruby-style variable name to JSON key.
50
29
  def self.attribute_map
@@ -116,8 +95,6 @@ module SquareConnect
116
95
  def valid?
117
96
  return false if !@catalog_object_id.nil? && @catalog_object_id.to_s.length > 192
118
97
  return false if !@name.nil? && @name.to_s.length > 255
119
- type_validator = EnumAttributeValidator.new('String', ["UNKNOWN_TAX", "ADDITIVE", "INCLUSIVE"])
120
- return false unless type_validator.valid?(@type)
121
98
  return false if !@percentage.nil? && @percentage.to_s.length > 10
122
99
  return true
123
100
  end
@@ -144,16 +121,6 @@ module SquareConnect
144
121
  @name = name
145
122
  end
146
123
 
147
- # Custom attribute writer method checking allowed values (enum).
148
- # @param [Object] type Object to be assigned
149
- def type=(type)
150
- validator = EnumAttributeValidator.new('String', ["UNKNOWN_TAX", "ADDITIVE", "INCLUSIVE"])
151
- unless validator.valid?(type)
152
- fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
153
- end
154
- @type = type
155
- end
156
-
157
124
  # Custom attribute writer method with validation
158
125
  # @param [Object] percentage Value to be assigned
159
126
  def percentage=(percentage)
@@ -63,27 +63,6 @@ module SquareConnect
63
63
  # A creation source represents the method used to create the customer profile. See [CustomerCreationSource](#type-customercreationsource) for possible values
64
64
  attr_accessor :creation_source
65
65
 
66
- class EnumAttributeValidator
67
- attr_reader :datatype
68
- attr_reader :allowable_values
69
-
70
- def initialize(datatype, allowable_values)
71
- @allowable_values = allowable_values.map do |value|
72
- case datatype.to_s
73
- when /Integer/i
74
- value.to_i
75
- when /Float/i
76
- value.to_f
77
- else
78
- value
79
- end
80
- end
81
- end
82
-
83
- def valid?(value)
84
- !value || allowable_values.include?(value)
85
- end
86
- end
87
66
 
88
67
  # Attribute mapping from ruby-style variable name to JSON key.
89
68
  def self.attribute_map
@@ -238,21 +217,9 @@ module SquareConnect
238
217
  return false if @id.nil?
239
218
  return false if @created_at.nil?
240
219
  return false if @updated_at.nil?
241
- creation_source_validator = EnumAttributeValidator.new('String', ["OTHER", "APPOINTMENTS", "COUPON", "DELETION_RECOVERY", "DIRECTORY", "EGIFTING", "EMAIL_COLLECTION", "FEEDBACK", "IMPORT", "INVOICES", "LOYALTY", "MARKETING", "MERGE", "ONLINE_STORE", "INSTANT_PROFILE", "TERMINAL", "THIRD_PARTY", "THIRD_PARTY_IMPORT", "UNMERGE_RECOVERY"])
242
- return false unless creation_source_validator.valid?(@creation_source)
243
220
  return true
244
221
  end
245
222
 
246
- # Custom attribute writer method checking allowed values (enum).
247
- # @param [Object] creation_source Object to be assigned
248
- def creation_source=(creation_source)
249
- validator = EnumAttributeValidator.new('String', ["OTHER", "APPOINTMENTS", "COUPON", "DELETION_RECOVERY", "DIRECTORY", "EGIFTING", "EMAIL_COLLECTION", "FEEDBACK", "IMPORT", "INVOICES", "LOYALTY", "MARKETING", "MERGE", "ONLINE_STORE", "INSTANT_PROFILE", "TERMINAL", "THIRD_PARTY", "THIRD_PARTY_IMPORT", "UNMERGE_RECOVERY"])
250
- unless validator.valid?(creation_source)
251
- fail ArgumentError, "invalid value for 'creation_source', must be one of #{validator.allowable_values}."
252
- end
253
- @creation_source = creation_source
254
- end
255
-
256
223
  # Checks equality by comparing each attribute.
257
224
  # @param [Object] Object to be compared
258
225
  def ==(o)
@@ -18,27 +18,6 @@ module SquareConnect
18
18
  # Indicates whether a customer profile matching the filter criteria should be included in the result or excluded from the result. Default: `INCLUDE`. See [CustomerInclusionExclusion](#type-customerinclusionexclusion) for possible values
19
19
  attr_accessor :rule
20
20
 
21
- class EnumAttributeValidator
22
- attr_reader :datatype
23
- attr_reader :allowable_values
24
-
25
- def initialize(datatype, allowable_values)
26
- @allowable_values = allowable_values.map do |value|
27
- case datatype.to_s
28
- when /Integer/i
29
- value.to_i
30
- when /Float/i
31
- value.to_f
32
- else
33
- value
34
- end
35
- end
36
- end
37
-
38
- def valid?(value)
39
- !value || allowable_values.include?(value)
40
- end
41
- end
42
21
 
43
22
  # Attribute mapping from ruby-style variable name to JSON key.
44
23
  def self.attribute_map
@@ -86,21 +65,9 @@ module SquareConnect
86
65
  # Check to see if the all the properties in the model are valid
87
66
  # @return true if the model is valid
88
67
  def valid?
89
- rule_validator = EnumAttributeValidator.new('String', ["INCLUDE", "EXCLUDE"])
90
- return false unless rule_validator.valid?(@rule)
91
68
  return true
92
69
  end
93
70
 
94
- # Custom attribute writer method checking allowed values (enum).
95
- # @param [Object] rule Object to be assigned
96
- def rule=(rule)
97
- validator = EnumAttributeValidator.new('String', ["INCLUDE", "EXCLUDE"])
98
- unless validator.valid?(rule)
99
- fail ArgumentError, "invalid value for 'rule', must be one of #{validator.allowable_values}."
100
- end
101
- @rule = rule
102
- end
103
-
104
71
  # Checks equality by comparing each attribute.
105
72
  # @param [Object] Object to be compared
106
73
  def ==(o)
@@ -18,27 +18,6 @@ module SquareConnect
18
18
  # Indicates the order in which results should be displayed based on the value of the sort field. String comparisons use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. See [SortOrder](#type-sortorder) for possible values
19
19
  attr_accessor :order
20
20
 
21
- class EnumAttributeValidator
22
- attr_reader :datatype
23
- attr_reader :allowable_values
24
-
25
- def initialize(datatype, allowable_values)
26
- @allowable_values = allowable_values.map do |value|
27
- case datatype.to_s
28
- when /Integer/i
29
- value.to_i
30
- when /Float/i
31
- value.to_f
32
- else
33
- value
34
- end
35
- end
36
- end
37
-
38
- def valid?(value)
39
- !value || allowable_values.include?(value)
40
- end
41
- end
42
21
 
43
22
  # Attribute mapping from ruby-style variable name to JSON key.
44
23
  def self.attribute_map
@@ -84,33 +63,9 @@ module SquareConnect
84
63
  # Check to see if the all the properties in the model are valid
85
64
  # @return true if the model is valid
86
65
  def valid?
87
- field_validator = EnumAttributeValidator.new('String', ["DEFAULT", "CREATED_AT"])
88
- return false unless field_validator.valid?(@field)
89
- order_validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
90
- return false unless order_validator.valid?(@order)
91
66
  return true
92
67
  end
93
68
 
94
- # Custom attribute writer method checking allowed values (enum).
95
- # @param [Object] field Object to be assigned
96
- def field=(field)
97
- validator = EnumAttributeValidator.new('String', ["DEFAULT", "CREATED_AT"])
98
- unless validator.valid?(field)
99
- fail ArgumentError, "invalid value for 'field', must be one of #{validator.allowable_values}."
100
- end
101
- @field = field
102
- end
103
-
104
- # Custom attribute writer method checking allowed values (enum).
105
- # @param [Object] order Object to be assigned
106
- def order=(order)
107
- validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
108
- unless validator.valid?(order)
109
- fail ArgumentError, "invalid value for 'order', must be one of #{validator.allowable_values}."
110
- end
111
- @order = order
112
- end
113
-
114
69
  # Checks equality by comparing each attribute.
115
70
  # @param [Object] Object to be compared
116
71
  def ==(o)