Class: EasyPost::Brand

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

Overview

The Brand object allows you to customize the publicly-accessible html page that shows tracking details for every EasyPost tracker.

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, each, #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

The url of the Brand object.



6
7
8
9
10
11
12
# File 'lib/easypost/brand.rb', line 6

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