Class: Lithic::Resources::Reports::Settlement

Inherits:
Object
  • Object
show all
Defined in:
lib/lithic/resources/reports/settlement.rb,
lib/lithic/resources/reports/settlement/network_totals.rb

Defined Under Namespace

Classes: NetworkTotals

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Settlement

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

Parameters:



66
67
68
69
# File 'lib/lithic/resources/reports/settlement.rb', line 66

def initialize(client:)
  @client = client
  @network_totals = Lithic::Resources::Reports::Settlement::NetworkTotals.new(client: client)
end

Instance Attribute Details

#network_totalsLithic::Resources::Reports::Settlement::NetworkTotals (readonly)



8
9
10
# File 'lib/lithic/resources/reports/settlement.rb', line 8

def network_totals
  @network_totals
end

Instance Method Details

#list_details(report_date, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::SettlementDetail>

Some parameter documentations has been truncated, see Models::Reports::SettlementListDetailsParams for more details.

List details.

Parameters:

  • report_date (Date)

    Date of the settlement report to retrieve. Not available in sandbox.

  • ending_before (String)

    A cursor representing an item’s token before which a page of results should end.

  • page_size (Integer)

    Number of records per page.

  • starting_after (String)

    A cursor representing an item’s token after which a page of results should begin

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

Returns:

See Also:



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/lithic/resources/reports/settlement.rb', line 30

def list_details(report_date, params = {})
  parsed, options = Lithic::Reports::SettlementListDetailsParams.dump_request(params)
  query = Lithic::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["v1/reports/settlement/details/%1$s", report_date],
    query: query,
    page: Lithic::Internal::CursorPage,
    model: Lithic::SettlementDetail,
    options: options
  )
end

#summary(report_date, request_options: {}) ⇒ Lithic::Models::SettlementReport

Get the settlement report for a specified report date. Not available in sandbox.

Parameters:

  • report_date (Date)

    Date of the settlement report to retrieve.

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

Returns:

See Also:



54
55
56
57
58
59
60
61
# File 'lib/lithic/resources/reports/settlement.rb', line 54

def summary(report_date, params = {})
  @client.request(
    method: :get,
    path: ["v1/reports/settlement/summary/%1$s", report_date],
    model: Lithic::SettlementReport,
    options: params[:request_options]
  )
end