Sha256: 1d316ea9b1d29b87be890091ff5d03a227246fb328b1ee9ec04df3e19f70895d
Contents?: true
Size: 772 Bytes
Versions: 6
Compression:
Stored size: 772 Bytes
Contents
# frozen_string_literal: true class EasyPost::Services::Insurance < EasyPost::Services::Service MODEL_CLASS = EasyPost::Models::Insurance # Create an Insurance object def create(params = {}) wrapped_params = { insurance: params } @client.make_request(:post, 'insurances', MODEL_CLASS, wrapped_params) end # Retrieve an Insurance object def retrieve(id) @client.make_request(:get, "insurances/#{id}", MODEL_CLASS) end # Retrieve all Insurance objects def all(params = {}) @client.make_request(:get, 'insurances', MODEL_CLASS, params) end # Get the next page of insurances. def get_next_page(collection, page_size = nil) get_next_page_helper(collection, collection.insurances, 'insurances', MODEL_CLASS, page_size) end end
Version data entries
6 entries across 6 versions & 1 rubygems