Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Commit 4249711

Browse files
yonpolsssung88
authored andcommitted
Release 2.7.0 (#34)
* Release 2.7.0
1 parent 3641b0e commit 4249711

14 files changed

+76
-32
lines changed

CHANGES.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Change Log
22

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+
325
## Version 2.6.1 (2018-03-28)
426

527
* Updates user-agent header

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
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)
22
==================
33

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://docs.google.com/forms/d/e/1FAIpQLSfAZGIEZoNs-XryKqUoW3atFQHdQw5UqXLMOVPq3V4DEq-AJw/viewform?usp=sf_link#response=ACYDBNj5LFgPy8Tcac2gSgv_IjXvgWsPy2CO2xTXwnc0OSSxCvWFgc7SCDHvVQ)**
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)**
55

66
This repository contains the released Ruby client SDK. Check out our [API
77
specification repository](https://github.com/square/connect-api-specification)
@@ -10,7 +10,7 @@ for the specification and template files we used to generate this.
1010
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
1111

1212
- API version: 2.0
13-
- Package version: 2.6.1
13+
- Package version: 2.7.0
1414
- Build package: io.swagger.codegen.languages.RubyClientCodegen
1515

1616
For more information, please visit [https://squareup.com/developers](https://squareup.com/developers)

docs/TransactionsApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Name | Type | Description | Notes
186186
187187
ListRefunds
188188

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
190190

191191
### Example
192192
```ruby
@@ -248,7 +248,7 @@ Name | Type | Description | Notes
248248
249249
ListTransactions
250250

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
252252

253253
### Example
254254
```ruby

docs/V1Payment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Name | Type | Description | Notes
2727
**inclusive_tax** | [**Array<V1PaymentTax>**](V1PaymentTax.md) | All of the inclusive taxes associated with the payment. | [optional]
2828
**additive_tax** | [**Array<V1PaymentTax>**](V1PaymentTax.md) | All of the additive taxes associated with the payment. | [optional]
2929
**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]
3131
**itemizations** | [**Array<V1PaymentItemization>**](V1PaymentItemization.md) | The items purchased in the payment. | [optional]
3232

3333

docs/V1Refund.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ Name | Type | Description | Notes
88
**type** | **String** | The type of refund | [optional]
99
**reason** | **String** | The merchant-specified reason for the refund. | [optional]
1010
**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.. | [optional]
11+
**created_at** | **String** | The time when the merchant initiated the refund for Square to process, in ISO 8601 format. | [optional]
1212
**processed_at** | **String** | The time when Square processed the refund on behalf of the merchant, in ISO 8601 format. | [optional]
13-
**payment_id** | **String** | The Square-issued ID of the payment the refund is applied to. | [optional]
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]
1414
**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]
1516

1617

docs/V1Tender.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ Name | Type | Description | Notes
1818
**tendered_money** | [**V1Money**](V1Money.md) | The amount of total_money applied to the payment. | [optional]
1919
**change_back_money** | [**V1Money**](V1Money.md) | The amount of total_money returned to the buyer as change. | [optional]
2020
**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]
2122

2223

docs/V1TransactionsApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ opts = {
273273
order: "order_example", # String | TThe order in which payments are listed in the response.
274274
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.
275275
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 maximum number of payments to return in a single response. This value cannot exceed 200.
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.
277277
batch_token: "batch_token_example" # String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
278278
}
279279

@@ -294,7 +294,7 @@ Name | Type | Description | Notes
294294
**order** | **String**| TThe order in which payments are listed in the response. | [optional]
295295
**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]
296296
**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 maximum number of payments to return in a single response. This value cannot exceed 200. | [optional]
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]
298298
**batch_token** | **String**| A pagination cursor to retrieve the next set of results for your original query to the endpoint. | [optional]
299299

300300
### Return type
@@ -509,7 +509,7 @@ api_instance = SquareConnect::V1TransactionsApi.new
509509

510510
location_id = "location_id_example" # String | The ID of the payment's associated location.
511511

512-
payment_id = "payment_id_example" # String | The payment's Square-issued ID. You obtain this value from Payment objects returned by the List Payments endpoint, or Settlement objects returned by the List Settlements endpoint.
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.
513513

514514

515515
begin
@@ -526,7 +526,7 @@ end
526526
Name | Type | Description | Notes
527527
------------- | ------------- | ------------- | -------------
528528
**location_id** | **String**| The ID of the payment's associated location. |
529-
**payment_id** | **String**| The payment's Square-issued ID. You obtain this value from Payment objects returned by the List Payments endpoint, or Settlement objects returned by the List Settlements endpoint. |
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. |
530530

531531
### Return type
532532

lib/square_connect/api/transactions_api.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def create_refund_with_http_info(location_id, transaction_id, body, opts = {})
193193
end
194194

195195
# 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
197197
# @param location_id The ID of the location to list refunds for.
198198
# @param [Hash] opts the optional parameters
199199
# @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 @@ def list_refunds(location_id, opts = {})
207207
end
208208

209209
# 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
211211
# @param location_id The ID of the location to list refunds for.
212212
# @param [Hash] opts the optional parameters
213213
# @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 @@ def list_refunds_with_http_info(location_id, opts = {})
261261
end
262262

263263
# 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
265265
# @param location_id The ID of the location to list transactions for.
266266
# @param [Hash] opts the optional parameters
267267
# @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 @@ def list_transactions(location_id, opts = {})
275275
end
276276

277277
# 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
279279
# @param location_id The ID of the location to list transactions for.
280280
# @param [Hash] opts the optional parameters
281281
# @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.

lib/square_connect/api/v1_transactions_api.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def list_payments_with_http_info(location_id, opts = {})
278278
# @option opts [String] :order TThe order in which payments are listed in the response.
279279
# @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.
280280
# @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 maximum number of payments to return in a single response. This value cannot exceed 200.
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.
282282
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
283283
# @return [Array<V1Refund>]
284284
def list_refunds(location_id, opts = {})
@@ -293,7 +293,7 @@ def list_refunds(location_id, opts = {})
293293
# @option opts [String] :order TThe order in which payments are listed in the response.
294294
# @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.
295295
# @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 maximum number of payments to return in a single response. This value cannot exceed 200.
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.
297297
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
298298
# @return [Array<(Array<V1Refund>, Fixnum, Hash)>] Array<V1Refund> data, response status code and response headers
299299
def list_refunds_with_http_info(location_id, opts = {})
@@ -544,7 +544,7 @@ def retrieve_order_with_http_info(location_id, order_id, opts = {})
544544
# Provides comprehensive information for a single payment.
545545
# Provides comprehensive information for a single payment.
546546
# @param location_id The ID of the payment&#39;s associated location.
547-
# @param payment_id The payment&#39;s Square-issued ID. You obtain this value from Payment objects returned by the List Payments endpoint, or Settlement objects returned by the List Settlements endpoint.
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.
548548
# @param [Hash] opts the optional parameters
549549
# @return [V1Payment]
550550
def retrieve_payment(location_id, payment_id, opts = {})
@@ -555,7 +555,7 @@ def retrieve_payment(location_id, payment_id, opts = {})
555555
# Provides comprehensive information for a single payment.
556556
# Provides comprehensive information for a single payment.
557557
# @param location_id The ID of the payment&#39;s associated location.
558-
# @param payment_id The payment&#39;s Square-issued ID. You obtain this value from Payment objects returned by the List Payments endpoint, or Settlement objects returned by the List Settlements endpoint.
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.
559559
# @param [Hash] opts the optional parameters
560560
# @return [Array<(V1Payment, Fixnum, Hash)>] V1Payment data, response status code and response headers
561561
def retrieve_payment_with_http_info(location_id, payment_id, opts = {})

lib/square_connect/api_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def initialize(config = Configuration.default)
3030
@config = config
3131

3232
# Construct user agent string. Returns slightly different string for JRuby
33-
@user_agent = "Square-Connect-Ruby/2.6.1"
33+
@user_agent = "Square-Connect-Ruby/2.7.0"
3434

3535
@default_headers = {
3636
'Content-Type' => "application/json",

0 commit comments

Comments
 (0)