Class: Onlyfans::Resources::Statistics::Statements

Inherits:
Object
  • Object
show all
Defined in:
lib/onlyfans/resources/statistics/statements.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Statements

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Statements.

Parameters:



39
40
41
# File 'lib/onlyfans/resources/statistics/statements.rb', line 39

def initialize(client:)
  @client = client
end

Instance Method Details

#get_earnings(account, start_date:, end_date: nil, type: nil, request_options: {}) ⇒ Onlyfans::Models::Statistics::StatementGetEarningsResponse

Get the earnings for a given period.

Parameters:

Returns:

See Also:



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/onlyfans/resources/statistics/statements.rb', line 24

def get_earnings(, params)
  parsed, options = Onlyfans::Statistics::StatementGetEarningsParams.dump_request(params)
  query = Onlyfans::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["api/%1$s/statistics/statements/earnings", ],
    query: query,
    model: Onlyfans::Models::Statistics::StatementGetEarningsResponse,
    options: options
  )
end