Module: ClientSuccess::ToDo
Instance Method Summary collapse
Instance Method Details
#create(client_id:, attributes:, connection:) ⇒ Object
18 19 20 21 |
# File 'lib/client_success/to_do.rb', line 18 def create(client_id:, attributes:, connection:) raise NotImplementedError end |
#list_all(client_id:, connection:) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/client_success/to_do.rb', line 8 def list_all(client_id:, connection:) response = connection.get( "/v1/clients/#{client_id}/to-dos") response.body.map do |payload| DomainModel::ToDo.new( payload.deep_transform_keys(&:underscore)) end end |