Class: CheckoutSdk::Reports::ReportsClient

Inherits:
Client
  • Object
show all
Defined in:
lib/checkout_sdk/reports/reports_client.rb

Constant Summary collapse

REPORTS =
'reports'
FILES =
'files'

Instance Attribute Summary

Attributes inherited from Client

#api_client, #authorization_type, #configuration

Instance Method Summary collapse

Constructor Details

#initialize(api_client, configuration) ⇒ ReportsClient

Returns a new instance of ReportsClient.

Parameters:



11
12
13
# File 'lib/checkout_sdk/reports/reports_client.rb', line 11

def initialize(api_client, configuration)
  super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH
end

Instance Method Details

#get_all_reports(query_filter) ⇒ Object

Parameters:



16
17
18
# File 'lib/checkout_sdk/reports/reports_client.rb', line 16

def get_all_reports(query_filter)
  api_client.invoke_get(REPORTS, sdk_authorization, query_filter)
end

#get_report_details(report_id) ⇒ Object

Parameters:

  • report_id (String)


21
22
23
# File 'lib/checkout_sdk/reports/reports_client.rb', line 21

def get_report_details(report_id)
  api_client.invoke_get(build_path(REPORTS, report_id), sdk_authorization)
end

#get_report_file(report_id, file_id) ⇒ Object

Parameters:

  • report_id (String)
  • file_id (String)


27
28
29
# File 'lib/checkout_sdk/reports/reports_client.rb', line 27

def get_report_file(report_id, file_id)
  api_client.invoke_get(build_path(REPORTS, report_id, FILES, file_id), sdk_authorization)
end