square_connect 2.20190327.1.292 → 2.20190410.0.296
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +19 -0
- data/README.md +23 -20
- data/docs/BatchRetrieveOrdersRequest.md +1 -1
- data/docs/BatchRetrieveOrdersResponse.md +1 -1
- data/docs/CaptureTransactionRequest.md +1 -1
- data/docs/CaptureTransactionResponse.md +1 -1
- data/docs/ChargeRequest.md +1 -1
- data/docs/ChargeResponse.md +1 -1
- data/docs/CreateCheckoutRequest.md +1 -1
- data/docs/CreateCheckoutResponse.md +1 -1
- data/docs/CreateCustomerCardRequest.md +1 -1
- data/docs/CreateCustomerCardResponse.md +1 -1
- data/docs/CreateCustomerRequest.md +1 -1
- data/docs/CreateCustomerResponse.md +1 -1
- data/docs/CreateMobileAuthorizationCodeRequest.md +1 -1
- data/docs/CreateMobileAuthorizationCodeResponse.md +1 -1
- data/docs/CreateOrderResponse.md +1 -1
- data/docs/CreateRefundRequest.md +1 -1
- data/docs/CreateRefundResponse.md +1 -1
- data/docs/CustomerFilter.md +1 -1
- data/docs/CustomersApi.md +1 -1
- data/docs/DeleteCustomerCardRequest.md +1 -1
- data/docs/DeleteCustomerCardResponse.md +1 -1
- data/docs/DeleteCustomerRequest.md +1 -1
- data/docs/DeleteCustomerResponse.md +1 -1
- data/docs/ListAdditionalRecipientReceivableRefundsRequest.md +1 -1
- data/docs/ListAdditionalRecipientReceivableRefundsResponse.md +1 -1
- data/docs/ListAdditionalRecipientReceivablesRequest.md +1 -1
- data/docs/ListAdditionalRecipientReceivablesResponse.md +1 -1
- data/docs/ListCustomersRequest.md +1 -1
- data/docs/ListCustomersResponse.md +1 -1
- data/docs/ListEmployeesResponse.md +1 -1
- data/docs/ListLocationsRequest.md +1 -1
- data/docs/ListLocationsResponse.md +1 -1
- data/docs/ListRefundsRequest.md +1 -1
- data/docs/ListRefundsResponse.md +1 -1
- data/docs/ListTransactionsRequest.md +1 -1
- data/docs/ListTransactionsResponse.md +1 -1
- data/docs/Order.md +2 -1
- data/docs/OrderSource.md +12 -0
- data/docs/OrdersApi.md +1 -1
- data/docs/RegisterDomainRequest.md +1 -1
- data/docs/RegisterDomainResponse.md +1 -1
- data/docs/RetrieveCustomerRequest.md +1 -1
- data/docs/RetrieveCustomerResponse.md +1 -1
- data/docs/RetrieveEmployeeResponse.md +1 -1
- data/docs/RetrieveTransactionRequest.md +1 -1
- data/docs/RetrieveTransactionResponse.md +1 -1
- data/docs/SearchCustomersRequest.md +1 -1
- data/docs/SearchCustomersResponse.md +1 -1
- data/docs/Transaction.md +1 -1
- data/docs/TransactionsApi.md +3 -3
- data/docs/UpdateCustomerRequest.md +1 -1
- data/docs/UpdateCustomerResponse.md +1 -1
- data/docs/V1Category.md +1 -0
- data/docs/V1Discount.md +1 -0
- data/docs/V1Fee.md +1 -0
- data/docs/V1Item.md +1 -0
- data/docs/V1ModifierList.md +1 -0
- data/docs/V1ModifierOption.md +1 -0
- data/docs/V1Variation.md +1 -0
- data/docs/VoidTransactionRequest.md +1 -1
- data/docs/VoidTransactionResponse.md +1 -1
- data/lib/square_connect/api/apple_pay_api.rb +1 -1
- data/lib/square_connect/api/catalog_api.rb +11 -11
- data/lib/square_connect/api/checkout_api.rb +1 -1
- data/lib/square_connect/api/customers_api.rb +10 -10
- data/lib/square_connect/api/employees_api.rb +2 -2
- data/lib/square_connect/api/inventory_api.rb +7 -7
- data/lib/square_connect/api/labor_api.rb +14 -14
- data/lib/square_connect/api/locations_api.rb +1 -1
- data/lib/square_connect/api/mobile_authorization_api.rb +1 -1
- data/lib/square_connect/api/o_auth_api.rb +3 -3
- data/lib/square_connect/api/orders_api.rb +4 -4
- data/lib/square_connect/api/reporting_api.rb +2 -2
- data/lib/square_connect/api/transactions_api.rb +13 -13
- data/lib/square_connect/api/v1_employees_api.rb +16 -16
- data/lib/square_connect/api/v1_items_api.rb +40 -40
- data/lib/square_connect/api/v1_locations_api.rb +2 -2
- data/lib/square_connect/api/v1_transactions_api.rb +11 -11
- data/lib/square_connect/api_client.rb +1 -1
- data/lib/square_connect/models/batch_retrieve_orders_request.rb +1 -1
- data/lib/square_connect/models/batch_retrieve_orders_response.rb +1 -1
- data/lib/square_connect/models/capture_transaction_request.rb +1 -1
- data/lib/square_connect/models/capture_transaction_response.rb +1 -1
- data/lib/square_connect/models/charge_request.rb +1 -1
- data/lib/square_connect/models/charge_response.rb +1 -1
- data/lib/square_connect/models/create_checkout_request.rb +1 -1
- data/lib/square_connect/models/create_checkout_response.rb +1 -1
- data/lib/square_connect/models/create_customer_card_request.rb +1 -1
- data/lib/square_connect/models/create_customer_card_response.rb +1 -1
- data/lib/square_connect/models/create_customer_request.rb +1 -1
- data/lib/square_connect/models/create_customer_response.rb +1 -1
- data/lib/square_connect/models/create_mobile_authorization_code_request.rb +1 -1
- data/lib/square_connect/models/create_mobile_authorization_code_response.rb +1 -1
- data/lib/square_connect/models/create_order_response.rb +1 -1
- data/lib/square_connect/models/create_refund_request.rb +1 -1
- data/lib/square_connect/models/create_refund_response.rb +1 -1
- data/lib/square_connect/models/customer_filter.rb +1 -1
- data/lib/square_connect/models/delete_customer_card_request.rb +1 -1
- data/lib/square_connect/models/delete_customer_card_response.rb +1 -1
- data/lib/square_connect/models/delete_customer_request.rb +1 -1
- data/lib/square_connect/models/delete_customer_response.rb +1 -1
- data/lib/square_connect/models/list_additional_recipient_receivable_refunds_request.rb +1 -1
- data/lib/square_connect/models/list_additional_recipient_receivable_refunds_response.rb +1 -1
- data/lib/square_connect/models/list_additional_recipient_receivables_request.rb +1 -1
- data/lib/square_connect/models/list_additional_recipient_receivables_response.rb +1 -1
- data/lib/square_connect/models/list_customers_request.rb +1 -1
- data/lib/square_connect/models/list_customers_response.rb +1 -1
- data/lib/square_connect/models/list_employees_response.rb +1 -1
- data/lib/square_connect/models/list_locations_request.rb +1 -1
- data/lib/square_connect/models/list_locations_response.rb +1 -1
- data/lib/square_connect/models/list_refunds_request.rb +1 -1
- data/lib/square_connect/models/list_refunds_response.rb +1 -1
- data/lib/square_connect/models/list_transactions_request.rb +1 -1
- data/lib/square_connect/models/list_transactions_response.rb +1 -1
- data/lib/square_connect/models/order.rb +12 -2
- data/lib/square_connect/models/order_source.rb +186 -0
- data/lib/square_connect/models/register_domain_request.rb +1 -1
- data/lib/square_connect/models/register_domain_response.rb +1 -1
- data/lib/square_connect/models/retrieve_customer_request.rb +1 -1
- data/lib/square_connect/models/retrieve_customer_response.rb +1 -1
- data/lib/square_connect/models/retrieve_employee_response.rb +1 -1
- data/lib/square_connect/models/retrieve_transaction_request.rb +1 -1
- data/lib/square_connect/models/retrieve_transaction_response.rb +1 -1
- data/lib/square_connect/models/search_customers_request.rb +1 -1
- data/lib/square_connect/models/search_customers_response.rb +1 -1
- data/lib/square_connect/models/transaction.rb +1 -1
- data/lib/square_connect/models/update_customer_request.rb +1 -1
- data/lib/square_connect/models/update_customer_response.rb +1 -1
- data/lib/square_connect/models/v1_category.rb +14 -4
- data/lib/square_connect/models/v1_discount.rb +14 -4
- data/lib/square_connect/models/v1_fee.rb +14 -4
- data/lib/square_connect/models/v1_item.rb +14 -4
- data/lib/square_connect/models/v1_modifier_list.rb +14 -4
- data/lib/square_connect/models/v1_modifier_option.rb +14 -4
- data/lib/square_connect/models/v1_variation.rb +14 -4
- data/lib/square_connect/models/void_transaction_request.rb +1 -1
- data/lib/square_connect/models/void_transaction_response.rb +1 -1
- data/lib/square_connect/version.rb +1 -1
- data/lib/square_connect.rb +1 -0
- data/spec/models/order_source_spec.rb +39 -0
- metadata +6 -2
@@ -0,0 +1,186 @@
|
|
1
|
+
=begin
|
2
|
+
#Square Connect API
|
3
|
+
|
4
|
+
OpenAPI spec version: 2.0
|
5
|
+
Contact: developers@squareup.com
|
6
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
|
+
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'date'
|
11
|
+
|
12
|
+
module SquareConnect
|
13
|
+
# Represents the origination details of an order.
|
14
|
+
class OrderSource
|
15
|
+
# The name used to identify the place (physical or digital) that an order originates. If unset, the name defaults to the name of the application that created the order.
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'name' => :'name'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.swagger_types
|
28
|
+
{
|
29
|
+
:'name' => :'String'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Initializes the object
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return unless attributes.is_a?(Hash)
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
40
|
+
|
41
|
+
if attributes.has_key?(:'name')
|
42
|
+
self.name = attributes[:'name']
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
48
|
+
# @return Array for valid properies with the reasons
|
49
|
+
def list_invalid_properties
|
50
|
+
invalid_properties = Array.new
|
51
|
+
return invalid_properties
|
52
|
+
end
|
53
|
+
|
54
|
+
# Check to see if the all the properties in the model are valid
|
55
|
+
# @return true if the model is valid
|
56
|
+
def valid?
|
57
|
+
return true
|
58
|
+
end
|
59
|
+
|
60
|
+
# Checks equality by comparing each attribute.
|
61
|
+
# @param [Object] Object to be compared
|
62
|
+
def ==(o)
|
63
|
+
return true if self.equal?(o)
|
64
|
+
self.class == o.class &&
|
65
|
+
name == o.name
|
66
|
+
end
|
67
|
+
|
68
|
+
# @see the `==` method
|
69
|
+
# @param [Object] Object to be compared
|
70
|
+
def eql?(o)
|
71
|
+
self == o
|
72
|
+
end
|
73
|
+
|
74
|
+
# Calculates hash code according to all attributes.
|
75
|
+
# @return [Fixnum] Hash code
|
76
|
+
def hash
|
77
|
+
[name].hash
|
78
|
+
end
|
79
|
+
|
80
|
+
# Builds the object from hash
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
# @return [Object] Returns the model itself
|
83
|
+
def build_from_hash(attributes)
|
84
|
+
return nil unless attributes.is_a?(Hash)
|
85
|
+
self.class.swagger_types.each_pair do |key, type|
|
86
|
+
if type =~ /\AArray<(.*)>/i
|
87
|
+
# check to ensure the input is an array given that the the attribute
|
88
|
+
# is documented as an array but the input is not
|
89
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
90
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
91
|
+
end
|
92
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
93
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
94
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
95
|
+
end
|
96
|
+
|
97
|
+
self
|
98
|
+
end
|
99
|
+
|
100
|
+
# Deserializes the data based on type
|
101
|
+
# @param string type Data type
|
102
|
+
# @param string value Value to be deserialized
|
103
|
+
# @return [Object] Deserialized data
|
104
|
+
def _deserialize(type, value)
|
105
|
+
case type.to_sym
|
106
|
+
when :DateTime
|
107
|
+
DateTime.parse(value)
|
108
|
+
when :Date
|
109
|
+
Date.parse(value)
|
110
|
+
when :String
|
111
|
+
value.to_s
|
112
|
+
when :Integer
|
113
|
+
value.to_i
|
114
|
+
when :Float
|
115
|
+
value.to_f
|
116
|
+
when :BOOLEAN
|
117
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
118
|
+
true
|
119
|
+
else
|
120
|
+
false
|
121
|
+
end
|
122
|
+
when :Object
|
123
|
+
# generic object (usually a Hash), return directly
|
124
|
+
value
|
125
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
126
|
+
inner_type = Regexp.last_match[:inner_type]
|
127
|
+
value.map { |v| _deserialize(inner_type, v) }
|
128
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
129
|
+
k_type = Regexp.last_match[:k_type]
|
130
|
+
v_type = Regexp.last_match[:v_type]
|
131
|
+
{}.tap do |hash|
|
132
|
+
value.each do |k, v|
|
133
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
else # model
|
137
|
+
temp_model = SquareConnect.const_get(type).new
|
138
|
+
temp_model.build_from_hash(value)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
# Returns the string representation of the object
|
143
|
+
# @return [String] String presentation of the object
|
144
|
+
def to_s
|
145
|
+
to_hash.to_s
|
146
|
+
end
|
147
|
+
|
148
|
+
# to_body is an alias to to_hash (backward compatibility)
|
149
|
+
# @return [Hash] Returns the object in the form of hash
|
150
|
+
def to_body
|
151
|
+
to_hash
|
152
|
+
end
|
153
|
+
|
154
|
+
# Returns the object in the form of hash
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
156
|
+
def to_hash
|
157
|
+
hash = {}
|
158
|
+
self.class.attribute_map.each_pair do |attr, param|
|
159
|
+
value = self.send(attr)
|
160
|
+
next if value.nil?
|
161
|
+
hash[param] = _to_hash(value)
|
162
|
+
end
|
163
|
+
hash
|
164
|
+
end
|
165
|
+
|
166
|
+
# Outputs non-array value in the form of hash
|
167
|
+
# For object, use to_hash. Otherwise, just return the value
|
168
|
+
# @param [Object] value Any valid value
|
169
|
+
# @return [Hash] Returns the value in the form of hash
|
170
|
+
def _to_hash(value)
|
171
|
+
if value.is_a?(Array)
|
172
|
+
value.compact.map{ |v| _to_hash(v) }
|
173
|
+
elsif value.is_a?(Hash)
|
174
|
+
{}.tap do |hash|
|
175
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
176
|
+
end
|
177
|
+
elsif value.respond_to? :to_hash
|
178
|
+
value.to_hash
|
179
|
+
else
|
180
|
+
value
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
end
|
185
|
+
|
186
|
+
end
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Defines the parameters that can be included in the body of a request to the
|
13
|
+
# Defines the parameters that can be included in the body of a request to the RegisterDomain endpoint.
|
14
14
|
class RegisterDomainRequest
|
15
15
|
# A domain name as described in RFC-1034 that will be registered with ApplePay
|
16
16
|
attr_accessor :domain_name
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Defines the fields that are included in the response body of a request to the
|
13
|
+
# Defines the fields that are included in the response body of a request to the RegisterDomain endpoint. Either `errors` or `status` will be present in a given response (never both).
|
14
14
|
class RegisterDomainResponse
|
15
15
|
# Any errors that occurred during the request.
|
16
16
|
attr_accessor :errors
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
#
|
13
|
+
# Defines the fields that are included in requests to the RetrieveCustomer endpoint.
|
14
14
|
class RetrieveCustomerRequest
|
15
15
|
|
16
16
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Defines the fields that are included in the response body of a request to the
|
13
|
+
# Defines the fields that are included in the response body of a request to the RetrieveCustomer endpoint. One of `errors` or `customer` is present in a given response (never both).
|
14
14
|
class RetrieveCustomerResponse
|
15
15
|
# Any errors that occurred during the request.
|
16
16
|
attr_accessor :errors
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Defines the fields that are included in the response body of a request to the
|
13
|
+
# Defines the fields that are included in the response body of a request to the RetrieveEmployee endpoint. One of `errors` or `employee` is present in a given response (never both).
|
14
14
|
class RetrieveEmployeeResponse
|
15
15
|
# The response object.
|
16
16
|
attr_accessor :employee
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
#
|
13
|
+
# Defines the request body fields for calls to the RetrieveTransaction endpoint.
|
14
14
|
class RetrieveTransactionRequest
|
15
15
|
|
16
16
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Defines the fields that are included in the response body of a request to the
|
13
|
+
# Defines the fields that are included in the response body of a request to the RetrieveTransaction endpoint. One of `errors` or `transaction` is present in a given response (never both).
|
14
14
|
class RetrieveTransactionResponse
|
15
15
|
# Any errors that occurred during the request.
|
16
16
|
attr_accessor :errors
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Defines the fields included in the request body for the
|
13
|
+
# Defines the fields included in the request body for the SearchCustomers endpoint.
|
14
14
|
class SearchCustomersRequest
|
15
15
|
# Include the pagination cursor in subsequent calls to this endpoint to retrieve the next set of results associated with the original query. See [Pagination](/basics/api101/pagination) for more information.
|
16
16
|
attr_accessor :cursor
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Defines the fields that are included in the response body of a request to the
|
13
|
+
# Defines the fields that are included in the response body of a request to the SearchCustomers endpoint. One of `errors` or `customers` is present in a given response (never both).
|
14
14
|
class SearchCustomersResponse
|
15
15
|
# Any errors that occurred during the request.
|
16
16
|
attr_accessor :errors
|
@@ -27,7 +27,7 @@ module SquareConnect
|
|
27
27
|
# Refunds that have been applied to any tender in the transaction.
|
28
28
|
attr_accessor :refunds
|
29
29
|
|
30
|
-
# If the transaction was created with the [Charge](#endpoint-charge) endpoint, this value is the same as the value provided for the `reference_id` parameter in the request to that endpoint. Otherwise, it is not set.
|
30
|
+
# If the transaction was created with the [Charge](#endpoint-transactions-charge) endpoint, this value is the same as the value provided for the `reference_id` parameter in the request to that endpoint. Otherwise, it is not set.
|
31
31
|
attr_accessor :reference_id
|
32
32
|
|
33
33
|
# The Square product that processed the transaction. See [TransactionProduct](#type-transactionproduct) for possible values
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Defines the body parameters that can be provided in a request to the
|
13
|
+
# Defines the body parameters that can be provided in a request to the UpdateCustomer endpoint.
|
14
14
|
class UpdateCustomerRequest
|
15
15
|
# The customer's given (i.e., first) name.
|
16
16
|
attr_accessor :given_name
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# Defines the fields that are included in the response body of a request to the
|
13
|
+
# Defines the fields that are included in the response body of a request to the UpdateCustomer endpoint. One of `errors` or `customer` is present in a given response (never both).
|
14
14
|
class UpdateCustomerResponse
|
15
15
|
# Any errors that occurred during the request.
|
16
16
|
attr_accessor :errors
|
@@ -18,12 +18,16 @@ module SquareConnect
|
|
18
18
|
# The category's name.
|
19
19
|
attr_accessor :name
|
20
20
|
|
21
|
+
# The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.
|
22
|
+
attr_accessor :v2_id
|
23
|
+
|
21
24
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
26
|
def self.attribute_map
|
24
27
|
{
|
25
28
|
:'id' => :'id',
|
26
|
-
:'name' => :'name'
|
29
|
+
:'name' => :'name',
|
30
|
+
:'v2_id' => :'v2_id'
|
27
31
|
}
|
28
32
|
end
|
29
33
|
|
@@ -31,7 +35,8 @@ module SquareConnect
|
|
31
35
|
def self.swagger_types
|
32
36
|
{
|
33
37
|
:'id' => :'String',
|
34
|
-
:'name' => :'String'
|
38
|
+
:'name' => :'String',
|
39
|
+
:'v2_id' => :'String'
|
35
40
|
}
|
36
41
|
end
|
37
42
|
|
@@ -51,6 +56,10 @@ module SquareConnect
|
|
51
56
|
self.name = attributes[:'name']
|
52
57
|
end
|
53
58
|
|
59
|
+
if attributes.has_key?(:'v2_id')
|
60
|
+
self.v2_id = attributes[:'v2_id']
|
61
|
+
end
|
62
|
+
|
54
63
|
end
|
55
64
|
|
56
65
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -72,7 +81,8 @@ module SquareConnect
|
|
72
81
|
return true if self.equal?(o)
|
73
82
|
self.class == o.class &&
|
74
83
|
id == o.id &&
|
75
|
-
name == o.name
|
84
|
+
name == o.name &&
|
85
|
+
v2_id == o.v2_id
|
76
86
|
end
|
77
87
|
|
78
88
|
# @see the `==` method
|
@@ -84,7 +94,7 @@ module SquareConnect
|
|
84
94
|
# Calculates hash code according to all attributes.
|
85
95
|
# @return [Fixnum] Hash code
|
86
96
|
def hash
|
87
|
-
[id, name].hash
|
97
|
+
[id, name, v2_id].hash
|
88
98
|
end
|
89
99
|
|
90
100
|
# Builds the object from hash
|
@@ -33,6 +33,9 @@ module SquareConnect
|
|
33
33
|
# The color of the discount's display label in Square Register, if not the default color. The default color is 9da2a6. See [V1DiscountColor](#type-v1discountcolor) for possible values
|
34
34
|
attr_accessor :color
|
35
35
|
|
36
|
+
# The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.
|
37
|
+
attr_accessor :v2_id
|
38
|
+
|
36
39
|
class EnumAttributeValidator
|
37
40
|
attr_reader :datatype
|
38
41
|
attr_reader :allowable_values
|
@@ -64,7 +67,8 @@ module SquareConnect
|
|
64
67
|
:'amount_money' => :'amount_money',
|
65
68
|
:'discount_type' => :'discount_type',
|
66
69
|
:'pin_required' => :'pin_required',
|
67
|
-
:'color' => :'color'
|
70
|
+
:'color' => :'color',
|
71
|
+
:'v2_id' => :'v2_id'
|
68
72
|
}
|
69
73
|
end
|
70
74
|
|
@@ -77,7 +81,8 @@ module SquareConnect
|
|
77
81
|
:'amount_money' => :'V1Money',
|
78
82
|
:'discount_type' => :'String',
|
79
83
|
:'pin_required' => :'BOOLEAN',
|
80
|
-
:'color' => :'String'
|
84
|
+
:'color' => :'String',
|
85
|
+
:'v2_id' => :'String'
|
81
86
|
}
|
82
87
|
end
|
83
88
|
|
@@ -117,6 +122,10 @@ module SquareConnect
|
|
117
122
|
self.color = attributes[:'color']
|
118
123
|
end
|
119
124
|
|
125
|
+
if attributes.has_key?(:'v2_id')
|
126
|
+
self.v2_id = attributes[:'v2_id']
|
127
|
+
end
|
128
|
+
|
120
129
|
end
|
121
130
|
|
122
131
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -167,7 +176,8 @@ module SquareConnect
|
|
167
176
|
amount_money == o.amount_money &&
|
168
177
|
discount_type == o.discount_type &&
|
169
178
|
pin_required == o.pin_required &&
|
170
|
-
color == o.color
|
179
|
+
color == o.color &&
|
180
|
+
v2_id == o.v2_id
|
171
181
|
end
|
172
182
|
|
173
183
|
# @see the `==` method
|
@@ -179,7 +189,7 @@ module SquareConnect
|
|
179
189
|
# Calculates hash code according to all attributes.
|
180
190
|
# @return [Fixnum] Hash code
|
181
191
|
def hash
|
182
|
-
[id, name, rate, amount_money, discount_type, pin_required, color].hash
|
192
|
+
[id, name, rate, amount_money, discount_type, pin_required, color, v2_id].hash
|
183
193
|
end
|
184
194
|
|
185
195
|
# Builds the object from hash
|
@@ -39,6 +39,9 @@ module SquareConnect
|
|
39
39
|
# In countries with multiple classifications for sales taxes, indicates which classification the fee falls under. Currently relevant only to Canadian merchants. See [V1FeeType](#type-v1feetype) for possible values
|
40
40
|
attr_accessor :type
|
41
41
|
|
42
|
+
# The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.
|
43
|
+
attr_accessor :v2_id
|
44
|
+
|
42
45
|
class EnumAttributeValidator
|
43
46
|
attr_reader :datatype
|
44
47
|
attr_reader :allowable_values
|
@@ -72,7 +75,8 @@ module SquareConnect
|
|
72
75
|
:'applies_to_custom_amounts' => :'applies_to_custom_amounts',
|
73
76
|
:'enabled' => :'enabled',
|
74
77
|
:'inclusion_type' => :'inclusion_type',
|
75
|
-
:'type' => :'type'
|
78
|
+
:'type' => :'type',
|
79
|
+
:'v2_id' => :'v2_id'
|
76
80
|
}
|
77
81
|
end
|
78
82
|
|
@@ -87,7 +91,8 @@ module SquareConnect
|
|
87
91
|
:'applies_to_custom_amounts' => :'BOOLEAN',
|
88
92
|
:'enabled' => :'BOOLEAN',
|
89
93
|
:'inclusion_type' => :'String',
|
90
|
-
:'type' => :'String'
|
94
|
+
:'type' => :'String',
|
95
|
+
:'v2_id' => :'String'
|
91
96
|
}
|
92
97
|
end
|
93
98
|
|
@@ -135,6 +140,10 @@ module SquareConnect
|
|
135
140
|
self.type = attributes[:'type']
|
136
141
|
end
|
137
142
|
|
143
|
+
if attributes.has_key?(:'v2_id')
|
144
|
+
self.v2_id = attributes[:'v2_id']
|
145
|
+
end
|
146
|
+
|
138
147
|
end
|
139
148
|
|
140
149
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -211,7 +220,8 @@ module SquareConnect
|
|
211
220
|
applies_to_custom_amounts == o.applies_to_custom_amounts &&
|
212
221
|
enabled == o.enabled &&
|
213
222
|
inclusion_type == o.inclusion_type &&
|
214
|
-
type == o.type
|
223
|
+
type == o.type &&
|
224
|
+
v2_id == o.v2_id
|
215
225
|
end
|
216
226
|
|
217
227
|
# @see the `==` method
|
@@ -223,7 +233,7 @@ module SquareConnect
|
|
223
233
|
# Calculates hash code according to all attributes.
|
224
234
|
# @return [Fixnum] Hash code
|
225
235
|
def hash
|
226
|
-
[id, name, rate, calculation_phase, adjustment_type, applies_to_custom_amounts, enabled, inclusion_type, type].hash
|
236
|
+
[id, name, rate, calculation_phase, adjustment_type, applies_to_custom_amounts, enabled, inclusion_type, type, v2_id].hash
|
227
237
|
end
|
228
238
|
|
229
239
|
# Builds the object from hash
|
@@ -60,6 +60,9 @@ module SquareConnect
|
|
60
60
|
# If true, the item can be added to pickup orders from the merchant's online store. Default value: false
|
61
61
|
attr_accessor :available_for_pickup
|
62
62
|
|
63
|
+
# The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.
|
64
|
+
attr_accessor :v2_id
|
65
|
+
|
63
66
|
class EnumAttributeValidator
|
64
67
|
attr_reader :datatype
|
65
68
|
attr_reader :allowable_values
|
@@ -100,7 +103,8 @@ module SquareConnect
|
|
100
103
|
:'fees' => :'fees',
|
101
104
|
:'taxable' => :'taxable',
|
102
105
|
:'category_id' => :'category_id',
|
103
|
-
:'available_for_pickup' => :'available_for_pickup'
|
106
|
+
:'available_for_pickup' => :'available_for_pickup',
|
107
|
+
:'v2_id' => :'v2_id'
|
104
108
|
}
|
105
109
|
end
|
106
110
|
|
@@ -122,7 +126,8 @@ module SquareConnect
|
|
122
126
|
:'fees' => :'Array<V1Fee>',
|
123
127
|
:'taxable' => :'BOOLEAN',
|
124
128
|
:'category_id' => :'String',
|
125
|
-
:'available_for_pickup' => :'BOOLEAN'
|
129
|
+
:'available_for_pickup' => :'BOOLEAN',
|
130
|
+
:'v2_id' => :'String'
|
126
131
|
}
|
127
132
|
end
|
128
133
|
|
@@ -204,6 +209,10 @@ module SquareConnect
|
|
204
209
|
self.available_for_pickup = attributes[:'available_for_pickup']
|
205
210
|
end
|
206
211
|
|
212
|
+
if attributes.has_key?(:'v2_id')
|
213
|
+
self.v2_id = attributes[:'v2_id']
|
214
|
+
end
|
215
|
+
|
207
216
|
end
|
208
217
|
|
209
218
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -275,7 +284,8 @@ module SquareConnect
|
|
275
284
|
fees == o.fees &&
|
276
285
|
taxable == o.taxable &&
|
277
286
|
category_id == o.category_id &&
|
278
|
-
available_for_pickup == o.available_for_pickup
|
287
|
+
available_for_pickup == o.available_for_pickup &&
|
288
|
+
v2_id == o.v2_id
|
279
289
|
end
|
280
290
|
|
281
291
|
# @see the `==` method
|
@@ -287,7 +297,7 @@ module SquareConnect
|
|
287
297
|
# Calculates hash code according to all attributes.
|
288
298
|
# @return [Fixnum] Hash code
|
289
299
|
def hash
|
290
|
-
[id, name, description, type, color, abbreviation, visibility, available_online, master_image, category, variations, modifier_lists, fees, taxable, category_id, available_for_pickup].hash
|
300
|
+
[id, name, description, type, color, abbreviation, visibility, available_online, master_image, category, variations, modifier_lists, fees, taxable, category_id, available_for_pickup, v2_id].hash
|
291
301
|
end
|
292
302
|
|
293
303
|
# Builds the object from hash
|
@@ -24,6 +24,9 @@ module SquareConnect
|
|
24
24
|
# The options included in the modifier list.
|
25
25
|
attr_accessor :modifier_options
|
26
26
|
|
27
|
+
# The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.
|
28
|
+
attr_accessor :v2_id
|
29
|
+
|
27
30
|
class EnumAttributeValidator
|
28
31
|
attr_reader :datatype
|
29
32
|
attr_reader :allowable_values
|
@@ -52,7 +55,8 @@ module SquareConnect
|
|
52
55
|
:'id' => :'id',
|
53
56
|
:'name' => :'name',
|
54
57
|
:'selection_type' => :'selection_type',
|
55
|
-
:'modifier_options' => :'modifier_options'
|
58
|
+
:'modifier_options' => :'modifier_options',
|
59
|
+
:'v2_id' => :'v2_id'
|
56
60
|
}
|
57
61
|
end
|
58
62
|
|
@@ -62,7 +66,8 @@ module SquareConnect
|
|
62
66
|
:'id' => :'String',
|
63
67
|
:'name' => :'String',
|
64
68
|
:'selection_type' => :'String',
|
65
|
-
:'modifier_options' => :'Array<V1ModifierOption>'
|
69
|
+
:'modifier_options' => :'Array<V1ModifierOption>',
|
70
|
+
:'v2_id' => :'String'
|
66
71
|
}
|
67
72
|
end
|
68
73
|
|
@@ -92,6 +97,10 @@ module SquareConnect
|
|
92
97
|
end
|
93
98
|
end
|
94
99
|
|
100
|
+
if attributes.has_key?(:'v2_id')
|
101
|
+
self.v2_id = attributes[:'v2_id']
|
102
|
+
end
|
103
|
+
|
95
104
|
end
|
96
105
|
|
97
106
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -127,7 +136,8 @@ module SquareConnect
|
|
127
136
|
id == o.id &&
|
128
137
|
name == o.name &&
|
129
138
|
selection_type == o.selection_type &&
|
130
|
-
modifier_options == o.modifier_options
|
139
|
+
modifier_options == o.modifier_options &&
|
140
|
+
v2_id == o.v2_id
|
131
141
|
end
|
132
142
|
|
133
143
|
# @see the `==` method
|
@@ -139,7 +149,7 @@ module SquareConnect
|
|
139
149
|
# Calculates hash code according to all attributes.
|
140
150
|
# @return [Fixnum] Hash code
|
141
151
|
def hash
|
142
|
-
[id, name, selection_type, modifier_options].hash
|
152
|
+
[id, name, selection_type, modifier_options, v2_id].hash
|
143
153
|
end
|
144
154
|
|
145
155
|
# Builds the object from hash
|
@@ -30,6 +30,9 @@ module SquareConnect
|
|
30
30
|
# The ID of the modifier list the option belongs to.
|
31
31
|
attr_accessor :modifier_list_id
|
32
32
|
|
33
|
+
# The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.
|
34
|
+
attr_accessor :v2_id
|
35
|
+
|
33
36
|
|
34
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
38
|
def self.attribute_map
|
@@ -39,7 +42,8 @@ module SquareConnect
|
|
39
42
|
:'price_money' => :'price_money',
|
40
43
|
:'on_by_default' => :'on_by_default',
|
41
44
|
:'ordinal' => :'ordinal',
|
42
|
-
:'modifier_list_id' => :'modifier_list_id'
|
45
|
+
:'modifier_list_id' => :'modifier_list_id',
|
46
|
+
:'v2_id' => :'v2_id'
|
43
47
|
}
|
44
48
|
end
|
45
49
|
|
@@ -51,7 +55,8 @@ module SquareConnect
|
|
51
55
|
:'price_money' => :'V1Money',
|
52
56
|
:'on_by_default' => :'BOOLEAN',
|
53
57
|
:'ordinal' => :'Integer',
|
54
|
-
:'modifier_list_id' => :'String'
|
58
|
+
:'modifier_list_id' => :'String',
|
59
|
+
:'v2_id' => :'String'
|
55
60
|
}
|
56
61
|
end
|
57
62
|
|
@@ -87,6 +92,10 @@ module SquareConnect
|
|
87
92
|
self.modifier_list_id = attributes[:'modifier_list_id']
|
88
93
|
end
|
89
94
|
|
95
|
+
if attributes.has_key?(:'v2_id')
|
96
|
+
self.v2_id = attributes[:'v2_id']
|
97
|
+
end
|
98
|
+
|
90
99
|
end
|
91
100
|
|
92
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -112,7 +121,8 @@ module SquareConnect
|
|
112
121
|
price_money == o.price_money &&
|
113
122
|
on_by_default == o.on_by_default &&
|
114
123
|
ordinal == o.ordinal &&
|
115
|
-
modifier_list_id == o.modifier_list_id
|
124
|
+
modifier_list_id == o.modifier_list_id &&
|
125
|
+
v2_id == o.v2_id
|
116
126
|
end
|
117
127
|
|
118
128
|
# @see the `==` method
|
@@ -124,7 +134,7 @@ module SquareConnect
|
|
124
134
|
# Calculates hash code according to all attributes.
|
125
135
|
# @return [Fixnum] Hash code
|
126
136
|
def hash
|
127
|
-
[id, name, price_money, on_by_default, ordinal, modifier_list_id].hash
|
137
|
+
[id, name, price_money, on_by_default, ordinal, modifier_list_id, v2_id].hash
|
128
138
|
end
|
129
139
|
|
130
140
|
# Builds the object from hash
|