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

Commit 9cd7ed0

Browse files
author
Francisco Rojas
authored
Release/2.4.0 (#24)
* From connect-api-specification: Release SDK 2.4 (#81) * Document changes for 2.4 release
1 parent 9d13021 commit 9cd7ed0

20 files changed

+733
-17
lines changed

CHANGES.md

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

3+
## Version 2.4 (2017-09-27)
4+
5+
### New features: Register Domain for Apple Pay
6+
7+
* `RegisterDomain` endpoint activates a domain for use with Web Apple Pay.
8+
9+
### Other Changes
10+
11+
* `Location.type` used to indicate whether or not the location object represents a physical space.
12+
313
## Version 2.3.1 (2017-09-15)
414

515
### New features: Charge Orders

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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.3.1
13+
- Package version: 2.4.0
1414
- Build package: io.swagger.codegen.languages.RubyClientCodegen
1515

1616
For more information, please visit [https://squareup.com/developers](https://squareup.com/developers)
@@ -57,17 +57,17 @@ SquareConnect.configure do |config|
5757
config.access_token = 'YOUR ACCESS TOKEN'
5858
end
5959

60-
api_instance = SquareConnect::CatalogApi.new
60+
api_instance = SquareConnect::ApplePayApi.new
6161

62-
body = SquareConnect::BatchDeleteCatalogObjectsRequest.new # BatchDeleteCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
62+
body = SquareConnect::RegisterDomainRequest.new # RegisterDomainRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
6363

6464

6565
begin
66-
#BatchDeleteCatalogObjects
67-
result = api_instance.batch_delete_catalog_objects(body)
66+
#RegisterDomain
67+
result = api_instance.register_domain(body)
6868
p result
6969
rescue SquareConnect::ApiError => e
70-
puts "Exception when calling CatalogApi->batch_delete_catalog_objects: #{e}"
70+
puts "Exception when calling ApplePayApi->register_domain: #{e}"
7171
end
7272

7373
```
@@ -78,6 +78,7 @@ All URIs are relative to *https://connect.squareup.com*
7878

7979
Class | Method | HTTP request | Description
8080
------------ | ------------- | ------------- | -------------
81+
*SquareConnect::ApplePayApi* | [**register_domain**](docs/ApplePayApi.md#register_domain) | **POST** /v2/apple-pay/domains | RegisterDomain
8182
*SquareConnect::CatalogApi* | [**batch_delete_catalog_objects**](docs/CatalogApi.md#batch_delete_catalog_objects) | **POST** /v2/catalog/batch-delete | BatchDeleteCatalogObjects
8283
*SquareConnect::CatalogApi* | [**batch_retrieve_catalog_objects**](docs/CatalogApi.md#batch_retrieve_catalog_objects) | **POST** /v2/catalog/batch-retrieve | BatchRetrieveCatalogObjects
8384
*SquareConnect::CatalogApi* | [**batch_upsert_catalog_objects**](docs/CatalogApi.md#batch_upsert_catalog_objects) | **POST** /v2/catalog/batch-upsert | BatchUpsertCatalogObjects
@@ -269,6 +270,7 @@ Class | Method | HTTP request | Description
269270
- [SquareConnect::Location](docs/Location.md)
270271
- [SquareConnect::LocationCapability](docs/LocationCapability.md)
271272
- [SquareConnect::LocationStatus](docs/LocationStatus.md)
273+
- [SquareConnect::LocationType](docs/LocationType.md)
272274
- [SquareConnect::Money](docs/Money.md)
273275
- [SquareConnect::Order](docs/Order.md)
274276
- [SquareConnect::OrderLineItem](docs/OrderLineItem.md)
@@ -280,6 +282,9 @@ Class | Method | HTTP request | Description
280282
- [SquareConnect::OrderLineItemTaxType](docs/OrderLineItemTaxType.md)
281283
- [SquareConnect::Refund](docs/Refund.md)
282284
- [SquareConnect::RefundStatus](docs/RefundStatus.md)
285+
- [SquareConnect::RegisterDomainRequest](docs/RegisterDomainRequest.md)
286+
- [SquareConnect::RegisterDomainResponse](docs/RegisterDomainResponse.md)
287+
- [SquareConnect::RegisterDomainResponseStatus](docs/RegisterDomainResponseStatus.md)
283288
- [SquareConnect::RetrieveCatalogObjectRequest](docs/RetrieveCatalogObjectRequest.md)
284289
- [SquareConnect::RetrieveCatalogObjectResponse](docs/RetrieveCatalogObjectResponse.md)
285290
- [SquareConnect::RetrieveCustomerRequest](docs/RetrieveCustomerRequest.md)

docs/ApplePayApi.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SquareConnect::ApplePayApi
2+
3+
All URIs are relative to *https://connect.squareup.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**register_domain**](ApplePayApi.md#register_domain) | **POST** /v2/apple-pay/domains | RegisterDomain
8+
9+
10+
# **register_domain**
11+
> RegisterDomainResponse register_domain(body)
12+
13+
RegisterDomain
14+
15+
Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](https://docs.connect.squareup.com/articles/adding-payment-form) guide.
16+
17+
### Example
18+
```ruby
19+
# load the gem
20+
require 'square_connect'
21+
# setup authorization
22+
SquareConnect.configure do |config|
23+
# Configure OAuth2 access token for authorization: oauth2
24+
config.access_token = 'YOUR ACCESS TOKEN'
25+
end
26+
27+
api_instance = SquareConnect::ApplePayApi.new
28+
29+
body = SquareConnect::RegisterDomainRequest.new # RegisterDomainRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
30+
31+
32+
begin
33+
#RegisterDomain
34+
result = api_instance.register_domain(body)
35+
p result
36+
rescue SquareConnect::ApiError => e
37+
puts "Exception when calling ApplePayApi->register_domain: #{e}"
38+
end
39+
```
40+
41+
### Parameters
42+
43+
Name | Type | Description | Notes
44+
------------- | ------------- | ------------- | -------------
45+
**body** | [**RegisterDomainRequest**](RegisterDomainRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
46+
47+
### Return type
48+
49+
[**RegisterDomainResponse**](RegisterDomainResponse.md)
50+
51+
### Authorization
52+
53+
[oauth2](../README.md#oauth2)
54+
55+
### HTTP request headers
56+
57+
- **Content-Type**: application/json
58+
- **Accept**: application/json
59+
60+
61+

docs/CatalogObject.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
1313
**version** | **Integer** | The version of the object. When updating an object, the version supplied by the must match the version in the database, otherwise the write will be rejected as conflicting. | [optional]
1414
**is_deleted** | **BOOLEAN** | If `true`, the object has been deleted from the database. Must be `false` for new objects being inserted. When deleted, the `updated_at` field will equal the deletion time. | [optional]
1515
**catalog_v1_ids** | [**Array<CatalogV1Id>**](CatalogV1Id.md) | The Connect V1 IDs for this object at each [location](#type-location) where it is present, where they differ from the object's Connect V2 ID. The field will only be present for objects that have been created or modified by legacy APIs. | [optional]
16-
**present_at_all_locations** | **BOOLEAN** | If `true`, this object is present at all locations (including future locations), except where specified in the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations), except where specified in the `present_at_location_ids` field. | [optional]
16+
**present_at_all_locations** | **BOOLEAN** | If `true`, this object is present at all locations (including future locations), except where specified in the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations), except where specified in the `present_at_location_ids` field. If not specified, defaults to `true`. | [optional]
1717
**present_at_location_ids** | **Array<String>** | A list of locations where the object is present, even if `present_at_all_locations` is `false`. | [optional]
1818
**absent_at_location_ids** | **Array<String>** | A list of locations where the object is not present, even if `present_at_all_locations` is `true`. | [optional]
1919
**item_data** | [**CatalogItem**](CatalogItem.md) | Structured data for a [CatalogItem](#type-catalogitem), set for CatalogObjects of type `ITEM`. | [optional]

docs/Location.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Represents one of a business's locations.
88
Name | Type | Description | Notes
99
------------ | ------------- | ------------- | -------------
1010
**id** | **String** | The location's unique ID. | [optional]
11-
**name** | **String** | The location's name. Location names are set by the location owner and displayed in the dashboard as the location's nickname | [optional]
11+
**name** | **String** | The location's name. Location names are set by the account owner and displayed in the dashboard as the location's nickname | [optional]
1212
**address** | [**Address**](Address.md) | The location's physical address. | [optional]
1313
**timezone** | **String** | The [IANA Timezone Database](https://www.iana.org/time-zones) identifier for the location's timezone. | [optional]
1414
**capabilities** | **Array<String>** | Indicates which Square features are enabled for the location. See [LocationCapability](#type-locationcapability) for possible values. | [optional]
@@ -20,5 +20,6 @@ Name | Type | Description | Notes
2020
**currency** | **String** | The currency used for all transactions at this location, specified in __ISO 4217 format__. For example, the currency for a location processing transactions in the United States is 'USD'. See [Currency](#type-currency) for possible values. | [optional]
2121
**phone_number** | **String** | The location's phone_number. | [optional]
2222
**business_name** | **String** | The location's business_name which is shown to its customers. For example, this is the name printed on its customer's receipts. | [optional]
23+
**type** | **String** | The location's type, as set by the account owner in the Square dashboard. Typically used to indicate whether or not the location object represents a physical space like a building or mall space. See [LocationType](#type-locationtype) for possible values. | [optional]
2324

2425

docs/LocationCapability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### Description
44

5-
Indicates account capabilities that a business's location might or might not have enabled.
5+
Indicates payment capabilities that a business's location might or might not have enabled.
66

77
## Properties
88
Name | Type

docs/LocationType.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SquareConnect::LocationType
2+
3+
### Description
4+
5+
Indicates the location's type.
6+
7+
## Properties
8+
Name | Type
9+
------------ | -------------
10+
**PHYSICAL** | string
11+
**MOBILE** | string
12+
13+

docs/RegisterDomainRequest.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SquareConnect::RegisterDomainRequest
2+
3+
### Description
4+
5+
Defines the parameters that can be included in the body of a request to the [RegisterDomain](#endpoint-registerdomain) endpoint.
6+
7+
## Properties
8+
Name | Type | Description | Notes
9+
------------ | ------------- | ------------- | -------------
10+
**domain_name** | **String** | A domain name as described in RFC-1034 that will be registered with ApplePay |
11+
12+

docs/RegisterDomainResponse.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SquareConnect::RegisterDomainResponse
2+
3+
### Description
4+
5+
Defines the fields that are included in the response body of a request to the [RegisterDomain](#endpoint-registerdomain) endpoint. Either `errors` or `status` will be present in a given response (never both).
6+
7+
## Properties
8+
Name | Type | Description | Notes
9+
------------ | ------------- | ------------- | -------------
10+
**errors** | [**Array<Error>**](Error.md) | Any errors that occurred during the request. | [optional]
11+
**status** | **String** | Status of the domain registration. See [RegisterDomainResponseStatus](#type-registerdomainresponsestatus) for possible values. | [optional]
12+
13+

docs/RegisterDomainResponseStatus.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SquareConnect::RegisterDomainResponseStatus
2+
3+
### Description
4+
5+
The status of domain registration.
6+
7+
## Properties
8+
Name | Type
9+
------------ | -------------
10+
**PENDING** | string
11+
**VERIFIED** | string
12+
13+

0 commit comments

Comments
 (0)