Sha256: 27d2ba1926bc215b3fc379d94d667a80661ff4d37cd20676a740d59112383412

Contents?: true

Size: 569 Bytes

Versions: 1

Compression:

Stored size: 569 Bytes

Contents

module EasyPost
  class CarrierAccount < Resource
    def save
      if @unsaved_values.length > 0
        values = {}
        @unsaved_values.each { |k| values[k] = @values[k] }

        wrapped_params = {carrier_account: values}

        response, api_key = EasyPost.request(:put, url, @api_key, wrapped_params)
        refresh_from(response, api_key)
      end
      return self
    end

    def self.types
      response, api_key = EasyPost.request(:get, "/carrier_types", @api_key)
      return Util.convert_to_easypost_object(response, api_key)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
easypost-2.0.15 lib/easypost/carrier_account.rb