Module: ClientSuccess::ClientType

Extended by:
ClientType
Included in:
ClientType
Defined in:
lib/client_success/client_type.rb

Instance Method Summary collapse

Instance Method Details

#list_all(connection:) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/client_success/client_type.rb', line 8

def list_all(connection:)
  response = connection.get(
    "/v1/client-segments")

  response.body.map do |payload|
    DomainModel::ClientType.new(
      payload.deep_transform_keys(&:underscore))
  end
end