Class: EasyPost::Services::CustomsInfo
- Defined in:
- lib/easypost/services/customs_info.rb
Constant Summary collapse
- MODEL_CLASS =
EasyPost::Models::CustomsInfo
Instance Method Summary collapse
-
#create(params) ⇒ Object
Create a CustomsInfo object.
-
#retrieve(id) ⇒ Object
Retrieve a CustomsInfo object.
Methods inherited from Service
Constructor Details
This class inherits a constructor from EasyPost::Services::Service
Instance Method Details
#create(params) ⇒ Object
Create a CustomsInfo object
7 8 9 10 11 12 |
# 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) ⇒ Object
Retrieve a CustomsInfo object
15 16 17 18 19 |
# 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 |