class

Laspatule::Services::Ingredients

Inherits Reference < Object

Constructors

new(user_id : Int32, repository : Repositories::Ingredients)
Source

Instance methods

create(ingredient : Models::CreateIngredient) : Models::Ingredient

Creates a new ingredient and returns its.

Source
get_by_id(id : Int32) : Models::Ingredient

Gets an ingredient by id.

Source
search_by_name(name : String, page_size : Int32, next_page : String | Nil) : Models::Page(Models::Ingredient)

Search ingredients by name.

See Models::Page documentation about pagination.

Source