Sha256: e8be1ea24a981f9cb0b5895825fa992157c9847633578109cbe1c78d9ea2774f

Contents?: true

Size: 572 Bytes

Versions: 7

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

class EasyPost::Services::CustomsItem < EasyPost::Services::Service
  MODEL_CLASS = EasyPost::Models::CustomsItem

  # Create a CustomsItem object
  def create(params)
    response = @client.make_request(:post, 'customs_items', params)

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

  # Retrieve a CustomsItem object
  def retrieve(id)
    response = @client.make_request(:get, "customs_items/#{id}")

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
easypost-6.4.1 lib/easypost/services/customs_item.rb
easypost-6.4.0 lib/easypost/services/customs_item.rb
easypost-6.3.0 lib/easypost/services/customs_item.rb
easypost-6.2.0 lib/easypost/services/customs_item.rb
easypost-6.1.1 lib/easypost/services/customs_item.rb
easypost-6.1.0 lib/easypost/services/customs_item.rb
easypost-6.0.0 lib/easypost/services/customs_item.rb