Class: CandidApiClient::ExternalPaymentAccountConfig::V1::V1Client

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/external_payment_account_config/v_1/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request_client:) ⇒ CandidApiClient::ExternalPaymentAccountConfig::V1::V1Client

Parameters:



16
17
18
# File 'lib/candidhealth/external_payment_account_config/v_1/client.rb', line 16

def initialize(request_client:)
  @request_client = request_client
end

Instance Attribute Details

#request_clientCandidApiClient::RequestClient (readonly)



12
13
14
# File 'lib/candidhealth/external_payment_account_config/v_1/client.rb', line 12

def request_client
  @request_client
end

Instance Method Details

#get_multi(limit: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::ExternalPaymentAccountConfig::V1::Types::ExternalPaymentAccountConfigPage

Examples:

api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
api..v_1.get_multi(limit: 1, page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9")

Parameters:

  • limit (Integer) (defaults to: nil)

    Defaults to 100

  • page_token (String) (defaults to: nil)
  • request_options (CandidApiClient::RequestOptions) (defaults to: nil)

Returns:



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/candidhealth/external_payment_account_config/v_1/client.rb', line 27

def get_multi(limit: nil, page_token: nil, request_options: nil)
  response = @request_client.conn.get do |req|
    req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
    req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
    req.headers = {
  **(req.headers || {}),
  **@request_client.get_headers,
  **(request_options&.additional_headers || {})
    }.compact
    req.params = {
      **(request_options&.additional_query_parameters || {}),
      "limit": limit,
      "page_token": page_token
    }.compact
    req.url "#{@request_client.get_url(environment: CandidApi,
                                       request_options: request_options)}/api/external-payment-account-config/v1"
  end
  CandidApiClient::ExternalPaymentAccountConfig::V1::Types::ExternalPaymentAccountConfigPage.from_json(json_object: response.body)
end