Class: SezzleClient::ReportsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/sezzle_client/api/reports_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ReportsApi

Returns a new instance of ReportsApi.



16
17
18
# File 'lib/sezzle_client/api/reports_api.rb', line 16

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



14
15
16
# File 'lib/sezzle_client/api/reports_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#get_interest_account_activity(start_date, opts = {}) ⇒ String

Interest Account Activity

Parameters:

  • start_date

    Start Date

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :end_date (String)

    End Date

  • :offset (String)

    Pagination Offset (Limit 20)

  • :currency_code (String)

    ISO-4217 Currency Code

Returns:

  • (String)


26
27
28
29
# File 'lib/sezzle_client/api/reports_api.rb', line 26

def (start_date, opts = {})
  data, _status_code, _headers = (start_date, opts)
  data
end

#get_interest_account_activity_with_http_info(start_date, opts = {}) ⇒ Array<(String, Integer, Hash)>

Interest Account Activity

Parameters:

  • start_date

    Start Date

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :end_date (String)

    End Date

  • :offset (String)

    Pagination Offset (Limit 20)

  • :currency_code (String)

    ISO-4217 Currency Code

Returns:

  • (Array<(String, Integer, Hash)>)

    String data, response status code and response headers



38
39
40
41
42
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
# File 'lib/sezzle_client/api/reports_api.rb', line 38

def (start_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ReportsApi.get_interest_account_activity ...'
  end
  # verify the required parameter 'start_date' is set
  if @api_client.config.client_side_validation && start_date.nil?
    fail ArgumentError, "Missing the required parameter 'start_date' when calling ReportsApi.get_interest_account_activity"
  end
  # resource path
  local_var_path = '/interest/activity'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'start-date'] = start_date
  query_params[:'end-date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'currency-code'] = opts[:'currency_code'] if !opts[:'currency_code'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/csv', 'application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body]

  return_type = opts[:return_type] || 'String'

  auth_names = opts[:auth_names] || ['Bearer']
  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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ReportsApi#get_interest_account_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_interest_account_balance(opts = {}) ⇒ InlineResponse2009

Interest Account Balance

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :currency_code (String)

    ISO-4217 Currency Code

Returns:



87
88
89
90
# File 'lib/sezzle_client/api/reports_api.rb', line 87

def (opts = {})
  data, _status_code, _headers = (opts)
  data
end

#get_interest_account_balance_with_http_info(opts = {}) ⇒ Array<(InlineResponse2009, Integer, Hash)>

Interest Account Balance

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :currency_code (String)

    ISO-4217 Currency Code

Returns:

  • (Array<(InlineResponse2009, Integer, Hash)>)

    InlineResponse2009 data, response status code and response headers



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/sezzle_client/api/reports_api.rb', line 96

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ReportsApi.get_interest_account_balance ...'
  end
  # resource path
  local_var_path = '/interest/balance'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'currency-code'] = opts[:'currency_code'] if !opts[:'currency_code'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body]

  return_type = opts[:return_type] || 'InlineResponse2009'

  auth_names = opts[:auth_names] || ['Bearer']
  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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ReportsApi#get_interest_account_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_settlement_details(payout_uuid, opts = {}) ⇒ String

Settlement Details

Parameters:

  • payout_uuid

    Payout UUID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


138
139
140
141
# File 'lib/sezzle_client/api/reports_api.rb', line 138

def get_settlement_details(payout_uuid, opts = {})
  data, _status_code, _headers = get_settlement_details_with_http_info(payout_uuid, opts)
  data
end

#get_settlement_details_with_http_info(payout_uuid, opts = {}) ⇒ Array<(String, Integer, Hash)>

Settlement Details

Parameters:

  • payout_uuid

    Payout UUID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Integer, Hash)>)

    String data, response status code and response headers



147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/sezzle_client/api/reports_api.rb', line 147

def get_settlement_details_with_http_info(payout_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ReportsApi.get_settlement_details ...'
  end
  # verify the required parameter 'payout_uuid' is set
  if @api_client.config.client_side_validation && payout_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'payout_uuid' when calling ReportsApi.get_settlement_details"
  end
  # resource path
  local_var_path = '/settlements/details/{payout_uuid}'.sub('{' + 'payout_uuid' + '}', payout_uuid.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/csv', 'application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body]

  return_type = opts[:return_type] || 'String'

  auth_names = opts[:auth_names] || ['Bearer']
  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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ReportsApi#get_settlement_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_settlement_summaries(start_date, opts = {}) ⇒ Payout

Settlement Summaries

Parameters:

  • start_date

    Start Date

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :end_date (String)

    End Date

  • :offset (String)

    Pagination Offset (Limit 20)

  • :currency_code (String)

    ISO-4217 Currency Code

Returns:



195
196
197
198
# File 'lib/sezzle_client/api/reports_api.rb', line 195

def get_settlement_summaries(start_date, opts = {})
  data, _status_code, _headers = get_settlement_summaries_with_http_info(start_date, opts)
  data
end

#get_settlement_summaries_with_http_info(start_date, opts = {}) ⇒ Array<(Payout, Integer, Hash)>

Settlement Summaries

Parameters:

  • start_date

    Start Date

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :end_date (String)

    End Date

  • :offset (String)

    Pagination Offset (Limit 20)

  • :currency_code (String)

    ISO-4217 Currency Code

Returns:

  • (Array<(Payout, Integer, Hash)>)

    Payout data, response status code and response headers



207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/sezzle_client/api/reports_api.rb', line 207

def get_settlement_summaries_with_http_info(start_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ReportsApi.get_settlement_summaries ...'
  end
  # verify the required parameter 'start_date' is set
  if @api_client.config.client_side_validation && start_date.nil?
    fail ArgumentError, "Missing the required parameter 'start_date' when calling ReportsApi.get_settlement_summaries"
  end
  # resource path
  local_var_path = '/settlements/summaries'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'start-date'] = start_date
  query_params[:'end-date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'currency-code'] = opts[:'currency_code'] if !opts[:'currency_code'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body]

  return_type = opts[:return_type] || 'Payout'

  auth_names = opts[:auth_names] || ['Bearer']
  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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ReportsApi#get_settlement_summaries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end