Skip to content

Commit 8675741

Browse files
authored
Merge pull request #80 from square/release/13.1.0.20210818
Generated PR for Release: 13.1.0.20210818
2 parents 3920c07 + 43ac3e0 commit 8675741

File tree

97 files changed

+480
-389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+480
-389
lines changed

CHANGELOG.md

Lines changed: 20 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,33 @@
11
# Change Log
22

3-
## Version 13.0.0.20210721 (2021-07-21)
4-
## API updates
3+
## Version 13.1.0.20210818 (2021-08-18)
4+
## API updates
55

6-
* **Orders API:**
7-
* [OrderServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderServiceCharge) object. Added a new field, `type`. It identifies the service charge type.
8-
9-
* [OrderQuantityUnit](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderQuantityUnit),
10-
[OrderLineItem](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItem),
11-
[OrderLineItemDiscount](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemDiscount),
12-
[OrderLineItemModifier](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemModifier),
13-
[OrderLineItemTax](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemTax),
14-
[OrderServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderServiceCharge),
15-
[OrderReturnLineItem](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnLineItem),
16-
[OrderReturnLineItemModifier](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnLineItemModifier),
17-
[OrderReturnServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnServiceCharge),
18-
[OrderReturnTax](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnTax), and
19-
[OrderReturnDiscount](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnDiscount) objects. Added a new field, `catalog_version`.
20-
* **Locations API:**
21-
* [Location](https://developer.squareup.com/reference/square_2021-07-21/objects/Location) object. Added a new field `tax_ids` of type `TaxIds`. In the current implementation, sellers in Ireland and France can configure tax IDs during the onboarding process. They can also provide the information later by updating the location information in the Seller Dashboard. These tax IDs appear in this field.
6+
* **Customers API:**
7+
* [Customer](https://developer.squareup.com/reference/square_2021-08-18/objects/Customer) object. The `version` field has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state. This field represents the current version of the customer profile and enables optimistic concurrency control. For more information, see [Customer profile versions and optimistic concurrency support.](https://developer.squareup.com/docs/customers-api/what-it-does#customer-profile-versions-and-optimistic-concurrency-support)
8+
* [ListCustomers](https://developer.squareup.com/reference/square_2021-08-18/customers-api/list-customers) endpoint. The new, optional `limit` query parameter can be used to specify the maximum number of results in a paginated response.
229

23-
* **Loyalty API:**
24-
* As of July 15, 2021, the country in which the seller’s Square account is activated determines whether Square uses pretax or post-tax purchase amounts to calculate accrued points. This change supports consumption tax models, such as value-added tax (VAT). Previously, point accrual was based on pretax purchase amounts only. This change does not affect the existing point balance of loyalty accounts. For more information, see [Availability of Square Loyalty.](https://developer.squareup.com/docs/loyalty-api/overview#loyalty-market-availability)
10+
* **Customer Groups API:**
11+
* [ListCustomerGroups](https://developer.squareup.com/reference/square_2021-08-18/customer-groups-api/list-customer-groups) endpoint. The new, optional `limit` query parameter can be used to specify the maximum number of results in a paginated response.
2512

26-
* **Payments API:**
27-
* [UpdatePayment](https://developer.squareup.com/reference/square_2021-07-21/payments-api/update-payment). The endpoint has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state. Also, you can now update gift card payments (similar to card, cash, and external payments).
13+
* **Customer Segments API:**
14+
* [ListCustomerSegments](https://developer.squareup.com/reference/square_2021-08-18/customer-segments-api/list-customer-segments) endpoint. The new, optional `limit` query parameter can be used to specify the maximum number of results in a paginated response.
2815

29-
* **Subscriptions API:**
30-
* The [Subscriptions API](https://developer.squareup.com/docs/subscriptions-api/overview) has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state.
31-
* [CatalogSubscriptionPlan](https://developer.squareup.com/reference/square_2021-07-21/objects/CatalogSubscriptionPlan) object. The `name` and `price` are now write-once fields. You specify these values at the time of creating a plan. After the plan is created, these fields cannot be updated. This makes a subscription plan immutable.
16+
* **Invoices API:**
17+
* Square Invoices Plus is a monthly subscription plan that allows access to premium invoice features. After Invoices Plus is launched in September 2021, a subscription will be required to create invoices with custom fields and installment payments. For more information, including how to handle new errors, see [Premium features available with Invoices Plus.](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription)
3218

33-
* **Inventory API:**
34-
* [RetrieveInventoryTransfer.](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Transfer) This new endpoint is introduced to support the retrieval of inventory transfer.
35-
* [RetrieveInventoryChanges.](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Changes) This endpoint is deprecated. Its support ends when it is retired in about 12 months.
36-
* The following endpoints have updated URLs to conform to the standard REST API convention. For more information about migrating deprecated URLs to updated URLs in your application, see [Inventory API: Migrate to Updated API Entities.](https://developer.squareup.com/docs/inventory-api/migrate-to-updated-api-entities)
37-
* [RetrieveInventoryAdjustment](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Adjustment)
38-
* [BatchChangeInventory](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Change-Inventory)
39-
* [BatchRetrieveInventoryChanges](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Retrieve-Inventory-Changes)
40-
* [BatchRetrieveInventoryCounts](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Retrieve-Inventory-Counts)
41-
* [RetrieveInventoryPhysicalCount](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Physical-Count)
19+
* **Loyalty API:**
20+
* [LoyaltyAccount](https://developer.squareup.com/reference/square_2021-08-18/objects/LoyaltyAccount) object. Added a new `expiring_point_deadlines` field that specifies when points in the account balance are scheduled to expire. This field contains a list of [LoyaltyAccountExpiringPointDeadline](https://developer.squareup.com/reference/square_2021-08-18/objects/LoyaltyAccountExpiringPointDeadline) objects. For more information, see [Expiring points.](https://developer.squareup.com/docs/loyalty-api/overview#expiring-points)
4221

4322
## Documentation updates
44-
* **Webhooks.** Revised the steps and descriptions for creating and using webhooks. For more information, see [Webhooks Overview.](https://developer.squareup.com/docs/webhooks/overview)
4523

24+
* [App Marketplace.](https://developer.squareup.com/docs/app-marketplace) Added the following topics:
25+
* [How to apply.](https://developer.squareup.com/docs/app-marketplace#how-to-apply) Documented the process to list an application on the Square App Marketplace.
26+
* [App Marketplace API Usage Requirements.](https://developer.squareup.com/docs/app-marketplace/requirements) Added a topic that describes a set of API usage requirements and recommendations for partner applications.
27+
28+
* [Automatic communications from Square about invoices.](https://developer.squareup.com/docs/invoices-api/overview#automatic-communication-from-square-to-customers) Documented the invoice-related communications sent from Square to customers and sellers.
29+
30+
* [Snippets best practices.](https://developer.squareup.com/docs/snippets-api/overview#best-practices) Documented best practices and additional requirements for snippets and applications that integrate with the Snippets API.
4631

4732

4833
## Version 12.0.0.20210616 (2021-06-16)

README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
Use this gem to integrate Square payments into your app and grow your business with Square APIs including Catalog, Customers, Employees, Inventory, Labor, Locations, and Orders.
1010

11+
## Requirements
12+
13+
We support Ruby 2.5.x, 2.6.x, and 2.7.x.
14+
1115
## Installation
1216

1317
Install the gem from the command line:
@@ -33,9 +37,6 @@ gem 'square.rb'
3337
* [Disputes]
3438
* [Checkout]
3539
* [Apple Pay]
36-
* [Cards]
37-
38-
### Terminal
3940
* [Terminal]
4041

4142
### Orders
@@ -59,22 +60,19 @@ gem 'square.rb'
5960
### Loyalty
6061
* [Loyalty]
6162

62-
### Gift Cards
63-
* [Gift Cards]
64-
* [Gift Card Activities]
65-
6663
### Bookings
6764
* [Bookings]
6865

6966
### Business
7067
* [Merchants]
7168
* [Locations]
7269
* [Devices]
73-
* [Cash Drawers]
7470

7571
### Team
7672
* [Team]
73+
* [Employees]
7774
* [Labor]
75+
* [Cash Drawers]
7876

7977
### Financials
8078
* [Bank Accounts]
@@ -88,7 +86,6 @@ gem 'square.rb'
8886
* [OAuth]
8987

9088
### Deprecated APIs
91-
* [Employees]
9289
* [V1 Employees]
9390
* [V1 Transactions]
9491
* [V1 Items]
@@ -340,6 +337,3 @@ You can also use the Square API to create applications or services that work wit
340337
[Transactions]: doc/api/transactions.md
341338
[Sites]: doc/api/sites.md
342339
[Snippets]: doc/api/snippets.md
343-
[Cards]: doc/api/cards.md
344-
[Gift Cards]: doc/api/gift-cards.md
345-
[Gift Card Activities]: doc/api/gift-card-activities.md

doc/api/customer-groups.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ customer_groups_api = client.customer_groups
2222
Retrieves the list of customer groups of a business.
2323

2424
```ruby
25-
def list_customer_groups(cursor: nil)
25+
def list_customer_groups(cursor: nil,
26+
limit: nil)
2627
```
2728

2829
## Parameters
2930

3031
| Parameter | Type | Tags | Description |
3132
| --- | --- | --- | --- |
3233
| `cursor` | `String` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for your original query.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
34+
| `limit` | `Integer` | Query, Optional | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.<br>The limit is ignored if it is less than 1 or greater than 50. The default value is 50.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
3335

3436
## Response Type
3537

@@ -39,8 +41,9 @@ def list_customer_groups(cursor: nil)
3941

4042
```ruby
4143
cursor = 'cursor6'
44+
limit = 172
4245

43-
result = customer_groups_api.list_customer_groups(cursor: cursor)
46+
result = customer_groups_api.list_customer_groups(cursor: cursor, limit: limit)
4447

4548
if result.success?
4649
puts result.data

doc/api/customer-segments.md

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

2121
```ruby
22-
def list_customer_segments(cursor: nil)
22+
def list_customer_segments(cursor: nil,
23+
limit: nil)
2324
```
2425

2526
## Parameters
2627

2728
| Parameter | Type | Tags | Description |
2829
| --- | --- | --- | --- |
2930
| `cursor` | `String` | Query, Optional | A pagination cursor returned by previous calls to `ListCustomerSegments`.<br>This cursor is used to retrieve the next set of query results.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
31+
| `limit` | `Integer` | Query, Optional | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.<br>The limit is ignored if it is less than 1 or greater than 50. The default value is 50.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
3032

3133
## Response Type
3234

@@ -36,8 +38,9 @@ def list_customer_segments(cursor: nil)
3638

3739
```ruby
3840
cursor = 'cursor6'
41+
limit = 172
3942

40-
result = customer_segments_api.list_customer_segments(cursor: cursor)
43+
result = customer_segments_api.list_customer_segments(cursor: cursor, limit: limit)
4144

4245
if result.success?
4346
puts result.data

doc/api/customers.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ profiles can take closer to one minute or longer, especially during network inci
3232

3333
```ruby
3434
def list_customers(cursor: nil,
35+
limit: nil,
3536
sort_field: nil,
3637
sort_order: nil)
3738
```
@@ -41,8 +42,9 @@ def list_customers(cursor: nil,
4142
| Parameter | Type | Tags | Description |
4243
| --- | --- | --- | --- |
4344
| `cursor` | `String` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for your original query.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
44-
| `sort_field` | [`String (Customer Sort Field)`](/doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.<br><br>Default: `DEFAULT`. |
45-
| `sort_order` | [`String (Sort Order)`](/doc/models/sort-order.md) | Query, Optional | Indicates whether customers should be sorted in ascending (`ASC`) or<br>descending (`DESC`) order.<br><br>Default: `ASC`. |
45+
| `limit` | `Integer` | Query, Optional | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.<br>The limit is ignored if it is less than 1 or greater than 100. The default value is 100.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
46+
| `sort_field` | [`String (Customer Sort Field)`](/doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.<br><br>The default value is `DEFAULT`. |
47+
| `sort_order` | [`String (Sort Order)`](/doc/models/sort-order.md) | Query, Optional | Indicates whether customers should be sorted in ascending (`ASC`) or<br>descending (`DESC`) order.<br><br>The default value is `ASC`. |
4648

4749
## Response Type
4850

@@ -52,10 +54,11 @@ def list_customers(cursor: nil,
5254

5355
```ruby
5456
cursor = 'cursor6'
57+
limit = 172
5558
sort_field = 'DEFAULT'
5659
sort_order = 'DESC'
5760

58-
result = customers_api.list_customers(cursor: cursor, sort_field: sort_field, sort_order: sort_order)
61+
result = customers_api.list_customers(cursor: cursor, limit: limit, sort_field: sort_field, sort_order: sort_order)
5962

6063
if result.success?
6164
puts result.data

doc/api/gift-cards.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ end
6767

6868
# Create Gift Card
6969

70-
Creates a digital gift card. You must activate the gift card before
71-
it can be used. For more information, see
70+
Creates a digital gift card or registers a physical (plastic) gift card. You must activate the gift card before
71+
it can be used for payment. For more information, see
7272
[Selling gift cards](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#selling-square-gift-cards).
7373

7474
```ruby

0 commit comments

Comments
 (0)