Class: Dodopayments::Resources::Payouts

Inherits:
Object
  • Object
show all
Defined in:
lib/dodopayments/resources/payouts.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Payouts

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 Payouts.

Parameters:



36
37
38
# File 'lib/dodopayments/resources/payouts.rb', line 36

def initialize(client:)
  @client = client
end

Instance Method Details

#list(created_at_gte: nil, created_at_lte: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::PayoutListResponse>

Parameters:

  • created_at_gte (Time)

    Get payouts created after this time (inclusive)

  • created_at_lte (Time)

    Get payouts created before this time (inclusive)

  • page_number (Integer)

    Page number default is 0

  • page_size (Integer)

    Page size default is 10 max is 100

  • request_options (Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/dodopayments/resources/payouts.rb', line 21

def list(params = {})
  parsed, options = Dodopayments::PayoutListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "payouts",
    query: parsed,
    page: Dodopayments::Internal::DefaultPageNumberPagination,
    model: Dodopayments::Models::PayoutListResponse,
    options: options
  )
end