class ShopifyAPI::Page

Attributes

admin_graphql_api_id[R]
author[R]
body_html[R]
created_at[R]
handle[R]
id[R]
metafield[R]
published_at[R]
shop_id[R]
template_suffix[R]
title[R]
updated_at[R]

Public Class Methods

all( limit: nil, since_id: nil, title: nil, handle: nil, created_at_min: nil, created_at_max: nil, updated_at_min: nil, updated_at_max: nil, published_at_min: nil, published_at_max: nil, fields: nil, published_status: nil, session: ShopifyAPI::Context.active_session, **kwargs ) click to toggle source
# File lib/shopify_api/rest/resources/2022_04/page.rb, line 133
def all(
  limit: nil,
  since_id: nil,
  title: nil,
  handle: nil,
  created_at_min: nil,
  created_at_max: nil,
  updated_at_min: nil,
  updated_at_max: nil,
  published_at_min: nil,
  published_at_max: nil,
  fields: nil,
  published_status: nil,
  session: ShopifyAPI::Context.active_session,
  **kwargs
)
  response = base_find(
    session: session,
    ids: {},
    params: {limit: limit, since_id: since_id, title: title, handle: handle, created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max, published_at_min: published_at_min, published_at_max: published_at_max, fields: fields, published_status: published_status}.merge(kwargs).compact,
  )

  T.cast(response, T::Array[Page])
end
count( title: nil, created_at_min: nil, created_at_max: nil, updated_at_min: nil, updated_at_max: nil, published_at_min: nil, published_at_max: nil, published_status: nil, session: ShopifyAPI::Context.active_session, **kwargs ) click to toggle source
# File lib/shopify_api/rest/resources/2022_04/page.rb, line 172
def count(
  title: nil,
  created_at_min: nil,
  created_at_max: nil,
  updated_at_min: nil,
  updated_at_max: nil,
  published_at_min: nil,
  published_at_max: nil,
  published_status: nil,
  session: ShopifyAPI::Context.active_session,
  **kwargs
)
  request(
    http_method: :get,
    operation: :count,
    session: session,
    ids: {},
    params: {title: title, created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max, published_at_min: published_at_min, published_at_max: published_at_max, published_status: published_status}.merge(kwargs).compact,
    body: {},
    entity: nil,
  )
end
delete( id:, session: ShopifyAPI::Context.active_session ) click to toggle source
# File lib/shopify_api/rest/resources/2022_04/page.rb, line 102
def delete(
  id:,
  session: ShopifyAPI::Context.active_session
)
  request(
    http_method: :delete,
    operation: :delete,
    session: session,
    ids: {id: id},
    params: {},
  )
end
find( id:, fields: nil, session: ShopifyAPI::Context.active_session ) click to toggle source
# File lib/shopify_api/rest/resources/2022_04/page.rb, line 83
def find(
  id:,
  fields: nil,
  session: ShopifyAPI::Context.active_session
)
  result = base_find(
    session: session,
    ids: {id: id},
    params: {fields: fields},
  )
  T.cast(result[0], T.nilable(Page))
end
new(session: ShopifyAPI::Context.active_session, from_hash: nil) click to toggle source
Calls superclass method ShopifyAPI::Rest::Base::new
# File lib/shopify_api/rest/resources/2022_04/page.rb, line 19
def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)

  @admin_graphql_api_id = T.let(nil, T.nilable(String))
  @author = T.let(nil, T.nilable(String))
  @body_html = T.let(nil, T.nilable(String))
  @created_at = T.let(nil, T.nilable(String))
  @handle = T.let(nil, T.nilable(String))
  @id = T.let(nil, T.nilable(Integer))
  @metafield = T.let(nil, T.nilable(Metafield))
  @published_at = T.let(nil, T.nilable(String))
  @shop_id = T.let(nil, T.nilable(Integer))
  @template_suffix = T.let(nil, T.nilable(String))
  @title = T.let(nil, T.nilable(String))
  @updated_at = T.let(nil, T.nilable(String))

  super(session: session, from_hash: from_hash)
end