Module: ClientSuccess::Product

Extended by:
Product
Included in:
Product
Defined in:
lib/client_success/product.rb

Instance Method Summary collapse

Instance Method Details

#list_all(connection:) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/client_success/product.rb', line 7

def list_all(connection:)
  response = connection.get("/v1/products")

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