As an example, passing additional_headers doesn't work for Square::Inventory::Client because request_options is not passed to Square::Internal::JSON::Request#new. So it's not possible to set the Square-Version header.
Example of problematic code:
_request = Square::Internal::JSON::Request.new(
base_url: request_options[:base_url] || Square::Environment::PRODUCTION,
method: "GET",
path: "v2/inventory/#{params[:catalog_object_id]}",
query: _query
)
Probably should be something like this:
_request = Square::Internal::JSON::Request.new(
base_url: request_options[:base_url] || Square::Environment::PRODUCTION,
method: "GET",
path: "v2/inventory/#{params[:catalog_object_id]}",
query: _query,
request_options: request_options
)
This is how it's done in Square::Catalog::Client.