-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose brand/update via User resource (#123)
* Expose brand/update via User resource * Fix updating Brand through User.
- Loading branch information
1 parent
25c4da2
commit 1e4c5bd
Showing
3 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class EasyPost::Brand < EasyPost::Resource | ||
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 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters