class EasyPost::Services::CustomsInfo

Constants

MODEL_CLASS

CustomsInfo objects contain CustomsItem objects and all necessary information for the generation of customs forms required for international shipping.

Public Instance Methods

create(params) click to toggle source

Create a CustomsInfo object

# File lib/easypost/services/customs_info.rb, line 7
def create(params)
  wrapped_params = { customs_info: params }
  response = @client.make_request(:post, 'customs_infos', wrapped_params)

  EasyPost::InternalUtilities::Json.convert_json_to_object(response, MODEL_CLASS)
end
retrieve(id) click to toggle source

Retrieve a CustomsInfo object

# File lib/easypost/services/customs_info.rb, line 15
def retrieve(id)
  response = @client.make_request(:get, "customs_infos/#{id}")

  EasyPost::InternalUtilities::Json.convert_json_to_object(response, MODEL_CLASS)
end