Class: Vng::Client
Overview
Provides methods to interact with Vonigo clients.
Constant Summary collapse
- PATH =
'/api/v1/data/Clients/'
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, email:) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(id:, email:) ⇒ Client
10 11 12 13 |
# File 'lib/vng/client.rb', line 10 def initialize(id:, email:) @id = id @email = email end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
8 9 10 |
# File 'lib/vng/client.rb', line 8 def email @email end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/vng/client.rb', line 8 def id @id end |
Class Method Details
.find(contact_id) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/vng/client.rb', line 16 def self.find(contact_id) body = { method: '1', objectID: contact_id, } data = request path: PATH, body: body email = value_for_field data, 238 new id: contact_id, email: email end |