class ShopifyAPI::Redirect

Attributes

id[R]
path[R]
target[R]

Public Class Methods

all( limit: nil, since_id: nil, path: nil, target: nil, fields: nil, session: ShopifyAPI::Context.active_session, **kwargs ) click to toggle source
# File lib/shopify_api/rest/resources/2022_04/redirect.rb, line 97
def all(
  limit: nil,
  since_id: nil,
  path: nil,
  target: nil,
  fields: nil,
  session: ShopifyAPI::Context.active_session,
  **kwargs
)
  response = base_find(
    session: session,
    ids: {},
    params: {limit: limit, since_id: since_id, path: path, target: target, fields: fields}.merge(kwargs).compact,
  )

  T.cast(response, T::Array[Redirect])
end
count( path: nil, target: nil, session: ShopifyAPI::Context.active_session, **kwargs ) click to toggle source
# File lib/shopify_api/rest/resources/2022_04/redirect.rb, line 123
def count(
  path: nil,
  target: nil,
  session: ShopifyAPI::Context.active_session,
  **kwargs
)
  request(
    http_method: :get,
    operation: :count,
    session: session,
    ids: {},
    params: {path: path, target: target}.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/redirect.rb, line 73
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/redirect.rb, line 54
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(Redirect))
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/redirect.rb, line 19
def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)

  @id = T.let(nil, T.nilable(Integer))
  @path = T.let(nil, T.nilable(String))
  @target = T.let(nil, T.nilable(String))

  super(session: session, from_hash: from_hash)
end