Class: Plaid::Internal::Multipart::Request Private
- Inherits:
-
Http::BaseRequest
- Object
- Http::BaseRequest
- Plaid::Internal::Multipart::Request
- Defined in:
- lib/plaid/internal/multipart/multipart_request.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #body ⇒ Object readonly private
Attributes inherited from Http::BaseRequest
#base_url, #headers, #method, #path, #query, #request_options
Instance Method Summary collapse
-
#encode_body ⇒ String?
private
Note: additional_body_parameters from request_options are not applied to multipart requests.
-
#encode_headers(protected_keys: []) ⇒ Hash
private
The encoded HTTP request headers.
-
#initialize(base_url:, path:, method:, headers: {}, query: {}, body: nil, request_options: {}) ⇒ Request
constructor
private
A new instance of Request.
Methods inherited from Http::BaseRequest
#additional_body_parameters, #encode_query
Constructor Details
#initialize(base_url:, path:, method:, headers: {}, query: {}, body: nil, request_options: {}) ⇒ Request
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 Request.
17 18 19 20 21 |
# File 'lib/plaid/internal/multipart/multipart_request.rb', line 17 def initialize(base_url:, path:, method:, headers: {}, query: {}, body: nil, request_options: {}) super(base_url:, path:, method:, headers:, query:, request_options:) @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
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.
8 9 10 |
# File 'lib/plaid/internal/multipart/multipart_request.rb', line 8 def body @body end |
Instance Method Details
#encode_body ⇒ String?
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.
Note: additional_body_parameters from request_options are not applied to multipart requests.
35 36 37 |
# File 'lib/plaid/internal/multipart/multipart_request.rb', line 35 def encode_body @body&.encode end |
#encode_headers(protected_keys: []) ⇒ Hash
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 The encoded HTTP request headers.
26 27 28 29 30 31 |
# File 'lib/plaid/internal/multipart/multipart_request.rb', line 26 def encode_headers(protected_keys: []) sdk_headers = { "Content-Type" => @body.content_type }.merge(@headers) merge_additional_headers(sdk_headers, protected_keys:) end |