Class: Updox::Models::Patient

Inherits:
Model
  • Object
show all
Defined in:
lib/updox/models/patient.rb

Constant Summary collapse

SYNC_ENDPOINT =
'/PatientsSync'.freeze

Constants inherited from Model

Model::LIST_NAME, Model::LIST_TYPE

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

from_response

Class Method Details

.sync(patients, account_id:) ⇒ Object



32
33
34
# File 'lib/updox/models/patient.rb', line 32

def self.sync(patients, account_id: )
  from_response(UpdoxClient.connection.request(endpoint: SYNC_ENDPOINT, body: { patients: patients }, auth: {accountId: }, required_auths: Updox::Models::Auth::AUTH_ACCT), self)
end

Instance Method Details

#save(account_id:) ⇒ Object



28
29
30
# File 'lib/updox/models/patient.rb', line 28

def save(account_id: )
  self.class.sync([self], account_id: )
end