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

Commit 7d628b3

Browse files
authored
Release/2.0.2 (#10)
* Pushed by Travis CI from connect-api-specification. Commit: ceb6d9c80f8e37813aa2b034b4756001f7e58852 * Pushed by Travis CI from connect-api-specification. Commit: cf43840c4589a7b7de99cdaf91dd226fa67c22a4 * Pushed by Travis CI from connect-api-specification. Commit: 3c8271912b5af9c242f3469af3c90f0e772e4293 * Pushed by Travis CI from connect-api-specification. Commit: 48fd7880f0d249d63ca8759f2e243b92ab528f70 * add tests * Pushed by Travis CI from connect-api-specification. Commit: 4e5125bbe36b2ec4fcf808fe6e106a75d818561d * Add location API test. * Pushed by Travis CI from connect-api-specification. Commit: 051f95877b2750fb1808f8a988135b11150b93aa * Pushed by Travis CI from connect-api-specification. Commit: 08196a58d8e9d353b7438cf8f6b662a8bafaa94b * Pushed by Travis CI from connect-api-specification. Commit: 9975b42234ced0699e71ddd4b5da703050c4cb31
1 parent aed8c09 commit 7d628b3

File tree

202 files changed

+3805
-476
lines changed

Some content is hidden

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

202 files changed

+3805
-476
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.py[cod]
2+

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: python
2+
cache: pip
3+
python:
4+
- '2.7'
5+
- '3.4'
6+
- '3.5'
7+
install:
8+
- pip install -r requirements.txt
9+
- pip install -r test-requirements.txt
10+
script: nosetests ./test
11+
before_install:
12+
- openssl aes-256-cbc -K $encrypted_27a1e8612058_key -iv $encrypted_27a1e8612058_iv -in ./travis-ci/accounts.enc -out ./travis-ci/accounts.json -d

README.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Square Connect V2 Python SDK
1+
# Square Connect V2 Python SDK [![Build Status](https://travis-ci.org/square/connect-python-sdk.svg?branch=master)](https://travis-ci.org/square/connect-python-sdk)[![PyPI version](https://badge.fury.io/py/squareconnect.svg)](https://badge.fury.io/py/squareconnect)
22

33
This repository contains the released Python client SDK. Check out our [API
44
specification repository](https://github.com/square/connect-api-specification)
@@ -39,15 +39,15 @@ import squareconnect
3939

4040
### Retrieve your location IDs
4141
```python
42-
from __future__ import print_function
42+
from __future__ import print_function
4343

4444
import squareconnect
4545
from squareconnect.rest import ApiException
4646
from squareconnect.apis.location_api import LocationApi
4747

4848
# create an instance of the Location API class
4949
api_instance = LocationApi()
50-
access_token = 'YOUR_ACCESS_TOKEN'
50+
access_token = 'YOUR_ACCESS_TOKEN'
5151

5252
try:
5353
# ListLocations
@@ -59,7 +59,7 @@ except ApiException as e:
5959
```
6060
### Charge the card nonce
6161
```python
62-
from __future__ import print_function
62+
from __future__ import print_function
6363
import uuid
6464

6565
import squareconnect
@@ -69,8 +69,8 @@ from squareconnect.apis.transaction_api import TransactionApi
6969
# create an instance of the Transaction API class
7070
api_instance = TransactionApi()
7171
access_token = 'YOUR_ACCESS_TOKEN'
72-
location_id = 'YOUR_LOCATION_ID'
73-
nonce = 'YOUR_NONCE'
72+
location_id = 'YOUR_LOCATION_ID'
73+
nonce = 'YOUR_NONCE'
7474

7575
try:
7676
# Charge
@@ -89,8 +89,9 @@ except ApiException as e:
8989
All URIs are relative to [Square Connect V2 Documentation](https://docs.connect.squareup.com/api/connect/v2/#navsection-endpoints)
9090

9191

92-
Class | Method | HTTP request
93-
------------ | ------------- | -------------
92+
Class | Method | HTTP request
93+
------------ | ------------- | -------------
94+
*CheckoutApi* | [**create_checkout**](docs/CheckoutApi.md#create_checkout) | **POST** /v2/locations/{location_id}/checkouts
9495
*CustomerApi* | [**create_customer**](docs/CustomerApi.md#create_customer) | **POST** /v2/customers
9596
*CustomerApi* | [**delete_customer**](docs/CustomerApi.md#delete_customer) | **DELETE** /v2/customers/{customer_id}
9697
*CustomerApi* | [**list_customers**](docs/CustomerApi.md#list_customers) | **GET** /v2/customers
@@ -111,38 +112,55 @@ Class | Method | HTTP request
111112
## Documentation For Models
112113

113114
- [Address](docs/Address.md)
115+
- [CaptureTransactionRequest](docs/CaptureTransactionRequest.md)
114116
- [CaptureTransactionResponse](docs/CaptureTransactionResponse.md)
115117
- [Card](docs/Card.md)
116118
- [ChargeRequest](docs/ChargeRequest.md)
117119
- [ChargeResponse](docs/ChargeResponse.md)
120+
- [Checkout](docs/Checkout.md)
121+
- [CreateCheckoutRequest](docs/CreateCheckoutRequest.md)
122+
- [CreateCheckoutResponse](docs/CreateCheckoutResponse.md)
118123
- [CreateCustomerCardRequest](docs/CreateCustomerCardRequest.md)
119124
- [CreateCustomerCardResponse](docs/CreateCustomerCardResponse.md)
120125
- [CreateCustomerRequest](docs/CreateCustomerRequest.md)
121126
- [CreateCustomerResponse](docs/CreateCustomerResponse.md)
127+
- [CreateOrderRequest](docs/CreateOrderRequest.md)
128+
- [CreateOrderRequestLineItem](docs/CreateOrderRequestLineItem.md)
129+
- [CreateOrderRequestOrder](docs/CreateOrderRequestOrder.md)
122130
- [CreateRefundRequest](docs/CreateRefundRequest.md)
123131
- [CreateRefundResponse](docs/CreateRefundResponse.md)
124132
- [Customer](docs/Customer.md)
133+
- [CustomerGroupInfo](docs/CustomerGroupInfo.md)
134+
- [CustomerPreferences](docs/CustomerPreferences.md)
135+
- [DeleteCustomerCardRequest](docs/DeleteCustomerCardRequest.md)
125136
- [DeleteCustomerCardResponse](docs/DeleteCustomerCardResponse.md)
137+
- [DeleteCustomerRequest](docs/DeleteCustomerRequest.md)
126138
- [DeleteCustomerResponse](docs/DeleteCustomerResponse.md)
127139
- [Error](docs/Error.md)
128140
- [ListCustomersRequest](docs/ListCustomersRequest.md)
129141
- [ListCustomersResponse](docs/ListCustomersResponse.md)
142+
- [ListLocationsRequest](docs/ListLocationsRequest.md)
130143
- [ListLocationsResponse](docs/ListLocationsResponse.md)
131144
- [ListRefundsRequest](docs/ListRefundsRequest.md)
132145
- [ListRefundsResponse](docs/ListRefundsResponse.md)
133146
- [ListTransactionsRequest](docs/ListTransactionsRequest.md)
134147
- [ListTransactionsResponse](docs/ListTransactionsResponse.md)
135148
- [Location](docs/Location.md)
136149
- [Money](docs/Money.md)
150+
- [Order](docs/Order.md)
151+
- [OrderLineItem](docs/OrderLineItem.md)
137152
- [Refund](docs/Refund.md)
153+
- [RetrieveCustomerRequest](docs/RetrieveCustomerRequest.md)
138154
- [RetrieveCustomerResponse](docs/RetrieveCustomerResponse.md)
155+
- [RetrieveTransactionRequest](docs/RetrieveTransactionRequest.md)
139156
- [RetrieveTransactionResponse](docs/RetrieveTransactionResponse.md)
140157
- [Tender](docs/Tender.md)
141158
- [TenderCardDetails](docs/TenderCardDetails.md)
142159
- [TenderCashDetails](docs/TenderCashDetails.md)
143160
- [Transaction](docs/Transaction.md)
144161
- [UpdateCustomerRequest](docs/UpdateCustomerRequest.md)
145162
- [UpdateCustomerResponse](docs/UpdateCustomerResponse.md)
163+
- [VoidTransactionRequest](docs/VoidTransactionRequest.md)
146164
- [VoidTransactionResponse](docs/VoidTransactionResponse.md)
147165

148166

@@ -171,7 +189,7 @@ as this repository contains only the generated SDK code.
171189
## License
172190

173191
```
174-
Copyright 2016 Square, Inc.
192+
Copyright 2017 Square, Inc.
175193
176194
Licensed under the Apache License, Version 2.0 (the "License");
177195
you may not use this file except in compliance with the License.

docs/Address.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ Represents a physical address.
88
## Properties
99
Name | Type | Notes
1010
------------ | ------------- | -------------
11-
**address_line_1** | **str** | [optional]
12-
**address_line_2** | **str** | [optional]
13-
**address_line_3** | **str** | [optional]
14-
**locality** | **str** | [optional]
15-
**sublocality** | **str** | [optional]
16-
**sublocality_2** | **str** | [optional]
17-
**sublocality_3** | **str** | [optional]
18-
**administrative_district_level_1** | **str** | [optional]
19-
**administrative_district_level_2** | **str** | [optional]
20-
**administrative_district_level_3** | **str** | [optional]
21-
**postal_code** | **str** | [optional]
22-
**country** | **str** | [optional]
23-
**first_name** | **str** | [optional]
24-
**last_name** | **str** | [optional]
25-
**organization** | **str** | [optional]
11+
**address_line_1** | **str** | [optional]
12+
**address_line_2** | **str** | [optional]
13+
**address_line_3** | **str** | [optional]
14+
**locality** | **str** | [optional]
15+
**sublocality** | **str** | [optional]
16+
**sublocality_2** | **str** | [optional]
17+
**sublocality_3** | **str** | [optional]
18+
**administrative_district_level_1** | **str** | [optional]
19+
**administrative_district_level_2** | **str** | [optional]
20+
**administrative_district_level_3** | **str** | [optional]
21+
**postal_code** | **str** | [optional]
22+
**country** | **str** | [optional]
23+
**first_name** | **str** | [optional]
24+
**last_name** | **str** | [optional]
25+
**organization** | **str** | [optional]
2626

2727
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2828

docs/CaptureTransactionResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Defines the fields that are included in the response body of a request to the [C
88
## Properties
99
Name | Type | Notes
1010
------------ | ------------- | -------------
11-
**errors** | [**list[Error]**](Error.md) | [optional]
11+
**errors** | [**list[Error]**](Error.md) | [optional]
1212

1313
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1414

docs/Card.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Represents the non-confidential details of a credit card.
88
## Properties
99
Name | Type | Notes
1010
------------ | ------------- | -------------
11-
**id** | **str** | [optional]
12-
**card_brand** | **str** | [optional]
13-
**last_4** | **str** | [optional]
14-
**exp_month** | **int** | [optional]
15-
**exp_year** | **int** | [optional]
16-
**cardholder_name** | **str** | [optional]
17-
**billing_address** | [**Address**](Address.md) | [optional]
11+
**id** | **str** | [optional]
12+
**card_brand** | **str** | [optional]
13+
**last_4** | **str** | [optional]
14+
**exp_month** | **int** | [optional]
15+
**exp_year** | **int** | [optional]
16+
**cardholder_name** | **str** | [optional]
17+
**billing_address** | [**Address**](Address.md) | [optional]
1818

1919
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2020

docs/ChargeRequest.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ Defines the parameters that can be included in the body of a request to the [Cha
88
## Properties
99
Name | Type | Notes
1010
------------ | ------------- | -------------
11-
**idempotency_key** | **str** |
12-
**amount_money** | [**Money**](Money.md) |
13-
**card_nonce** | **str** | [optional]
14-
**customer_card_id** | **str** | [optional]
15-
**delay_capture** | **bool** | [optional]
16-
**reference_id** | **str** | [optional]
17-
**note** | **str** | [optional]
18-
**customer_id** | **str** | [optional]
19-
**billing_address** | [**Address**](Address.md) | [optional]
20-
**shipping_address** | [**Address**](Address.md) | [optional]
21-
**buyer_email_address** | **str** | [optional]
11+
**idempotency_key** | **str** |
12+
**amount_money** | [**Money**](Money.md) |
13+
**card_nonce** | **str** | [optional]
14+
**customer_card_id** | **str** | [optional]
15+
**delay_capture** | **bool** | [optional]
16+
**reference_id** | **str** | [optional]
17+
**note** | **str** | [optional]
18+
**customer_id** | **str** | [optional]
19+
**billing_address** | [**Address**](Address.md) | [optional]
20+
**shipping_address** | [**Address**](Address.md) | [optional]
21+
**buyer_email_address** | **str** | [optional]
2222

2323
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2424

docs/ChargeResponse.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Defines the fields that are included in the response body of a request to the [C
88
## Properties
99
Name | Type | Notes
1010
------------ | ------------- | -------------
11-
**errors** | [**list[Error]**](Error.md) | [optional]
12-
**transaction** | [**Transaction**](Transaction.md) | [optional]
11+
**errors** | [**list[Error]**](Error.md) | [optional]
12+
**transaction** | [**Transaction**](Transaction.md) | [optional]
1313

1414
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1515

docs/Checkout.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Square Checkout lets merchants accept online payments for supported payment type
88
## Properties
99
Name | Type | Notes
1010
------------ | ------------- | -------------
11-
**id** | **str** | [optional]
12-
**checkout_page_url** | **str** | [optional]
13-
**ask_for_shipping_address** | **bool** | [optional]
14-
**merchant_support_email** | **str** | [optional]
15-
**pre_populate_buyer_email** | **str** | [optional]
16-
**pre_populate_shipping_address** | [**Address**](Address.md) | [optional]
17-
**redirect_url** | **str** | [optional]
18-
**order** | [**Order**](Order.md) | [optional]
19-
**created_at** | **str** | [optional]
11+
**id** | **str** | [optional]
12+
**checkout_page_url** | **str** | [optional]
13+
**ask_for_shipping_address** | **bool** | [optional]
14+
**merchant_support_email** | **str** | [optional]
15+
**pre_populate_buyer_email** | **str** | [optional]
16+
**pre_populate_shipping_address** | [**Address**](Address.md) | [optional]
17+
**redirect_url** | **str** | [optional]
18+
**order** | [**Order**](Order.md) | [optional]
19+
**created_at** | **str** | [optional]
2020

2121
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2222

docs/CheckoutApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
All endpoints are relative to [Square Connect V2 Documentation](https://docs.connect.squareup.com/api/connect/v2/#navsection-endpoints)
55

66

7-
Method | HTTP request
7+
Method | HTTP request
88
------------- | -------------
99
[**create_checkout**](CheckoutApi.md#create_checkout) | **POST** /v2/locations/{location_id}/checkouts
1010

@@ -20,9 +20,9 @@ Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `che
2020

2121
Name | Type | Notes
2222
------------- | ------------- | ------------- | -------------
23-
**authorization** | **str**|
24-
**location_id** | **str**|
25-
**body** | [**CreateCheckoutRequest**](CreateCheckoutRequest.md)|
23+
**authorization** | **str**|
24+
**location_id** | **str**|
25+
**body** | [**CreateCheckoutRequest**](CreateCheckoutRequest.md)|
2626

2727
### Return type
2828

0 commit comments

Comments
 (0)