class PolarAccesslink::NightlyRechargeApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/polar_accesslink/api/nightly_recharge_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

list_nightly_recharge(opts = {}) click to toggle source

List Nightly Recharges List Nightly Recharge data of user for the last 28 days. @param [Hash] opts the optional parameters @return [nil]

# File lib/polar_accesslink/api/nightly_recharge_api.rb, line 26
def list_nightly_recharge(opts = {})
  list_nightly_recharge_with_http_info(opts)
  nil
end
list_nightly_recharge_with_http_info(opts = {}) click to toggle source

List Nightly Recharges List Nightly Recharge data of user for the last 28 days. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/polar_accesslink/api/nightly_recharge_api.rb, line 35
def list_nightly_recharge_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NightlyRechargeApi.list_nightly_recharge ...'
  end
  # resource path
  local_var_path = '/v3/users/nightly-recharge'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NightlyRechargeApi#list_nightly_recharge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
v3_users_nightly_recharge_date_get(date, opts = {}) click to toggle source

Get Nightly Recharge Get Users Nightly Recharge data for given date. @param date Date of Nightly Recharge as ISO-8601 date string, example: "2020-01-01&quot; @param [Hash] opts the optional parameters @return [nil]

# File lib/polar_accesslink/api/nightly_recharge_api.rb, line 70
def v3_users_nightly_recharge_date_get(date, opts = {})
  v3_users_nightly_recharge_date_get_with_http_info(date, opts)
  nil
end
v3_users_nightly_recharge_date_get_with_http_info(date, opts = {}) click to toggle source

Get Nightly Recharge Get Users Nightly Recharge data for given date. @param date Date of Nightly Recharge as ISO-8601 date string, example: "2020-01-01&quot; @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/polar_accesslink/api/nightly_recharge_api.rb, line 80
def v3_users_nightly_recharge_date_get_with_http_info(date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NightlyRechargeApi.v3_users_nightly_recharge_date_get ...'
  end
  # verify the required parameter 'date' is set
  if @api_client.config.client_side_validation && date.nil?
    fail ArgumentError, "Missing the required parameter 'date' when calling NightlyRechargeApi.v3_users_nightly_recharge_date_get"
  end
  # resource path
  local_var_path = '/v3/users/nightly-recharge/{date}'.sub('{' + 'date' + '}', date.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NightlyRechargeApi#v3_users_nightly_recharge_date_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end