Class: MagicWrite::Companies

Inherits:
Object
  • Object
show all
Defined in:
lib/magicwrite/companies.rb

Instance Method Summary collapse

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

#retrieveObject



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