Class: Dato::Account::Repo::Account

Inherits:
Base
  • Object
show all
Defined in:
lib/dato/account/repo/account.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Dato::Account::Repo::Base

Instance Method Details

#findObject



17
18
19
# File 'lib/dato/account/repo/account.rb', line 17

def find
  get_request '/account'
end

#update(resource_attributes) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/dato/account/repo/account.rb', line 8

def update(resource_attributes)
  body = JsonApiSerializer.new(
    type: :account,
    attributes: %i(email password)
  ).serialize(resource_attributes)

  put_request '/account', body
end