Sha256: ee6c3c6eaef1355b64e7a02d7e7908dc1c5f314abbcd3c5c9d3170cd9e9974c2

Contents?: true

Size: 427 Bytes

Versions: 6

Compression:

Stored size: 427 Bytes

Contents

# frozen_string_literal: true

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

  # Create a Parcel object
  def create(params = {})
    wrapped_params = { parcel: params }
    @client.make_request(:post, 'parcels', MODEL_CLASS, wrapped_params)
  end

  # Retrieve a Parcel object
  def retrieve(id)
    @client.make_request(:get, "parcels/#{id}", MODEL_CLASS)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
easypost-5.3.0 lib/easypost/services/parcel.rb
easypost-5.2.0 lib/easypost/services/parcel.rb
easypost-5.1.1 lib/easypost/services/parcel.rb
easypost-5.1.0 lib/easypost/services/parcel.rb
easypost-5.0.1 lib/easypost/services/parcel.rb
easypost-5.0.0 lib/easypost/services/parcel.rb