Hi,
So I have a class and in its constructor I set up the context and get an active session
def setup_shopify_context
ShopifyAPI::Context.setup(
api_key: app_id,
api_secret_key: app_secret,
api_version: "2024-04",
scope: "read_locations,read_orders,read_users",
is_private: false,
is_embedded: true,
response_as_struct: true
)
end
def setup_shopify_active_session
@session = ShopifyAPI::Auth::Session.new(
shop: api_url,
access_token: access_token
)
end
But when I do
collection = ShopifyAPI::Order.all(session: @session, {
limit: ORDERS_LIMIT,
created_at_min: start_date,
created_at_max: end_date,
status: "any",
financial_status: "paid",
fields: "id,created_at,subtotal_price,location_id"
}
)
I get the following error:
undefined method `all’ for ShopifyAPI::Order:Class (NoMethodError) collection = ShopifyAPI::Order.all(session: @session,…