Class: Onlyfans::Resources::Statistics::Statements
- Inherits:
-
Object
- Object
- Onlyfans::Resources::Statistics::Statements
- Defined in:
- lib/onlyfans/resources/statistics/statements.rb
Instance Method Summary collapse
-
#get_earnings(account, start_date:, end_date: nil, type: nil, request_options: {}) ⇒ Onlyfans::Models::Statistics::StatementGetEarningsResponse
Get the earnings for a given period.
-
#initialize(client:) ⇒ Statements
constructor
private
A new instance of Statements.
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.
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.
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/onlyfans/resources/statistics/statements.rb', line 24 def get_earnings(account, params) parsed, = 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", account], query: query, model: Onlyfans::Models::Statistics::StatementGetEarningsResponse, options: ) end |