square_connect 2.2.1.145 → 2.3.0.153

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -1
  3. data/docs/BatchRetrieveOrdersRequest.md +12 -0
  4. data/docs/BatchRetrieveOrdersResponse.md +13 -0
  5. data/docs/CatalogItemVariation.md +1 -1
  6. data/docs/CatalogObject.md +1 -1
  7. data/docs/CatalogV1Id.md +2 -2
  8. data/docs/CreateOrderRequest.md +5 -4
  9. data/docs/CreateOrderRequestDiscount.md +5 -4
  10. data/docs/CreateOrderRequestLineItem.md +10 -6
  11. data/docs/CreateOrderRequestModifier.md +12 -0
  12. data/docs/CreateOrderRequestTax.md +5 -4
  13. data/docs/CreateOrderResponse.md +13 -0
  14. data/docs/Currency.md +1 -0
  15. data/docs/CustomersApi.md +1 -1
  16. data/docs/ErrorCode.md +2 -0
  17. data/docs/ItemVariationLocationOverrides.md +5 -5
  18. data/docs/Location.md +9 -1
  19. data/docs/LocationStatus.md +13 -0
  20. data/docs/Order.md +1 -0
  21. data/docs/OrderLineItem.md +6 -1
  22. data/docs/OrderLineItemDiscount.md +1 -0
  23. data/docs/OrderLineItemDiscountScope.md +1 -0
  24. data/docs/OrderLineItemDiscountType.md +1 -1
  25. data/docs/OrderLineItemModifier.md +15 -0
  26. data/docs/OrderLineItemTax.md +1 -0
  27. data/docs/OrderLineItemTaxType.md +1 -1
  28. data/docs/OrdersApi.md +120 -0
  29. data/docs/SearchCatalogObjectsRequest.md +1 -1
  30. data/docs/Transaction.md +1 -1
  31. data/docs/TransactionsApi.md +1 -1
  32. data/docs/V1Payment.md +3 -3
  33. data/docs/V1Refund.md +0 -5
  34. data/lib/square_connect/api/customers_api.rb +2 -2
  35. data/lib/square_connect/api/orders_api.rb +134 -0
  36. data/lib/square_connect/api/transactions_api.rb +2 -2
  37. data/lib/square_connect/api_client.rb +1 -1
  38. data/lib/square_connect/models/batch_retrieve_orders_request.rb +193 -0
  39. data/lib/square_connect/models/batch_retrieve_orders_response.rb +200 -0
  40. data/lib/square_connect/models/catalog_item_variation.rb +1 -1
  41. data/lib/square_connect/models/catalog_object.rb +1 -1
  42. data/lib/square_connect/models/catalog_v1_id.rb +2 -2
  43. data/lib/square_connect/models/charge_request.rb +108 -0
  44. data/lib/square_connect/models/create_checkout_request.rb +16 -0
  45. data/lib/square_connect/models/create_order_request.rb +31 -5
  46. data/lib/square_connect/models/create_order_request_discount.rb +47 -5
  47. data/lib/square_connect/models/create_order_request_line_item.rb +106 -7
  48. data/lib/square_connect/models/create_order_request_modifier.rb +219 -0
  49. data/lib/square_connect/models/create_order_request_tax.rb +49 -7
  50. data/lib/square_connect/models/create_order_response.rb +198 -0
  51. data/lib/square_connect/models/create_refund_request.rb +72 -0
  52. data/lib/square_connect/models/currency.rb +1 -0
  53. data/lib/square_connect/models/error.rb +2 -2
  54. data/lib/square_connect/models/error_code.rb +2 -0
  55. data/lib/square_connect/models/item_variation_location_overrides.rb +5 -5
  56. data/lib/square_connect/models/location.rb +121 -5
  57. data/lib/square_connect/models/location_status.rb +19 -0
  58. data/lib/square_connect/models/money.rb +27 -2
  59. data/lib/square_connect/models/order.rb +11 -1
  60. data/lib/square_connect/models/order_line_item.rb +54 -2
  61. data/lib/square_connect/models/order_line_item_discount.rb +15 -5
  62. data/lib/square_connect/models/order_line_item_discount_scope.rb +1 -0
  63. data/lib/square_connect/models/order_line_item_discount_type.rb +1 -1
  64. data/lib/square_connect/models/order_line_item_modifier.rb +216 -0
  65. data/lib/square_connect/models/order_line_item_tax.rb +13 -3
  66. data/lib/square_connect/models/order_line_item_tax_type.rb +1 -1
  67. data/lib/square_connect/models/search_catalog_objects_request.rb +1 -1
  68. data/lib/square_connect/models/transaction.rb +14 -14
  69. data/lib/square_connect/models/v1_payment.rb +3 -0
  70. data/lib/square_connect/models/v1_refund.rb +1 -51
  71. data/lib/square_connect/version.rb +1 -1
  72. data/lib/square_connect.rb +7 -0
  73. metadata +17 -3
@@ -0,0 +1,216 @@
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
+ # A [CatalogModifier](#type-catalogmodifier).
14
+ class OrderLineItemModifier
15
+ # The catalog object id referencing [CatalogModifier](#type-catalogmodifier).
16
+ attr_accessor :catalog_object_id
17
+
18
+ # The name of the item modifier.
19
+ attr_accessor :name
20
+
21
+ # The base price of the item modifier.
22
+ attr_accessor :base_price_money
23
+
24
+ # The total price of the item modifier for its line item. This is the modifier's base_price_money multiplied by the line item's quantity.
25
+ attr_accessor :total_price_money
26
+
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'catalog_object_id' => :'catalog_object_id',
32
+ :'name' => :'name',
33
+ :'base_price_money' => :'base_price_money',
34
+ :'total_price_money' => :'total_price_money'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'catalog_object_id' => :'String',
42
+ :'name' => :'String',
43
+ :'base_price_money' => :'Money',
44
+ :'total_price_money' => :'Money'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param [Hash] attributes Model attributes in the form of hash
50
+ def initialize(attributes = {})
51
+ return unless attributes.is_a?(Hash)
52
+
53
+ # convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
55
+
56
+ if attributes.has_key?(:'catalog_object_id')
57
+ self.catalog_object_id = attributes[:'catalog_object_id']
58
+ end
59
+
60
+ if attributes.has_key?(:'name')
61
+ self.name = attributes[:'name']
62
+ end
63
+
64
+ if attributes.has_key?(:'base_price_money')
65
+ self.base_price_money = attributes[:'base_price_money']
66
+ end
67
+
68
+ if attributes.has_key?(:'total_price_money')
69
+ self.total_price_money = attributes[:'total_price_money']
70
+ end
71
+
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properies with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ return invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ return true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ catalog_object_id == o.catalog_object_id &&
93
+ name == o.name &&
94
+ base_price_money == o.base_price_money &&
95
+ total_price_money == o.total_price_money
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Fixnum] Hash code
106
+ def hash
107
+ [catalog_object_id, name, base_price_money, total_price_money].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+ self.class.swagger_types.each_pair do |key, type|
116
+ if type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
120
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
121
+ end
122
+ elsif !attributes[self.class.attribute_map[key]].nil?
123
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
125
+ end
126
+
127
+ self
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def _deserialize(type, value)
135
+ case type.to_sym
136
+ when :DateTime
137
+ DateTime.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :BOOLEAN
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ temp_model = SquareConnect.const_get(type).new
168
+ temp_model.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ next if value.nil?
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map{ |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+
214
+ end
215
+
216
+ end
@@ -12,6 +12,9 @@ require 'date'
12
12
  module SquareConnect
13
13
  # Represents a tax that applies to one or more line items in an order.
14
14
  class OrderLineItemTax
15
+ # The catalog object id referencing [CatalogTax](#type-catalogtax).
16
+ attr_accessor :catalog_object_id
17
+
15
18
  # The tax's name.
16
19
  attr_accessor :name
17
20
 
@@ -49,6 +52,7 @@ module SquareConnect
49
52
  # Attribute mapping from ruby-style variable name to JSON key.
50
53
  def self.attribute_map
51
54
  {
55
+ :'catalog_object_id' => :'catalog_object_id',
52
56
  :'name' => :'name',
53
57
  :'type' => :'type',
54
58
  :'percentage' => :'percentage',
@@ -59,6 +63,7 @@ module SquareConnect
59
63
  # Attribute type mapping.
60
64
  def self.swagger_types
61
65
  {
66
+ :'catalog_object_id' => :'String',
62
67
  :'name' => :'String',
63
68
  :'type' => :'String',
64
69
  :'percentage' => :'String',
@@ -74,6 +79,10 @@ module SquareConnect
74
79
  # convert string to symbol for hash key
75
80
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
76
81
 
82
+ if attributes.has_key?(:'catalog_object_id')
83
+ self.catalog_object_id = attributes[:'catalog_object_id']
84
+ end
85
+
77
86
  if attributes.has_key?(:'name')
78
87
  self.name = attributes[:'name']
79
88
  end
@@ -102,7 +111,7 @@ module SquareConnect
102
111
  # Check to see if the all the properties in the model are valid
103
112
  # @return true if the model is valid
104
113
  def valid?
105
- type_validator = EnumAttributeValidator.new('String', ["UNKNOWN", "ADDITIVE", "INCLUSIVE"])
114
+ type_validator = EnumAttributeValidator.new('String', ["UNKNOWN_TAX", "ADDITIVE", "INCLUSIVE"])
106
115
  return false unless type_validator.valid?(@type)
107
116
  return true
108
117
  end
@@ -110,7 +119,7 @@ module SquareConnect
110
119
  # Custom attribute writer method checking allowed values (enum).
111
120
  # @param [Object] type Object to be assigned
112
121
  def type=(type)
113
- validator = EnumAttributeValidator.new('String', ["UNKNOWN", "ADDITIVE", "INCLUSIVE"])
122
+ validator = EnumAttributeValidator.new('String', ["UNKNOWN_TAX", "ADDITIVE", "INCLUSIVE"])
114
123
  unless validator.valid?(type)
115
124
  fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
116
125
  end
@@ -122,6 +131,7 @@ module SquareConnect
122
131
  def ==(o)
123
132
  return true if self.equal?(o)
124
133
  self.class == o.class &&
134
+ catalog_object_id == o.catalog_object_id &&
125
135
  name == o.name &&
126
136
  type == o.type &&
127
137
  percentage == o.percentage &&
@@ -137,7 +147,7 @@ module SquareConnect
137
147
  # Calculates hash code according to all attributes.
138
148
  # @return [Fixnum] Hash code
139
149
  def hash
140
- [name, type, percentage, applied_money].hash
150
+ [catalog_object_id, name, type, percentage, applied_money].hash
141
151
  end
142
152
 
143
153
  # Builds the object from hash
@@ -12,7 +12,7 @@ require 'date'
12
12
  module SquareConnect
13
13
  class OrderLineItemTaxType
14
14
 
15
- UNKNOWN = "UNKNOWN".freeze
15
+ UNKNOWN_TAX = "UNKNOWN_TAX".freeze
16
16
  ADDITIVE = "ADDITIVE".freeze
17
17
  INCLUSIVE = "INCLUSIVE".freeze
18
18
  end
@@ -24,7 +24,7 @@ module SquareConnect
24
24
  # If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response.
25
25
  attr_accessor :include_related_objects
26
26
 
27
- # Return only objects that have been modified after this [timestamp](#workingwithdates) (in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\"). The timestamp is exclusive - objects whose timestamp is equal to `begin_time` will not be included in the response.
27
+ # Return objects modified after this [timestamp](#workingwithdates), in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". The timestamp is exclusive - objects with a timestamp equal to `begin_time` will not be included in the response.
28
28
  attr_accessor :begin_time
29
29
 
30
30
  # A query to be used to filter or sort the results. If no query is specified, the entire catalog will be returned.
@@ -36,12 +36,12 @@ module SquareConnect
36
36
  # If the transaction was created in the Square Point of Sale app, this value is the ID generated for the transaction by Square Point of Sale. This ID has no relationship to the transaction's canonical `id`, which is generated by Square's backend servers. This value is generated for bookkeeping purposes, in case the transaction cannot immediately be completed (for example, if the transaction is processed in offline mode). It is not currently possible with the Connect API to perform a transaction lookup by this value.
37
37
  attr_accessor :client_id
38
38
 
39
- # The order associated with this transaction, if any.
40
- attr_accessor :order
41
-
42
39
  # The shipping address provided in the request, if any.
43
40
  attr_accessor :shipping_address
44
41
 
42
+ # The order_id is an identifier for the order associated with this transaction, if any.
43
+ attr_accessor :order_id
44
+
45
45
  class EnumAttributeValidator
46
46
  attr_reader :datatype
47
47
  attr_reader :allowable_values
@@ -75,8 +75,8 @@ module SquareConnect
75
75
  :'reference_id' => :'reference_id',
76
76
  :'product' => :'product',
77
77
  :'client_id' => :'client_id',
78
- :'order' => :'order',
79
- :'shipping_address' => :'shipping_address'
78
+ :'shipping_address' => :'shipping_address',
79
+ :'order_id' => :'order_id'
80
80
  }
81
81
  end
82
82
 
@@ -91,8 +91,8 @@ module SquareConnect
91
91
  :'reference_id' => :'String',
92
92
  :'product' => :'String',
93
93
  :'client_id' => :'String',
94
- :'order' => :'Order',
95
- :'shipping_address' => :'Address'
94
+ :'shipping_address' => :'Address',
95
+ :'order_id' => :'String'
96
96
  }
97
97
  end
98
98
 
@@ -140,14 +140,14 @@ module SquareConnect
140
140
  self.client_id = attributes[:'client_id']
141
141
  end
142
142
 
143
- if attributes.has_key?(:'order')
144
- self.order = attributes[:'order']
145
- end
146
-
147
143
  if attributes.has_key?(:'shipping_address')
148
144
  self.shipping_address = attributes[:'shipping_address']
149
145
  end
150
146
 
147
+ if attributes.has_key?(:'order_id')
148
+ self.order_id = attributes[:'order_id']
149
+ end
150
+
151
151
  end
152
152
 
153
153
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -188,8 +188,8 @@ module SquareConnect
188
188
  reference_id == o.reference_id &&
189
189
  product == o.product &&
190
190
  client_id == o.client_id &&
191
- order == o.order &&
192
- shipping_address == o.shipping_address
191
+ shipping_address == o.shipping_address &&
192
+ order_id == o.order_id
193
193
  end
194
194
 
195
195
  # @see the `==` method
@@ -201,7 +201,7 @@ module SquareConnect
201
201
  # Calculates hash code according to all attributes.
202
202
  # @return [Fixnum] Hash code
203
203
  def hash
204
- [id, location_id, created_at, tenders, refunds, reference_id, product, client_id, order, shipping_address].hash
204
+ [id, location_id, created_at, tenders, refunds, reference_id, product, client_id, shipping_address, order_id].hash
205
205
  end
206
206
 
207
207
  # Builds the object from hash
@@ -60,10 +60,13 @@ module SquareConnect
60
60
  # The total of all refunds applied to the payment.
61
61
  attr_accessor :refunded_money
62
62
 
63
+ # The total of all sales, including any applicable taxes, rounded to the smallest legal unit of currency (e.g., the nearest penny in USD, the nearest nickel in CAD)
63
64
  attr_accessor :swedish_rounding_money
64
65
 
66
+ # The total of all sales, including any applicable taxes.
65
67
  attr_accessor :gross_sales_money
66
68
 
69
+ # The total of all sales, minus any applicable taxes.
67
70
  attr_accessor :net_sales_money
68
71
 
69
72
  # All of the inclusive taxes associated with the payment.
@@ -21,21 +21,6 @@ module SquareConnect
21
21
  # The amount of money refunded. This amount is always negative.
22
22
  attr_accessor :refunded_money
23
23
 
24
- # The amount of processing fee money refunded.
25
- attr_accessor :refunded_processing_fee_money
26
-
27
- # The amount of additive tax money refunded.
28
- attr_accessor :refunded_additive_tax_money
29
-
30
- # The amount of inclusive tax money refunded.
31
- attr_accessor :refunded_inclusive_tax_money
32
-
33
- # The amount of tip money refunded.
34
- attr_accessor :refunded_tip_money
35
-
36
- # The amount of discount money refunded.
37
- attr_accessor :refunded_discount_money
38
-
39
24
  # The time when the merchant initiated the refund for Square to process, in ISO 8601 format..
40
25
  attr_accessor :created_at
41
26
 
@@ -76,11 +61,6 @@ module SquareConnect
76
61
  :'type' => :'type',
77
62
  :'reason' => :'reason',
78
63
  :'refunded_money' => :'refunded_money',
79
- :'refunded_processing_fee_money' => :'refunded_processing_fee_money',
80
- :'refunded_additive_tax_money' => :'refunded_additive_tax_money',
81
- :'refunded_inclusive_tax_money' => :'refunded_inclusive_tax_money',
82
- :'refunded_tip_money' => :'refunded_tip_money',
83
- :'refunded_discount_money' => :'refunded_discount_money',
84
64
  :'created_at' => :'created_at',
85
65
  :'processed_at' => :'processed_at',
86
66
  :'payment_id' => :'payment_id',
@@ -94,11 +74,6 @@ module SquareConnect
94
74
  :'type' => :'String',
95
75
  :'reason' => :'String',
96
76
  :'refunded_money' => :'V1Money',
97
- :'refunded_processing_fee_money' => :'V1Money',
98
- :'refunded_additive_tax_money' => :'V1Money',
99
- :'refunded_inclusive_tax_money' => :'V1Money',
100
- :'refunded_tip_money' => :'V1Money',
101
- :'refunded_discount_money' => :'V1Money',
102
77
  :'created_at' => :'String',
103
78
  :'processed_at' => :'String',
104
79
  :'payment_id' => :'String',
@@ -126,26 +101,6 @@ module SquareConnect
126
101
  self.refunded_money = attributes[:'refunded_money']
127
102
  end
128
103
 
129
- if attributes.has_key?(:'refunded_processing_fee_money')
130
- self.refunded_processing_fee_money = attributes[:'refunded_processing_fee_money']
131
- end
132
-
133
- if attributes.has_key?(:'refunded_additive_tax_money')
134
- self.refunded_additive_tax_money = attributes[:'refunded_additive_tax_money']
135
- end
136
-
137
- if attributes.has_key?(:'refunded_inclusive_tax_money')
138
- self.refunded_inclusive_tax_money = attributes[:'refunded_inclusive_tax_money']
139
- end
140
-
141
- if attributes.has_key?(:'refunded_tip_money')
142
- self.refunded_tip_money = attributes[:'refunded_tip_money']
143
- end
144
-
145
- if attributes.has_key?(:'refunded_discount_money')
146
- self.refunded_discount_money = attributes[:'refunded_discount_money']
147
- end
148
-
149
104
  if attributes.has_key?(:'created_at')
150
105
  self.created_at = attributes[:'created_at']
151
106
  end
@@ -197,11 +152,6 @@ module SquareConnect
197
152
  type == o.type &&
198
153
  reason == o.reason &&
199
154
  refunded_money == o.refunded_money &&
200
- refunded_processing_fee_money == o.refunded_processing_fee_money &&
201
- refunded_additive_tax_money == o.refunded_additive_tax_money &&
202
- refunded_inclusive_tax_money == o.refunded_inclusive_tax_money &&
203
- refunded_tip_money == o.refunded_tip_money &&
204
- refunded_discount_money == o.refunded_discount_money &&
205
155
  created_at == o.created_at &&
206
156
  processed_at == o.processed_at &&
207
157
  payment_id == o.payment_id &&
@@ -217,7 +167,7 @@ module SquareConnect
217
167
  # Calculates hash code according to all attributes.
218
168
  # @return [Fixnum] Hash code
219
169
  def hash
220
- [type, reason, refunded_money, refunded_processing_fee_money, refunded_additive_tax_money, refunded_inclusive_tax_money, refunded_tip_money, refunded_discount_money, created_at, processed_at, payment_id, merchant_id].hash
170
+ [type, reason, refunded_money, created_at, processed_at, payment_id, merchant_id].hash
221
171
  end
222
172
 
223
173
  # Builds the object from hash
@@ -8,5 +8,5 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
8
8
  =end
9
9
 
10
10
  module SquareConnect
11
- VERSION = "2.2.1"
11
+ VERSION = "2.3.0"
12
12
  end
@@ -19,6 +19,8 @@ require 'square_connect/models/batch_delete_catalog_objects_request'
19
19
  require 'square_connect/models/batch_delete_catalog_objects_response'
20
20
  require 'square_connect/models/batch_retrieve_catalog_objects_request'
21
21
  require 'square_connect/models/batch_retrieve_catalog_objects_response'
22
+ require 'square_connect/models/batch_retrieve_orders_request'
23
+ require 'square_connect/models/batch_retrieve_orders_response'
22
24
  require 'square_connect/models/batch_upsert_catalog_objects_request'
23
25
  require 'square_connect/models/batch_upsert_catalog_objects_response'
24
26
  require 'square_connect/models/capture_transaction_request'
@@ -67,7 +69,9 @@ require 'square_connect/models/create_customer_response'
67
69
  require 'square_connect/models/create_order_request'
68
70
  require 'square_connect/models/create_order_request_discount'
69
71
  require 'square_connect/models/create_order_request_line_item'
72
+ require 'square_connect/models/create_order_request_modifier'
70
73
  require 'square_connect/models/create_order_request_tax'
74
+ require 'square_connect/models/create_order_response'
71
75
  require 'square_connect/models/create_refund_request'
72
76
  require 'square_connect/models/create_refund_response'
73
77
  require 'square_connect/models/currency'
@@ -98,12 +102,14 @@ require 'square_connect/models/list_transactions_request'
98
102
  require 'square_connect/models/list_transactions_response'
99
103
  require 'square_connect/models/location'
100
104
  require 'square_connect/models/location_capability'
105
+ require 'square_connect/models/location_status'
101
106
  require 'square_connect/models/money'
102
107
  require 'square_connect/models/order'
103
108
  require 'square_connect/models/order_line_item'
104
109
  require 'square_connect/models/order_line_item_discount'
105
110
  require 'square_connect/models/order_line_item_discount_scope'
106
111
  require 'square_connect/models/order_line_item_discount_type'
112
+ require 'square_connect/models/order_line_item_modifier'
107
113
  require 'square_connect/models/order_line_item_tax'
108
114
  require 'square_connect/models/order_line_item_tax_type'
109
115
  require 'square_connect/models/refund'
@@ -181,6 +187,7 @@ require 'square_connect/api/catalog_api'
181
187
  require 'square_connect/api/checkout_api'
182
188
  require 'square_connect/api/customers_api'
183
189
  require 'square_connect/api/locations_api'
190
+ require 'square_connect/api/orders_api'
184
191
  require 'square_connect/api/transactions_api'
185
192
  require 'square_connect/api/v1_employees_api'
186
193
  require 'square_connect/api/v1_items_api'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: square_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1.145
4
+ version: 2.3.0.153
5
5
  platform: ruby
6
6
  authors:
7
7
  - Square, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-14 00:00:00.000000000 Z
11
+ date: 2017-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -208,6 +208,8 @@ files:
208
208
  - docs/BatchDeleteCatalogObjectsResponse.md
209
209
  - docs/BatchRetrieveCatalogObjectsRequest.md
210
210
  - docs/BatchRetrieveCatalogObjectsResponse.md
211
+ - docs/BatchRetrieveOrdersRequest.md
212
+ - docs/BatchRetrieveOrdersResponse.md
211
213
  - docs/BatchUpsertCatalogObjectsRequest.md
212
214
  - docs/BatchUpsertCatalogObjectsResponse.md
213
215
  - docs/CaptureTransactionRequest.md
@@ -258,7 +260,9 @@ files:
258
260
  - docs/CreateOrderRequest.md
259
261
  - docs/CreateOrderRequestDiscount.md
260
262
  - docs/CreateOrderRequestLineItem.md
263
+ - docs/CreateOrderRequestModifier.md
261
264
  - docs/CreateOrderRequestTax.md
265
+ - docs/CreateOrderResponse.md
262
266
  - docs/CreateRefundRequest.md
263
267
  - docs/CreateRefundResponse.md
264
268
  - docs/Currency.md
@@ -290,6 +294,7 @@ files:
290
294
  - docs/ListTransactionsResponse.md
291
295
  - docs/Location.md
292
296
  - docs/LocationCapability.md
297
+ - docs/LocationStatus.md
293
298
  - docs/LocationsApi.md
294
299
  - docs/Money.md
295
300
  - docs/Order.md
@@ -297,8 +302,10 @@ files:
297
302
  - docs/OrderLineItemDiscount.md
298
303
  - docs/OrderLineItemDiscountScope.md
299
304
  - docs/OrderLineItemDiscountType.md
305
+ - docs/OrderLineItemModifier.md
300
306
  - docs/OrderLineItemTax.md
301
307
  - docs/OrderLineItemTaxType.md
308
+ - docs/OrdersApi.md
302
309
  - docs/Refund.md
303
310
  - docs/RefundStatus.md
304
311
  - docs/RetrieveCatalogObjectRequest.md
@@ -378,6 +385,7 @@ files:
378
385
  - lib/square_connect/api/checkout_api.rb
379
386
  - lib/square_connect/api/customers_api.rb
380
387
  - lib/square_connect/api/locations_api.rb
388
+ - lib/square_connect/api/orders_api.rb
381
389
  - lib/square_connect/api/transactions_api.rb
382
390
  - lib/square_connect/api/v1_employees_api.rb
383
391
  - lib/square_connect/api/v1_items_api.rb
@@ -391,6 +399,8 @@ files:
391
399
  - lib/square_connect/models/batch_delete_catalog_objects_response.rb
392
400
  - lib/square_connect/models/batch_retrieve_catalog_objects_request.rb
393
401
  - lib/square_connect/models/batch_retrieve_catalog_objects_response.rb
402
+ - lib/square_connect/models/batch_retrieve_orders_request.rb
403
+ - lib/square_connect/models/batch_retrieve_orders_response.rb
394
404
  - lib/square_connect/models/batch_upsert_catalog_objects_request.rb
395
405
  - lib/square_connect/models/batch_upsert_catalog_objects_response.rb
396
406
  - lib/square_connect/models/capture_transaction_request.rb
@@ -439,7 +449,9 @@ files:
439
449
  - lib/square_connect/models/create_order_request.rb
440
450
  - lib/square_connect/models/create_order_request_discount.rb
441
451
  - lib/square_connect/models/create_order_request_line_item.rb
452
+ - lib/square_connect/models/create_order_request_modifier.rb
442
453
  - lib/square_connect/models/create_order_request_tax.rb
454
+ - lib/square_connect/models/create_order_response.rb
443
455
  - lib/square_connect/models/create_refund_request.rb
444
456
  - lib/square_connect/models/create_refund_response.rb
445
457
  - lib/square_connect/models/currency.rb
@@ -470,12 +482,14 @@ files:
470
482
  - lib/square_connect/models/list_transactions_response.rb
471
483
  - lib/square_connect/models/location.rb
472
484
  - lib/square_connect/models/location_capability.rb
485
+ - lib/square_connect/models/location_status.rb
473
486
  - lib/square_connect/models/money.rb
474
487
  - lib/square_connect/models/order.rb
475
488
  - lib/square_connect/models/order_line_item.rb
476
489
  - lib/square_connect/models/order_line_item_discount.rb
477
490
  - lib/square_connect/models/order_line_item_discount_scope.rb
478
491
  - lib/square_connect/models/order_line_item_discount_type.rb
492
+ - lib/square_connect/models/order_line_item_modifier.rb
479
493
  - lib/square_connect/models/order_line_item_tax.rb
480
494
  - lib/square_connect/models/order_line_item_tax_type.rb
481
495
  - lib/square_connect/models/refund.rb
@@ -735,7 +749,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
735
749
  version: '0'
736
750
  requirements: []
737
751
  rubyforge_project:
738
- rubygems_version: 2.4.5
752
+ rubygems_version: 2.6.13
739
753
  signing_key:
740
754
  specification_version: 4
741
755
  summary: Square Connect API Ruby Gem