Class: SquareConnect::ReportingApi
- Inherits:
-
Object
- Object
- SquareConnect::ReportingApi
- Defined in:
- lib/square_connect/api/reporting_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ ReportingApi
constructor
A new instance of ReportingApi.
-
#list_additional_recipient_receivable_refunds(location_id, opts = {}) ⇒ ListAdditionalRecipientReceivableRefundsResponse
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.
-
#list_additional_recipient_receivable_refunds_with_http_info(location_id, opts = {}) ⇒ Array<(ListAdditionalRecipientReceivableRefundsResponse, Fixnum, Hash)>
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.
-
#list_additional_recipient_receivables(location_id, opts = {}) ⇒ ListAdditionalRecipientReceivablesResponse
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.
-
#list_additional_recipient_receivables_with_http_info(location_id, opts = {}) ⇒ Array<(ListAdditionalRecipientReceivablesResponse, Fixnum, Hash)>
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.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ReportingApi
Returns a new instance of ReportingApi.
16 17 18 |
# File 'lib/square_connect/api/reporting_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/square_connect/api/reporting_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#list_additional_recipient_receivable_refunds(location_id, opts = {}) ⇒ ListAdditionalRecipientReceivableRefundsResponse
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
29 30 31 32 |
# 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 |
#list_additional_recipient_receivable_refunds_with_http_info(location_id, opts = {}) ⇒ Array<(ListAdditionalRecipientReceivableRefundsResponse, Fixnum, Hash)>
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
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# 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 |
#list_additional_recipient_receivables(location_id, opts = {}) ⇒ ListAdditionalRecipientReceivablesResponse
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
96 97 98 99 |
# 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 |
#list_additional_recipient_receivables_with_http_info(location_id, opts = {}) ⇒ Array<(ListAdditionalRecipientReceivablesResponse, Fixnum, Hash)>
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
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# 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 |