Class: Onlyfans::Resources::Transactions
- Inherits:
-
Object
- Object
- Onlyfans::Resources::Transactions
- Defined in:
- lib/onlyfans/resources/transactions.rb
Overview
APIs for managing OnlyFans transactions
Instance Method Summary collapse
-
#initialize(client:) ⇒ Transactions
constructor
private
A new instance of Transactions.
-
#list(account, limit: nil, marker: nil, start_date: nil, tips_source: nil, type: nil, request_options: {}) ⇒ Onlyfans::Models::TransactionListResponse
Some parameter documentations has been truncated, see Models::TransactionListParams for more details.
Constructor Details
#initialize(client:) ⇒ Transactions
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 Transactions.
48 49 50 |
# File 'lib/onlyfans/resources/transactions.rb', line 48 def initialize(client:) @client = client end |
Instance Method Details
#list(account, limit: nil, marker: nil, start_date: nil, tips_source: nil, type: nil, request_options: {}) ⇒ Onlyfans::Models::TransactionListResponse
Some parameter documentations has been truncated, see Models::TransactionListParams for more details.
Get a paginated list of transactions for an Account. Newest transactions are first. You can filter by transaction type and tips source.
‘post_
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/onlyfans/resources/transactions.rb', line 33 def list(account, params = {}) parsed, = Onlyfans::TransactionListParams.dump_request(params) query = Onlyfans::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["api/%1$s/transactions", account], query: query.transform_keys(start_date: "startDate", tips_source: "tipsSource"), model: Onlyfans::Models::TransactionListResponse, options: ) end |