pify/shop

The shop the token belongs to and the scopes it holds. These are the cheapest authenticated reads, so they make a good connection check.

Types

pub type Shop {
  Shop(
    name: String,
    myshopify_domain: String,
    currency_code: String,
    plan_name: option.Option(String),
    tax_pricing: order.TaxPricing,
  )
}

Constructors

  • Shop(
      name: String,
      myshopify_domain: String,
      currency_code: String,
      plan_name: option.Option(String),
      tax_pricing: order.TaxPricing,
    )

    Arguments

    currency_code

    The shop’s currency. Order money read through shopMoney is in it.

    tax_pricing

    taxesIncluded: whether the shop’s product prices hold the tax.

Values

pub fn access_scopes(
  client: pify.Client,
) -> effect.Effect(Result(List(String), error.ShopifyError), key)

The scope handles granted to the token, such as read_orders. A missing write scope surfaces here before a write fails with ACCESS_DENIED.

pub fn access_scopes_decoder() -> decode.Decoder(List(String))
pub const access_scopes_query: String
pub fn decoder() -> decode.Decoder(Shop)
pub fn probe(
  client: pify.Client,
) -> effect.Effect(
  Result(execute.Served(Shop), error.ShopifyError),
  key,
)

Keeps the served version, so a connection test can report that Shopify fell forward from a retired version.

pub const query: String
✨ Search Document