class EasyPost::Services::CustomsItem

Constants

MODEL_CLASS

A CustomsItem object describes goods for international shipment and should be created then included in a CustomsInfo object.

Public Instance Methods

create(params) click to toggle source

Create a CustomsItem object

# File lib/easypost/services/customs_item.rb, line 7
def create(params)
  response = @client.make_request(:post, 'customs_items', params)

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

Retrieve a CustomsItem object

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

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