This repository has been archived by the owner on Apr 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Release 2.20180712.1 * Release 2.20180712.1
- Loading branch information
Showing
25 changed files
with
466 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SquareConnect.CreateMobileAuthorizationCodeRequest | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**locationId** | **String** | The Square location ID the authorization code should be tied to. | [optional] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SquareConnect.CreateMobileAuthorizationCodeResponse | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**authorizationCode** | **String** | Generated authorization code that connects a mobile application instance to a Square account. | [optional] | ||
**expiresAt** | **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] | ||
**error** | [**Error**](Error.md) | An error object that provides details about how creation of authorization code failed. | [optional] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# SquareConnect.MobileAuthorizationApi | ||
|
||
All URIs are relative to *https://connect.squareup.com* | ||
|
||
Method | HTTP request | Description | ||
------------- | ------------- | ------------- | ||
[**createMobileAuthorizationCode**](MobileAuthorizationApi.md#createMobileAuthorizationCode) | **POST** /mobile/authorization-code | CreateMobileAuthorizationCode | ||
|
||
|
||
<a name="createMobileAuthorizationCode"></a> | ||
# **createMobileAuthorizationCode** | ||
> CreateMobileAuthorizationCodeResponse createMobileAuthorizationCode(body) | ||
CreateMobileAuthorizationCode | ||
|
||
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). | ||
|
||
### Example | ||
```javascript | ||
var SquareConnect = require('square-connect'); | ||
var defaultClient = SquareConnect.ApiClient.instance; | ||
|
||
// Configure OAuth2 access token for authorization: oauth2 | ||
var oauth2 = defaultClient.authentications['oauth2']; | ||
oauth2.accessToken = 'YOUR ACCESS TOKEN'; | ||
|
||
var apiInstance = new SquareConnect.MobileAuthorizationApi(); | ||
|
||
var body = new SquareConnect.CreateMobileAuthorizationCodeRequest(); // CreateMobileAuthorizationCodeRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. | ||
|
||
apiInstance.createMobileAuthorizationCode(body).then(function(data) { | ||
console.log('API called successfully. Returned data: ' + data); | ||
}, function(error) { | ||
console.error(error); | ||
}); | ||
|
||
``` | ||
|
||
### Parameters | ||
|
||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | ------------- | ||
**body** | [**CreateMobileAuthorizationCodeRequest**](CreateMobileAuthorizationCodeRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | | ||
|
||
### Return type | ||
|
||
[**CreateMobileAuthorizationCodeResponse**](CreateMobileAuthorizationCodeResponse.md) | ||
|
||
### Authorization | ||
|
||
[oauth2](../README.md#oauth2) | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: application/json | ||
- **Accept**: application/json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.