class Plaid::ApiClient
- Plaid::ApiClient
- Reference
- Object
Defined in:
plaid/api_client.crConstant Summary
-
COLLECTION_FORMAT_MULTI =
"multi"
-
COLLECTION_FORMAT_SEPARATOR_MAP =
{"csv" => ",", "ssv" => " ", "tsv" => "\t", "pipes" => "|", COLLECTION_FORMAT_MULTI => COLLECTION_FORMAT_MULTI}
-
DEFAULT_MIME_TYPE =
"application/octet-stream"
-
JSON_MIME_REGEX =
/Application\/.*json(?!p)(;.*)?/i
-
UNKNOWN_COLLECTION_FORMAT_SEPARATOR =
"unknown"
Constructors
- .default : ApiClient
-
.new(config : Plaid::Configuration = Configuration.default, default_url_encoder : ::Crest::ParamsEncoder.class = Crest::ZeroEnumeratedFlatParamsEncoder, default_headers : Hash(String, String) = Hash(String, String).new, default_cookies : Hash(String, String) = Hash(String, String).new)
Initializes the ApiClient @option config [Configuration] Configuration for initializing the object, default to Configuration.default
Instance Method Summary
-
#build_api_request(http_method : Symbol, path : String, operation : String | Nil = nil, post_body : IO | String | Nil = nil, auth_names : Array(String) = Array(String).new, header_params : Hash(String, String) = Hash(String, String).new, cookie_params : Hash(String, String) = Hash(String, String).new, query_params : Hash(String, String | Array(String) | JSON::Any) = Hash(String, String | Array(String) | JSON::Any).new, form_params : Array(Tuple(String, Crest::ParamsValue)) | Nil = nil) : Crest::Request
Build an API request with given options.
-
#build_collection_param(params : Array, collection_format : String) : Array(String)
Build parameter value according to the given collection format.
-
#build_collection_param_tuples(name : String, params : Array, collection_format : String) : Array(Tuple(String, Crest::ParamsValue))
Build tuples of parameters according to the given collection format.
-
#build_form_data(form_params : Array(Tuple(String, Crest::ParamsValue)), header_params : Hash(String, String)) : String
Build form data from form params @param [Array(Tuple(String, Crest::ParamsValue))] form_params
-
#build_header_param(params : Array) : String
Build HTTP header value for array HTTP header values are always comma separated @param [Array] params
-
#build_multipart_form_data(form_params : Array(Tuple(String, Crest::ParamsValue)), header_params : Hash(String, String)) : String
Build multipart form data from form params @param [Array(Tuple(String, Crest::ParamsValue))] form_params
- #build_request_url(path : String, operation : String | Nil) : String
-
#build_url_encoded_form_data(form_params : Array(Tuple(String, Crest::ParamsValue))) : String
Build url encoded form data from form params @param [Array(Tuple(String, Crest::ParamsValue))] form_params
-
#config : Configuration
The Configuration object holding settings to be used in the API client.
-
#config=(config : Configuration)
The Configuration object holding settings to be used in the API client.
-
#default_cookies : Hash(String, String)
Defines the cookies to be used in HTTP requests of all API calls by default.
-
#default_cookies=(default_cookies : Hash(String, String))
Defines the cookies to be used in HTTP requests of all API calls by default.
-
#default_headers : Hash(String, String)
Defines the headers to be used in HTTP requests of all API calls by default.
-
#default_headers=(default_headers : Hash(String, String))
Defines the headers to be used in HTTP requests of all API calls by default.
-
#default_url_encoder : Crest::ParamsEncoder.class
The encoder class used to encode request body
-
#default_url_encoder=(default_url_encoder : Crest::ParamsEncoder.class)
The encoder class used to encode request body
- #encode(body : Hash | Array | OpenApi::Json | JSON::Any, content_type : String | Nil = nil, url_encoder : Crest::ParamsEncoder.class | Nil = nil) : String
- #execute_api_request(request : Crest::Request) : Tuple(String, Int32, Hash(String, Array(String) | String))
-
#json_mime?(mime : String) : Bool
Check if the given MIME is a JSON MIME.
-
#select_header_accept(accepts : Array(String)) : String
Return Accept header based on an array of accepts provided.
-
#select_header_content_type(content_types : Array(String)) : String
Return Content-Type header based on an array of content types provided.
-
#update_params_for_auth!(header_params : Hash(String, String), cookie_params : Hash(String, String), query_params : Hash(String, String | Array(String) | JSON::Any), auth_names : Array(String)) : Nil
Update header and query params based on authentication settings.
-
#user_agent : String | Nil
User Agent
-
#user_agent=(user_agent : String | Nil) : Nil
Sets user agent in HTTP header
Constructor Detail
Initializes the ApiClient @option config [Configuration] Configuration for initializing the object, default to Configuration.default
Instance Method Detail
Build an API request with given options.
@return Crest::Request the data deserialized from response body (could be nil), response status code and response headers.
Build parameter value according to the given collection format. @param [String] collection_format one of csv, ssv, tsv, pipes and multi
Build tuples of parameters according to the given collection format. @param [String] collection_format one of csv, ssv, tsv, pipes and multi
Build form data from form params @param [Array(Tuple(String, Crest::ParamsValue))] form_params
Build HTTP header value for array HTTP header values are always comma separated @param [Array] params
Build multipart form data from form params @param [Array(Tuple(String, Crest::ParamsValue))] form_params
Build url encoded form data from form params @param [Array(Tuple(String, Crest::ParamsValue))] form_params
The Configuration object holding settings to be used in the API client.
The Configuration object holding settings to be used in the API client.
Defines the cookies to be used in HTTP requests of all API calls by default.
@return [Hash]
Defines the cookies to be used in HTTP requests of all API calls by default.
@return [Hash]
Defines the headers to be used in HTTP requests of all API calls by default.
@return [Hash]
Defines the headers to be used in HTTP requests of all API calls by default.
@return [Hash]
The encoder class used to encode request body
The encoder class used to encode request body
Check if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; charset=UTF8 APPLICATION/JSON / @param [String] mime MIME @return [Boolean] True if the MIME is application/json
Return Accept header based on an array of accepts provided. @param [Array] accepts array for Accept @return [String] the Accept header (e.g. application/json)
Return Content-Type header based on an array of content types provided. @param [Array] content_types array for Content-Type @return [String] the Content-Type header (e.g. application/json)
Update header and query params based on authentication settings.
@param [Hash] header_params Header parameters @param [Hash] query_params Query parameters @param [String] auth_names Authentication scheme name
Sets user agent in HTTP header
@param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.0)