Class: EasyPost::Services::CustomsItem

Inherits:
Service
  • Object
show all
Defined in:
lib/easypost/services/customs_item.rb

Constant Summary collapse

MODEL_CLASS =
EasyPost::Models::CustomsItem

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from EasyPost::Services::Service

Instance Method Details

#create(params) ⇒ Object

Create a CustomsItem object



7
8
9
# File 'lib/easypost/services/customs_item.rb', line 7

def create(params)
  @client.make_request(:post, 'customs_items', MODEL_CLASS, params)
end

#retrieve(id) ⇒ Object

Retrieve a CustomsItem object



12
13
14
# File 'lib/easypost/services/customs_item.rb', line 12

def retrieve(id)
  @client.make_request(:get, "customs_items/#{id}", MODEL_CLASS)
end