Skip to content

Commit 99b29df

Browse files
Merge pull request #25 from square/release/6.4.0.20200923
release
2 parents 39fef0d + b3c10d1 commit 99b29df

32 files changed

Lines changed: 274 additions & 198 deletions

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Change Log
22

3+
## Version 6.4.0.20200923 (2020-09-23)
4+
## Existing API updates
5+
* Invoices API (beta)
6+
* [InvoiceStatus](https://developer.squareup.com/reference/square_2020-09-23/enums/InvoiceStatus) enum. Added the `PAYMENT_PENDING` value. Previously, the Invoices API returned a `PAID` or `PARTIALLY_PAID` status for invoices in a payment pending state. Now, the Invoices API returns a `PAYMENT_PENDING` status for all invoices in a payment pending state, including those previously returned as `PAID` or `PARTIALLY_PAID`.
7+
* Payments API
8+
* [ListPayment](https://developer.squareup.com/reference/square_2020-09-23/payments-api/list-payments). The endpoint now supports the `limit` parameter.
9+
* Refunds API
10+
* [ListPaymentRefunds](https://developer.squareup.com/reference/square_2020-09-23/refunds-api/list-payment-refunds). The endpoint now supports the `limit` parameter.
11+
* [DeviceDetails](https://developer.squareup.com/reference/square_2020-09-23/objects/DeviceDetails#definition__property-device_installation_id). The object now includes the `device_installation_id` field.
12+
## Documentation updates
13+
* [Payment status.](https://developer.squareup.com/docs/payments-api/take-payments#payment-status) Added details about the `Payment.status` changes and how the status relates to the seller receiving the funds.
14+
* [Refund status.](https://developer.squareup.com/docs/payments-api/refund-payments#refund-status) Added details about the `PaymentRefund.status` changes and how the status relates to the cardholder receiving the funds.
15+
* [CreateRefund errors.](https://developer.squareup.com/docs/payments-api/error-codes#createrefund-errors) Added documentation for the `REFUND_DECLINED` error code.
16+
317
## Version 6.3.0.20200826 (2020-08-26)
418
## Existing API updates
519
* Orders API
@@ -254,4 +268,4 @@ All SDKs have been updated to support the following changes:
254268
* __Beta release:__ SDKs updated to support the new [CashDrawerShifts](cashdrawershift-api/reporting) API.
255269

256270
* Square now follows the semantic versioning scheme for all SDKs except PHP and Node.js. This versioning scheme uses three numbers to delineate MAJOR, MINOR, and PATCH versions of our SDK. In addition, the SDK version also includes the API version so you know what Square API version the SDK is related to. For more information, see [Versioning and SDKs](build-basics/versioning-overview#versioning-and-sdks).
257-
* Java, .Net, Python, and Ruby SDKs are now version 4.0.0. Java and .Net SDKs have breaking changes in version 4.0.0. Ruby and Python do not have breaking changes.
271+
* Java, .Net, Python, and Ruby SDKs are now version 4.0.0. Java and .Net SDKs have breaking changes in version 4.0.0. Ruby and Python do not have breaking changes.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Install the client dynamically by adding a dependency to the POM for your projec
3333
<dependency>
3434
<groupId>com.squareup</groupId>
3535
<artifactId>square</artifactId>
36-
<version>6.3.0.20200826</version>
36+
<version>6.4.0.20200923</version>
3737
</dependency>
3838
```
3939

@@ -330,4 +330,4 @@ You can also use the Square API to create applications or services that work wit
330330
[V1 Items]: doc/v1-items.md
331331
[Team]: doc/team.md
332332
[Transactions]: doc/transactions.md
333-
[Subscriptions]: doc/subscriptions.md
333+
[Subscriptions]: doc/subscriptions.md

doc/disputes.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ DisputesApi disputesApi = client.getDisputesApi();
2323
## List Disputes
2424

2525
Returns a list of disputes associated
26-
with a particular account.
26+
with a particular account.
27+
28+
Access dispute information: [https://developer.squareup.com/docs/disputes-api/process-disputes#access-dispute-information](https://developer.squareup.com/docs/disputes-api/process-disputes#access-dispute-information)
2729

2830
```java
2931
CompletableFuture<ListDisputesResponse> listDisputesAsync(
@@ -100,7 +102,8 @@ dispute state to ACCEPTED.
100102
Square debits the disputed amount from the seller’s Square
101103
account. If the Square account balance does not have
102104
sufficient funds, Square debits the associated bank account.
103-
For an overview of the Disputes API, see [Overview](https://developer.squareup.com/docs/docs/disputes-api/overview).
105+
106+
Accept a dispute: [https://developer.squareup.com/docs/disputes-api/process-disputes#accept-a-dispute](https://developer.squareup.com/docs/disputes-api/process-disputes#accept-a-dispute)
104107

105108
```java
106109
CompletableFuture<AcceptDisputeResponse> acceptDisputeAsync(
@@ -245,7 +248,8 @@ disputesApi.retrieveDisputeEvidenceAsync(disputeId, evidenceId).thenAccept(resul
245248
Uploads a file to use as evidence in a dispute challenge. The endpoint accepts
246249
HTTP multipart/form-data file uploads in HEIC, HEIF, JPEG, PDF, PNG,
247250
and TIFF formats.
248-
For more information, see [Challenge a Dispute](https://developer.squareup.com/docs/docs/disputes-api/process-disputes#challenge-a-dispute).
251+
252+
Challenge a dispute: [https://developer.squareup.com/docs/disputes-api/process-disputes#challenge-a-dispute](https://developer.squareup.com/docs/disputes-api/process-disputes#challenge-a-dispute)
249253

250254
```java
251255
CompletableFuture<CreateDisputeEvidenceFileResponse> createDisputeEvidenceFileAsync(
@@ -287,8 +291,9 @@ disputesApi.createDisputeEvidenceFileAsync(disputeId, request, imageFile).thenAc
287291

288292
## Create Dispute Evidence Text
289293

290-
Uploads text to use as evidence for a dispute challenge. For more information, see
291-
[Challenge a Dispute](https://developer.squareup.com/docs/docs/disputes-api/process-disputes#challenge-a-dispute).
294+
Uploads text to use as evidence for a dispute challenge.
295+
296+
Challenge a dispute: [https://developer.squareup.com/docs/disputes-api/process-disputes#challenge-a-dispute](https://developer.squareup.com/docs/disputes-api/process-disputes#challenge-a-dispute)
292297

293298
```java
294299
CompletableFuture<CreateDisputeEvidenceTextResponse> createDisputeEvidenceTextAsync(
@@ -334,8 +339,9 @@ evidence uploaded using the
334339
[CreateDisputeEvidenceFile](https://developer.squareup.com/docs/reference/square/disputes-api/create-dispute-evidence-file) and
335340
[CreateDisputeEvidenceText](https://developer.squareup.com/docs/reference/square/disputes-api/create-dispute-evidence-text) endpoints,
336341
and evidence automatically provided by Square, when
337-
available. For more information, see
338-
[Challenge a Dispute](https://developer.squareup.com/docs/docs/disputes-api/process-disputes#challenge-a-dispute).
342+
available.
343+
344+
Challenge a dispute: [https://developer.squareup.com/docs/disputes-api/process-disputes#challenge-a-dispute](https://developer.squareup.com/docs/disputes-api/process-disputes#challenge-a-dispute)
339345

340346
```java
341347
CompletableFuture<SubmitEvidenceResponse> submitEvidenceAsync(

doc/invoices.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ InvoicesApi invoicesApi = client.getInvoicesApi();
2424
Returns a list of invoices for a given location. The response
2525
is paginated. If truncated, the response includes a `cursor` that you
2626
use in a subsequent request to fetch the next set of invoices.
27-
For more information about retrieving invoices, see [Retrieve invoices](https://developer.squareup.com/docs/docs/invoices-api/overview#retrieve-invoices).
27+
28+
Retrieve an invoice: [https://developer.squareup.com/docs/invoices-api/overview#retrieve-an-invoice](https://developer.squareup.com/docs/invoices-api/overview#retrieve-an-invoice)
2829

2930
```java
3031
CompletableFuture<ListInvoicesResponse> listInvoicesAsync(
@@ -66,8 +67,9 @@ Creates a draft [invoice](#type-invoice)
6667
for an order created using the Orders API.
6768

6869
A draft invoice remains in your account and no action is taken.
69-
You must publish the invoice before Square can process it (send it to the customer's email address or charge the customer’s card on file).
70-
For more information, see [Manage Invoices Using the Invoices API](https://developer.squareup.com/docs/docs/invoices-api/overview).
70+
You must publish the invoice before Square can process it (send it to the customer's email address or charge the customer’s card on file).
71+
72+
Create and publish an invoice: [https://developer.squareup.com/docs/invoices-api/overview#create-and-publish-an-invoice](https://developer.squareup.com/docs/invoices-api/overview#create-and-publish-an-invoice)
7173

7274
```java
7375
CompletableFuture<CreateInvoiceResponse> createInvoiceAsync(
@@ -162,8 +164,9 @@ retrieve invoices. In the current implementation, you can only specify one locat
162164
optionally one customer.
163165

164166
The response is paginated. If truncated, the response includes a `cursor`
165-
that you use in a subsequent request to fetch the next set of invoices.
166-
For more information about retrieving invoices, see [Retrieve invoices](https://developer.squareup.com/docs/docs/invoices-api/overview#retrieve-invoices).
167+
that you use in a subsequent request to fetch the next set of invoices.
168+
169+
Retrieve an invoice: [https://developer.squareup.com/docs/invoices-api/overview#retrieve-an-invoice](https://developer.squareup.com/docs/invoices-api/overview#retrieve-an-invoice)
167170

168171
```java
169172
CompletableFuture<SearchInvoicesResponse> searchInvoicesAsync(
@@ -218,7 +221,9 @@ invoicesApi.searchInvoicesAsync(body).thenAccept(result -> {
218221
Deletes the specified invoice. When an invoice is deleted, the
219222
associated Order status changes to CANCELED. You can only delete a draft
220223
invoice (you cannot delete an invoice scheduled for publication, or a
221-
published invoice).
224+
published invoice).
225+
226+
Delete an invoice: [https://developer.squareup.com/docs/invoices-api/overview#delete-an-invoice](https://developer.squareup.com/docs/invoices-api/overview#delete-an-invoice)
222227

223228
```java
224229
CompletableFuture<DeleteInvoiceResponse> deleteInvoiceAsync(
@@ -253,7 +258,9 @@ invoicesApi.deleteInvoiceAsync(invoiceId, version).thenAccept(result -> {
253258

254259
## Get Invoice
255260

256-
Retrieves an invoice by invoice ID.
261+
Retrieves an invoice by invoice ID.
262+
263+
Retrieve an invoice: [https://developer.squareup.com/docs/invoices-api/overview#retrieve-an-invoice](https://developer.squareup.com/docs/invoices-api/overview#retrieve-an-invoice)
257264

258265
```java
259266
CompletableFuture<GetInvoiceResponse> getInvoiceAsync(
@@ -288,8 +295,9 @@ invoicesApi.getInvoiceAsync(invoiceId).thenAccept(result -> {
288295
Updates an invoice by modifying field values, clearing field values, or both
289296
as specified in the request.
290297
There are no restrictions to updating an invoice in a draft state.
291-
However, there are guidelines for updating a published invoice.
292-
For more information, see [Update an invoice](https://developer.squareup.com/docs/docs/invoices-api/overview#update-an-invoice).
298+
However, there are guidelines for updating a published invoice.
299+
300+
Update an invoice: [https://developer.squareup.com/docs/invoices-api/overview#update-an-invoice](https://developer.squareup.com/docs/invoices-api/overview#update-an-invoice)
293301

294302
```java
295303
CompletableFuture<UpdateInvoiceResponse> updateInvoiceAsync(
@@ -371,7 +379,9 @@ invoicesApi.updateInvoiceAsync(invoiceId, body).thenAccept(result -> {
371379
Cancels an invoice. The seller cannot collect payments for
372380
the canceled invoice.
373381

374-
You cannot cancel an invoice in a terminal state: `PAID`, `REFUNDED`, `CANCELED`, or `FAILED`.
382+
You cannot cancel an invoice in a terminal state: `PAID`, `REFUNDED`, `CANCELED`, or `FAILED`.
383+
384+
Cancel an invoice: [https://developer.squareup.com/docs/invoices-api/overview#cancel-an-invoice](https://developer.squareup.com/docs/invoices-api/overview#cancel-an-invoice)
375385

376386
```java
377387
CompletableFuture<CancelInvoiceResponse> cancelInvoiceAsync(
@@ -420,8 +430,7 @@ based on the invoice configuration. For example, the status changes to `UNPAID`
420430
Square emails the invoice or `PARTIALLY_PAID` if Square charge a card on file for a portion of the
421431
invoice amount).
422432

423-
For more information, see
424-
[Create and publish an invoice](https://developer.squareup.com/docs/docs/invoices-api/overview#create-and-publish-an-invoice).
433+
Create and publish an invoice: [https://developer.squareup.com/docs/invoices-api/overview#create-and-publish-an-invoice](https://developer.squareup.com/docs/invoices-api/overview#create-and-publish-an-invoice)
425434

426435
```java
427436
CompletableFuture<PublishInvoiceResponse> publishInvoiceAsync(

doc/models/create-payment-request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ For information about application fees in a payment, see
1919
| Name | Type | Tags | Description | Getter |
2020
| --- | --- | --- | --- | --- |
2121
| `SourceId` | `String` | | The ID for the source of funds for this payment. This can be a nonce<br>generated by the Payment Form or a card on file made with the Customers API. | String getSourceId() |
22-
| `IdempotencyKey` | `String` | | A unique string that identifies this CreatePayment request. Keys can be any valid string<br>but must be unique for every CreatePayment request.<br><br>Max: 45 characters<br><br>See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. | String getIdempotencyKey() |
22+
| `IdempotencyKey` | `String` | | A unique string that identifies this CreatePayment request. Keys can be any valid string<br>but must be unique for every CreatePayment request.<br><br>Max: 45 characters<br><br>Note: The number of allowed characters might be less than the stated maximum, if multi-byte<br>characters are used.<br><br>See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. | String getIdempotencyKey() |
2323
| `AmountMoney` | [`Money`](/doc/models/money.md) | | Represents an amount of money. `Money` fields can be signed or unsigned.<br>Fields that do not explicitly define whether they are signed or unsigned are<br>considered unsigned and can only hold positive amounts. For signed fields, the<br>sign of the value indicates the purpose of the money transfer. See<br>[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)<br>for more information. | Money getAmountMoney() |
2424
| `TipMoney` | [`Money`](/doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.<br>Fields that do not explicitly define whether they are signed or unsigned are<br>considered unsigned and can only hold positive amounts. For signed fields, the<br>sign of the value indicates the purpose of the money transfer. See<br>[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)<br>for more information. | Money getTipMoney() |
2525
| `AppFeeMoney` | [`Money`](/doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.<br>Fields that do not explicitly define whether they are signed or unsigned are<br>considered unsigned and can only hold positive amounts. For signed fields, the<br>sign of the value indicates the purpose of the money transfer. See<br>[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)<br>for more information. | Money getAppFeeMoney() |

doc/models/device-details.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ Details about the device that took the payment.
1111
| Name | Type | Tags | Description | Getter |
1212
| --- | --- | --- | --- | --- |
1313
| `DeviceId` | `String` | Optional | Square-issued ID of the device. | String getDeviceId() |
14+
| `DeviceInstallationId` | `String` | Optional | Square-issued installation ID for the device. | String getDeviceInstallationId() |
1415
| `DeviceName` | `String` | Optional | The name of the device set by the merchant. | String getDeviceName() |
1516

1617
### Example (as JSON)
1718

1819
```json
1920
{
2021
"device_id": "device_id6",
22+
"device_installation_id": "device_installation_id8",
2123
"device_name": "device_name2"
2224
}
2325
```

doc/models/invoice-status.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ Indicates the status of an invoice.
1010

1111
| Name | Description |
1212
| --- | --- |
13-
| `DRAFT` | The invoice is a draft. You must publish a draft invoice before Square can process it.<br>A draft invoice has no public_url, so it is not available to customers. |
13+
| `DRAFT` | The invoice is a draft. You must publish a draft invoice before Square can process it.<br>A draft invoice has no `public_url`, so it is not available to customers. |
1414
| `UNPAID` | The invoice is published but not yet paid. |
15-
| `SCHEDULED` | The invoice is scheduled to be processed. On scheduled date,<br>Square emails the invoice (if the `request_method` is EMAIL),<br>charge the customer's card (if `request_method` is CHARGE_CARD_ON_FILE),<br>or take no action (if the `request_method` is SHARE_MANUALLY).<br>The invoice status then changes accordingly (`UNPAID`, `PAID`, or `PARTIALLY_PAID`). |
15+
| `SCHEDULED` | The invoice is scheduled to be processed. On the scheduled date,<br>Square emails the invoice (if the `request_method` is `EMAIL`),<br>charges the customer's card (if the `request_method` is `CHARGE_CARD_ON_FILE`),<br>or takes no action (if the `request_method` is `SHARE_MANUALLY`).<br>The invoice status then changes accordingly (`UNPAID`, `PAID`, or `PARTIALLY_PAID`). |
1616
| `PARTIALLY_PAID` | A partial payment is received for the invoice. |
1717
| `PAID` | The customer paid the invoice in full. |
1818
| `PARTIALLY_REFUNDED` | The invoice is paid (or partially paid) and some but not all the amount paid is<br>refunded. |
1919
| `REFUNDED` | The full amount that the customer paid for the invoice is refunded. |
2020
| `CANCELED` | The invoice is canceled. Square no longer requests payments from the customer.<br>The `public_url` page remains and is accessible, but it displays the invoice<br>as cancelled and does not accept payment. |
2121
| `FAILED` | Square canceled the invoice due to suspicious activity. |
22+
| `PAYMENT_PENDING` | A payment on the invoice was initiated but has not yet been processed. <br><br>When in this state, invoices cannot be updated and other payments cannot be initiated. |
2223

doc/models/list-payment-refunds-request.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Max results per page: 100
1919
| `LocationId` | `String` | Optional | Limit results to the location supplied. By default, results are returned<br>for all locations associated with the merchant. | String getLocationId() |
2020
| `Status` | `String` | Optional | If provided, only refunds with the given status are returned.<br>For a list of refund status values, see [PaymentRefund](#type-paymentrefund).<br><br>Default: If omitted refunds are returned regardless of status. | String getStatus() |
2121
| `SourceType` | `String` | Optional | If provided, only refunds with the given source type are returned.<br>- `CARD` - List refunds only for payments where card was specified as payment<br>source.<br><br>Default: If omitted refunds are returned regardless of source type. | String getSourceType() |
22+
| `Limit` | `Integer` | Optional | Maximum number of results to be returned in a single page.<br>It is possible to receive fewer results than the specified limit on a given page.<br><br>If the supplied value is greater than 100, at most 100 results will be returned.<br><br>Default: `100` | Integer getLimit() |
2223

2324
### Example (as JSON)
2425

0 commit comments

Comments
 (0)