Class: Dodopayments::Resources::Payouts

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

Defined Under Namespace

Classes: Breakup

Instance Attribute Summary collapse

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:



40
41
42
43
# File 'lib/dodopayments/resources/payouts.rb', line 40

def initialize(client:)
  @client = client
  @breakup = Dodopayments::Resources::Payouts::Breakup.new(client: client)
end

Instance Attribute Details

#breakupDodopayments::Resources::Payouts::Breakup (readonly)



7
8
9
# File 'lib/dodopayments/resources/payouts.rb', line 7

def breakup
  @breakup
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:



24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/dodopayments/resources/payouts.rb', line 24

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