Class: CandidApiClient::ExternalPaymentAccountConfig::V1::AsyncV1Client

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

Parameters:



54
55
56
# File 'lib/candidhealth/external_payment_account_config/v_1/client.rb', line 54

def initialize(request_client:)
  @request_client = request_client
end

Instance Attribute Details

#request_clientCandidApiClient::AsyncRequestClient (readonly)



50
51
52
# File 'lib/candidhealth/external_payment_account_config/v_1/client.rb', line 50

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:



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/candidhealth/external_payment_account_config/v_1/client.rb', line 65

def get_multi(limit: nil, page_token: nil, request_options: nil)
  Async do
    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
end