bigcommerce-api-ruby
bigcommerce-api-ruby copied to clipboard
Bigcommerce::Request: Do Not Modify Caller's Hash When Accessing Connection
Expected behavior
API request method calls do not modify the caller's references.
Actual behavior
Bigcommerce::Request#raw_request
calls params.delete(:connection)
removing :connection
from caller
Steps to reproduce behavior
options = {
:page => page,
:limit => 250,
:connection => connection
}
customers = Bigcommerce::Customer.all(options)
# process
# get page 2
options[:page] = page + 1
# NoMethodError because :connection was remove by prior call
customers = Bigcommerce::Customer.all(options)