square_connect 2.6.1.197 → 2.7.0.202
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +22 -0
- data/README.md +2 -2
- data/docs/TransactionsApi.md +2 -2
- data/docs/V1Payment.md +1 -1
- data/docs/V1Refund.md +3 -2
- data/docs/V1Tender.md +1 -0
- data/docs/V1TransactionsApi.md +4 -4
- data/lib/square_connect/api/transactions_api.rb +4 -4
- data/lib/square_connect/api/v1_transactions_api.rb +4 -4
- data/lib/square_connect/api_client.rb +1 -1
- data/lib/square_connect/models/v1_payment.rb +1 -1
- data/lib/square_connect/models/v1_refund.rb +16 -6
- data/lib/square_connect/models/v1_tender.rb +14 -4
- data/lib/square_connect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c046ea3d27024c46cb6db56c9b7327c79e968838ea8547cafb4b8dbd348069e
|
4
|
+
data.tar.gz: 35432e78d07a359cdac391fa84f4b3fabd7eb58b25db48e96bf0976664fede11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64ff9f8230cd0e4bc49f5a9a17cb36f3c38c1eae2a5ece76f02dab0102d6b58ce9eacb3a56a6f60d1cac1e6beba39ba50054e4f712a630a3cfc844432f85d36a
|
7
|
+
data.tar.gz: 45619659c1d21580d834bff01327d893850cc3020d0d8eb68f0426ec3775a79856a2ff97ef9b5a30e54e5535a9364dba7bce327e74734d727343233020a77ecf
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## Version 2.7.0 (2018-04-26)
|
4
|
+
|
5
|
+
### New features: Transactions API and Payments API
|
6
|
+
|
7
|
+
The Transactions API in Connect v2 now includes payment and refund information from exchanges.
|
8
|
+
|
9
|
+
* `ListTransactions` now includes payment information from sales and exchanges and refund
|
10
|
+
information from returns and exchanges.
|
11
|
+
* `ListRefunds` now includes refunds that result from exchanges in addition to partial refunds and
|
12
|
+
itemized returns through Square's Point of Sale applications.
|
13
|
+
|
14
|
+
The Payments API in Connect v1 now includes payment and refund information from exchanges.
|
15
|
+
|
16
|
+
* `ListPayments` now includes refunds that are generated from exchanges to account for the
|
17
|
+
value of returned goods.
|
18
|
+
* `ListRefunds` now returns an approximate number of refunds (default: 100, max: 200).
|
19
|
+
The response may contain more results than the prescribed limit when refunds are made
|
20
|
+
simultaneously to multiple tenders in a payment or when refunds are generated from exchanges
|
21
|
+
to account for the value of returned goods.
|
22
|
+
* `is_exchange` is added to `V1Refund` and `V1Tender`. Refunds and tenders marked in this way
|
23
|
+
represent the value of returned goods in an exchange, rather than actual money movement.
|
24
|
+
|
3
25
|
## Version 2.6.1 (2018-03-28)
|
4
26
|
|
5
27
|
* Updates user-agent header
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Square Connect Ruby SDKs [![Build Status](https://travis-ci.org/square/connect-ruby-sdk.svg?branch=master)](https://travis-ci.org/square/connect-ruby-sdk)[![Gem Version](https://badge.fury.io/rb/square_connect.svg)](https://badge.fury.io/rb/square_connect)
|
2
2
|
==================
|
3
3
|
|
4
|
-
**If you have feedback about the new SDKs, or just want to talk to other Square Developers, request an invite to the new [slack community for Square Developers](https://
|
4
|
+
**If you have feedback about the new SDKs, or just want to talk to other Square Developers, request an invite to the new [slack community for Square Developers](https://squ.re/2GYvF2B)**
|
5
5
|
|
6
6
|
This repository contains the released Ruby client SDK. Check out our [API
|
7
7
|
specification repository](https://github.com/square/connect-api-specification)
|
@@ -10,7 +10,7 @@ for the specification and template files we used to generate this.
|
|
10
10
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
11
11
|
|
12
12
|
- API version: 2.0
|
13
|
-
- Package version: 2.
|
13
|
+
- Package version: 2.7.0
|
14
14
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
15
15
|
|
16
16
|
For more information, please visit [https://squareup.com/developers](https://squareup.com/developers)
|
data/docs/TransactionsApi.md
CHANGED
@@ -186,7 +186,7 @@ Name | Type | Description | Notes
|
|
186
186
|
|
187
187
|
ListRefunds
|
188
188
|
|
189
|
-
Lists refunds for one of a business's locations. Refunds with a `status` of `PENDING` are not currently included in this endpoint's response. Max results per [page](#paginatingresults): 50
|
189
|
+
Lists refunds for one of a business's locations. In addition to full or partial tender refunds processed through Square APIs, refunds may result from itemized returns or exchanges through Square's Point of Sale applications. Refunds with a `status` of `PENDING` are not currently included in this endpoint's response. Max results per [page](#paginatingresults): 50
|
190
190
|
|
191
191
|
### Example
|
192
192
|
```ruby
|
@@ -248,7 +248,7 @@ Name | Type | Description | Notes
|
|
248
248
|
|
249
249
|
ListTransactions
|
250
250
|
|
251
|
-
Lists transactions for a particular location. Max results per [page](#paginatingresults): 50
|
251
|
+
Lists transactions for a particular location. Transactions include payment information from sales and exchanges and refund information from returns and exchanges. Max results per [page](#paginatingresults): 50
|
252
252
|
|
253
253
|
### Example
|
254
254
|
```ruby
|
data/docs/V1Payment.md
CHANGED
@@ -27,7 +27,7 @@ Name | Type | Description | Notes
|
|
27
27
|
**inclusive_tax** | [**Array<V1PaymentTax>**](V1PaymentTax.md) | All of the inclusive taxes associated with the payment. | [optional]
|
28
28
|
**additive_tax** | [**Array<V1PaymentTax>**](V1PaymentTax.md) | All of the additive taxes associated with the payment. | [optional]
|
29
29
|
**tender** | [**Array<V1Tender>**](V1Tender.md) | All of the additive taxes associated with the payment. | [optional]
|
30
|
-
**refunds** | [**Array<V1Refund>**](V1Refund.md) | All of the refunds applied to the payment. | [optional]
|
30
|
+
**refunds** | [**Array<V1Refund>**](V1Refund.md) | All of the refunds applied to the payment. Note that the value of all refunds on a payment can exceed the value of all tenders if a merchant chooses to refund money to a tender after previously accepting returned goods as part of an exchange. | [optional]
|
31
31
|
**itemizations** | [**Array<V1PaymentItemization>**](V1PaymentItemization.md) | The items purchased in the payment. | [optional]
|
32
32
|
|
33
33
|
|
data/docs/V1Refund.md
CHANGED
@@ -8,9 +8,10 @@ Name | Type | Description | Notes
|
|
8
8
|
**type** | **String** | The type of refund | [optional]
|
9
9
|
**reason** | **String** | The merchant-specified reason for the refund. | [optional]
|
10
10
|
**refunded_money** | [**V1Money**](V1Money.md) | The amount of money refunded. This amount is always negative. | [optional]
|
11
|
-
**created_at** | **String** | The time when the merchant initiated the refund for Square to process, in ISO 8601 format
|
11
|
+
**created_at** | **String** | The time when the merchant initiated the refund for Square to process, in ISO 8601 format. | [optional]
|
12
12
|
**processed_at** | **String** | The time when Square processed the refund on behalf of the merchant, in ISO 8601 format. | [optional]
|
13
|
-
**payment_id** | **String** |
|
13
|
+
**payment_id** | **String** | A Square-issued ID associated with the refund. For single-tender refunds, payment_id is the ID of the original payment ID. For split-tender refunds, payment_id is the ID of the original tender. For exchange-based refunds (is_exchange == true), payment_id is the ID of the original payment ID even if the payment includes other tenders. | [optional]
|
14
14
|
**merchant_id** | **String** | | [optional]
|
15
|
+
**is_exchange** | **BOOLEAN** | Indicates whether or not the refund is associated with an exchange. If is_exchange is true, the refund reflects the value of goods returned in the exchange not the total money refunded. | [optional]
|
15
16
|
|
16
17
|
|
data/docs/V1Tender.md
CHANGED
@@ -18,5 +18,6 @@ Name | Type | Description | Notes
|
|
18
18
|
**tendered_money** | [**V1Money**](V1Money.md) | The amount of total_money applied to the payment. | [optional]
|
19
19
|
**change_back_money** | [**V1Money**](V1Money.md) | The amount of total_money returned to the buyer as change. | [optional]
|
20
20
|
**refunded_money** | [**V1Money**](V1Money.md) | The total of all refunds applied to this tender. This amount is always negative or zero. | [optional]
|
21
|
+
**is_exchange** | **BOOLEAN** | Indicates whether or not the tender is associated with an exchange. If is_exchange is true, the tender represents the value of goods returned in an exchange not the actual money paid. The exchange value reduces the tender amounts needed to pay for items purchased in the exchange. | [optional]
|
21
22
|
|
22
23
|
|
data/docs/V1TransactionsApi.md
CHANGED
@@ -273,7 +273,7 @@ opts = {
|
|
273
273
|
order: "order_example", # String | TThe order in which payments are listed in the response.
|
274
274
|
begin_time: "begin_time_example", # String | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
275
275
|
end_time: "end_time_example", # String | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
|
276
|
-
limit: 56, # Integer | The
|
276
|
+
limit: 56, # Integer | The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods.
|
277
277
|
batch_token: "batch_token_example" # String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
278
278
|
}
|
279
279
|
|
@@ -294,7 +294,7 @@ Name | Type | Description | Notes
|
|
294
294
|
**order** | **String**| TThe order in which payments are listed in the response. | [optional]
|
295
295
|
**begin_time** | **String**| The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. | [optional]
|
296
296
|
**end_time** | **String**| The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. | [optional]
|
297
|
-
**limit** | **Integer**| The
|
297
|
+
**limit** | **Integer**| The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods. | [optional]
|
298
298
|
**batch_token** | **String**| A pagination cursor to retrieve the next set of results for your original query to the endpoint. | [optional]
|
299
299
|
|
300
300
|
### Return type
|
@@ -509,7 +509,7 @@ api_instance = SquareConnect::V1TransactionsApi.new
|
|
509
509
|
|
510
510
|
location_id = "location_id_example" # String | The ID of the payment's associated location.
|
511
511
|
|
512
|
-
payment_id = "payment_id_example" # String | The
|
512
|
+
payment_id = "payment_id_example" # String | The Square-issued payment ID. payment_id comes from Payment objects returned by the List Payments endpoint, Settlement objects returned by the List Settlements endpoint, or Refund objects returned by the List Refunds endpoint.
|
513
513
|
|
514
514
|
|
515
515
|
begin
|
@@ -526,7 +526,7 @@ end
|
|
526
526
|
Name | Type | Description | Notes
|
527
527
|
------------- | ------------- | ------------- | -------------
|
528
528
|
**location_id** | **String**| The ID of the payment's associated location. |
|
529
|
-
**payment_id** | **String**| The
|
529
|
+
**payment_id** | **String**| The Square-issued payment ID. payment_id comes from Payment objects returned by the List Payments endpoint, Settlement objects returned by the List Settlements endpoint, or Refund objects returned by the List Refunds endpoint. |
|
530
530
|
|
531
531
|
### Return type
|
532
532
|
|
@@ -193,7 +193,7 @@ module SquareConnect
|
|
193
193
|
end
|
194
194
|
|
195
195
|
# ListRefunds
|
196
|
-
# Lists refunds for one of a business's locations. Refunds with a `status` of `PENDING` are not currently included in this endpoint's response. Max results per [page](#paginatingresults): 50
|
196
|
+
# Lists refunds for one of a business's locations. In addition to full or partial tender refunds processed through Square APIs, refunds may result from itemized returns or exchanges through Square's Point of Sale applications. Refunds with a `status` of `PENDING` are not currently included in this endpoint's response. Max results per [page](#paginatingresults): 50
|
197
197
|
# @param location_id The ID of the location to list refunds for.
|
198
198
|
# @param [Hash] opts the optional parameters
|
199
199
|
# @option opts [String] :begin_time The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
|
@@ -207,7 +207,7 @@ module SquareConnect
|
|
207
207
|
end
|
208
208
|
|
209
209
|
# ListRefunds
|
210
|
-
# Lists refunds for one of a business's locations. Refunds with a `status` of `PENDING` are not currently included in this endpoint's response. Max results per [page](#paginatingresults): 50
|
210
|
+
# Lists refunds for one of a business's locations. In addition to full or partial tender refunds processed through Square APIs, refunds may result from itemized returns or exchanges through Square's Point of Sale applications. Refunds with a `status` of `PENDING` are not currently included in this endpoint's response. Max results per [page](#paginatingresults): 50
|
211
211
|
# @param location_id The ID of the location to list refunds for.
|
212
212
|
# @param [Hash] opts the optional parameters
|
213
213
|
# @option opts [String] :begin_time The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
|
@@ -261,7 +261,7 @@ module SquareConnect
|
|
261
261
|
end
|
262
262
|
|
263
263
|
# ListTransactions
|
264
|
-
# Lists transactions for a particular location. Max results per [page](#paginatingresults): 50
|
264
|
+
# Lists transactions for a particular location. Transactions include payment information from sales and exchanges and refund information from returns and exchanges. Max results per [page](#paginatingresults): 50
|
265
265
|
# @param location_id The ID of the location to list transactions for.
|
266
266
|
# @param [Hash] opts the optional parameters
|
267
267
|
# @option opts [String] :begin_time The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
|
@@ -275,7 +275,7 @@ module SquareConnect
|
|
275
275
|
end
|
276
276
|
|
277
277
|
# ListTransactions
|
278
|
-
# Lists transactions for a particular location. Max results per [page](#paginatingresults): 50
|
278
|
+
# Lists transactions for a particular location. Transactions include payment information from sales and exchanges and refund information from returns and exchanges. Max results per [page](#paginatingresults): 50
|
279
279
|
# @param location_id The ID of the location to list transactions for.
|
280
280
|
# @param [Hash] opts the optional parameters
|
281
281
|
# @option opts [String] :begin_time The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
|
@@ -278,7 +278,7 @@ module SquareConnect
|
|
278
278
|
# @option opts [String] :order TThe order in which payments are listed in the response.
|
279
279
|
# @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
280
280
|
# @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
|
281
|
-
# @option opts [Integer] :limit The
|
281
|
+
# @option opts [Integer] :limit The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods.
|
282
282
|
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
283
283
|
# @return [Array<V1Refund>]
|
284
284
|
def list_refunds(location_id, opts = {})
|
@@ -293,7 +293,7 @@ module SquareConnect
|
|
293
293
|
# @option opts [String] :order TThe order in which payments are listed in the response.
|
294
294
|
# @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
295
295
|
# @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
|
296
|
-
# @option opts [Integer] :limit The
|
296
|
+
# @option opts [Integer] :limit The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods.
|
297
297
|
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
298
298
|
# @return [Array<(Array<V1Refund>, Fixnum, Hash)>] Array<V1Refund> data, response status code and response headers
|
299
299
|
def list_refunds_with_http_info(location_id, opts = {})
|
@@ -544,7 +544,7 @@ module SquareConnect
|
|
544
544
|
# Provides comprehensive information for a single payment.
|
545
545
|
# Provides comprehensive information for a single payment.
|
546
546
|
# @param location_id The ID of the payment's associated location.
|
547
|
-
# @param payment_id The
|
547
|
+
# @param payment_id The Square-issued payment ID. payment_id comes from Payment objects returned by the List Payments endpoint, Settlement objects returned by the List Settlements endpoint, or Refund objects returned by the List Refunds endpoint.
|
548
548
|
# @param [Hash] opts the optional parameters
|
549
549
|
# @return [V1Payment]
|
550
550
|
def retrieve_payment(location_id, payment_id, opts = {})
|
@@ -555,7 +555,7 @@ module SquareConnect
|
|
555
555
|
# Provides comprehensive information for a single payment.
|
556
556
|
# Provides comprehensive information for a single payment.
|
557
557
|
# @param location_id The ID of the payment's associated location.
|
558
|
-
# @param payment_id The
|
558
|
+
# @param payment_id The Square-issued payment ID. payment_id comes from Payment objects returned by the List Payments endpoint, Settlement objects returned by the List Settlements endpoint, or Refund objects returned by the List Refunds endpoint.
|
559
559
|
# @param [Hash] opts the optional parameters
|
560
560
|
# @return [Array<(V1Payment, Fixnum, Hash)>] V1Payment data, response status code and response headers
|
561
561
|
def retrieve_payment_with_http_info(location_id, payment_id, opts = {})
|
@@ -30,7 +30,7 @@ module SquareConnect
|
|
30
30
|
@config = config
|
31
31
|
|
32
32
|
# Construct user agent string. Returns slightly different string for JRuby
|
33
|
-
@user_agent = "Square-Connect-Ruby/2.
|
33
|
+
@user_agent = "Square-Connect-Ruby/2.7.0"
|
34
34
|
|
35
35
|
@default_headers = {
|
36
36
|
'Content-Type' => "application/json",
|
@@ -78,7 +78,7 @@ module SquareConnect
|
|
78
78
|
# All of the additive taxes associated with the payment.
|
79
79
|
attr_accessor :tender
|
80
80
|
|
81
|
-
# All of the refunds applied to the payment.
|
81
|
+
# All of the refunds applied to the payment. Note that the value of all refunds on a payment can exceed the value of all tenders if a merchant chooses to refund money to a tender after previously accepting returned goods as part of an exchange.
|
82
82
|
attr_accessor :refunds
|
83
83
|
|
84
84
|
# The items purchased in the payment.
|
@@ -21,18 +21,21 @@ module SquareConnect
|
|
21
21
|
# The amount of money refunded. This amount is always negative.
|
22
22
|
attr_accessor :refunded_money
|
23
23
|
|
24
|
-
# The time when the merchant initiated the refund for Square to process, in ISO 8601 format
|
24
|
+
# The time when the merchant initiated the refund for Square to process, in ISO 8601 format.
|
25
25
|
attr_accessor :created_at
|
26
26
|
|
27
27
|
# The time when Square processed the refund on behalf of the merchant, in ISO 8601 format.
|
28
28
|
attr_accessor :processed_at
|
29
29
|
|
30
|
-
#
|
30
|
+
# A Square-issued ID associated with the refund. For single-tender refunds, payment_id is the ID of the original payment ID. For split-tender refunds, payment_id is the ID of the original tender. For exchange-based refunds (is_exchange == true), payment_id is the ID of the original payment ID even if the payment includes other tenders.
|
31
31
|
attr_accessor :payment_id
|
32
32
|
|
33
33
|
#
|
34
34
|
attr_accessor :merchant_id
|
35
35
|
|
36
|
+
# Indicates whether or not the refund is associated with an exchange. If is_exchange is true, the refund reflects the value of goods returned in the exchange not the total money refunded.
|
37
|
+
attr_accessor :is_exchange
|
38
|
+
|
36
39
|
class EnumAttributeValidator
|
37
40
|
attr_reader :datatype
|
38
41
|
attr_reader :allowable_values
|
@@ -64,7 +67,8 @@ module SquareConnect
|
|
64
67
|
:'created_at' => :'created_at',
|
65
68
|
:'processed_at' => :'processed_at',
|
66
69
|
:'payment_id' => :'payment_id',
|
67
|
-
:'merchant_id' => :'merchant_id'
|
70
|
+
:'merchant_id' => :'merchant_id',
|
71
|
+
:'is_exchange' => :'is_exchange'
|
68
72
|
}
|
69
73
|
end
|
70
74
|
|
@@ -77,7 +81,8 @@ module SquareConnect
|
|
77
81
|
:'created_at' => :'String',
|
78
82
|
:'processed_at' => :'String',
|
79
83
|
:'payment_id' => :'String',
|
80
|
-
:'merchant_id' => :'String'
|
84
|
+
:'merchant_id' => :'String',
|
85
|
+
:'is_exchange' => :'BOOLEAN'
|
81
86
|
}
|
82
87
|
end
|
83
88
|
|
@@ -117,6 +122,10 @@ module SquareConnect
|
|
117
122
|
self.merchant_id = attributes[:'merchant_id']
|
118
123
|
end
|
119
124
|
|
125
|
+
if attributes.has_key?(:'is_exchange')
|
126
|
+
self.is_exchange = attributes[:'is_exchange']
|
127
|
+
end
|
128
|
+
|
120
129
|
end
|
121
130
|
|
122
131
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -155,7 +164,8 @@ module SquareConnect
|
|
155
164
|
created_at == o.created_at &&
|
156
165
|
processed_at == o.processed_at &&
|
157
166
|
payment_id == o.payment_id &&
|
158
|
-
merchant_id == o.merchant_id
|
167
|
+
merchant_id == o.merchant_id &&
|
168
|
+
is_exchange == o.is_exchange
|
159
169
|
end
|
160
170
|
|
161
171
|
# @see the `==` method
|
@@ -167,7 +177,7 @@ module SquareConnect
|
|
167
177
|
# Calculates hash code according to all attributes.
|
168
178
|
# @return [Fixnum] Hash code
|
169
179
|
def hash
|
170
|
-
[type, reason, refunded_money, created_at, processed_at, payment_id, merchant_id].hash
|
180
|
+
[type, reason, refunded_money, created_at, processed_at, payment_id, merchant_id, is_exchange].hash
|
171
181
|
end
|
172
182
|
|
173
183
|
# Builds the object from hash
|
@@ -51,6 +51,9 @@ module SquareConnect
|
|
51
51
|
# The total of all refunds applied to this tender. This amount is always negative or zero.
|
52
52
|
attr_accessor :refunded_money
|
53
53
|
|
54
|
+
# Indicates whether or not the tender is associated with an exchange. If is_exchange is true, the tender represents the value of goods returned in an exchange not the actual money paid. The exchange value reduces the tender amounts needed to pay for items purchased in the exchange.
|
55
|
+
attr_accessor :is_exchange
|
56
|
+
|
54
57
|
class EnumAttributeValidator
|
55
58
|
attr_reader :datatype
|
56
59
|
attr_reader :allowable_values
|
@@ -88,7 +91,8 @@ module SquareConnect
|
|
88
91
|
:'total_money' => :'total_money',
|
89
92
|
:'tendered_money' => :'tendered_money',
|
90
93
|
:'change_back_money' => :'change_back_money',
|
91
|
-
:'refunded_money' => :'refunded_money'
|
94
|
+
:'refunded_money' => :'refunded_money',
|
95
|
+
:'is_exchange' => :'is_exchange'
|
92
96
|
}
|
93
97
|
end
|
94
98
|
|
@@ -107,7 +111,8 @@ module SquareConnect
|
|
107
111
|
:'total_money' => :'V1Money',
|
108
112
|
:'tendered_money' => :'V1Money',
|
109
113
|
:'change_back_money' => :'V1Money',
|
110
|
-
:'refunded_money' => :'V1Money'
|
114
|
+
:'refunded_money' => :'V1Money',
|
115
|
+
:'is_exchange' => :'BOOLEAN'
|
111
116
|
}
|
112
117
|
end
|
113
118
|
|
@@ -171,6 +176,10 @@ module SquareConnect
|
|
171
176
|
self.refunded_money = attributes[:'refunded_money']
|
172
177
|
end
|
173
178
|
|
179
|
+
if attributes.has_key?(:'is_exchange')
|
180
|
+
self.is_exchange = attributes[:'is_exchange']
|
181
|
+
end
|
182
|
+
|
174
183
|
end
|
175
184
|
|
176
185
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -239,7 +248,8 @@ module SquareConnect
|
|
239
248
|
total_money == o.total_money &&
|
240
249
|
tendered_money == o.tendered_money &&
|
241
250
|
change_back_money == o.change_back_money &&
|
242
|
-
refunded_money == o.refunded_money
|
251
|
+
refunded_money == o.refunded_money &&
|
252
|
+
is_exchange == o.is_exchange
|
243
253
|
end
|
244
254
|
|
245
255
|
# @see the `==` method
|
@@ -251,7 +261,7 @@ module SquareConnect
|
|
251
261
|
# Calculates hash code according to all attributes.
|
252
262
|
# @return [Fixnum] Hash code
|
253
263
|
def hash
|
254
|
-
[id, type, name, employee_id, receipt_url, card_brand, pan_suffix, entry_method, payment_note, total_money, tendered_money, change_back_money, refunded_money].hash
|
264
|
+
[id, type, name, employee_id, receipt_url, card_brand, pan_suffix, entry_method, payment_note, total_money, tendered_money, change_back_money, refunded_money, is_exchange].hash
|
255
265
|
end
|
256
266
|
|
257
267
|
# Builds the object from hash
|
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.
|
4
|
+
version: 2.7.0.202
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Square, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|