lib/easypost/printer.rb in easypost-3.1.4 vs lib/easypost/printer.rb in easypost-3.1.5

- old
+ new

@@ -1,28 +1,24 @@ -module EasyPost - class Printer < Resource +class EasyPost::Printer < EasyPost::Resource - def job - response = EasyPost.make_request( - :get, url + '/jobs', @api_key - ) - return EasyPost::Util::convert_to_easypost_object(response, api_key) - end + def job + response = EasyPost.make_request( + :get, url + '/jobs', @api_key + ) + return EasyPost::Util::convert_to_easypost_object(response, api_key) + end - def print(params={}) - if params.instance_of?(EasyPost::PostageLabel) - temp = params.clone - params = {} - params[:postage_label] = temp - end - - response = EasyPost.make_request( - :post, url + '/print_postage_label', @api_key, params - ) - return true - rescue - return false + def print(params={}) + if params.instance_of?(EasyPost::PostageLabel) + temp = params.clone + params = {} + params[:postage_label] = temp end + response = EasyPost.make_request( + :post, url + '/print_postage_label', @api_key, params + ) + true + rescue + false end end -