lib/sendgrid/web/client.rb in sendgrid-web-0.0.7 vs lib/sendgrid/web/client.rb in sendgrid-web-0.1.0
- old
+ new
@@ -48,17 +48,19 @@
def connection
@connection = API
end
def default_params(additions = {})
+ params = Sendgrid::Web::Parameters.new
defaults = {
query: {
api_user: config.username,
api_key: config.password
}
}
- defaults[:query].merge!(additions)
- defaults
+ params.replace(defaults)
+ params[:query].merge!(additions)
+ params
end
def craft_response(response)
Sendgrid::Web::Response.new(response.code, response.body)
end