iyzico v1.5.6 Iyzico.BasketItem

A module for representing an item on a shopping basket to be processed in payment.

Link to this section Summary

Types

t()

Represents an item on a basket

The type of an item by its tangibility. A physical item should be tangible

Functions

Path for given item

Link to this section Types

Link to this type t()
t() :: %Iyzico.BasketItem{category: binary, id: binary, name: binary, price: binary, subcategory: binary, type: type}

Represents an item on a basket.

Fields

  • :id: Identifier of an item to be queried in host platform in future. It had better be unique.
  • :price: Price of the item.
  • :name: Name of the item, (e.g.: Binoculars).
  • :category: Category of the item, (e.g.: Collectibles).
  • :subcategory: Subcategory of the item, (.e.g.: Accessories).
  • :type: Type of the item, check out type type for more information.
Link to this type type()
type() :: :physical | :virtual

The type of an item by its tangibility. A physical item should be tangible.

Link to this section Functions

Path for given item.

Examples

iex> Iyzico.BasketItem.path(%Iyzico.BasketItem{id: "3", price: "45.72", name: "Binoculars", category: "Collectibles", subcategory: "Accessories", type: :physical})
"Collectibles/Accessories/Binoculars/3"