Skip to content

Latest commit

 

History

History
122 lines (86 loc) · 7.85 KB

ReportingApi.md

File metadata and controls

122 lines (86 loc) · 7.85 KB

SquareConnect\ReportingApi

All URIs are relative to https://connect.squareup.com

Method HTTP request Description
listAdditionalRecipientReceivableRefunds GET /v2/locations/{location_id}/additional-recipient-receivable-refunds ListAdditionalRecipientReceivableRefunds
listAdditionalRecipientReceivables GET /v2/locations/{location_id}/additional-recipient-receivables ListAdditionalRecipientReceivables

listAdditionalRecipientReceivableRefunds

\SquareConnect\Model\ListAdditionalRecipientReceivableRefundsResponse listAdditionalRecipientReceivableRefunds($location_id, $begin_time, $end_time, $sort_order, $cursor)

ListAdditionalRecipientReceivableRefunds

Returns a list of refunded transactions (across all possible originating locations) relating to monies credited to the provided location ID by another Square account using the additional_recipients field in a transaction. Max results per page: 50

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new SquareConnect\Api\ReportingApi();
$location_id = "location_id_example"; // string | The ID of the location to list AdditionalRecipientReceivableRefunds for.
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in RFC 3339 format.  See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.  Default value: The current time minus one year.
$end_time = "end_time_example"; // string | The end of the requested reporting period, in RFC 3339 format.  See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.  Default value: The current time.
$sort_order = "sort_order_example"; // string | The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first).  Default value: `DESC`
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query.  See [Paginating results](#paginatingresults) for more information.

try {
    $result = $api_instance->listAdditionalRecipientReceivableRefunds($location_id, $begin_time, $end_time, $sort_order, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReportingApi->listAdditionalRecipientReceivableRefunds: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
location_id string The ID of the location to list AdditionalRecipientReceivableRefunds for.
begin_time string The beginning of the requested reporting period, in RFC 3339 format. See Date ranges for details on date inclusivity/exclusivity. Default value: The current time minus one year. [optional]
end_time string The end of the requested reporting period, in RFC 3339 format. See Date ranges for details on date inclusivity/exclusivity. Default value: The current time. [optional]
sort_order string The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` [optional]
cursor string A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See Paginating results for more information. [optional]

Return type

\SquareConnect\Model\ListAdditionalRecipientReceivableRefundsResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listAdditionalRecipientReceivables

\SquareConnect\Model\ListAdditionalRecipientReceivablesResponse listAdditionalRecipientReceivables($location_id, $begin_time, $end_time, $sort_order, $cursor)

ListAdditionalRecipientReceivables

Returns a list of receivables (across all possible sending locations) representing monies credited to the provided location ID by another Square account using the additional_recipients field in a transaction. Max results per page: 50

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new SquareConnect\Api\ReportingApi();
$location_id = "location_id_example"; // string | The ID of the location to list AdditionalRecipientReceivables for.
$begin_time = "begin_time_example"; // string | The beginning of the requested reporting period, in RFC 3339 format.  See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.  Default value: The current time minus one year.
$end_time = "end_time_example"; // string | The end of the requested reporting period, in RFC 3339 format.  See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.  Default value: The current time.
$sort_order = "sort_order_example"; // string | The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first).  Default value: `DESC`
$cursor = "cursor_example"; // string | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query.  See [Paginating results](#paginatingresults) for more information.

try {
    $result = $api_instance->listAdditionalRecipientReceivables($location_id, $begin_time, $end_time, $sort_order, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReportingApi->listAdditionalRecipientReceivables: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
location_id string The ID of the location to list AdditionalRecipientReceivables for.
begin_time string The beginning of the requested reporting period, in RFC 3339 format. See Date ranges for details on date inclusivity/exclusivity. Default value: The current time minus one year. [optional]
end_time string The end of the requested reporting period, in RFC 3339 format. See Date ranges for details on date inclusivity/exclusivity. Default value: The current time. [optional]
sort_order string The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` [optional]
cursor string A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See Paginating results for more information. [optional]

Return type

\SquareConnect\Model\ListAdditionalRecipientReceivablesResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]