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

Commit 9731e8e

Browse files
authored
Release 2.20180712.1 (#41)
1 parent 3d83bfc commit 9731e8e

26 files changed

+730
-28
lines changed

CHANGES.md

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

3+
## Version 2.20180712.1 (2018-08-02)
4+
5+
We have added MobileAuthorization API.
6+
7+
### New endpoint: MobileAuthorization API
8+
9+
* `CreateMobileAuthorizationCode` endpoint — Generate a mobile authorization code for an instance of your application. Mobile authorization credentials permit an instance of your application to accept payments for a given location using the Square Reader SDK. Mobile authorization codes are one-time-use and expire shortly after being issued.
10+
311
## Version 2.20180712.0 (2018-07-12)
412

513
We introduce Square API versions. `Square-Version` is 2018-07-12 for this SDK.

README.md

Lines changed: 4 additions & 1 deletion
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.20180712.0
13+
- Package version: 2.20180712.1
1414
- Build package: io.swagger.codegen.languages.RubyClientCodegen
1515

1616
For more information, please visit [https://squareup.com/developers](https://squareup.com/developers)
@@ -95,6 +95,7 @@ Class | Method | HTTP request | Description
9595
*SquareConnect::CustomersApi* | [**search_customers**](docs/CustomersApi.md#search_customers) | **POST** /v2/customers/search | SearchCustomers
9696
*SquareConnect::CustomersApi* | [**update_customer**](docs/CustomersApi.md#update_customer) | **PUT** /v2/customers/{customer_id} | UpdateCustomer
9797
*SquareConnect::LocationsApi* | [**list_locations**](docs/LocationsApi.md#list_locations) | **GET** /v2/locations | ListLocations
98+
*SquareConnect::MobileAuthorizationApi* | [**create_mobile_authorization_code**](docs/MobileAuthorizationApi.md#create_mobile_authorization_code) | **POST** /mobile/authorization-code | CreateMobileAuthorizationCode
9899
*SquareConnect::OrdersApi* | [**batch_retrieve_orders**](docs/OrdersApi.md#batch_retrieve_orders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders
99100
*SquareConnect::OrdersApi* | [**create_order**](docs/OrdersApi.md#create_order) | **POST** /v2/locations/{location_id}/orders | CreateOrder
100101
*SquareConnect::ReportingApi* | [**list_additional_recipient_receivable_refunds**](docs/ReportingApi.md#list_additional_recipient_receivable_refunds) | **GET** /v2/locations/{location_id}/additional-recipient-receivable-refunds | ListAdditionalRecipientReceivableRefunds
@@ -235,6 +236,8 @@ Class | Method | HTTP request | Description
235236
- [SquareConnect::CreateCustomerCardResponse](docs/CreateCustomerCardResponse.md)
236237
- [SquareConnect::CreateCustomerRequest](docs/CreateCustomerRequest.md)
237238
- [SquareConnect::CreateCustomerResponse](docs/CreateCustomerResponse.md)
239+
- [SquareConnect::CreateMobileAuthorizationCodeRequest](docs/CreateMobileAuthorizationCodeRequest.md)
240+
- [SquareConnect::CreateMobileAuthorizationCodeResponse](docs/CreateMobileAuthorizationCodeResponse.md)
238241
- [SquareConnect::CreateOrderRequest](docs/CreateOrderRequest.md)
239242
- [SquareConnect::CreateOrderRequestDiscount](docs/CreateOrderRequestDiscount.md)
240243
- [SquareConnect::CreateOrderRequestLineItem](docs/CreateOrderRequestLineItem.md)

docs/ApplePayApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Method | HTTP request | Description
1212
1313
RegisterDomain
1414

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.
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](/payments/sqpaymentform/overview) guide.
1616

1717
### Example
1818
```ruby

docs/CatalogObject.md

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

33
### Description
44

5-
The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](https://docs.connect.squareup.com/articles/catalog-overview).
5+
The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](/products/catalog/overview).
66

77
## Properties
88
Name | Type | Description | Notes

docs/ChargeRequest.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Name | Type | Description | Notes
1313
**customer_card_id** | **String** | The ID of the customer card on file to charge. Do not provide a value for this field if you provide a value for `card_nonce`. If you provide this value, you _must_ also provide a value for `customer_id`. | [optional]
1414
**delay_capture** | **BOOLEAN** | If `true`, the request will only perform an Auth on the provided card. You can then later perform either a Capture (with the [CaptureTransaction](#endpoint-capturetransaction) endpoint) or a Void (with the [VoidTransaction](#endpoint-voidtransaction) endpoint). Default value: `false` | [optional]
1515
**reference_id** | **String** | An optional ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters. | [optional]
16-
**note** | **String** | An optional note to associate with the transaction. This value cannot exceed 60 characters. | [optional]
16+
**note** | **String** | | [optional]
1717
**customer_id** | **String** | The ID of the customer to associate this transaction with. This field is required if you provide a value for `customer_card_id`, and optional otherwise. | [optional]
1818
**billing_address** | [**Address**](Address.md) | The buyer's billing address. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `shipping_address` is provided. | [optional]
1919
**shipping_address** | [**Address**](Address.md) | The buyer's shipping address, if available. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `billing_address` is provided. | [optional]
2020
**buyer_email_address** | **String** | The buyer's email address, if available. This value is optional, but this transaction is ineligible for chargeback protection if it is not provided. | [optional]
21-
**order_id** | **String** | The ID of the order to associate with this transaction. If you provide this value, the `amount_money` value of your request must __exactly match__ the `total_money` value of the order's `order_amounts` field. | [optional]
22-
**additional_recipients** | [**Array<AdditionalRecipient>**](AdditionalRecipient.md) | The basic primitive of multi-party transaction. The value is optional. The transaction facilitated by you can be split from here. If you provide this value, the `amount_money` value in your additional_recipients must not be more than 90% of the `amount_money` value in you charge's request. The `location_id` must be the valid location of the app owner merchant. This field requires `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission. This field is currently not supported in sandbox. | [optional]
21+
**order_id** | **String** | The ID of the order to associate with this transaction. If you provide this value, the `amount_money` value of your request must __exactly match__ the value of the order's `total_money` field. | [optional]
22+
**additional_recipients** | [**Array<AdditionalRecipient>**](AdditionalRecipient.md) | The basic primitive of multi-party transaction. The value is optional. The transaction facilitated by you can be split from here. If you provide this value, the `amount_money` value in your additional_recipients must not be more than 90% of the `amount_money` value in the charge request. The `location_id` must be the valid location of the app owner merchant. This field requires the `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission. This field is currently not supported in sandbox. | [optional]
2323

2424

docs/CreateCustomerCardRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Defines the fields that are included in the request body of a request to the [Cr
77
## Properties
88
Name | Type | Description | Notes
99
------------ | ------------- | ------------- | -------------
10-
**card_nonce** | **String** | A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/articles/adding-payment-form/) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card. |
10+
**card_nonce** | **String** | A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/payments/sqpaymentform/overview) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card. |
1111
**billing_address** | [**Address**](Address.md) | Address information for the card on file. Only the `postal_code` field is required for payments in the US and Canada. | [optional]
1212
**cardholder_name** | **String** | The cardholder's name. | [optional]
1313

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SquareConnect::CreateMobileAuthorizationCodeRequest
2+
3+
### Description
4+
5+
Defines the body parameters that can be provided in a request to the [CreateMobileAuthorizationCode](#endpoint-createmobileauthorizationcode) endpoint.
6+
7+
## Properties
8+
Name | Type | Description | Notes
9+
------------ | ------------- | ------------- | -------------
10+
**location_id** | **String** | The Square location ID the authorization code should be tied to. | [optional]
11+
12+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SquareConnect::CreateMobileAuthorizationCodeResponse
2+
3+
### Description
4+
5+
Defines the fields that are included in the response body of a request to the [CreateMobileAuthorizationCode](#endpoint-createmobileauthorizationcode) endpoint.
6+
7+
## Properties
8+
Name | Type | Description | Notes
9+
------------ | ------------- | ------------- | -------------
10+
**authorization_code** | **String** | Generated authorization code that connects a mobile application instance to a Square account. | [optional]
11+
**expires_at** | **String** | The timestamp when `authorization_code` expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
12+
**error** | [**Error**](Error.md) | An error object that provides details about how creation of authorization code failed. | [optional]
13+
14+

docs/MobileAuthorizationApi.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SquareConnect::MobileAuthorizationApi
2+
3+
All URIs are relative to *https://connect.squareup.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**create_mobile_authorization_code**](MobileAuthorizationApi.md#create_mobile_authorization_code) | **POST** /mobile/authorization-code | CreateMobileAuthorizationCode
8+
9+
10+
# **create_mobile_authorization_code**
11+
> CreateMobileAuthorizationCodeResponse create_mobile_authorization_code(body)
12+
13+
CreateMobileAuthorizationCode
14+
15+
Generates code to authorize a mobile application to connect to a Square card reader Authorization codes are one-time-use and expire __60 minutes__ after being issued. __Important:__ The `Authorization` header you provide to this endpoint must have the following format: ``` Authorization: Bearer ACCESS_TOKEN ``` Replace `ACCESS_TOKEN` with a [valid production authorization credential](https://docs.connect.squareup.com/get-started#step-4-understand-the-different-application-credentials).
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::MobileAuthorizationApi.new
28+
29+
body = SquareConnect::CreateMobileAuthorizationCodeRequest.new # CreateMobileAuthorizationCodeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
30+
31+
32+
begin
33+
#CreateMobileAuthorizationCode
34+
result = api_instance.create_mobile_authorization_code(body)
35+
p result
36+
rescue SquareConnect::ApiError => e
37+
puts "Exception when calling MobileAuthorizationApi->create_mobile_authorization_code: #{e}"
38+
end
39+
```
40+
41+
### Parameters
42+
43+
Name | Type | Description | Notes
44+
------------- | ------------- | ------------- | -------------
45+
**body** | [**CreateMobileAuthorizationCodeRequest**](CreateMobileAuthorizationCodeRequest.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+
[**CreateMobileAuthorizationCodeResponse**](CreateMobileAuthorizationCodeResponse.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/OrdersApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Name | Type | Description | Notes
6868
6969
CreateOrder
7070

71-
Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](https://docs.connect.squareup.com/articles/orders-api-overview).
71+
Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](/products/orders/overview).
7272

7373
### Example
7474
```ruby

0 commit comments

Comments
 (0)