Class: EasyPost::Brand

Inherits:
Resource show all
Defined in:
lib/easypost/brand.rb

Instance Attribute Summary

Attributes inherited from EasyPostObject

#api_key, #name, #parent, #unsaved_values

Instance Method Summary collapse

Methods inherited from Resource

all, class_name, create, #delete, #refresh, retrieve, #save, url

Methods inherited from EasyPostObject

#[], #[]=, #as_json, construct_from, #deconstruct_keys, #each, #id, #id=, #initialize, #inspect, #keys, #refresh_from, #to_hash, #to_json, #to_s, #values

Constructor Details

This class inherits a constructor from EasyPost::EasyPostObject

Instance Method Details

#urlObject



2
3
4
5
6
7
8
# File 'lib/easypost/brand.rb', line 2

def url
  if user_id.nil? || user_id.empty?
    raise EasyPost::Error, "Missing user_id: #{self.class} instance is missing user_id"
  end

  "#{::EasyPost::User.url}/#{CGI.escape(user_id)}/brand"
end