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.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/README.md +1 -2
- data/docs/CatalogItem.md +0 -1
- data/docs/CatalogItemVariation.md +0 -1
- data/docs/CatalogObject.md +3 -0
- data/docs/CatalogPricingRule.md +0 -3
- data/docs/InventoryAdjustment.md +1 -1
- data/docs/InventoryCount.md +1 -1
- data/docs/InventoryPhysicalCount.md +1 -1
- data/docs/InventoryTransfer.md +1 -1
- data/docs/TransactionsApi.md +2 -2
- data/lib/square_connect.rb +0 -1
- data/lib/square_connect/api/customers_api.rb +0 -6
- data/lib/square_connect/api/employees_api.rb +0 -3
- data/lib/square_connect/api/reporting_api.rb +0 -6
- data/lib/square_connect/api/transactions_api.rb +4 -10
- data/lib/square_connect/api/v1_employees_api.rb +0 -15
- data/lib/square_connect/api/v1_transactions_api.rb +0 -15
- data/lib/square_connect/api_client.rb +1 -1
- data/lib/square_connect/models/address.rb +0 -33
- data/lib/square_connect/models/batch_retrieve_inventory_changes_request.rb +0 -21
- data/lib/square_connect/models/business_hours_period.rb +0 -33
- data/lib/square_connect/models/card.rb +0 -33
- data/lib/square_connect/models/catalog_discount.rb +0 -33
- data/lib/square_connect/models/catalog_item.rb +1 -44
- data/lib/square_connect/models/catalog_item_variation.rb +1 -56
- data/lib/square_connect/models/catalog_modifier_list.rb +0 -33
- data/lib/square_connect/models/catalog_object.rb +31 -34
- data/lib/square_connect/models/catalog_pricing_rule.rb +1 -64
- data/lib/square_connect/models/catalog_query_sorted_attribute.rb +0 -33
- data/lib/square_connect/models/catalog_tax.rb +0 -45
- data/lib/square_connect/models/create_order_request_tax.rb +0 -33
- data/lib/square_connect/models/customer.rb +0 -33
- data/lib/square_connect/models/customer_creation_source_filter.rb +0 -33
- data/lib/square_connect/models/customer_sort.rb +0 -45
- data/lib/square_connect/models/employee.rb +0 -33
- data/lib/square_connect/models/error.rb +0 -45
- data/lib/square_connect/models/inventory_adjustment.rb +1 -46
- data/lib/square_connect/models/inventory_change.rb +0 -33
- data/lib/square_connect/models/inventory_count.rb +1 -34
- data/lib/square_connect/models/inventory_physical_count.rb +1 -34
- data/lib/square_connect/models/inventory_transfer.rb +1 -34
- data/lib/square_connect/models/item_variation_location_overrides.rb +0 -45
- data/lib/square_connect/models/list_additional_recipient_receivable_refunds_request.rb +0 -33
- data/lib/square_connect/models/list_additional_recipient_receivables_request.rb +0 -33
- data/lib/square_connect/models/list_customers_request.rb +0 -45
- data/lib/square_connect/models/list_employees_request.rb +0 -33
- data/lib/square_connect/models/list_refunds_request.rb +0 -33
- data/lib/square_connect/models/list_transactions_request.rb +0 -33
- data/lib/square_connect/models/location.rb +0 -69
- data/lib/square_connect/models/measurement_unit.rb +0 -81
- data/lib/square_connect/models/money.rb +0 -33
- data/lib/square_connect/models/order.rb +0 -33
- data/lib/square_connect/models/order_fulfillment.rb +0 -45
- data/lib/square_connect/models/order_fulfillment_pickup_details.rb +0 -33
- data/lib/square_connect/models/order_line_item_discount.rb +0 -45
- data/lib/square_connect/models/order_line_item_tax.rb +0 -45
- data/lib/square_connect/models/order_return_discount.rb +0 -45
- data/lib/square_connect/models/order_return_service_charge.rb +0 -33
- data/lib/square_connect/models/order_return_tax.rb +0 -45
- data/lib/square_connect/models/order_service_charge.rb +0 -33
- data/lib/square_connect/models/refund.rb +0 -33
- data/lib/square_connect/models/register_domain_response.rb +0 -33
- data/lib/square_connect/models/search_catalog_objects_request.rb +0 -21
- data/lib/square_connect/models/search_orders_fulfillment_filter.rb +0 -21
- data/lib/square_connect/models/search_orders_sort.rb +0 -45
- data/lib/square_connect/models/search_orders_state_filter.rb +0 -21
- data/lib/square_connect/models/shift.rb +0 -33
- data/lib/square_connect/models/shift_filter.rb +0 -33
- data/lib/square_connect/models/shift_sort.rb +0 -45
- data/lib/square_connect/models/shift_workday.rb +0 -33
- data/lib/square_connect/models/source_application.rb +0 -33
- data/lib/square_connect/models/tender.rb +0 -33
- data/lib/square_connect/models/tender_card_details.rb +0 -45
- data/lib/square_connect/models/transaction.rb +0 -33
- data/lib/square_connect/models/v1_adjust_inventory_request.rb +0 -33
- data/lib/square_connect/models/v1_bank_account.rb +0 -33
- data/lib/square_connect/models/v1_cash_drawer_event.rb +0 -33
- data/lib/square_connect/models/v1_cash_drawer_shift.rb +0 -33
- data/lib/square_connect/models/v1_create_refund_request.rb +0 -33
- data/lib/square_connect/models/v1_discount.rb +0 -45
- data/lib/square_connect/models/v1_employee.rb +0 -33
- data/lib/square_connect/models/v1_employee_role.rb +0 -21
- data/lib/square_connect/models/v1_fee.rb +0 -69
- data/lib/square_connect/models/v1_item.rb +0 -57
- data/lib/square_connect/models/v1_list_cash_drawer_shifts_request.rb +0 -33
- data/lib/square_connect/models/v1_list_employee_roles_request.rb +0 -33
- data/lib/square_connect/models/v1_list_employees_request.rb +0 -45
- data/lib/square_connect/models/v1_list_orders_request.rb +0 -33
- data/lib/square_connect/models/v1_list_payments_request.rb +0 -33
- data/lib/square_connect/models/v1_list_refunds_request.rb +0 -33
- data/lib/square_connect/models/v1_list_settlements_request.rb +0 -45
- data/lib/square_connect/models/v1_list_timecards_request.rb +0 -33
- data/lib/square_connect/models/v1_merchant.rb +0 -45
- data/lib/square_connect/models/v1_modifier_list.rb +0 -33
- data/lib/square_connect/models/v1_money.rb +0 -33
- data/lib/square_connect/models/v1_order.rb +0 -33
- data/lib/square_connect/models/v1_order_history_entry.rb +0 -33
- data/lib/square_connect/models/v1_page_cell.rb +0 -45
- data/lib/square_connect/models/v1_payment_itemization.rb +0 -33
- data/lib/square_connect/models/v1_payment_surcharge.rb +0 -33
- data/lib/square_connect/models/v1_payment_tax.rb +0 -33
- data/lib/square_connect/models/v1_refund.rb +0 -33
- data/lib/square_connect/models/v1_settlement.rb +0 -33
- data/lib/square_connect/models/v1_settlement_entry.rb +0 -33
- data/lib/square_connect/models/v1_tender.rb +0 -57
- data/lib/square_connect/models/v1_timecard_event.rb +0 -33
- data/lib/square_connect/models/v1_update_modifier_list_request.rb +0 -33
- data/lib/square_connect/models/v1_update_order_request.rb +0 -33
- data/lib/square_connect/models/v1_variation.rb +0 -45
- data/lib/square_connect/models/workweek_config.rb +0 -33
- data/lib/square_connect/version.rb +1 -1
- data/spec/api/catalog_api_spec.rb +0 -1
- metadata +2 -6
- data/docs/AggregationStrategy.md +0 -15
- data/lib/square_connect/models/aggregation_strategy.rb +0 -21
- data/spec/models/aggregation_strategy_spec.rb +0 -33
@@ -21,27 +21,6 @@ module SquareConnect
|
|
21
21
|
# A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
22
22
|
attr_accessor :batch_token
|
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
|
-
order_validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
97
|
-
return false unless order_validator.valid?(@order)
|
98
75
|
return true
|
99
76
|
end
|
100
77
|
|
101
|
-
# Custom attribute writer method checking allowed values (enum).
|
102
|
-
# @param [Object] order Object to be assigned
|
103
|
-
def order=(order)
|
104
|
-
validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
105
|
-
unless validator.valid?(order)
|
106
|
-
fail ArgumentError, "invalid value for 'order', must be one of #{validator.allowable_values}."
|
107
|
-
end
|
108
|
-
@order = order
|
109
|
-
end
|
110
|
-
|
111
78
|
# Checks equality by comparing each attribute.
|
112
79
|
# @param [Object] Object to be compared
|
113
80
|
def ==(o)
|
@@ -39,27 +39,6 @@ module SquareConnect
|
|
39
39
|
# A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
40
40
|
attr_accessor :batch_token
|
41
41
|
|
42
|
-
class EnumAttributeValidator
|
43
|
-
attr_reader :datatype
|
44
|
-
attr_reader :allowable_values
|
45
|
-
|
46
|
-
def initialize(datatype, allowable_values)
|
47
|
-
@allowable_values = allowable_values.map do |value|
|
48
|
-
case datatype.to_s
|
49
|
-
when /Integer/i
|
50
|
-
value.to_i
|
51
|
-
when /Float/i
|
52
|
-
value.to_f
|
53
|
-
else
|
54
|
-
value
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
def valid?(value)
|
60
|
-
!value || allowable_values.include?(value)
|
61
|
-
end
|
62
|
-
end
|
63
42
|
|
64
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
65
44
|
def self.attribute_map
|
@@ -147,33 +126,9 @@ module SquareConnect
|
|
147
126
|
# Check to see if the all the properties in the model are valid
|
148
127
|
# @return true if the model is valid
|
149
128
|
def valid?
|
150
|
-
order_validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
151
|
-
return false unless order_validator.valid?(@order)
|
152
|
-
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "INACTIVE"])
|
153
|
-
return false unless status_validator.valid?(@status)
|
154
129
|
return true
|
155
130
|
end
|
156
131
|
|
157
|
-
# Custom attribute writer method checking allowed values (enum).
|
158
|
-
# @param [Object] order Object to be assigned
|
159
|
-
def order=(order)
|
160
|
-
validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
161
|
-
unless validator.valid?(order)
|
162
|
-
fail ArgumentError, "invalid value for 'order', must be one of #{validator.allowable_values}."
|
163
|
-
end
|
164
|
-
@order = order
|
165
|
-
end
|
166
|
-
|
167
|
-
# Custom attribute writer method checking allowed values (enum).
|
168
|
-
# @param [Object] status Object to be assigned
|
169
|
-
def status=(status)
|
170
|
-
validator = EnumAttributeValidator.new('String', ["ACTIVE", "INACTIVE"])
|
171
|
-
unless validator.valid?(status)
|
172
|
-
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
|
173
|
-
end
|
174
|
-
@status = status
|
175
|
-
end
|
176
|
-
|
177
132
|
# Checks equality by comparing each attribute.
|
178
133
|
# @param [Object] Object to be compared
|
179
134
|
def ==(o)
|
@@ -21,27 +21,6 @@ module SquareConnect
|
|
21
21
|
# A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
22
22
|
attr_accessor :batch_token
|
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
|
-
order_validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
97
|
-
return false unless order_validator.valid?(@order)
|
98
75
|
return true
|
99
76
|
end
|
100
77
|
|
101
|
-
# Custom attribute writer method checking allowed values (enum).
|
102
|
-
# @param [Object] order Object to be assigned
|
103
|
-
def order=(order)
|
104
|
-
validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
105
|
-
unless validator.valid?(order)
|
106
|
-
fail ArgumentError, "invalid value for 'order', must be one of #{validator.allowable_values}."
|
107
|
-
end
|
108
|
-
@order = order
|
109
|
-
end
|
110
|
-
|
111
78
|
# Checks equality by comparing each attribute.
|
112
79
|
# @param [Object] Object to be compared
|
113
80
|
def ==(o)
|
@@ -30,27 +30,6 @@ module SquareConnect
|
|
30
30
|
# Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed.
|
31
31
|
attr_accessor :include_partial
|
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,21 +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
|
-
order_validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
124
|
-
return false unless order_validator.valid?(@order)
|
125
102
|
return true
|
126
103
|
end
|
127
104
|
|
128
|
-
# Custom attribute writer method checking allowed values (enum).
|
129
|
-
# @param [Object] order Object to be assigned
|
130
|
-
def order=(order)
|
131
|
-
validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
132
|
-
unless validator.valid?(order)
|
133
|
-
fail ArgumentError, "invalid value for 'order', must be one of #{validator.allowable_values}."
|
134
|
-
end
|
135
|
-
@order = order
|
136
|
-
end
|
137
|
-
|
138
105
|
# Checks equality by comparing each attribute.
|
139
106
|
# @param [Object] Object to be compared
|
140
107
|
def ==(o)
|
@@ -27,27 +27,6 @@ module SquareConnect
|
|
27
27
|
# A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
28
28
|
attr_accessor :batch_token
|
29
29
|
|
30
|
-
class EnumAttributeValidator
|
31
|
-
attr_reader :datatype
|
32
|
-
attr_reader :allowable_values
|
33
|
-
|
34
|
-
def initialize(datatype, allowable_values)
|
35
|
-
@allowable_values = allowable_values.map do |value|
|
36
|
-
case datatype.to_s
|
37
|
-
when /Integer/i
|
38
|
-
value.to_i
|
39
|
-
when /Float/i
|
40
|
-
value.to_f
|
41
|
-
else
|
42
|
-
value
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
def valid?(value)
|
48
|
-
!value || allowable_values.include?(value)
|
49
|
-
end
|
50
|
-
end
|
51
30
|
|
52
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
53
32
|
def self.attribute_map
|
@@ -111,21 +90,9 @@ module SquareConnect
|
|
111
90
|
# Check to see if the all the properties in the model are valid
|
112
91
|
# @return true if the model is valid
|
113
92
|
def valid?
|
114
|
-
order_validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
115
|
-
return false unless order_validator.valid?(@order)
|
116
93
|
return true
|
117
94
|
end
|
118
95
|
|
119
|
-
# Custom attribute writer method checking allowed values (enum).
|
120
|
-
# @param [Object] order Object to be assigned
|
121
|
-
def order=(order)
|
122
|
-
validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
123
|
-
unless validator.valid?(order)
|
124
|
-
fail ArgumentError, "invalid value for 'order', must be one of #{validator.allowable_values}."
|
125
|
-
end
|
126
|
-
@order = order
|
127
|
-
end
|
128
|
-
|
129
96
|
# Checks equality by comparing each attribute.
|
130
97
|
# @param [Object] Object to be compared
|
131
98
|
def ==(o)
|
@@ -30,27 +30,6 @@ module SquareConnect
|
|
30
30
|
# A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
31
31
|
attr_accessor :batch_token
|
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
|
-
order_validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
124
|
-
return false unless order_validator.valid?(@order)
|
125
|
-
status_validator = EnumAttributeValidator.new('String', ["SENT", "FAILED"])
|
126
|
-
return false unless status_validator.valid?(@status)
|
127
102
|
return true
|
128
103
|
end
|
129
104
|
|
130
|
-
# Custom attribute writer method checking allowed values (enum).
|
131
|
-
# @param [Object] order Object to be assigned
|
132
|
-
def order=(order)
|
133
|
-
validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
134
|
-
unless validator.valid?(order)
|
135
|
-
fail ArgumentError, "invalid value for 'order', must be one of #{validator.allowable_values}."
|
136
|
-
end
|
137
|
-
@order = order
|
138
|
-
end
|
139
|
-
|
140
|
-
# Custom attribute writer method checking allowed values (enum).
|
141
|
-
# @param [Object] status Object to be assigned
|
142
|
-
def status=(status)
|
143
|
-
validator = EnumAttributeValidator.new('String', ["SENT", "FAILED"])
|
144
|
-
unless validator.valid?(status)
|
145
|
-
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
|
146
|
-
end
|
147
|
-
@status = status
|
148
|
-
end
|
149
|
-
|
150
105
|
# Checks equality by comparing each attribute.
|
151
106
|
# @param [Object] Object to be compared
|
152
107
|
def ==(o)
|
@@ -45,27 +45,6 @@ module SquareConnect
|
|
45
45
|
# A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
46
46
|
attr_accessor :batch_token
|
47
47
|
|
48
|
-
class EnumAttributeValidator
|
49
|
-
attr_reader :datatype
|
50
|
-
attr_reader :allowable_values
|
51
|
-
|
52
|
-
def initialize(datatype, allowable_values)
|
53
|
-
@allowable_values = allowable_values.map do |value|
|
54
|
-
case datatype.to_s
|
55
|
-
when /Integer/i
|
56
|
-
value.to_i
|
57
|
-
when /Float/i
|
58
|
-
value.to_f
|
59
|
-
else
|
60
|
-
value
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
def valid?(value)
|
66
|
-
!value || allowable_values.include?(value)
|
67
|
-
end
|
68
|
-
end
|
69
48
|
|
70
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
71
50
|
def self.attribute_map
|
@@ -165,21 +144,9 @@ module SquareConnect
|
|
165
144
|
# Check to see if the all the properties in the model are valid
|
166
145
|
# @return true if the model is valid
|
167
146
|
def valid?
|
168
|
-
order_validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
169
|
-
return false unless order_validator.valid?(@order)
|
170
147
|
return true
|
171
148
|
end
|
172
149
|
|
173
|
-
# Custom attribute writer method checking allowed values (enum).
|
174
|
-
# @param [Object] order Object to be assigned
|
175
|
-
def order=(order)
|
176
|
-
validator = EnumAttributeValidator.new('String', ["DESC", "ASC"])
|
177
|
-
unless validator.valid?(order)
|
178
|
-
fail ArgumentError, "invalid value for 'order', must be one of #{validator.allowable_values}."
|
179
|
-
end
|
180
|
-
@order = order
|
181
|
-
end
|
182
|
-
|
183
150
|
# Checks equality by comparing each attribute.
|
184
151
|
# @param [Object] Object to be compared
|
185
152
|
def ==(o)
|
@@ -57,27 +57,6 @@ module SquareConnect
|
|
57
57
|
# The URL of the merchant's online store.
|
58
58
|
attr_accessor :market_url
|
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
|
@@ -203,33 +182,9 @@ module SquareConnect
|
|
203
182
|
# Check to see if the all the properties in the model are valid
|
204
183
|
# @return true if the model is valid
|
205
184
|
def valid?
|
206
|
-
account_type_validator = EnumAttributeValidator.new('String', ["LOCATION", "BUSINESS"])
|
207
|
-
return false unless account_type_validator.valid?(@account_type)
|
208
|
-
business_type_validator = EnumAttributeValidator.new('String', ["ACCOUNTING", "APPAREL_AND_ACCESSORY_SHOPS", "ART_DEALERS_GALLERIES", "ART_DESIGN_AND_PHOTOGRAPHY", "BAR_CLUB_LOUNGE", "BEAUTY_AND_BARBER_SHOPS", "BOOK_STORES", "BUSINESS_SERVICES", "CATERING", "CHARITABLE_SOCIAL_SERVICE_ORGANIZATIONS", "CHARITIBLE_ORGS", "CLEANING_SERVICES", "COMPUTER_EQUIPMENT_SOFTWARE_MAINTENANCE_REPAIR_SERVICES", "CONSULTANT", "CONTRACTORS", "DELIVERY_SERVICES", "DENTISTRY", "EDUCATION", "FOOD_STORES_CONVENIENCE_STORES_AND_SPECIALTY_MARKETS", "FOOD_TRUCK_CART", "FURNITURE_HOME_AND_OFFICE_EQUIPMENT", "FURNITURE_HOME_GOODS", "HOTELS_AND_LODGING", "INDIVIDUAL_USE", "JEWELRY_AND_WATCHES", "LANDSCAPING_AND_HORTICULTURAL_SERVICES", "LANGUAGE_SCHOOLS", "LEGAL_SERVICES", "MEDICAL_PRACTITIONERS", "MEDICAL_SERVICES_AND_HEALTH_PRACTITIONERS", "MEMBERSHIP_ORGANIZATIONS", "MUSIC_AND_ENTERTAINMENT", "OTHER", "OUTDOOR_MARKETS", "PERSONAL_SERVICES", "POLITICAL_ORGANIZATIONS", "PROFESSIONAL_SERVICES", "REAL_ESTATE", "RECREATION_SERVICES", "REPAIR_SHOPS_AND_RELATED_SERVICES", "RESTAURANTS", "RETAIL_SHOPS", "SCHOOLS_AND_EDUCATIONAL_SERVICES", "SPORTING_GOODS", "TAXICABS_AND_LIMOUSINES", "TICKET_SALES", "TOURISM", "TRAVEL_TOURISM", "VETERINARY_SERVICES", "WEB_DEV_DESIGN"])
|
209
|
-
return false unless business_type_validator.valid?(@business_type)
|
210
185
|
return true
|
211
186
|
end
|
212
187
|
|
213
|
-
# Custom attribute writer method checking allowed values (enum).
|
214
|
-
# @param [Object] account_type Object to be assigned
|
215
|
-
def account_type=(account_type)
|
216
|
-
validator = EnumAttributeValidator.new('String', ["LOCATION", "BUSINESS"])
|
217
|
-
unless validator.valid?(account_type)
|
218
|
-
fail ArgumentError, "invalid value for 'account_type', must be one of #{validator.allowable_values}."
|
219
|
-
end
|
220
|
-
@account_type = account_type
|
221
|
-
end
|
222
|
-
|
223
|
-
# Custom attribute writer method checking allowed values (enum).
|
224
|
-
# @param [Object] business_type Object to be assigned
|
225
|
-
def business_type=(business_type)
|
226
|
-
validator = EnumAttributeValidator.new('String', ["ACCOUNTING", "APPAREL_AND_ACCESSORY_SHOPS", "ART_DEALERS_GALLERIES", "ART_DESIGN_AND_PHOTOGRAPHY", "BAR_CLUB_LOUNGE", "BEAUTY_AND_BARBER_SHOPS", "BOOK_STORES", "BUSINESS_SERVICES", "CATERING", "CHARITABLE_SOCIAL_SERVICE_ORGANIZATIONS", "CHARITIBLE_ORGS", "CLEANING_SERVICES", "COMPUTER_EQUIPMENT_SOFTWARE_MAINTENANCE_REPAIR_SERVICES", "CONSULTANT", "CONTRACTORS", "DELIVERY_SERVICES", "DENTISTRY", "EDUCATION", "FOOD_STORES_CONVENIENCE_STORES_AND_SPECIALTY_MARKETS", "FOOD_TRUCK_CART", "FURNITURE_HOME_AND_OFFICE_EQUIPMENT", "FURNITURE_HOME_GOODS", "HOTELS_AND_LODGING", "INDIVIDUAL_USE", "JEWELRY_AND_WATCHES", "LANDSCAPING_AND_HORTICULTURAL_SERVICES", "LANGUAGE_SCHOOLS", "LEGAL_SERVICES", "MEDICAL_PRACTITIONERS", "MEDICAL_SERVICES_AND_HEALTH_PRACTITIONERS", "MEMBERSHIP_ORGANIZATIONS", "MUSIC_AND_ENTERTAINMENT", "OTHER", "OUTDOOR_MARKETS", "PERSONAL_SERVICES", "POLITICAL_ORGANIZATIONS", "PROFESSIONAL_SERVICES", "REAL_ESTATE", "RECREATION_SERVICES", "REPAIR_SHOPS_AND_RELATED_SERVICES", "RESTAURANTS", "RETAIL_SHOPS", "SCHOOLS_AND_EDUCATIONAL_SERVICES", "SPORTING_GOODS", "TAXICABS_AND_LIMOUSINES", "TICKET_SALES", "TOURISM", "TRAVEL_TOURISM", "VETERINARY_SERVICES", "WEB_DEV_DESIGN"])
|
227
|
-
unless validator.valid?(business_type)
|
228
|
-
fail ArgumentError, "invalid value for 'business_type', must be one of #{validator.allowable_values}."
|
229
|
-
end
|
230
|
-
@business_type = business_type
|
231
|
-
end
|
232
|
-
|
233
188
|
# Checks equality by comparing each attribute.
|
234
189
|
# @param [Object] Object to be compared
|
235
190
|
def ==(o)
|
@@ -27,27 +27,6 @@ module SquareConnect
|
|
27
27
|
# The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.
|
28
28
|
attr_accessor :v2_id
|
29
29
|
|
30
|
-
class EnumAttributeValidator
|
31
|
-
attr_reader :datatype
|
32
|
-
attr_reader :allowable_values
|
33
|
-
|
34
|
-
def initialize(datatype, allowable_values)
|
35
|
-
@allowable_values = allowable_values.map do |value|
|
36
|
-
case datatype.to_s
|
37
|
-
when /Integer/i
|
38
|
-
value.to_i
|
39
|
-
when /Float/i
|
40
|
-
value.to_f
|
41
|
-
else
|
42
|
-
value
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
def valid?(value)
|
48
|
-
!value || allowable_values.include?(value)
|
49
|
-
end
|
50
|
-
end
|
51
30
|
|
52
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
53
32
|
def self.attribute_map
|
@@ -113,21 +92,9 @@ module SquareConnect
|
|
113
92
|
# Check to see if the all the properties in the model are valid
|
114
93
|
# @return true if the model is valid
|
115
94
|
def valid?
|
116
|
-
selection_type_validator = EnumAttributeValidator.new('String', ["SINGLE", "MULTIPLE"])
|
117
|
-
return false unless selection_type_validator.valid?(@selection_type)
|
118
95
|
return true
|
119
96
|
end
|
120
97
|
|
121
|
-
# Custom attribute writer method checking allowed values (enum).
|
122
|
-
# @param [Object] selection_type Object to be assigned
|
123
|
-
def selection_type=(selection_type)
|
124
|
-
validator = EnumAttributeValidator.new('String', ["SINGLE", "MULTIPLE"])
|
125
|
-
unless validator.valid?(selection_type)
|
126
|
-
fail ArgumentError, "invalid value for 'selection_type', must be one of #{validator.allowable_values}."
|
127
|
-
end
|
128
|
-
@selection_type = selection_type
|
129
|
-
end
|
130
|
-
|
131
98
|
# Checks equality by comparing each attribute.
|
132
99
|
# @param [Object] Object to be compared
|
133
100
|
def ==(o)
|