Class: Foto::Patient
Constant Summary
collapse
- ATTRIBUTES =
[ :external_id, :first_name, :last_name,
:email, :date_of_birth, :gender, :language ]
Instance Attribute Summary
Attributes inherited from Consumer
#api_key
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Consumer
#initialize, #save
Constructor Details
This class inherits a constructor from Foto::Consumer
Class Method Details
.attributes ⇒ Object
9
10
11
|
# File 'lib/foto/patient.rb', line 9
def attributes
ATTRIBUTES
end
|
.url ⇒ Object
13
14
15
|
# File 'lib/foto/patient.rb', line 13
def url
'patient'
end
|
Instance Method Details
#as_json ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/foto/patient.rb', line 18
def as_json
Yajl::Encoder.encode({
'FirstName' => first_name,
'LastName' => last_name,
'DateOfBirth' => Foto::JsonDate.new(date_of_birth),
'Email' => email,
'Gender' => gender,
'Language' => language || 'en',
'ExternalId' => external_id
})
end
|