SquareConnect::ReportingApi

March 13, 2019 ยท View on GitHub

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

MethodHTTP requestDescription
list_additional_recipient_receivable_refundsGET /v2/locations/{location_id}/additional-recipient-receivable-refundsListAdditionalRecipientReceivableRefunds
list_additional_recipient_receivablesGET /v2/locations/{location_id}/additional-recipient-receivablesListAdditionalRecipientReceivables

list_additional_recipient_receivable_refunds

ListAdditionalRecipientReceivableRefundsResponse list_additional_recipient_receivable_refunds(location_id, opts)

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

# load the gem
require 'square_connect'
# setup authorization
SquareConnect.configure do |config|
  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = SquareConnect::ReportingApi.new

location_id = "location_id_example" # String | The ID of the location to list AdditionalRecipientReceivableRefunds for.

opts = { 
  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 [Pagination](/basics/api101/pagination) for more information.
}

begin
  #ListAdditionalRecipientReceivableRefunds
  result = api_instance.list_additional_recipient_receivable_refunds(location_id, opts)
  p result
rescue SquareConnect::ApiError => e
  puts "Exception when calling ReportingApi->list_additional_recipient_receivable_refunds: #{e}"
end

Parameters

NameTypeDescriptionNotes
location_idStringThe ID of the location to list AdditionalRecipientReceivableRefunds for.
begin_timeStringThe 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_timeStringThe 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_orderStringThe order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC`[optional]
cursorStringA pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See Pagination for more information.[optional]

Return type

ListAdditionalRecipientReceivableRefundsResponse

Authorization

oauth2

HTTP request headers

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

list_additional_recipient_receivables

ListAdditionalRecipientReceivablesResponse list_additional_recipient_receivables(location_id, opts)

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

# load the gem
require 'square_connect'
# setup authorization
SquareConnect.configure do |config|
  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = SquareConnect::ReportingApi.new

location_id = "location_id_example" # String | The ID of the location to list AdditionalRecipientReceivables for.

opts = { 
  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 [Pagination](/basics/api101/pagination) for more information.
}

begin
  #ListAdditionalRecipientReceivables
  result = api_instance.list_additional_recipient_receivables(location_id, opts)
  p result
rescue SquareConnect::ApiError => e
  puts "Exception when calling ReportingApi->list_additional_recipient_receivables: #{e}"
end

Parameters

NameTypeDescriptionNotes
location_idStringThe ID of the location to list AdditionalRecipientReceivables for.
begin_timeStringThe 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_timeStringThe 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_orderStringThe order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC`[optional]
cursorStringA pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See Pagination for more information.[optional]

Return type

ListAdditionalRecipientReceivablesResponse

Authorization

oauth2

HTTP request headers

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