lib/easypost/beta/end_shipper.rb in easypost-4.7.1 vs lib/easypost/beta/end_shipper.rb in easypost-4.8.0

- old
+ new

@@ -1,30 +1,34 @@ # frozen_string_literal: true # EndShipper objects are fully-qualified Address objects that require all parameters and get verified upon creation. class EasyPost::Beta::EndShipper < EasyPost::Resource + # Create an EndShipper object. # <b>DEPRECATED:</b> Please use <tt>EndShipper</tt> in the main namespace instead. def self.create(params = {}, api_key = nil) warn '[DEPRECATION] Please use `EndShipper.create` in the main namespace instead.' response = EasyPost.make_request(:post, '/beta/end_shippers', api_key, { address: params }) EasyPost::Util.convert_to_easypost_object(response, api_key) end # Retrieves an EndShipper object. + # <b>DEPRECATED:</b> Please use <tt>EndShipper</tt> in the main namespace instead. def self.retrieve(id, params = {}, api_key = nil) warn '[DEPRECATION] Please use `EndShipper.retrieve` in the main namespace instead.' response = EasyPost.make_request(:get, "/beta/end_shippers/#{id}", api_key, params) EasyPost::Util.convert_to_easypost_object(response, api_key) end # Retrieves a list of EndShipper objects. + # <b>DEPRECATED:</b> Please use <tt>EndShipper</tt> in the main namespace instead. def self.all(params = {}, api_key = nil) warn '[DEPRECATION] Please use `EndShipper.all` in the main namespace instead.' response = EasyPost.make_request(:get, '/beta/end_shippers', api_key, params) EasyPost::Util.convert_to_easypost_object(response, api_key) end # Updates (saves) an EndShipper object. This requires all parameters to be set. + # <b>DEPRECATED:</b> Please use <tt>EndShipper</tt> in the main namespace instead. def save warn '[DEPRECATION] Please use `endShipper.save` in the main namespace instead.' if @unsaved_values.length.positive? values = {} @unsaved_values.each { |k| values[k] = @values[k] }