-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
Steps to reproduce:
- Create a
Square::Clientspecifying thebase_url:client = Square::Client.new(token:, base_url: Square::Environment::SANDBOX) - Call an inventory method:
client.inventory.get(catalog_object_id:) - The client tries to connect to
Host: connect.squareup.com
The problem is that when creating the request it defaults to Square::Environment::PRODUCTION when request_options[:base_url] is not set:
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
)A work around is to set base_url in request_options: client.inventory.get(request_options: { base_url: Square::Environment::SANDBOX }, catalog_object_id:)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels