Skip to content

Commit 95416de

Browse files
authored
Merge pull request #11 from square/release/5.2.1.20200422
5.2.1.20200422 release
2 parents e7bb101 + c4db137 commit 95416de

15 files changed

+96
-71
lines changed

doc/customer-groups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ customerGroupsApi.listCustomerGroupsAsync(null).thenAccept(result -> {
5050

5151
Creates a new customer group for a business.
5252

53-
The request must include at least the `name` value of the group.
53+
The request must include the `name` value of the group.
5454

5555
```java
5656
CompletableFuture<CreateCustomerGroupResponse> createCustomerGroupAsync(

doc/customer-segments.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ Retrieves the list of customer segments of a business.
1919

2020
```java
2121
CompletableFuture<ListCustomerSegmentsResponse> listCustomerSegmentsAsync(
22-
final String cursor,
23-
final Long limit)
22+
final String cursor)
2423
```
2524

2625
### Parameters
2726

2827
| Parameter | Type | Tags | Description |
2928
| --- | --- | --- | --- |
3029
| `cursor` | `String` | Query, Optional | A pagination cursor returned by previous calls to __ListCustomerSegments__.<br>Used to retrieve the next set of query results.<br><br>See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. |
31-
| `limit` | `Long` | Query, Optional | Sets the maximum number of results to be returned in a single page.<br>Limit values outside the supported range are ignored.<br><br>Minimum value: `1`<br>Maximum value: `1,000` |
3230

3331
### Response Type
3432

@@ -37,7 +35,7 @@ CompletableFuture<ListCustomerSegmentsResponse> listCustomerSegmentsAsync(
3735
### Example Usage
3836

3937
```java
40-
customerSegmentsApi.listCustomerSegmentsAsync(null, null).thenAccept(result -> {
38+
customerSegmentsApi.listCustomerSegmentsAsync(null).thenAccept(result -> {
4139
// TODO success callback handler
4240
}).exceptionally(exception -> {
4341
// TODO failure callback handler

doc/customers.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,15 @@ TimeRange bodyQueryFilterCreatedAt = new TimeRange.Builder()
147147
.startAt("2018-01-01T00:00:00-00:00")
148148
.endAt("2018-02-01T00:00:00-00:00")
149149
.build();
150+
List<String> bodyQueryFilterGroupIdsAll = new LinkedList<>();
151+
bodyQueryFilterGroupIdsAll.add("545AXB44B4XXWMVQ4W8SBT3HHF");
152+
FilterValue bodyQueryFilterGroupIds = new FilterValue.Builder()
153+
.all(bodyQueryFilterGroupIdsAll)
154+
.build();
150155
CustomerFilter bodyQueryFilter = new CustomerFilter.Builder()
151156
.creationSource(bodyQueryFilterCreationSource)
152157
.createdAt(bodyQueryFilterCreatedAt)
158+
.groupIds(bodyQueryFilterGroupIds)
153159
.build();
154160
CustomerSort bodyQuerySort = new CustomerSort.Builder()
155161
.field("CREATED_AT")
@@ -372,7 +378,7 @@ customersApi.deleteCustomerCardAsync(customerId, cardId).thenAccept(result -> {
372378

373379
## Remove Group From Customer
374380

375-
Removes a customer membership from a customer group.
381+
Removes a group membership from a customer.
376382

377383
The customer is identified by the `customer_id` value
378384
and the customer group is identified by the `group_id` value.
@@ -410,7 +416,7 @@ customersApi.removeGroupFromCustomerAsync(customerId, groupId).thenAccept(result
410416

411417
## Add Group to Customer
412418

413-
Adds a customer membership to a customer group.
419+
Adds a group membership to a customer.
414420

415421
The customer is identified by the `customer_id` value
416422
and the customer group is identified by the `group_id` value.

doc/models/list-customer-segments-request.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Defines the valid parameters for requests to __ListCustomerSegments__.
1111
| Name | Type | Tags | Description |
1212
| --- | --- | --- | --- |
1313
| `Cursor` | `String` | Optional | A pagination cursor returned by previous calls to __ListCustomerSegments__.<br>Used to retrieve the next set of query results.<br><br>See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. |
14-
| `Limit` | `Long` | Optional | Sets the maximum number of results to be returned in a single page.<br>Limit values outside the supported range are ignored.<br><br>Minimum value: `1`<br>Maximum value: `1,000` |
1514

1615
### Example (as JSON)
1716

doc/models/list-customers-response.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,19 @@ One of `errors` or `customers` is present in a given response (never both).
4242
"note": "a customer",
4343
"groups": [
4444
{
45-
"id": "16894e93-96eb-4ced-b24b-f71d42bf084c",
45+
"id": "545AXB44B4XXWMVQ4W8SBT3HHF",
4646
"name": "Aviation Enthusiasts"
47+
},
48+
{
49+
"id": "1KB9JE5EGJXCW.REACHABLE",
50+
"name": "Reachable"
4751
}
52+
],
53+
"group_ids": [
54+
"545AXB44B4XXWMVQ4W8SBT3HHF"
55+
],
56+
"segment_ids": [
57+
"1KB9JE5EGJXCW.REACHABLE"
4858
]
4959
}
5060
]

doc/models/retrieve-customer-response.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,19 @@ One of `errors` or `customer` is present in a given response (never both).
4040
"note": "a customer",
4141
"groups": [
4242
{
43-
"id": "16894e93-96eb-4ced-b24b-f71d42bf084c",
43+
"id": "545AXB44B4XXWMVQ4W8SBT3HHF",
4444
"name": "Aviation Enthusiasts"
45+
},
46+
{
47+
"id": "1KB9JE5EGJXCW.REACHABLE",
48+
"name": "Reachable"
4549
}
50+
],
51+
"group_ids": [
52+
"545AXB44B4XXWMVQ4W8SBT3HHF"
53+
],
54+
"segment_ids": [
55+
"1KB9JE5EGJXCW.REACHABLE"
4656
]
4757
}
4858
}

doc/models/search-customers-request.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ SearchCustomers endpoint.
3030
"created_at": {
3131
"start_at": "2018-01-01T00:00:00-00:00",
3232
"end_at": "2018-02-01T00:00:00-00:00"
33+
},
34+
"group_ids": {
35+
"all": [
36+
"545AXB44B4XXWMVQ4W8SBT3HHF"
37+
]
3338
}
3439
},
3540
"sort": {

doc/models/search-customers-response.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,23 @@ One of `errors` or `customers` is present in a given response (never both).
3939
},
4040
"phone_number": "1-212-555-4250",
4141
"reference_id": "YOUR_REFERENCE_ID_2",
42-
"creation_source": "THIRD_PARTY"
42+
"creation_source": "THIRD_PARTY",
43+
"groups": [
44+
{
45+
"id": "545AXB44B4XXWMVQ4W8SBT3HHF",
46+
"name": "Aviation Enthusiasts"
47+
},
48+
{
49+
"id": "1KB9JE5EGJXCW.REACHABLE",
50+
"name": "Reachable"
51+
}
52+
],
53+
"group_ids": [
54+
"545AXB44B4XXWMVQ4W8SBT3HHF"
55+
],
56+
"segment_ids": [
57+
"1KB9JE5EGJXCW.REACHABLE"
58+
]
4359
},
4460
{
4561
"id": "JDKYHBWT1D4F8MFH63DBMEN8Y4",
@@ -59,7 +75,23 @@ One of `errors` or `customers` is present in a given response (never both).
5975
"phone_number": "1-212-555-4240",
6076
"reference_id": "YOUR_REFERENCE_ID_1",
6177
"note": "a customer",
62-
"creation_source": "THIRD_PARTY"
78+
"creation_source": "THIRD_PARTY",
79+
"groups": [
80+
{
81+
"id": "545AXB44B4XXWMVQ4W8SBT3HHF",
82+
"name": "Aviation Enthusiasts"
83+
},
84+
{
85+
"id": "1KB9JE5EGJXCW.REACHABLE",
86+
"name": "Reachable"
87+
}
88+
],
89+
"group_ids": [
90+
"545AXB44B4XXWMVQ4W8SBT3HHF"
91+
],
92+
"segment_ids": [
93+
"1KB9JE5EGJXCW.REACHABLE"
94+
]
6395
}
6496
],
6597
"cursor": "9dpS093Uy12AzeE"

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.squareup</groupId>
66
<artifactId>square</artifactId>
7-
<version>5.2.0.20200422</version>
7+
<version>5.2.1.20200422</version>
88
<packaging>jar</packaging>
99

1010
<name>Square</name>
@@ -214,4 +214,4 @@
214214
<scope>test</scope>
215215
</dependency>
216216
</dependencies>
217-
</project>
217+
</project>

src/main/java/com/squareup/square/SquareClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ public Headers getAdditionalHeaders() {
435435
* @return sdkVersion
436436
*/
437437
public String getSdkVersion() {
438-
return "5.2.0.20200422";
438+
return "5.2.1.20200422";
439439
}
440440

441441
/**
@@ -586,4 +586,4 @@ public SquareClient build() {
586586
authManagers, httpCallback);
587587
}
588588
}
589-
}
589+
}

0 commit comments

Comments
 (0)