diff --git a/README.md b/README.md index 47ff7a6..60628c6 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,32 @@ Class | Method | HTTP request - [TransactionProduct](docs/TransactionProduct.md) +## Documentation For Authorization + + +## oauth2 + +- **Type**: OAuth +- **Flow**: accessCode +- **Authorization URL**: `https://connect.squareup.com/oauth2/authorize?` +- **Scopes**: + - **MERCHANT_PROFILE_READ**: GET endpoints related to a merchant's business and location entities. Almost all Connect API applications need this permission in order to obtain a merchant's location IDs + - **PAYMENTS_READ**: GET endpoints related to transactions and refunds + - **PAYMENTS_WRITE**: POST, PUT, and DELETE endpoints related to transactions and refunds. E-commerce applications must request this permission + - **CUSTOMERS_READ**: GET endpoints related to customer management + - **CUSTOMERS_WRITE**: POST, PUT, and DELETE endpoints related to customer management + - **SETTLEMENTS_READ**: GET endpoints related to settlements (deposits) + - **BANK_ACCOUNTS_READ**: GET endpoints related to a merchant's bank accounts + - **ITEMS_READ**: GET endpoints related to a merchant's item library + - **ITEMS_WRITE**: POST, PUT, and DELETE endpoints related to a merchant's item library + - **ORDERS_READ**: GET endpoints related to a merchant's Square online store. + - **ORDERS_WRITE**: POST, PUT, and DELETE endpoints related to a merchant's Square online store + - **EMPLOYEES_READ**: GET endpoints related to employee management + - **EMPLOYEES_WRITE**: POST, PUT, and DELETE endpoints related to employee management + - **TIMECARDS_READ**: GET endpoints related to employee timecards + - **TIMECARDS_WRITE**: POST, PUT, and DELETE endpoints related to employee timecards + + ## Contributing Send bug reports, feature requests, and code contributions to the [API diff --git a/docs/ErrorCode.md b/docs/ErrorCode.md index 368f041..5dea5f1 100644 --- a/docs/ErrorCode.md +++ b/docs/ErrorCode.md @@ -68,6 +68,7 @@ Name | Type **PAYMENT_NOT_REFUNDABLE** | string **INVALID_CARD_DATA** | string **IDEMPOTENCY_KEY_REUSED** | string +**UNEXPECTED_VALUE** | string **CARD_DECLINED** | string **VERIFY_CVV_FAILURE** | string **VERIFY_AVS_FAILURE** | string diff --git a/squareconnect/configuration.py b/squareconnect/configuration.py index edaaa8a..9588560 100644 --- a/squareconnect/configuration.py +++ b/squareconnect/configuration.py @@ -71,6 +71,9 @@ def __init__(self): # Password for HTTP basic authentication self.password = "" + # access token for OAuth + self.access_token = "" + # Logging Settings self.logger = {}