Class: Lithic::Resources::FundingEvents

Inherits:
Object
  • Object
show all
Defined in:
lib/lithic/resources/funding_events.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ FundingEvents

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

Parameters:



79
80
81
# File 'lib/lithic/resources/funding_events.rb', line 79

def initialize(client:)
  @client = client
end

Instance Method Details

#list(ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::FundingEvent>

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

Get all funding events for program

Parameters:

  • ending_before (String)

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

  • page_size (Integer)

    Page size (for pagination).

  • 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:



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/lithic/resources/funding_events.rb', line 44

def list(params = {})
  parsed, options = Lithic::FundingEventListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "v1/funding_events",
    query: parsed,
    page: Lithic::Internal::CursorPage,
    model: Lithic::FundingEvent,
    options: options
  )
end

#retrieve(funding_event_token, request_options: {}) ⇒ Lithic::Models::FundingEvent

Get funding event for program by id

Parameters:

  • funding_event_token (String)

    Globally unique identifier for funding event.

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

Returns:

See Also:



17
18
19
20
21
22
23
24
# File 'lib/lithic/resources/funding_events.rb', line 17

def retrieve(funding_event_token, params = {})
  @client.request(
    method: :get,
    path: ["v1/funding_events/%1$s", funding_event_token],
    model: Lithic::FundingEvent,
    options: params[:request_options]
  )
end

#retrieve_details(funding_event_token, request_options: {}) ⇒ Lithic::Models::FundingEventRetrieveDetailsResponse

Get funding event details by id

Parameters:

  • funding_event_token (String)

    Globally unique identifier for funding event.

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

Returns:

See Also:



67
68
69
70
71
72
73
74
# File 'lib/lithic/resources/funding_events.rb', line 67

def retrieve_details(funding_event_token, params = {})
  @client.request(
    method: :get,
    path: ["v1/funding_events/%1$s/details", funding_event_token],
    model: Lithic::Models::FundingEventRetrieveDetailsResponse,
    options: params[:request_options]
  )
end