diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d04a2dd --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.py[cod] + diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..857d702 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +language: python +cache: pip +python: +- '2.7' +- '3.4' +- '3.5' +install: +- pip install -r requirements.txt +- pip install -r test-requirements.txt +script: nosetests ./test +before_install: +- openssl aes-256-cbc -K $encrypted_27a1e8612058_key -iv $encrypted_27a1e8612058_iv -in ./travis-ci/accounts.enc -out ./travis-ci/accounts.json -d diff --git a/README.md b/README.md index edf6ef1..47ff7a6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Square Connect V2 Python SDK +# 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) This repository contains the released Python client SDK. Check out our [API specification repository](https://github.com/square/connect-api-specification) @@ -39,7 +39,7 @@ import squareconnect ### Retrieve your location IDs ```python -from __future__ import print_function +from __future__ import print_function import squareconnect from squareconnect.rest import ApiException @@ -47,7 +47,7 @@ from squareconnect.apis.location_api import LocationApi # create an instance of the Location API class api_instance = LocationApi() -access_token = 'YOUR_ACCESS_TOKEN' +access_token = 'YOUR_ACCESS_TOKEN' try: # ListLocations @@ -59,7 +59,7 @@ except ApiException as e: ``` ### Charge the card nonce ```python -from __future__ import print_function +from __future__ import print_function import uuid import squareconnect @@ -69,8 +69,8 @@ from squareconnect.apis.transaction_api import TransactionApi # create an instance of the Transaction API class api_instance = TransactionApi() access_token = 'YOUR_ACCESS_TOKEN' -location_id = 'YOUR_LOCATION_ID' -nonce = 'YOUR_NONCE' +location_id = 'YOUR_LOCATION_ID' +nonce = 'YOUR_NONCE' try: # Charge @@ -89,8 +89,9 @@ except ApiException as e: All URIs are relative to [Square Connect V2 Documentation](https://docs.connect.squareup.com/api/connect/v2/#navsection-endpoints) -Class | Method | HTTP request ------------- | ------------- | ------------- +Class | Method | HTTP request +------------ | ------------- | ------------- +*CheckoutApi* | [**create_checkout**](docs/CheckoutApi.md#create_checkout) | **POST** /v2/locations/{location_id}/checkouts *CustomerApi* | [**create_customer**](docs/CustomerApi.md#create_customer) | **POST** /v2/customers *CustomerApi* | [**delete_customer**](docs/CustomerApi.md#delete_customer) | **DELETE** /v2/customers/{customer_id} *CustomerApi* | [**list_customers**](docs/CustomerApi.md#list_customers) | **GET** /v2/customers @@ -111,22 +112,34 @@ Class | Method | HTTP request ## Documentation For Models - [Address](docs/Address.md) + - [CaptureTransactionRequest](docs/CaptureTransactionRequest.md) - [CaptureTransactionResponse](docs/CaptureTransactionResponse.md) - [Card](docs/Card.md) - [ChargeRequest](docs/ChargeRequest.md) - [ChargeResponse](docs/ChargeResponse.md) + - [Checkout](docs/Checkout.md) + - [CreateCheckoutRequest](docs/CreateCheckoutRequest.md) + - [CreateCheckoutResponse](docs/CreateCheckoutResponse.md) - [CreateCustomerCardRequest](docs/CreateCustomerCardRequest.md) - [CreateCustomerCardResponse](docs/CreateCustomerCardResponse.md) - [CreateCustomerRequest](docs/CreateCustomerRequest.md) - [CreateCustomerResponse](docs/CreateCustomerResponse.md) + - [CreateOrderRequest](docs/CreateOrderRequest.md) + - [CreateOrderRequestLineItem](docs/CreateOrderRequestLineItem.md) + - [CreateOrderRequestOrder](docs/CreateOrderRequestOrder.md) - [CreateRefundRequest](docs/CreateRefundRequest.md) - [CreateRefundResponse](docs/CreateRefundResponse.md) - [Customer](docs/Customer.md) + - [CustomerGroupInfo](docs/CustomerGroupInfo.md) + - [CustomerPreferences](docs/CustomerPreferences.md) + - [DeleteCustomerCardRequest](docs/DeleteCustomerCardRequest.md) - [DeleteCustomerCardResponse](docs/DeleteCustomerCardResponse.md) + - [DeleteCustomerRequest](docs/DeleteCustomerRequest.md) - [DeleteCustomerResponse](docs/DeleteCustomerResponse.md) - [Error](docs/Error.md) - [ListCustomersRequest](docs/ListCustomersRequest.md) - [ListCustomersResponse](docs/ListCustomersResponse.md) + - [ListLocationsRequest](docs/ListLocationsRequest.md) - [ListLocationsResponse](docs/ListLocationsResponse.md) - [ListRefundsRequest](docs/ListRefundsRequest.md) - [ListRefundsResponse](docs/ListRefundsResponse.md) @@ -134,8 +147,12 @@ Class | Method | HTTP request - [ListTransactionsResponse](docs/ListTransactionsResponse.md) - [Location](docs/Location.md) - [Money](docs/Money.md) + - [Order](docs/Order.md) + - [OrderLineItem](docs/OrderLineItem.md) - [Refund](docs/Refund.md) + - [RetrieveCustomerRequest](docs/RetrieveCustomerRequest.md) - [RetrieveCustomerResponse](docs/RetrieveCustomerResponse.md) + - [RetrieveTransactionRequest](docs/RetrieveTransactionRequest.md) - [RetrieveTransactionResponse](docs/RetrieveTransactionResponse.md) - [Tender](docs/Tender.md) - [TenderCardDetails](docs/TenderCardDetails.md) @@ -143,6 +160,7 @@ Class | Method | HTTP request - [Transaction](docs/Transaction.md) - [UpdateCustomerRequest](docs/UpdateCustomerRequest.md) - [UpdateCustomerResponse](docs/UpdateCustomerResponse.md) + - [VoidTransactionRequest](docs/VoidTransactionRequest.md) - [VoidTransactionResponse](docs/VoidTransactionResponse.md) @@ -171,7 +189,7 @@ as this repository contains only the generated SDK code. ## License ``` -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/docs/Address.md b/docs/Address.md index ad428e2..555d290 100644 --- a/docs/Address.md +++ b/docs/Address.md @@ -8,21 +8,21 @@ Represents a physical address. ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**address_line_1** | **str** | [optional] -**address_line_2** | **str** | [optional] -**address_line_3** | **str** | [optional] -**locality** | **str** | [optional] -**sublocality** | **str** | [optional] -**sublocality_2** | **str** | [optional] -**sublocality_3** | **str** | [optional] -**administrative_district_level_1** | **str** | [optional] -**administrative_district_level_2** | **str** | [optional] -**administrative_district_level_3** | **str** | [optional] -**postal_code** | **str** | [optional] -**country** | **str** | [optional] -**first_name** | **str** | [optional] -**last_name** | **str** | [optional] -**organization** | **str** | [optional] +**address_line_1** | **str** | [optional] +**address_line_2** | **str** | [optional] +**address_line_3** | **str** | [optional] +**locality** | **str** | [optional] +**sublocality** | **str** | [optional] +**sublocality_2** | **str** | [optional] +**sublocality_3** | **str** | [optional] +**administrative_district_level_1** | **str** | [optional] +**administrative_district_level_2** | **str** | [optional] +**administrative_district_level_3** | **str** | [optional] +**postal_code** | **str** | [optional] +**country** | **str** | [optional] +**first_name** | **str** | [optional] +**last_name** | **str** | [optional] +**organization** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CaptureTransactionResponse.md b/docs/CaptureTransactionResponse.md index b23312e..a3a5887 100644 --- a/docs/CaptureTransactionResponse.md +++ b/docs/CaptureTransactionResponse.md @@ -8,7 +8,7 @@ Defines the fields that are included in the response body of a request to the [C ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Card.md b/docs/Card.md index 4cbc104..3c1a7f0 100644 --- a/docs/Card.md +++ b/docs/Card.md @@ -8,13 +8,13 @@ Represents the non-confidential details of a credit card. ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**id** | **str** | [optional] -**card_brand** | **str** | [optional] -**last_4** | **str** | [optional] -**exp_month** | **int** | [optional] -**exp_year** | **int** | [optional] -**cardholder_name** | **str** | [optional] -**billing_address** | [**Address**](Address.md) | [optional] +**id** | **str** | [optional] +**card_brand** | **str** | [optional] +**last_4** | **str** | [optional] +**exp_month** | **int** | [optional] +**exp_year** | **int** | [optional] +**cardholder_name** | **str** | [optional] +**billing_address** | [**Address**](Address.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargeRequest.md b/docs/ChargeRequest.md index ff236cf..0a5a345 100644 --- a/docs/ChargeRequest.md +++ b/docs/ChargeRequest.md @@ -8,17 +8,17 @@ Defines the parameters that can be included in the body of a request to the [Cha ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**idempotency_key** | **str** | -**amount_money** | [**Money**](Money.md) | -**card_nonce** | **str** | [optional] -**customer_card_id** | **str** | [optional] -**delay_capture** | **bool** | [optional] -**reference_id** | **str** | [optional] -**note** | **str** | [optional] -**customer_id** | **str** | [optional] -**billing_address** | [**Address**](Address.md) | [optional] -**shipping_address** | [**Address**](Address.md) | [optional] -**buyer_email_address** | **str** | [optional] +**idempotency_key** | **str** | +**amount_money** | [**Money**](Money.md) | +**card_nonce** | **str** | [optional] +**customer_card_id** | **str** | [optional] +**delay_capture** | **bool** | [optional] +**reference_id** | **str** | [optional] +**note** | **str** | [optional] +**customer_id** | **str** | [optional] +**billing_address** | [**Address**](Address.md) | [optional] +**shipping_address** | [**Address**](Address.md) | [optional] +**buyer_email_address** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargeResponse.md b/docs/ChargeResponse.md index 4b9b6ea..1e5a3d0 100644 --- a/docs/ChargeResponse.md +++ b/docs/ChargeResponse.md @@ -8,8 +8,8 @@ Defines the fields that are included in the response body of a request to the [C ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] -**transaction** | [**Transaction**](Transaction.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] +**transaction** | [**Transaction**](Transaction.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Checkout.md b/docs/Checkout.md index ad8191a..05864a1 100644 --- a/docs/Checkout.md +++ b/docs/Checkout.md @@ -8,15 +8,15 @@ Square Checkout lets merchants accept online payments for supported payment type ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**id** | **str** | [optional] -**checkout_page_url** | **str** | [optional] -**ask_for_shipping_address** | **bool** | [optional] -**merchant_support_email** | **str** | [optional] -**pre_populate_buyer_email** | **str** | [optional] -**pre_populate_shipping_address** | [**Address**](Address.md) | [optional] -**redirect_url** | **str** | [optional] -**order** | [**Order**](Order.md) | [optional] -**created_at** | **str** | [optional] +**id** | **str** | [optional] +**checkout_page_url** | **str** | [optional] +**ask_for_shipping_address** | **bool** | [optional] +**merchant_support_email** | **str** | [optional] +**pre_populate_buyer_email** | **str** | [optional] +**pre_populate_shipping_address** | [**Address**](Address.md) | [optional] +**redirect_url** | **str** | [optional] +**order** | [**Order**](Order.md) | [optional] +**created_at** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CheckoutApi.md b/docs/CheckoutApi.md index b4f74a4..d947912 100644 --- a/docs/CheckoutApi.md +++ b/docs/CheckoutApi.md @@ -4,7 +4,7 @@ All endpoints are relative to [Square Connect V2 Documentation](https://docs.connect.squareup.com/api/connect/v2/#navsection-endpoints) -Method | HTTP request +Method | HTTP request ------------- | ------------- [**create_checkout**](CheckoutApi.md#create_checkout) | **POST** /v2/locations/{location_id}/checkouts @@ -20,9 +20,9 @@ Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `che Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **location_id** | **str**| - **body** | [**CreateCheckoutRequest**](CreateCheckoutRequest.md)| + **authorization** | **str**| + **location_id** | **str**| + **body** | [**CreateCheckoutRequest**](CreateCheckoutRequest.md)| ### Return type diff --git a/docs/CreateCheckoutRequest.md b/docs/CreateCheckoutRequest.md index 3a3eb17..98d4fdd 100644 --- a/docs/CreateCheckoutRequest.md +++ b/docs/CreateCheckoutRequest.md @@ -8,13 +8,13 @@ Defines the parameters that can be included in the body of a request to the [Cre ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**idempotency_key** | **str** | -**order** | [**CreateOrderRequestOrder**](CreateOrderRequestOrder.md) | -**ask_for_shipping_address** | **bool** | [optional] -**merchant_support_email** | **str** | [optional] -**pre_populate_buyer_email** | **str** | [optional] -**pre_populate_shipping_address** | [**Address**](Address.md) | [optional] -**redirect_url** | **str** | [optional] +**idempotency_key** | **str** | +**order** | [**CreateOrderRequestOrder**](CreateOrderRequestOrder.md) | +**ask_for_shipping_address** | **bool** | [optional] +**merchant_support_email** | **str** | [optional] +**pre_populate_buyer_email** | **str** | [optional] +**pre_populate_shipping_address** | [**Address**](Address.md) | [optional] +**redirect_url** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateCheckoutResponse.md b/docs/CreateCheckoutResponse.md index 79755ff..41b51a3 100644 --- a/docs/CreateCheckoutResponse.md +++ b/docs/CreateCheckoutResponse.md @@ -8,8 +8,8 @@ Defines the fields that are included in the response body of a request to the [C ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**checkout** | [**Checkout**](Checkout.md) | [optional] -**errors** | [**list[Error]**](Error.md) | [optional] +**checkout** | [**Checkout**](Checkout.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateCustomerCardRequest.md b/docs/CreateCustomerCardRequest.md index 76a2fdc..886b781 100644 --- a/docs/CreateCustomerCardRequest.md +++ b/docs/CreateCustomerCardRequest.md @@ -8,9 +8,9 @@ Defines the fields that are included in the request body of a request to the [Cr ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**card_nonce** | **str** | -**billing_address** | [**Address**](Address.md) | [optional] -**cardholder_name** | **str** | [optional] +**card_nonce** | **str** | +**billing_address** | [**Address**](Address.md) | [optional] +**cardholder_name** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateCustomerCardResponse.md b/docs/CreateCustomerCardResponse.md index 6d67276..0e27c40 100644 --- a/docs/CreateCustomerCardResponse.md +++ b/docs/CreateCustomerCardResponse.md @@ -8,8 +8,8 @@ Defines the fields that are included in the response body of a request to the [C ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] -**card** | [**Card**](Card.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] +**card** | [**Card**](Card.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateCustomerRequest.md b/docs/CreateCustomerRequest.md index f5e4171..1bd17ad 100644 --- a/docs/CreateCustomerRequest.md +++ b/docs/CreateCustomerRequest.md @@ -8,15 +8,15 @@ Defines the body parameters that can be provided in a request to the [CreateCust ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**given_name** | **str** | [optional] -**family_name** | **str** | [optional] -**company_name** | **str** | [optional] -**nickname** | **str** | [optional] -**email_address** | **str** | [optional] -**address** | [**Address**](Address.md) | [optional] -**phone_number** | **str** | [optional] -**reference_id** | **str** | [optional] -**note** | **str** | [optional] +**given_name** | **str** | [optional] +**family_name** | **str** | [optional] +**company_name** | **str** | [optional] +**nickname** | **str** | [optional] +**email_address** | **str** | [optional] +**address** | [**Address**](Address.md) | [optional] +**phone_number** | **str** | [optional] +**reference_id** | **str** | [optional] +**note** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateCustomerResponse.md b/docs/CreateCustomerResponse.md index 4fb7f35..eac7311 100644 --- a/docs/CreateCustomerResponse.md +++ b/docs/CreateCustomerResponse.md @@ -8,8 +8,8 @@ Defines the fields that are included in the response body of a request to the [C ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] -**customer** | [**Customer**](Customer.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] +**customer** | [**Customer**](Customer.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateOrderRequest.md b/docs/CreateOrderRequest.md index 3dc155e..794f54a 100644 --- a/docs/CreateOrderRequest.md +++ b/docs/CreateOrderRequest.md @@ -8,8 +8,8 @@ Defines the parameters that can be included in the body of a request to the [Cre ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**idempotency_key** | **str** | -**order** | [**Order**](Order.md) | +**idempotency_key** | **str** | +**order** | [**Order**](Order.md) | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateOrderRequestLineItem.md b/docs/CreateOrderRequestLineItem.md index bcc494d..66f6ec0 100644 --- a/docs/CreateOrderRequestLineItem.md +++ b/docs/CreateOrderRequestLineItem.md @@ -8,9 +8,9 @@ Represents a line item to include in an order. Each line item describes a differ ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**name** | **str** | -**quantity** | **str** | -**base_price_money** | [**Money**](Money.md) | +**name** | **str** | +**quantity** | **str** | +**base_price_money** | [**Money**](Money.md) | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateOrderRequestOrder.md b/docs/CreateOrderRequestOrder.md index 2cd43ba..abee300 100644 --- a/docs/CreateOrderRequestOrder.md +++ b/docs/CreateOrderRequestOrder.md @@ -8,8 +8,8 @@ The object describes the order. ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**reference_id** | **str** | [optional] -**line_items** | [**list[CreateOrderRequestLineItem]**](CreateOrderRequestLineItem.md) | +**reference_id** | **str** | [optional] +**line_items** | [**list[CreateOrderRequestLineItem]**](CreateOrderRequestLineItem.md) | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateRefundRequest.md b/docs/CreateRefundRequest.md index ca27444..6a369db 100644 --- a/docs/CreateRefundRequest.md +++ b/docs/CreateRefundRequest.md @@ -8,10 +8,10 @@ Defines the body parameters that can be included in a request to the [CreateRefu ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**idempotency_key** | **str** | -**tender_id** | **str** | -**reason** | **str** | [optional] -**amount_money** | [**Money**](Money.md) | +**idempotency_key** | **str** | +**tender_id** | **str** | +**reason** | **str** | [optional] +**amount_money** | [**Money**](Money.md) | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateRefundResponse.md b/docs/CreateRefundResponse.md index 3f51426..3e95e08 100644 --- a/docs/CreateRefundResponse.md +++ b/docs/CreateRefundResponse.md @@ -8,8 +8,8 @@ Defines the fields that are included in the response body of a request to the [C ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] -**refund** | [**Refund**](Refund.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] +**refund** | [**Refund**](Refund.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Customer.md b/docs/Customer.md index eb11037..0fd0352 100644 --- a/docs/Customer.md +++ b/docs/Customer.md @@ -8,21 +8,21 @@ Represents one of a business's customers, which can have one or more cards on fi ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**id** | **str** | -**created_at** | **str** | -**updated_at** | **str** | -**cards** | [**list[Card]**](Card.md) | [optional] -**given_name** | **str** | [optional] -**family_name** | **str** | [optional] -**nickname** | **str** | [optional] -**company_name** | **str** | [optional] -**email_address** | **str** | [optional] -**address** | [**Address**](Address.md) | [optional] -**phone_number** | **str** | [optional] -**reference_id** | **str** | [optional] -**note** | **str** | [optional] -**preferences** | [**CustomerPreferences**](CustomerPreferences.md) | [optional] -**groups** | [**list[CustomerGroupInfo]**](CustomerGroupInfo.md) | [optional] +**id** | **str** | +**created_at** | **str** | +**updated_at** | **str** | +**cards** | [**list[Card]**](Card.md) | [optional] +**given_name** | **str** | [optional] +**family_name** | **str** | [optional] +**nickname** | **str** | [optional] +**company_name** | **str** | [optional] +**email_address** | **str** | [optional] +**address** | [**Address**](Address.md) | [optional] +**phone_number** | **str** | [optional] +**reference_id** | **str** | [optional] +**note** | **str** | [optional] +**preferences** | [**CustomerPreferences**](CustomerPreferences.md) | [optional] +**groups** | [**list[CustomerGroupInfo]**](CustomerGroupInfo.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerApi.md b/docs/CustomerApi.md index a2e1fd5..3268f1d 100644 --- a/docs/CustomerApi.md +++ b/docs/CustomerApi.md @@ -4,7 +4,7 @@ All endpoints are relative to [Square Connect V2 Documentation](https://docs.connect.squareup.com/api/connect/v2/#navsection-endpoints) -Method | HTTP request +Method | HTTP request ------------- | ------------- [**create_customer**](CustomerApi.md#create_customer) | **POST** /v2/customers [**delete_customer**](CustomerApi.md#delete_customer) | **DELETE** /v2/customers/{customer_id} @@ -24,8 +24,8 @@ Creates a new customer for a business, which can have associated cards on file. Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **body** | [**CreateCustomerRequest**](CreateCustomerRequest.md)| + **authorization** | **str**| + **body** | [**CreateCustomerRequest**](CreateCustomerRequest.md)| ### Return type @@ -48,8 +48,8 @@ Deletes a customer from a business, along with any linked cards on file. Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **customer_id** | **str**| + **authorization** | **str**| + **customer_id** | **str**| ### Return type @@ -72,8 +72,8 @@ Lists a business's customers. Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **cursor** | **str**| [optional] + **authorization** | **str**| + **cursor** | **str**| [optional] ### Return type @@ -96,8 +96,8 @@ Returns details for a single customer. Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **customer_id** | **str**| + **authorization** | **str**| + **customer_id** | **str**| ### Return type @@ -120,9 +120,9 @@ Updates the details of an existing customer. You cannot edit a customer's cards Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **customer_id** | **str**| - **body** | [**UpdateCustomerRequest**](UpdateCustomerRequest.md)| + **authorization** | **str**| + **customer_id** | **str**| + **body** | [**UpdateCustomerRequest**](UpdateCustomerRequest.md)| ### Return type diff --git a/docs/CustomerCardApi.md b/docs/CustomerCardApi.md index 4d4c188..16b4bd4 100644 --- a/docs/CustomerCardApi.md +++ b/docs/CustomerCardApi.md @@ -4,7 +4,7 @@ All endpoints are relative to [Square Connect V2 Documentation](https://docs.connect.squareup.com/api/connect/v2/#navsection-endpoints) -Method | HTTP request +Method | HTTP request ------------- | ------------- [**create_customer_card**](CustomerCardApi.md#create_customer_card) | **POST** /v2/customers/{customer_id}/cards [**delete_customer_card**](CustomerCardApi.md#delete_customer_card) | **DELETE** /v2/customers/{customer_id}/cards/{card_id} @@ -21,9 +21,9 @@ Adds a card on file to an existing customer. Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **customer_id** | **str**| - **body** | [**CreateCustomerCardRequest**](CreateCustomerCardRequest.md)| + **authorization** | **str**| + **customer_id** | **str**| + **body** | [**CreateCustomerCardRequest**](CreateCustomerCardRequest.md)| ### Return type @@ -46,9 +46,9 @@ Removes a card on file from a customer. Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **customer_id** | **str**| - **card_id** | **str**| + **authorization** | **str**| + **customer_id** | **str**| + **card_id** | **str**| ### Return type diff --git a/docs/CustomerGroupInfo.md b/docs/CustomerGroupInfo.md index fcacd58..19744b5 100644 --- a/docs/CustomerGroupInfo.md +++ b/docs/CustomerGroupInfo.md @@ -8,8 +8,8 @@ Contains some brief information about a customer group with its identifier inclu ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**id** | **str** | -**name** | **str** | +**id** | **str** | +**name** | **str** | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerPreferences.md b/docs/CustomerPreferences.md index 348ba1c..d8cb525 100644 --- a/docs/CustomerPreferences.md +++ b/docs/CustomerPreferences.md @@ -8,7 +8,7 @@ Represents a particular customer's preferences. ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**email_unsubscribed** | **bool** | [optional] +**email_unsubscribed** | **bool** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeleteCustomerCardResponse.md b/docs/DeleteCustomerCardResponse.md index b2f417d..ac4557e 100644 --- a/docs/DeleteCustomerCardResponse.md +++ b/docs/DeleteCustomerCardResponse.md @@ -8,7 +8,7 @@ Defines the fields that are included in the response body of a request to the [D ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeleteCustomerResponse.md b/docs/DeleteCustomerResponse.md index 5fd0b1d..438514c 100644 --- a/docs/DeleteCustomerResponse.md +++ b/docs/DeleteCustomerResponse.md @@ -8,7 +8,7 @@ Defines the fields that are included in the response body of a request to the [D ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Error.md b/docs/Error.md index fd0afa0..600683a 100644 --- a/docs/Error.md +++ b/docs/Error.md @@ -8,10 +8,10 @@ Represents an error encountered during a request to the Connect API. See [Handl ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**category** | **str** | -**code** | **str** | -**detail** | **str** | [optional] -**field** | **str** | [optional] +**category** | **str** | +**code** | **str** | +**detail** | **str** | [optional] +**field** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListCustomersRequest.md b/docs/ListCustomersRequest.md index c02c23e..acd9c67 100644 --- a/docs/ListCustomersRequest.md +++ b/docs/ListCustomersRequest.md @@ -8,7 +8,7 @@ Defines the query parameters that can be provided in a request to the [ListCusto ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**cursor** | **str** | [optional] +**cursor** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListCustomersResponse.md b/docs/ListCustomersResponse.md index 1a5091d..bf5ffac 100644 --- a/docs/ListCustomersResponse.md +++ b/docs/ListCustomersResponse.md @@ -8,9 +8,9 @@ Defines the fields that are included in the response body of a request to the [L ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] -**customers** | [**list[Customer]**](Customer.md) | [optional] -**cursor** | **str** | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] +**customers** | [**list[Customer]**](Customer.md) | [optional] +**cursor** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListLocationsResponse.md b/docs/ListLocationsResponse.md index e9f3ad1..f45434f 100644 --- a/docs/ListLocationsResponse.md +++ b/docs/ListLocationsResponse.md @@ -8,8 +8,8 @@ Defines the fields that are included in the response body of a request to the [L ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] -**locations** | [**list[Location]**](Location.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] +**locations** | [**list[Location]**](Location.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListRefundsRequest.md b/docs/ListRefundsRequest.md index e3642e8..3361380 100644 --- a/docs/ListRefundsRequest.md +++ b/docs/ListRefundsRequest.md @@ -8,10 +8,10 @@ Defines the query parameters that can be included in a request to the [ListRefun ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**begin_time** | **str** | [optional] -**end_time** | **str** | [optional] -**sort_order** | **str** | [optional] -**cursor** | **str** | [optional] +**begin_time** | **str** | [optional] +**end_time** | **str** | [optional] +**sort_order** | **str** | [optional] +**cursor** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListRefundsResponse.md b/docs/ListRefundsResponse.md index 173e1a4..15244c4 100644 --- a/docs/ListRefundsResponse.md +++ b/docs/ListRefundsResponse.md @@ -8,9 +8,9 @@ Defines the fields that are included in the response body of a request to the [L ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] -**refunds** | [**list[Refund]**](Refund.md) | [optional] -**cursor** | **str** | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] +**refunds** | [**list[Refund]**](Refund.md) | [optional] +**cursor** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListTransactionsRequest.md b/docs/ListTransactionsRequest.md index 48a1ea3..1e06eb0 100644 --- a/docs/ListTransactionsRequest.md +++ b/docs/ListTransactionsRequest.md @@ -8,10 +8,10 @@ Defines the query parameters that can be included in a request to the [ListTrans ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**begin_time** | **str** | [optional] -**end_time** | **str** | [optional] -**sort_order** | **str** | [optional] -**cursor** | **str** | [optional] +**begin_time** | **str** | [optional] +**end_time** | **str** | [optional] +**sort_order** | **str** | [optional] +**cursor** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListTransactionsResponse.md b/docs/ListTransactionsResponse.md index f266c40..49aedb9 100644 --- a/docs/ListTransactionsResponse.md +++ b/docs/ListTransactionsResponse.md @@ -8,9 +8,9 @@ Defines the fields that are included in the response body of a request to the [L ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] -**transactions** | [**list[Transaction]**](Transaction.md) | [optional] -**cursor** | **str** | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] +**transactions** | [**list[Transaction]**](Transaction.md) | [optional] +**cursor** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Location.md b/docs/Location.md index 0cdfef8..554248e 100644 --- a/docs/Location.md +++ b/docs/Location.md @@ -8,11 +8,11 @@ Represents one of a business's locations. ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**id** | **str** | [optional] -**name** | **str** | [optional] -**address** | [**Address**](Address.md) | [optional] -**timezone** | **str** | [optional] -**capabilities** | **list[str]** | [optional] +**id** | **str** | [optional] +**name** | **str** | [optional] +**address** | [**Address**](Address.md) | [optional] +**timezone** | **str** | [optional] +**capabilities** | **list[str]** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LocationApi.md b/docs/LocationApi.md index e62fb06..3d816ed 100644 --- a/docs/LocationApi.md +++ b/docs/LocationApi.md @@ -4,7 +4,7 @@ All endpoints are relative to [Square Connect V2 Documentation](https://docs.connect.squareup.com/api/connect/v2/#navsection-endpoints) -Method | HTTP request +Method | HTTP request ------------- | ------------- [**list_locations**](LocationApi.md#list_locations) | **GET** /v2/locations @@ -20,7 +20,7 @@ Provides the details for all of a business's locations. Most other Connect API Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| + **authorization** | **str**| ### Return type diff --git a/docs/Money.md b/docs/Money.md index a11b9c7..b1b3681 100644 --- a/docs/Money.md +++ b/docs/Money.md @@ -8,8 +8,8 @@ Represents an amount of money. __Important:__ Unlike version 1 of the Connect A ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**amount** | **int** | [optional] -**currency** | **str** | [optional] +**amount** | **int** | [optional] +**currency** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Order.md b/docs/Order.md index a95d57f..ba3a76b 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -8,11 +8,11 @@ Contains all information related to a single order to process with Square, inclu ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**id** | **str** | [optional] -**location_id** | **str** | [optional] -**reference_id** | **str** | [optional] -**line_items** | [**list[OrderLineItem]**](OrderLineItem.md) | [optional] -**total_money** | [**Money**](Money.md) | [optional] +**id** | **str** | [optional] +**location_id** | **str** | [optional] +**reference_id** | **str** | [optional] +**line_items** | [**list[OrderLineItem]**](OrderLineItem.md) | [optional] +**total_money** | [**Money**](Money.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderLineItem.md b/docs/OrderLineItem.md index e14a663..79a3053 100644 --- a/docs/OrderLineItem.md +++ b/docs/OrderLineItem.md @@ -8,11 +8,11 @@ Represents a line item in an order. Each line item describes a different product ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**id** | **str** | [optional] -**name** | **str** | [optional] -**quantity** | **str** | [optional] -**base_price_money** | [**Money**](Money.md) | [optional] -**total_money** | [**Money**](Money.md) | [optional] +**id** | **str** | [optional] +**name** | **str** | [optional] +**quantity** | **str** | [optional] +**base_price_money** | [**Money**](Money.md) | [optional] +**total_money** | [**Money**](Money.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Refund.md b/docs/Refund.md index 00ddecd..860efb7 100644 --- a/docs/Refund.md +++ b/docs/Refund.md @@ -8,15 +8,15 @@ Represents a refund processed for a Square transaction. ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**id** | **str** | -**location_id** | **str** | -**transaction_id** | **str** | -**tender_id** | **str** | -**created_at** | **str** | [optional] -**reason** | **str** | -**amount_money** | [**Money**](Money.md) | -**status** | **str** | -**processing_fee_money** | [**Money**](Money.md) | [optional] +**id** | **str** | +**location_id** | **str** | +**transaction_id** | **str** | +**tender_id** | **str** | +**created_at** | **str** | [optional] +**reason** | **str** | +**amount_money** | [**Money**](Money.md) | +**status** | **str** | +**processing_fee_money** | [**Money**](Money.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RefundApi.md b/docs/RefundApi.md index 089aadd..8916ff8 100644 --- a/docs/RefundApi.md +++ b/docs/RefundApi.md @@ -4,7 +4,7 @@ All endpoints are relative to [Square Connect V2 Documentation](https://docs.connect.squareup.com/api/connect/v2/#navsection-endpoints) -Method | HTTP request +Method | HTTP request ------------- | ------------- [**create_refund**](RefundApi.md#create_refund) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/refund [**list_refunds**](RefundApi.md#list_refunds) | **GET** /v2/locations/{location_id}/refunds @@ -21,10 +21,10 @@ Initiates a refund for a previously charged tender. Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **location_id** | **str**| - **transaction_id** | **str**| - **body** | [**CreateRefundRequest**](CreateRefundRequest.md)| + **authorization** | **str**| + **location_id** | **str**| + **transaction_id** | **str**| + **body** | [**CreateRefundRequest**](CreateRefundRequest.md)| ### Return type @@ -47,12 +47,12 @@ Lists refunds for one of a business's locations. Refunds with a `status` of `PE Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **location_id** | **str**| - **begin_time** | **str**| [optional] - **end_time** | **str**| [optional] - **sort_order** | **str**| [optional] - **cursor** | **str**| [optional] + **authorization** | **str**| + **location_id** | **str**| + **begin_time** | **str**| [optional] + **end_time** | **str**| [optional] + **sort_order** | **str**| [optional] + **cursor** | **str**| [optional] ### Return type diff --git a/docs/RetrieveCustomerResponse.md b/docs/RetrieveCustomerResponse.md index b72aa20..b040ddc 100644 --- a/docs/RetrieveCustomerResponse.md +++ b/docs/RetrieveCustomerResponse.md @@ -8,8 +8,8 @@ Defines the fields that are included in the response body of a request to the [R ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] -**customer** | [**Customer**](Customer.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] +**customer** | [**Customer**](Customer.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RetrieveTransactionResponse.md b/docs/RetrieveTransactionResponse.md index 41b12e1..643ba91 100644 --- a/docs/RetrieveTransactionResponse.md +++ b/docs/RetrieveTransactionResponse.md @@ -8,8 +8,8 @@ Defines the fields that are included in the response body of a request to the [R ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] -**transaction** | [**Transaction**](Transaction.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] +**transaction** | [**Transaction**](Transaction.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Tender.md b/docs/Tender.md index cf5de4c..0bda5bc 100644 --- a/docs/Tender.md +++ b/docs/Tender.md @@ -8,17 +8,17 @@ Represents a tender (i.e., a method of payment) used in a Square transaction. ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**id** | **str** | [optional] -**location_id** | **str** | [optional] -**transaction_id** | **str** | [optional] -**created_at** | **str** | [optional] -**note** | **str** | [optional] -**amount_money** | [**Money**](Money.md) | [optional] -**processing_fee_money** | [**Money**](Money.md) | [optional] -**customer_id** | **str** | [optional] -**type** | **str** | -**card_details** | [**TenderCardDetails**](TenderCardDetails.md) | [optional] -**cash_details** | [**TenderCashDetails**](TenderCashDetails.md) | [optional] +**id** | **str** | [optional] +**location_id** | **str** | [optional] +**transaction_id** | **str** | [optional] +**created_at** | **str** | [optional] +**note** | **str** | [optional] +**amount_money** | [**Money**](Money.md) | [optional] +**processing_fee_money** | [**Money**](Money.md) | [optional] +**customer_id** | **str** | [optional] +**type** | **str** | +**card_details** | [**TenderCardDetails**](TenderCardDetails.md) | [optional] +**cash_details** | [**TenderCashDetails**](TenderCashDetails.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TenderCardDetails.md b/docs/TenderCardDetails.md index 45b2c07..33bfdf2 100644 --- a/docs/TenderCardDetails.md +++ b/docs/TenderCardDetails.md @@ -8,9 +8,9 @@ Represents additional details of a tender with `type` `CARD` or `SQUARE_GIFT_CAR ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**status** | **str** | [optional] -**card** | [**Card**](Card.md) | [optional] -**entry_method** | **str** | [optional] +**status** | **str** | [optional] +**card** | [**Card**](Card.md) | [optional] +**entry_method** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TenderCashDetails.md b/docs/TenderCashDetails.md index 9447ebb..2cdc063 100644 --- a/docs/TenderCashDetails.md +++ b/docs/TenderCashDetails.md @@ -8,8 +8,8 @@ Represents the details of a tender with `type` `CASH`. ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**buyer_tendered_money** | [**Money**](Money.md) | [optional] -**change_back_money** | [**Money**](Money.md) | [optional] +**buyer_tendered_money** | [**Money**](Money.md) | [optional] +**change_back_money** | [**Money**](Money.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Transaction.md b/docs/Transaction.md index a0b2d04..f4e744b 100644 --- a/docs/Transaction.md +++ b/docs/Transaction.md @@ -8,16 +8,16 @@ Represents a transaction processed with Square, either with the Connect API or w ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**id** | **str** | [optional] -**location_id** | **str** | [optional] -**created_at** | **str** | [optional] -**tenders** | [**list[Tender]**](Tender.md) | [optional] -**refunds** | [**list[Refund]**](Refund.md) | [optional] -**reference_id** | **str** | [optional] -**product** | **str** | [optional] -**client_id** | **str** | [optional] -**order** | [**Order**](Order.md) | [optional] -**shipping_address** | [**Address**](Address.md) | [optional] +**id** | **str** | [optional] +**location_id** | **str** | [optional] +**created_at** | **str** | [optional] +**tenders** | [**list[Tender]**](Tender.md) | [optional] +**refunds** | [**list[Refund]**](Refund.md) | [optional] +**reference_id** | **str** | [optional] +**product** | **str** | [optional] +**client_id** | **str** | [optional] +**order** | [**Order**](Order.md) | [optional] +**shipping_address** | [**Address**](Address.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransactionApi.md b/docs/TransactionApi.md index ee0725f..12eaf83 100644 --- a/docs/TransactionApi.md +++ b/docs/TransactionApi.md @@ -4,7 +4,7 @@ All endpoints are relative to [Square Connect V2 Documentation](https://docs.connect.squareup.com/api/connect/v2/#navsection-endpoints) -Method | HTTP request +Method | HTTP request ------------- | ------------- [**capture_transaction**](TransactionApi.md#capture_transaction) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/capture [**charge**](TransactionApi.md#charge) | **POST** /v2/locations/{location_id}/transactions @@ -24,9 +24,9 @@ Captures a transaction that was created with the [Charge](#endpoint-charge) endp Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **location_id** | **str**| - **transaction_id** | **str**| + **authorization** | **str**| + **location_id** | **str**| + **transaction_id** | **str**| ### Return type @@ -49,9 +49,9 @@ Charges a card represented by a card nonce or a customer's card on file. Your r Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **location_id** | **str**| - **body** | [**ChargeRequest**](ChargeRequest.md)| + **authorization** | **str**| + **location_id** | **str**| + **body** | [**ChargeRequest**](ChargeRequest.md)| ### Return type @@ -74,12 +74,12 @@ Lists transactions for a particular location. Max results per [page](#paginatin Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **location_id** | **str**| - **begin_time** | **str**| [optional] - **end_time** | **str**| [optional] - **sort_order** | **str**| [optional] - **cursor** | **str**| [optional] + **authorization** | **str**| + **location_id** | **str**| + **begin_time** | **str**| [optional] + **end_time** | **str**| [optional] + **sort_order** | **str**| [optional] + **cursor** | **str**| [optional] ### Return type @@ -102,9 +102,9 @@ Retrieves details for a single transaction. Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **location_id** | **str**| - **transaction_id** | **str**| + **authorization** | **str**| + **location_id** | **str**| + **transaction_id** | **str**| ### Return type @@ -127,9 +127,9 @@ Cancels a transaction that was created with the [Charge](#endpoint-charge) endpo Name | Type | Notes ------------- | ------------- | ------------- | ------------- - **authorization** | **str**| - **location_id** | **str**| - **transaction_id** | **str**| + **authorization** | **str**| + **location_id** | **str**| + **transaction_id** | **str**| ### Return type diff --git a/docs/UpdateCustomerRequest.md b/docs/UpdateCustomerRequest.md index 9393699..361c269 100644 --- a/docs/UpdateCustomerRequest.md +++ b/docs/UpdateCustomerRequest.md @@ -8,15 +8,15 @@ Defines the body parameters that can be provided in a request to the [UpdateCust ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**given_name** | **str** | [optional] -**family_name** | **str** | [optional] -**company_name** | **str** | [optional] -**nickname** | **str** | [optional] -**email_address** | **str** | [optional] -**address** | [**Address**](Address.md) | [optional] -**phone_number** | **str** | [optional] -**reference_id** | **str** | [optional] -**note** | **str** | [optional] +**given_name** | **str** | [optional] +**family_name** | **str** | [optional] +**company_name** | **str** | [optional] +**nickname** | **str** | [optional] +**email_address** | **str** | [optional] +**address** | [**Address**](Address.md) | [optional] +**phone_number** | **str** | [optional] +**reference_id** | **str** | [optional] +**note** | **str** | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateCustomerResponse.md b/docs/UpdateCustomerResponse.md index 7a11c4a..3ef6f90 100644 --- a/docs/UpdateCustomerResponse.md +++ b/docs/UpdateCustomerResponse.md @@ -8,8 +8,8 @@ Defines the fields that are included in the response body of a request to the [U ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] -**customer** | [**Customer**](Customer.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] +**customer** | [**Customer**](Customer.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VoidTransactionResponse.md b/docs/VoidTransactionResponse.md index 19eafe4..124c522 100644 --- a/docs/VoidTransactionResponse.md +++ b/docs/VoidTransactionResponse.md @@ -8,7 +8,7 @@ Defines the fields that are included in the response body of a request to the [C ## Properties Name | Type | Notes ------------ | ------------- | ------------- -**errors** | [**list[Error]**](Error.md) | [optional] +**errors** | [**list[Error]**](Error.md) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/requirements.txt b/requirements.txt index f00e08f..bafdc07 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ certifi >= 14.05.14 -six == 1.8.0 +six >= 1.10 python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.15.1 diff --git a/setup.py b/setup.py index b35fadc..9db6022 100644 --- a/setup.py +++ b/setup.py @@ -20,18 +20,15 @@ setup( name=NAME, version=VERSION, - description="Official Square Connect v2 Client", - author = "Ti-Fen Pan, James Chang", - author_email="tpan@squareup.com, jchang@squareup.com", + description="Square Connect v2 Python Client", + author = "Square Inc.", + author_email="", url="https://github.com/square/connect-python-sdk", keywords=["Swagger", "Square Connect API"], install_requires=REQUIRES, packages=find_packages(), license="http://www.apache.org/licenses/LICENSE-2.0", - include_package_data=True, - long_description="""\ - - """ + include_package_data=True ) diff --git a/squareconnect/api_client.py b/squareconnect/api_client.py index 8eae3fd..73f7bdb 100644 --- a/squareconnect/api_client.py +++ b/squareconnect/api_client.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/apis/checkout_api.py b/squareconnect/apis/checkout_api.py index d46334b..ed6d8f9 100644 --- a/squareconnect/apis/checkout_api.py +++ b/squareconnect/apis/checkout_api.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -134,4 +134,4 @@ def create_checkout(self, authorization, location_id, body, **kwargs): response_type='CreateCheckoutResponse', auth_settings=auth_settings, callback=params.get('callback')) - + diff --git a/squareconnect/apis/customer_api.py b/squareconnect/apis/customer_api.py index 8d5d11e..5cd188c 100644 --- a/squareconnect/apis/customer_api.py +++ b/squareconnect/apis/customer_api.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -128,7 +128,7 @@ def create_customer(self, authorization, body, **kwargs): response_type='CreateCustomerResponse', auth_settings=auth_settings, callback=params.get('callback')) - + def delete_customer(self, authorization, customer_id, **kwargs): """ @@ -212,7 +212,7 @@ def delete_customer(self, authorization, customer_id, **kwargs): response_type='DeleteCustomerResponse', auth_settings=auth_settings, callback=params.get('callback')) - + def list_customers(self, authorization, **kwargs): """ @@ -293,7 +293,7 @@ def list_customers(self, authorization, **kwargs): response_type='ListCustomersResponse', auth_settings=auth_settings, callback=params.get('callback')) - + def retrieve_customer(self, authorization, customer_id, **kwargs): """ @@ -377,7 +377,7 @@ def retrieve_customer(self, authorization, customer_id, **kwargs): response_type='RetrieveCustomerResponse', auth_settings=auth_settings, callback=params.get('callback')) - + def update_customer(self, authorization, customer_id, body, **kwargs): """ @@ -467,4 +467,4 @@ def update_customer(self, authorization, customer_id, body, **kwargs): response_type='UpdateCustomerResponse', auth_settings=auth_settings, callback=params.get('callback')) - + diff --git a/squareconnect/apis/customer_card_api.py b/squareconnect/apis/customer_card_api.py index ff865b7..176fd5c 100644 --- a/squareconnect/apis/customer_card_api.py +++ b/squareconnect/apis/customer_card_api.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -134,7 +134,7 @@ def create_customer_card(self, authorization, customer_id, body, **kwargs): response_type='CreateCustomerCardResponse', auth_settings=auth_settings, callback=params.get('callback')) - + def delete_customer_card(self, authorization, customer_id, card_id, **kwargs): """ @@ -224,4 +224,4 @@ def delete_customer_card(self, authorization, customer_id, card_id, **kwargs): response_type='DeleteCustomerCardResponse', auth_settings=auth_settings, callback=params.get('callback')) - + diff --git a/squareconnect/apis/location_api.py b/squareconnect/apis/location_api.py index bb5994b..6bf01d0 100644 --- a/squareconnect/apis/location_api.py +++ b/squareconnect/apis/location_api.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -122,4 +122,4 @@ def list_locations(self, authorization, **kwargs): response_type='ListLocationsResponse', auth_settings=auth_settings, callback=params.get('callback')) - + diff --git a/squareconnect/apis/refund_api.py b/squareconnect/apis/refund_api.py index 2e98792..32bbf68 100644 --- a/squareconnect/apis/refund_api.py +++ b/squareconnect/apis/refund_api.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -140,7 +140,7 @@ def create_refund(self, authorization, location_id, transaction_id, body, **kwar response_type='CreateRefundResponse', auth_settings=auth_settings, callback=params.get('callback')) - + def list_refunds(self, authorization, location_id, **kwargs): """ @@ -236,4 +236,4 @@ def list_refunds(self, authorization, location_id, **kwargs): response_type='ListRefundsResponse', auth_settings=auth_settings, callback=params.get('callback')) - + diff --git a/squareconnect/apis/transaction_api.py b/squareconnect/apis/transaction_api.py index afad493..9392998 100644 --- a/squareconnect/apis/transaction_api.py +++ b/squareconnect/apis/transaction_api.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -134,7 +134,7 @@ def capture_transaction(self, authorization, location_id, transaction_id, **kwar response_type='CaptureTransactionResponse', auth_settings=auth_settings, callback=params.get('callback')) - + def charge(self, authorization, location_id, body, **kwargs): """ @@ -224,7 +224,7 @@ def charge(self, authorization, location_id, body, **kwargs): response_type='ChargeResponse', auth_settings=auth_settings, callback=params.get('callback')) - + def list_transactions(self, authorization, location_id, **kwargs): """ @@ -320,7 +320,7 @@ def list_transactions(self, authorization, location_id, **kwargs): response_type='ListTransactionsResponse', auth_settings=auth_settings, callback=params.get('callback')) - + def retrieve_transaction(self, authorization, location_id, transaction_id, **kwargs): """ @@ -410,7 +410,7 @@ def retrieve_transaction(self, authorization, location_id, transaction_id, **kwa response_type='RetrieveTransactionResponse', auth_settings=auth_settings, callback=params.get('callback')) - + def void_transaction(self, authorization, location_id, transaction_id, **kwargs): """ @@ -500,4 +500,4 @@ def void_transaction(self, authorization, location_id, transaction_id, **kwargs) response_type='VoidTransactionResponse', auth_settings=auth_settings, callback=params.get('callback')) - + diff --git a/squareconnect/configuration.py b/squareconnect/configuration.py index 7b16a21..edaaa8a 100644 --- a/squareconnect/configuration.py +++ b/squareconnect/configuration.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -226,5 +226,5 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 2.0\n"\ - "SDK Package Version: 1.0.0".\ + "SDK Package Version: 2.0.2".\ format(env=sys.platform, pyversion=sys.version) diff --git a/squareconnect/models/address.py b/squareconnect/models/address.py index 0ea6ba3..63d9f6c 100644 --- a/squareconnect/models/address.py +++ b/squareconnect/models/address.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -361,12 +361,6 @@ def country(self, country): :param country: The country of this Address. :type: str """ - allowed_values = ["ZZ", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"] - if country not in allowed_values: - raise ValueError( - "Invalid value for `country` ({0}), must be one of {1}" - .format(country, allowed_values) - ) self._country = country diff --git a/squareconnect/models/capture_transaction_request.py b/squareconnect/models/capture_transaction_request.py index a59e1dd..4013ea1 100644 --- a/squareconnect/models/capture_transaction_request.py +++ b/squareconnect/models/capture_transaction_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/capture_transaction_response.py b/squareconnect/models/capture_transaction_response.py index e0efe36..748433c 100644 --- a/squareconnect/models/capture_transaction_response.py +++ b/squareconnect/models/capture_transaction_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/card.py b/squareconnect/models/card.py index 98a0411..6432f48 100644 --- a/squareconnect/models/card.py +++ b/squareconnect/models/card.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -107,12 +107,6 @@ def card_brand(self, card_brand): :param card_brand: The card_brand of this Card. :type: str """ - allowed_values = ["OTHER_BRAND", "VISA", "MASTERCARD", "AMERICAN_EXPRESS", "DISCOVER", "DISCOVER_DINERS", "JCB", "CHINA_UNIONPAY", "SQUARE_GIFT_CARD"] - if card_brand not in allowed_values: - raise ValueError( - "Invalid value for `card_brand` ({0}), must be one of {1}" - .format(card_brand, allowed_values) - ) self._card_brand = card_brand diff --git a/squareconnect/models/card_brand.py b/squareconnect/models/card_brand.py index d73d3e6..af07a43 100644 --- a/squareconnect/models/card_brand.py +++ b/squareconnect/models/card_brand.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/charge_request.py b/squareconnect/models/charge_request.py index dc98ae2..6595cef 100644 --- a/squareconnect/models/charge_request.py +++ b/squareconnect/models/charge_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/charge_response.py b/squareconnect/models/charge_response.py index 8500f42..c8c5fb5 100644 --- a/squareconnect/models/charge_response.py +++ b/squareconnect/models/charge_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/checkout.py b/squareconnect/models/checkout.py index 4b2d256..8bfb6a9 100644 --- a/squareconnect/models/checkout.py +++ b/squareconnect/models/checkout.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/country.py b/squareconnect/models/country.py index 2dde10c..1fd1e08 100644 --- a/squareconnect/models/country.py +++ b/squareconnect/models/country.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/create_checkout_request.py b/squareconnect/models/create_checkout_request.py index 1683a2e..9afca94 100644 --- a/squareconnect/models/create_checkout_request.py +++ b/squareconnect/models/create_checkout_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/create_checkout_response.py b/squareconnect/models/create_checkout_response.py index 4de6e58..3c3d69e 100644 --- a/squareconnect/models/create_checkout_response.py +++ b/squareconnect/models/create_checkout_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/create_customer_card_request.py b/squareconnect/models/create_customer_card_request.py index 2ba8b8d..279dd07 100644 --- a/squareconnect/models/create_customer_card_request.py +++ b/squareconnect/models/create_customer_card_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/create_customer_card_response.py b/squareconnect/models/create_customer_card_response.py index acffa27..311ae77 100644 --- a/squareconnect/models/create_customer_card_response.py +++ b/squareconnect/models/create_customer_card_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/create_customer_request.py b/squareconnect/models/create_customer_request.py index c95921d..c9a4d4e 100644 --- a/squareconnect/models/create_customer_request.py +++ b/squareconnect/models/create_customer_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/create_customer_response.py b/squareconnect/models/create_customer_response.py index 5e2ae36..427e778 100644 --- a/squareconnect/models/create_customer_response.py +++ b/squareconnect/models/create_customer_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/create_order_request.py b/squareconnect/models/create_order_request.py index c723f02..2ec5e6f 100644 --- a/squareconnect/models/create_order_request.py +++ b/squareconnect/models/create_order_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/create_order_request_line_item.py b/squareconnect/models/create_order_request_line_item.py index 0829d01..124eb5b 100644 --- a/squareconnect/models/create_order_request_line_item.py +++ b/squareconnect/models/create_order_request_line_item.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/create_order_request_order.py b/squareconnect/models/create_order_request_order.py index d379bcc..366a449 100644 --- a/squareconnect/models/create_order_request_order.py +++ b/squareconnect/models/create_order_request_order.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/create_refund_request.py b/squareconnect/models/create_refund_request.py index 0fd64c3..8e30f67 100644 --- a/squareconnect/models/create_refund_request.py +++ b/squareconnect/models/create_refund_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/create_refund_response.py b/squareconnect/models/create_refund_response.py index 56d7603..e1d667e 100644 --- a/squareconnect/models/create_refund_response.py +++ b/squareconnect/models/create_refund_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/currency.py b/squareconnect/models/currency.py index 4ce7e4c..ef80324 100644 --- a/squareconnect/models/currency.py +++ b/squareconnect/models/currency.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/customer.py b/squareconnect/models/customer.py index afd5a85..147a151 100644 --- a/squareconnect/models/customer.py +++ b/squareconnect/models/customer.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/customer_group_info.py b/squareconnect/models/customer_group_info.py index 1073fb0..8210bb0 100644 --- a/squareconnect/models/customer_group_info.py +++ b/squareconnect/models/customer_group_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/customer_preferences.py b/squareconnect/models/customer_preferences.py index 91344f1..68cddf2 100644 --- a/squareconnect/models/customer_preferences.py +++ b/squareconnect/models/customer_preferences.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/delete_customer_card_request.py b/squareconnect/models/delete_customer_card_request.py index ff6dfa8..f07f89f 100644 --- a/squareconnect/models/delete_customer_card_request.py +++ b/squareconnect/models/delete_customer_card_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/delete_customer_card_response.py b/squareconnect/models/delete_customer_card_response.py index 9e862a4..426da62 100644 --- a/squareconnect/models/delete_customer_card_response.py +++ b/squareconnect/models/delete_customer_card_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/delete_customer_request.py b/squareconnect/models/delete_customer_request.py index 875c0d6..65352c1 100644 --- a/squareconnect/models/delete_customer_request.py +++ b/squareconnect/models/delete_customer_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/delete_customer_response.py b/squareconnect/models/delete_customer_response.py index 8ce1269..d22b343 100644 --- a/squareconnect/models/delete_customer_response.py +++ b/squareconnect/models/delete_customer_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/error.py b/squareconnect/models/error.py index 497a7e4..23ee9b4 100644 --- a/squareconnect/models/error.py +++ b/squareconnect/models/error.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -75,12 +75,6 @@ def category(self, category): :param category: The category of this Error. :type: str """ - allowed_values = ["API_ERROR", "AUTHENTICATION_ERROR", "INVALID_REQUEST_ERROR", "RATE_LIMIT_ERROR", "PAYMENT_METHOD_ERROR", "REFUND_ERROR"] - if category not in allowed_values: - raise ValueError( - "Invalid value for `category` ({0}), must be one of {1}" - .format(category, allowed_values) - ) self._category = category @@ -104,12 +98,6 @@ def code(self, code): :param code: The code of this Error. :type: str """ - allowed_values = ["INTERNAL_SERVER_ERROR", "UNAUTHORIZED", "ACCESS_TOKEN_EXPIRED", "ACCESS_TOKEN_REVOKED", "FORBIDDEN", "INSUFFICIENT_SCOPES", "APPLICATION_DISABLED", "V1_APPLICATION", "V1_ACCESS_TOKEN", "CARD_PROCESSING_NOT_ENABLED", "BAD_REQUEST", "MISSING_REQUIRED_PARAMETER", "INCORRECT_TYPE", "INVALID_TIME", "INVALID_TIME_RANGE", "INVALID_VALUE", "INVALID_CURSOR", "UNKNOWN_QUERY_PARAMETER", "CONFLICTING_PARAMETERS", "EXPECTED_JSON_BODY", "INVALID_SORT_ORDER", "VALUE_REGEX_MISMATCH", "VALUE_TOO_SHORT", "VALUE_TOO_LONG", "VALUE_TOO_LOW", "VALUE_TOO_HIGH", "VALUE_EMPTY", "ARRAY_EMPTY", "EXPECTED_BOOLEAN", "EXPECTED_INTEGER", "EXPECTED_FLOAT", "EXPECTED_STRING", "EXPECTED_OBJECT", "EXPECTED_ARRAY", "EXPECTED_BASE64_ENCODED_BYTE_ARRAY", "INVALID_ARRAY_VALUE", "INVALID_ENUM_VALUE", "INVALID_CONTENT_TYPE", "INVALID_FORM_VALUE", "ONE_INSTRUMENT_EXPECTED", "NO_FIELDS_SET", "CARD_EXPIRED", "INVALID_EXPIRATION", "INVALID_EXPIRATION_YEAR", "INVALID_EXPIRATION_DATE", "UNSUPPORTED_CARD_BRAND", "INVALID_CARD", "DELAYED_TRANSACTION_EXPIRED", "DELAYED_TRANSACTION_CANCELED", "DELAYED_TRANSACTION_CAPTURED", "DELAYED_TRANSACTION_FAILED", "CARD_TOKEN_EXPIRED", "CARD_TOKEN_USED", "AMOUNT_TOO_HIGH", "UNSUPPORTED_INSTRUMENT_TYPE", "REFUND_AMOUNT_INVALID", "REFUND_ALREADY_PENDING", "PAYMENT_NOT_REFUNDABLE", "INVALID_CARD_DATA", "IDEMPOTENCY_KEY_REUSED", "CARD_DECLINED", "VERIFY_CVV_FAILURE", "VERIFY_AVS_FAILURE", "CARD_DECLINED_CALL_ISSUER", "NOT_FOUND", "REQUEST_TIMEOUT", "CONFLICT", "REQUEST_ENTITY_TOO_LARGE", "UNSUPPORTED_MEDIA_TYPE", "RATE_LIMITED", "NOT_IMPLEMENTED", "SERVICE_UNAVAILABLE"] - if code not in allowed_values: - raise ValueError( - "Invalid value for `code` ({0}), must be one of {1}" - .format(code, allowed_values) - ) self._code = code diff --git a/squareconnect/models/error_category.py b/squareconnect/models/error_category.py index c84851c..e63eeae 100644 --- a/squareconnect/models/error_category.py +++ b/squareconnect/models/error_category.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/error_code.py b/squareconnect/models/error_code.py index 6791b72..4915a50 100644 --- a/squareconnect/models/error_code.py +++ b/squareconnect/models/error_code.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/list_customers_request.py b/squareconnect/models/list_customers_request.py index e162a43..c5b5bed 100644 --- a/squareconnect/models/list_customers_request.py +++ b/squareconnect/models/list_customers_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/list_customers_response.py b/squareconnect/models/list_customers_response.py index 50ffe2d..2110f9c 100644 --- a/squareconnect/models/list_customers_response.py +++ b/squareconnect/models/list_customers_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/list_locations_request.py b/squareconnect/models/list_locations_request.py index c331822..bcc9e65 100644 --- a/squareconnect/models/list_locations_request.py +++ b/squareconnect/models/list_locations_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/list_locations_response.py b/squareconnect/models/list_locations_response.py index 1919aab..1dad44c 100644 --- a/squareconnect/models/list_locations_response.py +++ b/squareconnect/models/list_locations_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/list_refunds_request.py b/squareconnect/models/list_refunds_request.py index 479c3ab..89a1513 100644 --- a/squareconnect/models/list_refunds_request.py +++ b/squareconnect/models/list_refunds_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -121,12 +121,6 @@ def sort_order(self, sort_order): :param sort_order: The sort_order of this ListRefundsRequest. :type: str """ - allowed_values = ["DESC", "ASC"] - if sort_order not in allowed_values: - raise ValueError( - "Invalid value for `sort_order` ({0}), must be one of {1}" - .format(sort_order, allowed_values) - ) self._sort_order = sort_order diff --git a/squareconnect/models/list_refunds_response.py b/squareconnect/models/list_refunds_response.py index 285cc76..32d8c47 100644 --- a/squareconnect/models/list_refunds_response.py +++ b/squareconnect/models/list_refunds_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/list_transactions_request.py b/squareconnect/models/list_transactions_request.py index c3a88fd..556fde0 100644 --- a/squareconnect/models/list_transactions_request.py +++ b/squareconnect/models/list_transactions_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -121,12 +121,6 @@ def sort_order(self, sort_order): :param sort_order: The sort_order of this ListTransactionsRequest. :type: str """ - allowed_values = ["DESC", "ASC"] - if sort_order not in allowed_values: - raise ValueError( - "Invalid value for `sort_order` ({0}), must be one of {1}" - .format(sort_order, allowed_values) - ) self._sort_order = sort_order diff --git a/squareconnect/models/list_transactions_response.py b/squareconnect/models/list_transactions_response.py index 6a91994..c68b933 100644 --- a/squareconnect/models/list_transactions_response.py +++ b/squareconnect/models/list_transactions_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/location.py b/squareconnect/models/location.py index a68c83f..567b178 100644 --- a/squareconnect/models/location.py +++ b/squareconnect/models/location.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -170,13 +170,6 @@ def capabilities(self, capabilities): :param capabilities: The capabilities of this Location. :type: list[str] """ - allowed_values = ['CREDIT_CARD_PROCESSING'] - for cap in capabilities: - if cap not in allowed_values: - raise ValueError( - "Invalid value for `capabilities` ({0}), must be one of {1}" - .format(cap, allowed_values) - ) self._capabilities = capabilities diff --git a/squareconnect/models/location_capability.py b/squareconnect/models/location_capability.py index 74a9a4a..f1709e5 100644 --- a/squareconnect/models/location_capability.py +++ b/squareconnect/models/location_capability.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/money.py b/squareconnect/models/money.py index b6b853f..3a8f5fd 100644 --- a/squareconnect/models/money.py +++ b/squareconnect/models/money.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -92,12 +92,6 @@ def currency(self, currency): :param currency: The currency of this Money. :type: str """ - allowed_values = ["AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STD", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "USN", "USS", "UYI", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XTS", "XXX", "YER", "ZAR", "ZMK", "ZMW", "BTC"] - if currency not in allowed_values: - raise ValueError( - "Invalid value for `currency` ({0}), must be one of {1}" - .format(currency, allowed_values) - ) self._currency = currency diff --git a/squareconnect/models/order.py b/squareconnect/models/order.py index ac0b625..e98ea5d 100644 --- a/squareconnect/models/order.py +++ b/squareconnect/models/order.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/order_line_item.py b/squareconnect/models/order_line_item.py index 999fa65..b82fecd 100644 --- a/squareconnect/models/order_line_item.py +++ b/squareconnect/models/order_line_item.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/refund.py b/squareconnect/models/refund.py index 967a9c8..b896397 100644 --- a/squareconnect/models/refund.py +++ b/squareconnect/models/refund.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -251,12 +251,6 @@ def status(self, status): :param status: The status of this Refund. :type: str """ - allowed_values = ["PENDING", "APPROVED", "REJECTED", "FAILED"] - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" - .format(status, allowed_values) - ) self._status = status diff --git a/squareconnect/models/refund_status.py b/squareconnect/models/refund_status.py index debf8f5..16991ba 100644 --- a/squareconnect/models/refund_status.py +++ b/squareconnect/models/refund_status.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/retrieve_customer_request.py b/squareconnect/models/retrieve_customer_request.py index dda9666..e508636 100644 --- a/squareconnect/models/retrieve_customer_request.py +++ b/squareconnect/models/retrieve_customer_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/retrieve_customer_response.py b/squareconnect/models/retrieve_customer_response.py index c49ed44..a5ef4dd 100644 --- a/squareconnect/models/retrieve_customer_response.py +++ b/squareconnect/models/retrieve_customer_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/retrieve_transaction_request.py b/squareconnect/models/retrieve_transaction_request.py index e82362b..ead202e 100644 --- a/squareconnect/models/retrieve_transaction_request.py +++ b/squareconnect/models/retrieve_transaction_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/retrieve_transaction_response.py b/squareconnect/models/retrieve_transaction_response.py index 3002c96..7cda2c5 100644 --- a/squareconnect/models/retrieve_transaction_response.py +++ b/squareconnect/models/retrieve_transaction_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/sort_order.py b/squareconnect/models/sort_order.py index fff6835..53afe13 100644 --- a/squareconnect/models/sort_order.py +++ b/squareconnect/models/sort_order.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/tender.py b/squareconnect/models/tender.py index 335db13..13d1505 100644 --- a/squareconnect/models/tender.py +++ b/squareconnect/models/tender.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -280,12 +280,6 @@ def type(self, type): :param type: The type of this Tender. :type: str """ - allowed_values = ["CARD", "CASH", "THIRD_PARTY_CARD", "SQUARE_GIFT_CARD", "NO_SALE", "OTHER"] - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" - .format(type, allowed_values) - ) self._type = type diff --git a/squareconnect/models/tender_card_details.py b/squareconnect/models/tender_card_details.py index bec649b..15ba38f 100644 --- a/squareconnect/models/tender_card_details.py +++ b/squareconnect/models/tender_card_details.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -72,12 +72,6 @@ def status(self, status): :param status: The status of this TenderCardDetails. :type: str """ - allowed_values = ["AUTHORIZED", "CAPTURED", "VOIDED", "FAILED"] - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" - .format(status, allowed_values) - ) self._status = status @@ -124,12 +118,6 @@ def entry_method(self, entry_method): :param entry_method: The entry_method of this TenderCardDetails. :type: str """ - allowed_values = ["SWIPED", "KEYED", "EMV", "ON_FILE", "CONTACTLESS"] - if entry_method not in allowed_values: - raise ValueError( - "Invalid value for `entry_method` ({0}), must be one of {1}" - .format(entry_method, allowed_values) - ) self._entry_method = entry_method diff --git a/squareconnect/models/tender_card_details_entry_method.py b/squareconnect/models/tender_card_details_entry_method.py index f2bc8d6..f78faae 100644 --- a/squareconnect/models/tender_card_details_entry_method.py +++ b/squareconnect/models/tender_card_details_entry_method.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/tender_card_details_status.py b/squareconnect/models/tender_card_details_status.py index 7b8764a..c980de6 100644 --- a/squareconnect/models/tender_card_details_status.py +++ b/squareconnect/models/tender_card_details_status.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/tender_cash_details.py b/squareconnect/models/tender_cash_details.py index b9def0a..3c979cb 100644 --- a/squareconnect/models/tender_cash_details.py +++ b/squareconnect/models/tender_cash_details.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/tender_type.py b/squareconnect/models/tender_type.py index d0ce7e3..5b2443f 100644 --- a/squareconnect/models/tender_type.py +++ b/squareconnect/models/tender_type.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/transaction.py b/squareconnect/models/transaction.py index 187b48d..e701261 100644 --- a/squareconnect/models/transaction.py +++ b/squareconnect/models/transaction.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -231,12 +231,6 @@ def product(self, product): :param product: The product of this Transaction. :type: str """ - allowed_values = ["REGISTER", "EXTERNAL_API", "BILLING", "APPOINTMENTS", "INVOICES", "ONLINE_STORE", "PAYROLL", "OTHER"] - if product not in allowed_values: - raise ValueError( - "Invalid value for `product` ({0}), must be one of {1}" - .format(product, allowed_values) - ) self._product = product diff --git a/squareconnect/models/transaction_product.py b/squareconnect/models/transaction_product.py index d1eadf6..5472826 100644 --- a/squareconnect/models/transaction_product.py +++ b/squareconnect/models/transaction_product.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/update_customer_request.py b/squareconnect/models/update_customer_request.py index 6ec547f..e3a1698 100644 --- a/squareconnect/models/update_customer_request.py +++ b/squareconnect/models/update_customer_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/update_customer_response.py b/squareconnect/models/update_customer_response.py index 53b4f99..38659f2 100644 --- a/squareconnect/models/update_customer_response.py +++ b/squareconnect/models/update_customer_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/models/void_transaction_request.py b/squareconnect/models/void_transaction_request.py index ff653d4..c0be55b 100644 --- a/squareconnect/models/void_transaction_request.py +++ b/squareconnect/models/void_transaction_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ def __init__(self): and the value is json key in definition. """ self.swagger_types = { - + } self.attribute_map = { - + } def to_dict(self): diff --git a/squareconnect/models/void_transaction_response.py b/squareconnect/models/void_transaction_response.py index 562cdd7..32ddb25 100644 --- a/squareconnect/models/void_transaction_response.py +++ b/squareconnect/models/void_transaction_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/squareconnect/rest.py b/squareconnect/rest.py index 5774b78..02cbe45 100644 --- a/squareconnect/rest.py +++ b/squareconnect/rest.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2016 Square, Inc. +Copyright 2017 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -52,7 +52,7 @@ def __init__(self, resp, method): self.urllib3_response = resp self.status = resp.status self.reason = resp.reason - # In Square Connect v2 API, + # In Square Connect v2 API, # GET ListCustomers/ListLocations/ListTransaction/ListRefunds # may have large response thus calling stream() for chunked-encoding if method in ['GET', 'HEAD']: @@ -62,7 +62,7 @@ def __init__(self, resp, method): # we need to decode it to string. if sys.version_info > (3,): self.data += chunk.decode('utf8') - else: + else: self.data += str(chunk) # as using preload_content=False, we should call release_conn() # to release the http connection back to the connection pool so that @@ -178,7 +178,7 @@ def request(self, method, url, query_params=None, headers=None, fields=query_params, headers=headers, preload_content=False) - + except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..2702246 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_address.py b/test/test_address.py new file mode 100644 index 0000000..eeeed22 --- /dev/null +++ b/test/test_address.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.address import Address + + +class TestAddress(unittest.TestCase): + """ Address unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAddress(self): + """ + Test Address + """ + model = squareconnect.models.address.Address() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_capture_transaction_request.py b/test/test_capture_transaction_request.py new file mode 100644 index 0000000..c1246af --- /dev/null +++ b/test/test_capture_transaction_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.capture_transaction_request import CaptureTransactionRequest + + +class TestCaptureTransactionRequest(unittest.TestCase): + """ CaptureTransactionRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCaptureTransactionRequest(self): + """ + Test CaptureTransactionRequest + """ + model = squareconnect.models.capture_transaction_request.CaptureTransactionRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_capture_transaction_response.py b/test/test_capture_transaction_response.py new file mode 100644 index 0000000..a940cd8 --- /dev/null +++ b/test/test_capture_transaction_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.capture_transaction_response import CaptureTransactionResponse + + +class TestCaptureTransactionResponse(unittest.TestCase): + """ CaptureTransactionResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCaptureTransactionResponse(self): + """ + Test CaptureTransactionResponse + """ + model = squareconnect.models.capture_transaction_response.CaptureTransactionResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_card.py b/test/test_card.py new file mode 100644 index 0000000..09abed3 --- /dev/null +++ b/test/test_card.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.card import Card + + +class TestCard(unittest.TestCase): + """ Card unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCard(self): + """ + Test Card + """ + model = squareconnect.models.card.Card() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_card_brand.py b/test/test_card_brand.py new file mode 100644 index 0000000..d9058b7 --- /dev/null +++ b/test/test_card_brand.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.card_brand import CardBrand + + +class TestCardBrand(unittest.TestCase): + """ CardBrand unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCardBrand(self): + """ + Test CardBrand + """ + model = squareconnect.models.card_brand.CardBrand() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_charge_request.py b/test/test_charge_request.py new file mode 100644 index 0000000..07d8dbd --- /dev/null +++ b/test/test_charge_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.charge_request import ChargeRequest + + +class TestChargeRequest(unittest.TestCase): + """ ChargeRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testChargeRequest(self): + """ + Test ChargeRequest + """ + model = squareconnect.models.charge_request.ChargeRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_charge_response.py b/test/test_charge_response.py new file mode 100644 index 0000000..d990fb9 --- /dev/null +++ b/test/test_charge_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.charge_response import ChargeResponse + + +class TestChargeResponse(unittest.TestCase): + """ ChargeResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testChargeResponse(self): + """ + Test ChargeResponse + """ + model = squareconnect.models.charge_response.ChargeResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_checkout.py b/test/test_checkout.py new file mode 100644 index 0000000..e0ef8cf --- /dev/null +++ b/test/test_checkout.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.checkout import Checkout + + +class TestCheckout(unittest.TestCase): + """ Checkout unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCheckout(self): + """ + Test Checkout + """ + model = squareconnect.models.checkout.Checkout() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_checkout_api.py b/test/test_checkout_api.py new file mode 100644 index 0000000..11b518b --- /dev/null +++ b/test/test_checkout_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.apis.checkout_api import CheckoutApi + + +class TestCheckoutApi(unittest.TestCase): + """ CheckoutApi unit test stubs """ + + def setUp(self): + self.api = squareconnect.apis.checkout_api.CheckoutApi() + + def tearDown(self): + pass + + def test_create_checkout(self): + print ("Start test case for create_checkout") + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_country.py b/test/test_country.py new file mode 100644 index 0000000..244c880 --- /dev/null +++ b/test/test_country.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.country import Country + + +class TestCountry(unittest.TestCase): + """ Country unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCountry(self): + """ + Test Country + """ + model = squareconnect.models.country.Country() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_checkout_request.py b/test/test_create_checkout_request.py new file mode 100644 index 0000000..5ec9a56 --- /dev/null +++ b/test/test_create_checkout_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.create_checkout_request import CreateCheckoutRequest + + +class TestCreateCheckoutRequest(unittest.TestCase): + """ CreateCheckoutRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateCheckoutRequest(self): + """ + Test CreateCheckoutRequest + """ + model = squareconnect.models.create_checkout_request.CreateCheckoutRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_checkout_response.py b/test/test_create_checkout_response.py new file mode 100644 index 0000000..991f79f --- /dev/null +++ b/test/test_create_checkout_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.create_checkout_response import CreateCheckoutResponse + + +class TestCreateCheckoutResponse(unittest.TestCase): + """ CreateCheckoutResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateCheckoutResponse(self): + """ + Test CreateCheckoutResponse + """ + model = squareconnect.models.create_checkout_response.CreateCheckoutResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_customer_card_request.py b/test/test_create_customer_card_request.py new file mode 100644 index 0000000..1b616b0 --- /dev/null +++ b/test/test_create_customer_card_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.create_customer_card_request import CreateCustomerCardRequest + + +class TestCreateCustomerCardRequest(unittest.TestCase): + """ CreateCustomerCardRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateCustomerCardRequest(self): + """ + Test CreateCustomerCardRequest + """ + model = squareconnect.models.create_customer_card_request.CreateCustomerCardRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_customer_card_response.py b/test/test_create_customer_card_response.py new file mode 100644 index 0000000..bc93810 --- /dev/null +++ b/test/test_create_customer_card_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.create_customer_card_response import CreateCustomerCardResponse + + +class TestCreateCustomerCardResponse(unittest.TestCase): + """ CreateCustomerCardResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateCustomerCardResponse(self): + """ + Test CreateCustomerCardResponse + """ + model = squareconnect.models.create_customer_card_response.CreateCustomerCardResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_customer_request.py b/test/test_create_customer_request.py new file mode 100644 index 0000000..6588287 --- /dev/null +++ b/test/test_create_customer_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.create_customer_request import CreateCustomerRequest + + +class TestCreateCustomerRequest(unittest.TestCase): + """ CreateCustomerRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateCustomerRequest(self): + """ + Test CreateCustomerRequest + """ + model = squareconnect.models.create_customer_request.CreateCustomerRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_customer_response.py b/test/test_create_customer_response.py new file mode 100644 index 0000000..0ac83bf --- /dev/null +++ b/test/test_create_customer_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.create_customer_response import CreateCustomerResponse + + +class TestCreateCustomerResponse(unittest.TestCase): + """ CreateCustomerResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateCustomerResponse(self): + """ + Test CreateCustomerResponse + """ + model = squareconnect.models.create_customer_response.CreateCustomerResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_order_request.py b/test/test_create_order_request.py new file mode 100644 index 0000000..8b87a69 --- /dev/null +++ b/test/test_create_order_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.create_order_request import CreateOrderRequest + + +class TestCreateOrderRequest(unittest.TestCase): + """ CreateOrderRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateOrderRequest(self): + """ + Test CreateOrderRequest + """ + model = squareconnect.models.create_order_request.CreateOrderRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_order_request_line_item.py b/test/test_create_order_request_line_item.py new file mode 100644 index 0000000..f4b68fe --- /dev/null +++ b/test/test_create_order_request_line_item.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.create_order_request_line_item import CreateOrderRequestLineItem + + +class TestCreateOrderRequestLineItem(unittest.TestCase): + """ CreateOrderRequestLineItem unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateOrderRequestLineItem(self): + """ + Test CreateOrderRequestLineItem + """ + model = squareconnect.models.create_order_request_line_item.CreateOrderRequestLineItem() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_order_request_order.py b/test/test_create_order_request_order.py new file mode 100644 index 0000000..3c02630 --- /dev/null +++ b/test/test_create_order_request_order.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.create_order_request_order import CreateOrderRequestOrder + + +class TestCreateOrderRequestOrder(unittest.TestCase): + """ CreateOrderRequestOrder unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateOrderRequestOrder(self): + """ + Test CreateOrderRequestOrder + """ + model = squareconnect.models.create_order_request_order.CreateOrderRequestOrder() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_refund_request.py b/test/test_create_refund_request.py new file mode 100644 index 0000000..3fbf1e9 --- /dev/null +++ b/test/test_create_refund_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.create_refund_request import CreateRefundRequest + + +class TestCreateRefundRequest(unittest.TestCase): + """ CreateRefundRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateRefundRequest(self): + """ + Test CreateRefundRequest + """ + model = squareconnect.models.create_refund_request.CreateRefundRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_refund_response.py b/test/test_create_refund_response.py new file mode 100644 index 0000000..1e4016f --- /dev/null +++ b/test/test_create_refund_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.create_refund_response import CreateRefundResponse + + +class TestCreateRefundResponse(unittest.TestCase): + """ CreateRefundResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateRefundResponse(self): + """ + Test CreateRefundResponse + """ + model = squareconnect.models.create_refund_response.CreateRefundResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_currency.py b/test/test_currency.py new file mode 100644 index 0000000..9886327 --- /dev/null +++ b/test/test_currency.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.currency import Currency + + +class TestCurrency(unittest.TestCase): + """ Currency unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCurrency(self): + """ + Test Currency + """ + model = squareconnect.models.currency.Currency() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_customer.py b/test/test_customer.py new file mode 100644 index 0000000..65e0e70 --- /dev/null +++ b/test/test_customer.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.customer import Customer + + +class TestCustomer(unittest.TestCase): + """ Customer unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCustomer(self): + """ + Test Customer + """ + model = squareconnect.models.customer.Customer() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_customer_api.py b/test/test_customer_api.py new file mode 100644 index 0000000..f4e2e38 --- /dev/null +++ b/test/test_customer_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.apis.customer_api import CustomerApi + + +class TestCustomerApi(unittest.TestCase): + """ CustomerApi unit test stubs """ + + def setUp(self): + self.api = squareconnect.apis.customer_api.CustomerApi() + + def tearDown(self): + pass + + def test_create_customer(self): + print ("Start test case for create_customer") + pass + + def test_delete_customer(self): + print ("Start test case for delete_customer") + pass + + def test_list_customers(self): + print ("Start test case for list_customers") + pass + + def test_retrieve_customer(self): + print ("Start test case for retrieve_customer") + pass + + def test_update_customer(self): + print ("Start test case for update_customer") + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_customer_card_api.py b/test/test_customer_card_api.py new file mode 100644 index 0000000..79f5d2c --- /dev/null +++ b/test/test_customer_card_api.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.apis.customer_card_api import CustomerCardApi + + +class TestCustomerCardApi(unittest.TestCase): + """ CustomerCardApi unit test stubs """ + + def setUp(self): + self.api = squareconnect.apis.customer_card_api.CustomerCardApi() + + def tearDown(self): + pass + + def test_create_customer_card(self): + print ("Start test case for create_customer_card") + pass + + def test_delete_customer_card(self): + print ("Start test case for delete_customer_card") + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_customer_group_info.py b/test/test_customer_group_info.py new file mode 100644 index 0000000..37981e4 --- /dev/null +++ b/test/test_customer_group_info.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.customer_group_info import CustomerGroupInfo + + +class TestCustomerGroupInfo(unittest.TestCase): + """ CustomerGroupInfo unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCustomerGroupInfo(self): + """ + Test CustomerGroupInfo + """ + model = squareconnect.models.customer_group_info.CustomerGroupInfo() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_customer_preferences.py b/test/test_customer_preferences.py new file mode 100644 index 0000000..42ac151 --- /dev/null +++ b/test/test_customer_preferences.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.customer_preferences import CustomerPreferences + + +class TestCustomerPreferences(unittest.TestCase): + """ CustomerPreferences unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCustomerPreferences(self): + """ + Test CustomerPreferences + """ + model = squareconnect.models.customer_preferences.CustomerPreferences() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_customer_card_request.py b/test/test_delete_customer_card_request.py new file mode 100644 index 0000000..31f9fc4 --- /dev/null +++ b/test/test_delete_customer_card_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.delete_customer_card_request import DeleteCustomerCardRequest + + +class TestDeleteCustomerCardRequest(unittest.TestCase): + """ DeleteCustomerCardRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeleteCustomerCardRequest(self): + """ + Test DeleteCustomerCardRequest + """ + model = squareconnect.models.delete_customer_card_request.DeleteCustomerCardRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_customer_card_response.py b/test/test_delete_customer_card_response.py new file mode 100644 index 0000000..7f9f8c5 --- /dev/null +++ b/test/test_delete_customer_card_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.delete_customer_card_response import DeleteCustomerCardResponse + + +class TestDeleteCustomerCardResponse(unittest.TestCase): + """ DeleteCustomerCardResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeleteCustomerCardResponse(self): + """ + Test DeleteCustomerCardResponse + """ + model = squareconnect.models.delete_customer_card_response.DeleteCustomerCardResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_customer_request.py b/test/test_delete_customer_request.py new file mode 100644 index 0000000..2447ece --- /dev/null +++ b/test/test_delete_customer_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.delete_customer_request import DeleteCustomerRequest + + +class TestDeleteCustomerRequest(unittest.TestCase): + """ DeleteCustomerRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeleteCustomerRequest(self): + """ + Test DeleteCustomerRequest + """ + model = squareconnect.models.delete_customer_request.DeleteCustomerRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_customer_response.py b/test/test_delete_customer_response.py new file mode 100644 index 0000000..75566ce --- /dev/null +++ b/test/test_delete_customer_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.delete_customer_response import DeleteCustomerResponse + + +class TestDeleteCustomerResponse(unittest.TestCase): + """ DeleteCustomerResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeleteCustomerResponse(self): + """ + Test DeleteCustomerResponse + """ + model = squareconnect.models.delete_customer_response.DeleteCustomerResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_error.py b/test/test_error.py new file mode 100644 index 0000000..7c4bd76 --- /dev/null +++ b/test/test_error.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.error import Error + + +class TestError(unittest.TestCase): + """ Error unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testError(self): + """ + Test Error + """ + model = squareconnect.models.error.Error() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_error_category.py b/test/test_error_category.py new file mode 100644 index 0000000..586cb1b --- /dev/null +++ b/test/test_error_category.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.error_category import ErrorCategory + + +class TestErrorCategory(unittest.TestCase): + """ ErrorCategory unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testErrorCategory(self): + """ + Test ErrorCategory + """ + model = squareconnect.models.error_category.ErrorCategory() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_error_code.py b/test/test_error_code.py new file mode 100644 index 0000000..717f579 --- /dev/null +++ b/test/test_error_code.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.error_code import ErrorCode + + +class TestErrorCode(unittest.TestCase): + """ ErrorCode unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testErrorCode(self): + """ + Test ErrorCode + """ + model = squareconnect.models.error_code.ErrorCode() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_customers_request.py b/test/test_list_customers_request.py new file mode 100644 index 0000000..9c4a315 --- /dev/null +++ b/test/test_list_customers_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.list_customers_request import ListCustomersRequest + + +class TestListCustomersRequest(unittest.TestCase): + """ ListCustomersRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testListCustomersRequest(self): + """ + Test ListCustomersRequest + """ + model = squareconnect.models.list_customers_request.ListCustomersRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_customers_response.py b/test/test_list_customers_response.py new file mode 100644 index 0000000..a3fcb02 --- /dev/null +++ b/test/test_list_customers_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.list_customers_response import ListCustomersResponse + + +class TestListCustomersResponse(unittest.TestCase): + """ ListCustomersResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testListCustomersResponse(self): + """ + Test ListCustomersResponse + """ + model = squareconnect.models.list_customers_response.ListCustomersResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_locations_request.py b/test/test_list_locations_request.py new file mode 100644 index 0000000..5f7ef2b --- /dev/null +++ b/test/test_list_locations_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.list_locations_request import ListLocationsRequest + + +class TestListLocationsRequest(unittest.TestCase): + """ ListLocationsRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testListLocationsRequest(self): + """ + Test ListLocationsRequest + """ + model = squareconnect.models.list_locations_request.ListLocationsRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_locations_response.py b/test/test_list_locations_response.py new file mode 100644 index 0000000..ce496a9 --- /dev/null +++ b/test/test_list_locations_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.list_locations_response import ListLocationsResponse + + +class TestListLocationsResponse(unittest.TestCase): + """ ListLocationsResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testListLocationsResponse(self): + """ + Test ListLocationsResponse + """ + model = squareconnect.models.list_locations_response.ListLocationsResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_refunds_request.py b/test/test_list_refunds_request.py new file mode 100644 index 0000000..7d034a5 --- /dev/null +++ b/test/test_list_refunds_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.list_refunds_request import ListRefundsRequest + + +class TestListRefundsRequest(unittest.TestCase): + """ ListRefundsRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testListRefundsRequest(self): + """ + Test ListRefundsRequest + """ + model = squareconnect.models.list_refunds_request.ListRefundsRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_refunds_response.py b/test/test_list_refunds_response.py new file mode 100644 index 0000000..ba48432 --- /dev/null +++ b/test/test_list_refunds_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.list_refunds_response import ListRefundsResponse + + +class TestListRefundsResponse(unittest.TestCase): + """ ListRefundsResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testListRefundsResponse(self): + """ + Test ListRefundsResponse + """ + model = squareconnect.models.list_refunds_response.ListRefundsResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_transactions_request.py b/test/test_list_transactions_request.py new file mode 100644 index 0000000..9702363 --- /dev/null +++ b/test/test_list_transactions_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.list_transactions_request import ListTransactionsRequest + + +class TestListTransactionsRequest(unittest.TestCase): + """ ListTransactionsRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testListTransactionsRequest(self): + """ + Test ListTransactionsRequest + """ + model = squareconnect.models.list_transactions_request.ListTransactionsRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_transactions_response.py b/test/test_list_transactions_response.py new file mode 100644 index 0000000..47b3398 --- /dev/null +++ b/test/test_list_transactions_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.list_transactions_response import ListTransactionsResponse + + +class TestListTransactionsResponse(unittest.TestCase): + """ ListTransactionsResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testListTransactionsResponse(self): + """ + Test ListTransactionsResponse + """ + model = squareconnect.models.list_transactions_response.ListTransactionsResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_location.py b/test/test_location.py new file mode 100644 index 0000000..5be147e --- /dev/null +++ b/test/test_location.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.location import Location + + +class TestLocation(unittest.TestCase): + """ Location unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLocation(self): + """ + Test Location + """ + model = squareconnect.models.location.Location() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_location_api.py b/test/test_location_api.py new file mode 100644 index 0000000..7f59243 --- /dev/null +++ b/test/test_location_api.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.apis.location_api import LocationApi +from squareconnect.models.location import Location + +from .utils import APITestCase + +class TestLocationApi(APITestCase): + """ LocationApi unit test stubs """ + + def setUp(self): + self.api = squareconnect.apis.location_api.LocationApi() + + def tearDown(self): + pass + + def test_list_locations(self): + print ("Start test case for list_locations") + account = self.accounts['US-Prod-Sandbox'] + access_token = account['access_token'] + result = self.api.list_locations(access_token) + self.assertIsNone(result.errors, "Errors in the result.") + self.assertGreater(len(result.locations), 0, "Empty location list.") + first_location = result.locations[0] + self.assertIsInstance(first_location, Location, "Result instance is not instance of Location.") + self.assertEqual(first_location.id, "CBASEEffqN8pnVNXwoCL0dSGMVAgAQ", "First location id doesn't match.") + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_location_capability.py b/test/test_location_capability.py new file mode 100644 index 0000000..7f30ff3 --- /dev/null +++ b/test/test_location_capability.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.location_capability import LocationCapability + + +class TestLocationCapability(unittest.TestCase): + """ LocationCapability unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLocationCapability(self): + """ + Test LocationCapability + """ + model = squareconnect.models.location_capability.LocationCapability() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_money.py b/test/test_money.py new file mode 100644 index 0000000..3e80113 --- /dev/null +++ b/test/test_money.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.money import Money + + +class TestMoney(unittest.TestCase): + """ Money unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMoney(self): + """ + Test Money + """ + model = squareconnect.models.money.Money() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_order.py b/test/test_order.py new file mode 100644 index 0000000..dbc89a0 --- /dev/null +++ b/test/test_order.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.order import Order + + +class TestOrder(unittest.TestCase): + """ Order unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrder(self): + """ + Test Order + """ + model = squareconnect.models.order.Order() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_order_line_item.py b/test/test_order_line_item.py new file mode 100644 index 0000000..0f2cd01 --- /dev/null +++ b/test/test_order_line_item.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.order_line_item import OrderLineItem + + +class TestOrderLineItem(unittest.TestCase): + """ OrderLineItem unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrderLineItem(self): + """ + Test OrderLineItem + """ + model = squareconnect.models.order_line_item.OrderLineItem() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_refund.py b/test/test_refund.py new file mode 100644 index 0000000..1ca0ea0 --- /dev/null +++ b/test/test_refund.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.refund import Refund + + +class TestRefund(unittest.TestCase): + """ Refund unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRefund(self): + """ + Test Refund + """ + model = squareconnect.models.refund.Refund() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_refund_api.py b/test/test_refund_api.py new file mode 100644 index 0000000..3e4b89c --- /dev/null +++ b/test/test_refund_api.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.apis.refund_api import RefundApi + + +class TestRefundApi(unittest.TestCase): + """ RefundApi unit test stubs """ + + def setUp(self): + self.api = squareconnect.apis.refund_api.RefundApi() + + def tearDown(self): + pass + + def test_create_refund(self): + print ("Start test case for create_refund") + pass + + def test_list_refunds(self): + print ("Start test case for list_refunds") + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_refund_status.py b/test/test_refund_status.py new file mode 100644 index 0000000..fd741e9 --- /dev/null +++ b/test/test_refund_status.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.refund_status import RefundStatus + + +class TestRefundStatus(unittest.TestCase): + """ RefundStatus unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRefundStatus(self): + """ + Test RefundStatus + """ + model = squareconnect.models.refund_status.RefundStatus() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_retrieve_customer_request.py b/test/test_retrieve_customer_request.py new file mode 100644 index 0000000..588a188 --- /dev/null +++ b/test/test_retrieve_customer_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.retrieve_customer_request import RetrieveCustomerRequest + + +class TestRetrieveCustomerRequest(unittest.TestCase): + """ RetrieveCustomerRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRetrieveCustomerRequest(self): + """ + Test RetrieveCustomerRequest + """ + model = squareconnect.models.retrieve_customer_request.RetrieveCustomerRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_retrieve_customer_response.py b/test/test_retrieve_customer_response.py new file mode 100644 index 0000000..62a099b --- /dev/null +++ b/test/test_retrieve_customer_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.retrieve_customer_response import RetrieveCustomerResponse + + +class TestRetrieveCustomerResponse(unittest.TestCase): + """ RetrieveCustomerResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRetrieveCustomerResponse(self): + """ + Test RetrieveCustomerResponse + """ + model = squareconnect.models.retrieve_customer_response.RetrieveCustomerResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_retrieve_transaction_request.py b/test/test_retrieve_transaction_request.py new file mode 100644 index 0000000..a652709 --- /dev/null +++ b/test/test_retrieve_transaction_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.retrieve_transaction_request import RetrieveTransactionRequest + + +class TestRetrieveTransactionRequest(unittest.TestCase): + """ RetrieveTransactionRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRetrieveTransactionRequest(self): + """ + Test RetrieveTransactionRequest + """ + model = squareconnect.models.retrieve_transaction_request.RetrieveTransactionRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_retrieve_transaction_response.py b/test/test_retrieve_transaction_response.py new file mode 100644 index 0000000..9078c21 --- /dev/null +++ b/test/test_retrieve_transaction_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.retrieve_transaction_response import RetrieveTransactionResponse + + +class TestRetrieveTransactionResponse(unittest.TestCase): + """ RetrieveTransactionResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRetrieveTransactionResponse(self): + """ + Test RetrieveTransactionResponse + """ + model = squareconnect.models.retrieve_transaction_response.RetrieveTransactionResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sort_order.py b/test/test_sort_order.py new file mode 100644 index 0000000..f480c78 --- /dev/null +++ b/test/test_sort_order.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.sort_order import SortOrder + + +class TestSortOrder(unittest.TestCase): + """ SortOrder unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSortOrder(self): + """ + Test SortOrder + """ + model = squareconnect.models.sort_order.SortOrder() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tender.py b/test/test_tender.py new file mode 100644 index 0000000..766aa37 --- /dev/null +++ b/test/test_tender.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.tender import Tender + + +class TestTender(unittest.TestCase): + """ Tender unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTender(self): + """ + Test Tender + """ + model = squareconnect.models.tender.Tender() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tender_card_details.py b/test/test_tender_card_details.py new file mode 100644 index 0000000..c728b66 --- /dev/null +++ b/test/test_tender_card_details.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.tender_card_details import TenderCardDetails + + +class TestTenderCardDetails(unittest.TestCase): + """ TenderCardDetails unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTenderCardDetails(self): + """ + Test TenderCardDetails + """ + model = squareconnect.models.tender_card_details.TenderCardDetails() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tender_card_details_entry_method.py b/test/test_tender_card_details_entry_method.py new file mode 100644 index 0000000..19da459 --- /dev/null +++ b/test/test_tender_card_details_entry_method.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.tender_card_details_entry_method import TenderCardDetailsEntryMethod + + +class TestTenderCardDetailsEntryMethod(unittest.TestCase): + """ TenderCardDetailsEntryMethod unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTenderCardDetailsEntryMethod(self): + """ + Test TenderCardDetailsEntryMethod + """ + model = squareconnect.models.tender_card_details_entry_method.TenderCardDetailsEntryMethod() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tender_card_details_status.py b/test/test_tender_card_details_status.py new file mode 100644 index 0000000..8b58121 --- /dev/null +++ b/test/test_tender_card_details_status.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.tender_card_details_status import TenderCardDetailsStatus + + +class TestTenderCardDetailsStatus(unittest.TestCase): + """ TenderCardDetailsStatus unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTenderCardDetailsStatus(self): + """ + Test TenderCardDetailsStatus + """ + model = squareconnect.models.tender_card_details_status.TenderCardDetailsStatus() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tender_cash_details.py b/test/test_tender_cash_details.py new file mode 100644 index 0000000..97a4f89 --- /dev/null +++ b/test/test_tender_cash_details.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.tender_cash_details import TenderCashDetails + + +class TestTenderCashDetails(unittest.TestCase): + """ TenderCashDetails unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTenderCashDetails(self): + """ + Test TenderCashDetails + """ + model = squareconnect.models.tender_cash_details.TenderCashDetails() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tender_type.py b/test/test_tender_type.py new file mode 100644 index 0000000..c80e613 --- /dev/null +++ b/test/test_tender_type.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.tender_type import TenderType + + +class TestTenderType(unittest.TestCase): + """ TenderType unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTenderType(self): + """ + Test TenderType + """ + model = squareconnect.models.tender_type.TenderType() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_transaction.py b/test/test_transaction.py new file mode 100644 index 0000000..f3fe3d5 --- /dev/null +++ b/test/test_transaction.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.transaction import Transaction + + +class TestTransaction(unittest.TestCase): + """ Transaction unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransaction(self): + """ + Test Transaction + """ + model = squareconnect.models.transaction.Transaction() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_transaction_api.py b/test/test_transaction_api.py new file mode 100644 index 0000000..c5f3ab3 --- /dev/null +++ b/test/test_transaction_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.apis.transaction_api import TransactionApi + + +class TestTransactionApi(unittest.TestCase): + """ TransactionApi unit test stubs """ + + def setUp(self): + self.api = squareconnect.apis.transaction_api.TransactionApi() + + def tearDown(self): + pass + + def test_capture_transaction(self): + print ("Start test case for capture_transaction") + pass + + def test_charge(self): + print ("Start test case for charge") + pass + + def test_list_transactions(self): + print ("Start test case for list_transactions") + pass + + def test_retrieve_transaction(self): + print ("Start test case for retrieve_transaction") + pass + + def test_void_transaction(self): + print ("Start test case for void_transaction") + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_transaction_product.py b/test/test_transaction_product.py new file mode 100644 index 0000000..2a732eb --- /dev/null +++ b/test/test_transaction_product.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.transaction_product import TransactionProduct + + +class TestTransactionProduct(unittest.TestCase): + """ TransactionProduct unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionProduct(self): + """ + Test TransactionProduct + """ + model = squareconnect.models.transaction_product.TransactionProduct() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_customer_request.py b/test/test_update_customer_request.py new file mode 100644 index 0000000..aaffa18 --- /dev/null +++ b/test/test_update_customer_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.update_customer_request import UpdateCustomerRequest + + +class TestUpdateCustomerRequest(unittest.TestCase): + """ UpdateCustomerRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateCustomerRequest(self): + """ + Test UpdateCustomerRequest + """ + model = squareconnect.models.update_customer_request.UpdateCustomerRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_customer_response.py b/test/test_update_customer_response.py new file mode 100644 index 0000000..4276489 --- /dev/null +++ b/test/test_update_customer_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.update_customer_response import UpdateCustomerResponse + + +class TestUpdateCustomerResponse(unittest.TestCase): + """ UpdateCustomerResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateCustomerResponse(self): + """ + Test UpdateCustomerResponse + """ + model = squareconnect.models.update_customer_response.UpdateCustomerResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_void_transaction_request.py b/test/test_void_transaction_request.py new file mode 100644 index 0000000..4b8eb0c --- /dev/null +++ b/test/test_void_transaction_request.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.void_transaction_request import VoidTransactionRequest + + +class TestVoidTransactionRequest(unittest.TestCase): + """ VoidTransactionRequest unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testVoidTransactionRequest(self): + """ + Test VoidTransactionRequest + """ + model = squareconnect.models.void_transaction_request.VoidTransactionRequest() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_void_transaction_response.py b/test/test_void_transaction_response.py new file mode 100644 index 0000000..5fd15cb --- /dev/null +++ b/test/test_void_transaction_response.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" +Copyright 2017 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + + +from __future__ import absolute_import + +import os +import sys +import unittest + +import squareconnect +from squareconnect.rest import ApiException +from squareconnect.models.void_transaction_response import VoidTransactionResponse + + +class TestVoidTransactionResponse(unittest.TestCase): + """ VoidTransactionResponse unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testVoidTransactionResponse(self): + """ + Test VoidTransactionResponse + """ + model = squareconnect.models.void_transaction_response.VoidTransactionResponse() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/utils/__init__.py b/test/utils/__init__.py new file mode 100644 index 0000000..29b9c1e --- /dev/null +++ b/test/utils/__init__.py @@ -0,0 +1,3 @@ +from __future__ import absolute_import + +from .api_test_case import APITestCase diff --git a/test/utils/api_test_case.py b/test/utils/api_test_case.py new file mode 100644 index 0000000..24d3014 --- /dev/null +++ b/test/utils/api_test_case.py @@ -0,0 +1,11 @@ +import unittest +import json + +class APITestCase(unittest.TestCase): + accounts = None + + @classmethod + def setUpClass(cls): + with open('./travis-ci/accounts.json') as json_data: + cls.accounts = json.load(json_data) + \ No newline at end of file diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..d99517b --- /dev/null +++ b/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py27, py34 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + nosetests \ + [] \ No newline at end of file diff --git a/travis-ci/accounts.enc b/travis-ci/accounts.enc new file mode 100644 index 0000000..b541193 Binary files /dev/null and b/travis-ci/accounts.enc differ