Skip to content

Commit

Permalink
Ruby 3.x fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasmiller committed Mar 8, 2021
1 parent 42586a6 commit a54cd7f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/recurly/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,23 @@ def pager(path, **options)
end

def head(path, **options)
validate_options!(options)
validate_options!(**options)
request = Net::HTTP::Head.new build_url(path, options)
set_headers(request, options[:headers])
http_response = run_request(request, options)
handle_response! request, http_response
end

def get(path, **options)
validate_options!(options)
validate_options!(**options)
request = Net::HTTP::Get.new build_url(path, options)
set_headers(request, options[:headers])
http_response = run_request(request, options)
handle_response! request, http_response
end

def post(path, request_data, request_class, **options)
validate_options!(options)
validate_options!(**options)
request_class.new(request_data).validate!
request = Net::HTTP::Post.new build_url(path, options)
request.set_content_type(JSON_CONTENT_TYPE)
Expand All @@ -123,7 +123,7 @@ def post(path, request_data, request_class, **options)
end

def put(path, request_data = nil, request_class = nil, **options)
validate_options!(options)
validate_options!(**options)
request = Net::HTTP::Put.new build_url(path, options)
request.set_content_type(JSON_CONTENT_TYPE)
set_headers(request, options[:headers])
Expand All @@ -137,7 +137,7 @@ def put(path, request_data = nil, request_class = nil, **options)
end

def delete(path, **options)
validate_options!(options)
validate_options!(**options)
request = Net::HTTP::Delete.new build_url(path, options)
set_headers(request, options[:headers])
http_response = run_request(request, options)
Expand Down

0 comments on commit a54cd7f

Please sign in to comment.