Class: MagicWrite::Companies
- Inherits:
-
Object
- Object
- MagicWrite::Companies
- Defined in:
- lib/magicwrite/companies.rb
Instance Method Summary collapse
- #create(parameters: {}) ⇒ Object
-
#initialize(client:) ⇒ Companies
constructor
A new instance of Companies.
- #retrieve ⇒ Object
- #update(parameters: {}) ⇒ Object
Constructor Details
#initialize(client:) ⇒ Companies
Returns a new instance of Companies.
3 4 5 |
# File 'lib/magicwrite/companies.rb', line 3 def initialize(client:) @client = client end |
Instance Method Details
#create(parameters: {}) ⇒ Object
7 8 9 |
# File 'lib/magicwrite/companies.rb', line 7 def create(parameters: {}) client.json_post(path: '/companies', parameters: parameters) end |
#retrieve ⇒ Object
11 12 13 |
# File 'lib/magicwrite/companies.rb', line 11 def retrieve client.get(path: '/companies/current') end |
#update(parameters: {}) ⇒ Object
15 16 17 |
# File 'lib/magicwrite/companies.rb', line 15 def update(parameters: {}) client.json_put(path: '/companies/current', parameters: parameters) end |