-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from square/release/18.0.0.20220420
Generated PR for Release: 18.0.0.20220420
- Loading branch information
Showing
109 changed files
with
1,549 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
# Payouts | ||
|
||
```python | ||
payouts_api = client.payouts | ||
``` | ||
|
||
## Class Name | ||
|
||
`PayoutsApi` | ||
|
||
## Methods | ||
|
||
* [List Payouts](../../doc/api/payouts.md#list-payouts) | ||
* [Get Payout](../../doc/api/payouts.md#get-payout) | ||
* [List Payout Entries](../../doc/api/payouts.md#list-payout-entries) | ||
|
||
|
||
# List Payouts | ||
|
||
Retrieves a list of all payouts for the default location. | ||
You can filter payouts by location ID, status, time range, and order them in ascending or descending order. | ||
To call this endpoint, set `PAYOUTS_READ` for the OAuth scope. | ||
|
||
```python | ||
def list_payouts(self, | ||
location_id=None, | ||
status=None, | ||
begin_time=None, | ||
end_time=None, | ||
sort_order=None, | ||
cursor=None, | ||
limit=None) | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Tags | Description | | ||
| --- | --- | --- | --- | | ||
| `location_id` | `string` | Query, Optional | The ID of the location for which to list the payouts.<br>By default, payouts are returned for the default (main) location associated with the seller. | | ||
| `status` | [`str (Payout Status)`](../../doc/models/payout-status.md) | Query, Optional | If provided, only payouts with the given status are returned. | | ||
| `begin_time` | `string` | Query, Optional | The timestamp for the beginning of the payout creation time, in RFC 3339 format.<br>Inclusive. Default: The current time minus one year. | | ||
| `end_time` | `string` | Query, Optional | The timestamp for the end of the payout creation time, in RFC 3339 format.<br>Default: The current time. | | ||
| `sort_order` | [`str (Sort Order)`](../../doc/models/sort-order.md) | Query, Optional | The order in which payouts are listed. | | ||
| `cursor` | `string` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for the original query.<br>For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination).<br>If request parameters change between requests, subsequent results may contain duplicates or missing records. | | ||
| `limit` | `int` | Query, Optional | The maximum number of results to be returned in a single page.<br>It is possible to receive fewer results than the specified limit on a given page.<br>The default value of 100 is also the maximum allowed value. If the provided value is<br>greater than 100, it is ignored and the default value is used instead.<br>Default: `100` | | ||
|
||
## Response Type | ||
|
||
[`List Payouts Response`](../../doc/models/list-payouts-response.md) | ||
|
||
## Example Usage | ||
|
||
```python | ||
location_id = 'location_id4' | ||
status = 'PAID' | ||
begin_time = 'begin_time2' | ||
end_time = 'end_time2' | ||
sort_order = 'DESC' | ||
cursor = 'cursor6' | ||
limit = 172 | ||
|
||
result = payouts_api.list_payouts(location_id, status, begin_time, end_time, sort_order, cursor, limit) | ||
|
||
if result.is_success(): | ||
print(result.body) | ||
elif result.is_error(): | ||
print(result.errors) | ||
``` | ||
|
||
|
||
# Get Payout | ||
|
||
Retrieves details of a specific payout identified by a payout ID. | ||
To call this endpoint, set `PAYOUTS_READ` for the OAuth scope. | ||
|
||
```python | ||
def get_payout(self, | ||
payout_id) | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Tags | Description | | ||
| --- | --- | --- | --- | | ||
| `payout_id` | `string` | Template, Required | The ID of the payout to retrieve the information for. | | ||
|
||
## Response Type | ||
|
||
[`Get Payout Response`](../../doc/models/get-payout-response.md) | ||
|
||
## Example Usage | ||
|
||
```python | ||
payout_id = 'payout_id6' | ||
|
||
result = payouts_api.get_payout(payout_id) | ||
|
||
if result.is_success(): | ||
print(result.body) | ||
elif result.is_error(): | ||
print(result.errors) | ||
``` | ||
|
||
|
||
# List Payout Entries | ||
|
||
Retrieves a list of all payout entries for a specific payout. | ||
To call this endpoint, set `PAYOUTS_READ` for the OAuth scope. | ||
|
||
```python | ||
def list_payout_entries(self, | ||
payout_id, | ||
sort_order=None, | ||
cursor=None, | ||
limit=None) | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Tags | Description | | ||
| --- | --- | --- | --- | | ||
| `payout_id` | `string` | Template, Required | The ID of the payout to retrieve the information for. | | ||
| `sort_order` | [`str (Sort Order)`](../../doc/models/sort-order.md) | Query, Optional | The order in which payout entries are listed. | | ||
| `cursor` | `string` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for the original query.<br>For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination).<br>If request parameters change between requests, subsequent results may contain duplicates or missing records. | | ||
| `limit` | `int` | Query, Optional | The maximum number of results to be returned in a single page.<br>It is possible to receive fewer results than the specified limit on a given page.<br>The default value of 100 is also the maximum allowed value. If the provided value is<br>greater than 100, it is ignored and the default value is used instead.<br>Default: `100` | | ||
|
||
## Response Type | ||
|
||
[`List Payout Entries Response`](../../doc/models/list-payout-entries-response.md) | ||
|
||
## Example Usage | ||
|
||
```python | ||
payout_id = 'payout_id6' | ||
sort_order = 'DESC' | ||
cursor = 'cursor6' | ||
limit = 172 | ||
|
||
result = payouts_api.list_payout_entries(payout_id, sort_order, cursor, limit) | ||
|
||
if result.is_success(): | ||
print(result.body) | ||
elif result.is_error(): | ||
print(result.errors) | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
# Activity Type | ||
|
||
## Enumeration | ||
|
||
`Activity Type` | ||
|
||
## Fields | ||
|
||
| Name | Description | | ||
| --- | --- | | ||
| `ADJUSTMENT` | A manual adjustment applied to the seller's account by Square. | | ||
| `APP_FEE_REFUND` | A refund for an application fee on a payment. | | ||
| `APP_FEE_REVENUE` | Revenue generated from an application fee on a payment. | | ||
| `AUTOMATIC_SAVINGS` | An automatic transfer from the payment processing balance to the Square Savings account.<br>These are, generally, proportional to the seller's sales. | | ||
| `AUTOMATIC_SAVINGS_REVERSED` | An automatic transfer from the Square Savings account back to the processing balance.<br>These are, generally, proportional to the seller's refunds. | | ||
| `CHARGE` | A credit card payment capture. | | ||
| `DEPOSIT_FEE` | Any fees involved with deposits such as instant deposits. | | ||
| `DISPUTE` | The balance change due to a dispute event. | | ||
| `ESCHEATMENT` | An escheatment entry for remittance. | | ||
| `FEE` | The Square processing fee. | | ||
| `FREE_PROCESSING` | Square offers free payments processing for a variety of business scenarios, including seller<br>referrals or when Square wants to apologize (for example, for a bug, customer service, or repricing complication).<br>This entry represents a credit to the seller for the purposes of free processing. | | ||
| `HOLD_ADJUSTMENT` | An adjustment made by Square related to holding a payment. | | ||
| `INITIAL_BALANCE_CHANGE` | An external change to a seller's balance. Initial, in the sense that it<br>causes the creation of the other activity types, such as hold and refund. | | ||
| `MONEY_TRANSFER` | The balance change from a money transfer. | | ||
| `MONEY_TRANSFER_REVERSAL` | The reversal of a money transfer. | | ||
| `OPEN_DISPUTE` | The balance change for a chargeback that has been filed. | | ||
| `OTHER` | Any other type that does not belong in the rest of the types. | | ||
| `OTHER_ADJUSTMENT` | Any other type of adjustment that does not fall under existing types. | | ||
| `PAID_SERVICE_FEE` | A fee paid to a third-party merchant. | | ||
| `PAID_SERVICE_FEE_REFUND` | A fee paid to a third-party merchant. | | ||
| `REDEMPTION_CODE` | Repayment for a redemption code. | | ||
| `REFUND` | A refund for an existing card payment. | | ||
| `RELEASE_ADJUSTMENT` | An adjustment made by Square related to releasing a payment. | | ||
| `RESERVE_HOLD` | Fees paid for funding risk reserve. | | ||
| `RESERVE_RELEASE` | Fees released from risk reserve. | | ||
| `RETURNED_PAYOUT` | An entry created when Square receives a response for the ACH file that Square sent indicating that the<br>settlement of the original entry failed. | | ||
| `SQUARE_CAPITAL_PAYMENT` | A capital merchant cash advance (MCA) assessment. These are, generally,<br>proportional to the merchant's sales but can be issued for other reasons related to the MCA. | | ||
| `SQUARE_CAPITAL_REVERSED_PAYMENT` | A capital merchant cash advance (MCA) assessment refund. These are, generally,<br>proportional to the merchant's refunds but can be issued for other reasons related to the MCA. | | ||
| `SUBSCRIPTION_FEE` | A fee charged for subscription to a Square product. | | ||
| `SUBSCRIPTION_FEE_PAID_REFUND` | A Square subscription fee that has been refunded. | | ||
| `SUBSCRIPTION_FEE_REFUND` | The refund of a previously charged Square product subscription fee. | | ||
| `TAX_ON_FEE` | The tax paid on fee amounts. | | ||
| `THIRD_PARTY_FEE` | Fees collected by a third-party platform. | | ||
| `THIRD_PARTY_FEE_REFUND` | Refunded fees from a third-party platform. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.