class EasyPost::Services::EndShipper
Public Instance Methods
Source
# File lib/easypost/services/end_shipper.rb, line 22 def all(params = {}) response = @client.make_request(:get, 'end_shippers', params) EasyPost::InternalUtilities::Json.convert_json_to_object(response, MODEL_CLASS) end
Retrieve all EndShipper
objects.
Source
# File lib/easypost/services/end_shipper.rb, line 7 def create(params = {}) wrapped_params = { address: params } response = @client.make_request(:post, 'end_shippers', wrapped_params) EasyPost::InternalUtilities::Json.convert_json_to_object(response, MODEL_CLASS) end
Create an EndShipper
object.
Source
# File lib/easypost/services/end_shipper.rb, line 15 def retrieve(id) response = @client.make_request(:get, "end_shippers/#{id}") EasyPost::InternalUtilities::Json.convert_json_to_object(response, MODEL_CLASS) end
Retrieve an EndShipper
object.
Source
# File lib/easypost/services/end_shipper.rb, line 29 def update(id, params) wrapped_params = { address: params } response = @client.make_request(:put, "end_shippers/#{id}", wrapped_params) EasyPost::InternalUtilities::Json.convert_json_to_object(response, MODEL_CLASS) end
Updates an EndShipper
object. This requires all parameters to be set.