class SquareConnect::ReportingApi
Attributes
Public Class Methods
# File lib/square_connect/api/reporting_api.rb, line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
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](paginatingresults): 50 @param location_id The ID of the location to list AdditionalRecipientReceivableRefunds for. @param [Hash] opts the optional parameters @option opts [String] :begin_time 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. @option opts [String] :end_time 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. @option opts [String] :sort_order The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` @option opts [String] :cursor 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. @return [ListAdditionalRecipientReceivableRefundsResponse]
# File lib/square_connect/api/reporting_api.rb, line 29 def list_additional_recipient_receivable_refunds(location_id, opts = {}) data, _status_code, _headers = list_additional_recipient_receivable_refunds_with_http_info(location_id, opts) return data end
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](paginatingresults): 50 @param location_id The ID of the location to list AdditionalRecipientReceivableRefunds for. @param [Hash] opts the optional parameters @option opts [String] :begin_time 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. @option opts [String] :end_time 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. @option opts [String] :sort_order The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` @option opts [String] :cursor 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. @return [Array<(ListAdditionalRecipientReceivableRefundsResponse
, Fixnum, Hash)>] ListAdditionalRecipientReceivableRefundsResponse
data, response status code and response headers
# File lib/square_connect/api/reporting_api.rb, line 43 def list_additional_recipient_receivable_refunds_with_http_info(location_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ReportingApi.list_additional_recipient_receivable_refunds ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling ReportingApi.list_additional_recipient_receivable_refunds" if location_id.nil? # resource path local_var_path = "/v2/locations/{location_id}/additional-recipient-receivable-refunds".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s) # query parameters query_params = {} query_params[:'begin_time'] = opts[:'begin_time'] if !opts[:'begin_time'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params['Square-Version'] = "2019-06-12" # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ListAdditionalRecipientReceivableRefundsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportingApi#list_additional_recipient_receivable_refunds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
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](paginatingresults): 50 @param location_id The ID of the location to list AdditionalRecipientReceivables for. @param [Hash] opts the optional parameters @option opts [String] :begin_time 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. @option opts [String] :end_time 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. @option opts [String] :sort_order The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` @option opts [String] :cursor 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. @return [ListAdditionalRecipientReceivablesResponse]
# File lib/square_connect/api/reporting_api.rb, line 96 def list_additional_recipient_receivables(location_id, opts = {}) data, _status_code, _headers = list_additional_recipient_receivables_with_http_info(location_id, opts) return data end
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](paginatingresults): 50 @param location_id The ID of the location to list AdditionalRecipientReceivables for. @param [Hash] opts the optional parameters @option opts [String] :begin_time 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. @option opts [String] :end_time 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. @option opts [String] :sort_order The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` @option opts [String] :cursor 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. @return [Array<(ListAdditionalRecipientReceivablesResponse
, Fixnum, Hash)>] ListAdditionalRecipientReceivablesResponse
data, response status code and response headers
# File lib/square_connect/api/reporting_api.rb, line 110 def list_additional_recipient_receivables_with_http_info(location_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ReportingApi.list_additional_recipient_receivables ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling ReportingApi.list_additional_recipient_receivables" if location_id.nil? # resource path local_var_path = "/v2/locations/{location_id}/additional-recipient-receivables".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s) # query parameters query_params = {} query_params[:'begin_time'] = opts[:'begin_time'] if !opts[:'begin_time'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params['Square-Version'] = "2019-06-12" # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ListAdditionalRecipientReceivablesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportingApi#list_additional_recipient_receivables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end