Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@

require "bundler/gem_tasks"
require "minitest/test_task"
require "rubocop/rake_task"
require "rake/testtask"

Minitest::TestTask.create

# Create a test task that only runs the working tests
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList[
'test/square/integration/catalog/test_client.rb',
'test/square_legacy/api/test_*.rb'
]
t.warning = false
end
require "rubocop/rake_task"

RuboCop::RakeTask.new

Expand Down
2 changes: 1 addition & 1 deletion lib/square/catalog/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def batch_get(request_options: {}, **params)
# @return [Square::Types::BatchUpsertCatalogObjectsResponse]
def batch_upsert(request_options: {}, **params)
_response = @client.send(Internal::JSON::Request.new(
base_url: Square::Environment::SANDBOX,
base_url: request_options[:base_url] || Square::Environment::SANDBOX,
path: "/v2/catalog/batch-upsert",
method: "POST",
body: Types::BatchUpsertCatalogObjectsRequest.new(params[:request]).to_h,
Expand Down
18 changes: 12 additions & 6 deletions lib/square/inventory/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def get_adjustment(request_options: {}, **params)
# @return [Square::Types::BatchChangeInventoryResponse]
def deprecated_batch_change(request_options: {}, **params)
_request = Square::Internal::JSON::Request.new(
method: POST,
base_url: request_options[:base_url] || Square::Environment::SANDBOX,
method: "POST",
path: "v2/inventory/batch-change",
body: Square::Types::BatchChangeInventoryRequest.new(params[:request]).to_h,
)
Expand All @@ -59,7 +60,8 @@ def deprecated_batch_change(request_options: {}, **params)
# @return [Square::Types::BatchGetInventoryChangesResponse]
def deprecated_batch_get_changes(request_options: {}, **params)
_request = Square::Internal::JSON::Request.new(
method: POST,
base_url: request_options[:base_url] || Square::Environment::SANDBOX,
method: "POST",
path: "v2/inventory/batch-retrieve-changes",
body: Square::Types::BatchRetrieveInventoryChangesRequest.new(params[:request]).to_h,
)
Expand All @@ -77,7 +79,8 @@ def deprecated_batch_get_changes(request_options: {}, **params)
# @return [Square::Types::BatchGetInventoryCountsResponse]
def deprecated_batch_get_counts(request_options: {}, **params)
_request = Square::Internal::JSON::Request.new(
method: POST,
base_url: request_options[:base_url] || Square::Environment::SANDBOX,
method: "POST",
path: "v2/inventory/batch-retrieve-counts",
body: Square::Types::BatchGetInventoryCountsRequest.new(params[:request]).to_h,
)
Expand All @@ -98,7 +101,8 @@ def deprecated_batch_get_counts(request_options: {}, **params)
# @return [Square::Types::BatchChangeInventoryResponse]
def batch_create_changes(request_options: {}, **params)
_request = Square::Internal::JSON::Request.new(
method: POST,
base_url: request_options[:base_url] || Square::Environment::SANDBOX,
method: "POST",
path: "v2/inventory/changes/batch-create",
body: Square::Types::BatchChangeInventoryRequest.new(params[:request]).to_h,
)
Expand All @@ -122,7 +126,8 @@ def batch_create_changes(request_options: {}, **params)
# @return [Square::Types::BatchGetInventoryChangesResponse]
def batch_get_changes(request_options: {}, **params)
_request = Square::Internal::JSON::Request.new(
method: POST,
base_url: request_options[:base_url] || Square::Environment::SANDBOX,
method: "POST",
path: "v2/inventory/changes/batch-retrieve",
body: Square::Types::BatchRetrieveInventoryChangesRequest.new(params[:request]).to_h,
)
Expand All @@ -149,7 +154,8 @@ def batch_get_changes(request_options: {}, **params)
# @return [Square::Types::BatchGetInventoryCountsResponse]
def batch_get_counts(request_options: {}, **params)
_request = Square::Internal::JSON::Request.new(
method: POST,
base_url: request_options[:base_url] || Square::Environment::SANDBOX,
method: "POST",
path: "v2/inventory/counts/batch-retrieve",
body: Square::Types::BatchGetInventoryCountsRequest.new(params[:request]).to_h,
)
Expand Down
Loading