types

Types

pub type Cart {
  Cart(
    id: option.Option(String),
    checkout_url: String,
    cost: option.Option(ShopifyCartCost),
    total_quantity: Int,
    lines: List(CartItem),
  )
}

Constructors

pub type CartItem {
  CartItem(
    id: option.Option(String),
    quantity: Int,
    cost: Cost,
    merchandise: Merchandise,
  )
}

Constructors

pub type CartProduct {
  CartProduct(
    id: String,
    handle: String,
    title: String,
    featured_image: Image,
  )
}

Constructors

  • CartProduct(
      id: String,
      handle: String,
      title: String,
      featured_image: Image,
    )
pub type Connection(a) {
  Connection(edges: List(Edge(a)))
}

Constructors

  • Connection(edges: List(Edge(a)))
pub type Cost {
  Cost(total_amount: Money)
}

Constructors

  • Cost(total_amount: Money)
pub type Edge(a) {
  Edge(node: a)
}

Constructors

  • Edge(node: a)
pub type Image {
  Image(
    url: String,
    alt_text: String,
    width: String,
    height: String,
  )
}

Constructors

  • Image(
      url: String,
      alt_text: String,
      width: String,
      height: String,
    )
pub type Maybe(a) {
  Maybe(option.Option(a))
}

Constructors

pub type Merchandise {
  Merchandise(
    id: String,
    title: String,
    selected_options: List(SelectedOption),
    product: CartProduct,
  )
}

Constructors

pub type Money {
  Money(amount: String, currency_code: String)
}

Constructors

  • Money(amount: String, currency_code: String)
pub type PriceRange {
  PriceRange(max_variant_price: Money, min_variant_price: Money)
}

Constructors

  • PriceRange(max_variant_price: Money, min_variant_price: Money)
pub type Product {
  Product(
    id: String,
    handle: String,
    available_for_sale: Bool,
    title: String,
    description: String,
    description_html: String,
    price_range: PriceRange,
    featured_image: Image,
    seo: Seo,
    tags: List(String),
    updated_at: String,
    variants: List(ProductVariant),
    images: List(Image),
  )
}

Constructors

  • Product(
      id: String,
      handle: String,
      available_for_sale: Bool,
      title: String,
      description: String,
      description_html: String,
      price_range: PriceRange,
      featured_image: Image,
      seo: Seo,
      tags: List(String),
      updated_at: String,
      variants: List(ProductVariant),
      images: List(Image),
    )
pub type ProductOption {
  ProductOption(id: String, name: String, values: List(String))
}

Constructors

  • ProductOption(id: String, name: String, values: List(String))
pub type ProductVariant {
  ProductVariant(
    id: String,
    title: String,
    available_for_sale: Bool,
    selected_options: SelectedOption,
    price: Money,
  )
}

Constructors

  • ProductVariant(
      id: String,
      title: String,
      available_for_sale: Bool,
      selected_options: SelectedOption,
      price: Money,
    )
pub type Products {
  Products(products: List(Product))
}

Constructors

  • Products(products: List(Product))
pub type SelectedOption {
  SelectedOption(name: String, value: String)
}

Constructors

  • SelectedOption(name: String, value: String)
pub type Seo {
  Seo(title: String, description: String)
}

Constructors

  • Seo(title: String, description: String)
pub type ShopifyCart {
  ShopifyCart(
    id: option.Option(String),
    checkout_url: String,
    cost: option.Option(ShopifyCartCost),
    lines: Connection(CartItem),
    total_quantity: Int,
  )
}

Constructors

pub type ShopifyCartCost {
  ShopifyCartCost(
    total_amount: Money,
    subtotal_amount: Money,
    total_tax_amount: Money,
  )
}

Constructors

  • ShopifyCartCost(
      total_amount: Money,
      subtotal_amount: Money,
      total_tax_amount: Money,
    )
pub type ShopifyClient {
  ShopifyClient(
    key: String,
    domain: String,
    api_version: option.Option(String),
  )
}

Constructors

  • ShopifyClient(
      key: String,
      domain: String,
      api_version: option.Option(String),
    )
pub type ShopifyError {
  ShopifyError(status: Int, body: String)
}

Constructors

  • ShopifyError(status: Int, body: String)
pub type ShopifyProduct {
  ShopifyProduct(
    id: String,
    handle: String,
    available_for_sale: Bool,
    title: String,
    description: String,
    description_html: String,
    price_range: PriceRange,
    variants: Connection(ProductVariant),
    featured_image: Image,
    images: Connection(Image),
    seo: Seo,
    tags: List(String),
    updated_at: String,
  )
}

Constructors

  • ShopifyProduct(
      id: String,
      handle: String,
      available_for_sale: Bool,
      title: String,
      description: String,
      description_html: String,
      price_range: PriceRange,
      variants: Connection(ProductVariant),
      featured_image: Image,
      images: Connection(Image),
      seo: Seo,
      tags: List(String),
      updated_at: String,
    )

Values

pub fn cart_decoder() -> decode.Decoder(Cart)
pub fn cart_item_connection_decoder() -> decode.Decoder(
  Connection(CartItem),
)
pub fn cart_item_edge_decoder() -> decode.Decoder(Edge(CartItem))
pub fn cost_decoder() -> decode.Decoder(Cost)
pub fn image_decoder() -> decode.Decoder(Image)
pub fn money_decoder() -> decode.Decoder(Money)
pub fn price_range_decoder() -> decode.Decoder(PriceRange)
pub fn product_decoder() -> decode.Decoder(Product)
pub fn product_variant_connection_decoder() -> decode.Decoder(
  Connection(ProductVariant),
)
pub fn product_variant_edges_decoder() -> decode.Decoder(
  Edge(ProductVariant),
)
pub fn products_decoder() -> decode.Decoder(Products)
pub fn seo_decoder() -> decode.Decoder(Seo)
pub fn shopify_cart_cost_decoder() -> decode.Decoder(
  ShopifyCartCost,
)
pub fn shopify_cart_decoder() -> decode.Decoder(ShopifyCart)
pub fn shopify_error_decoder() -> decode.Decoder(ShopifyError)
Search Document