Class: VitableConnect::Resources::Plans

Inherits:
Object
  • Object
show all
Defined in:
lib/vitable_connect/resources/plans.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Plans

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

Parameters:



36
37
38
# File 'lib/vitable_connect/resources/plans.rb', line 36

def initialize(client:)
  @client = client
end

Instance Method Details

#list(limit: nil, page: nil, request_options: {}) ⇒ VitableConnect::Internal::PageNumberPage<VitableConnect::Models::PlanListResponse>

Returns a paginated list of benefit plans linked to the authenticated organization.

Parameters:

  • limit (Integer)

    Items per page (default: 20, max: 100)

  • page (Integer)

    Page number (default: 1)

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

Returns:

See Also:



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

def list(params = {})
  parsed, options = VitableConnect::PlanListParams.dump_request(params)
  query = VitableConnect::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "v1/plans",
    query: query,
    page: VitableConnect::Internal::PageNumberPage,
    model: VitableConnect::Models::PlanListResponse,
    options: options
  )
end