Skip to content

Commit

Permalink
Add 2023-10 resources
Browse files Browse the repository at this point in the history
  • Loading branch information
mllemango committed Oct 6, 2023
1 parent 38166be commit 51e509a
Show file tree
Hide file tree
Showing 358 changed files with 38,094 additions and 2,016 deletions.
3 changes: 2 additions & 1 deletion lib/shopify_api/admin_versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module ShopifyAPI
module AdminVersions
SUPPORTED_ADMIN_VERSIONS = T.let([
"unstable",
"2023-10",
"2023-07",
"2023-04",
"2023-01",
Expand All @@ -14,7 +15,7 @@ module AdminVersions
"2022-01",
], T::Array[String])

LATEST_SUPPORTED_ADMIN_VERSION = T.let("2023-07", String)
LATEST_SUPPORTED_ADMIN_VERSION = T.let("2023-10", String)
end

SUPPORTED_ADMIN_VERSIONS = ShopifyAPI::AdminVersions::SUPPORTED_ADMIN_VERSIONS
Expand Down
4 changes: 4 additions & 0 deletions lib/shopify_api/rest/resources/2023_01/balance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Balance < ShopifyAPI::Rest::Base
def initialize(session: ShopifyAPI::Context.active_session)
super(session: session)

@balance = T.let(nil, T.nilable(T::Array[T.untyped]))
end

@has_one = T.let({}, T::Hash[Symbol, Class])
Expand All @@ -24,6 +25,9 @@ def initialize(session: ShopifyAPI::Context.active_session)
{http_method: :get, operation: :get, ids: [], path: "shopify_payments/balance.json"}
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])

sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
attr_reader :balance

class << self
sig do
params(
Expand Down
3 changes: 3 additions & 0 deletions lib/shopify_api/rest/resources/2023_01/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def initialize(session: ShopifyAPI::Context.active_session)
@client_details = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
@closed_at = T.let(nil, T.nilable(String))
@company = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
@confirmation_number = T.let(nil, T.nilable(String))
@created_at = T.let(nil, T.nilable(String))
@currency = T.let(nil, T.nilable(String))
@current_subtotal_price = T.let(nil, T.nilable(String))
Expand Down Expand Up @@ -142,6 +143,8 @@ def initialize(session: ShopifyAPI::Context.active_session)
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
attr_reader :company
sig { returns(T.nilable(String)) }
attr_reader :confirmation_number
sig { returns(T.nilable(String)) }
attr_reader :created_at
sig { returns(T.nilable(String)) }
attr_reader :currency
Expand Down
3 changes: 0 additions & 3 deletions lib/shopify_api/rest/resources/2023_01/shop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def initialize(session: ShopifyAPI::Context.active_session)
@address2 = T.let(nil, T.nilable(String))
@checkout_api_supported = T.let(nil, T.nilable(T::Boolean))
@city = T.let(nil, T.nilable(String))
@cookie_consent_level = T.let(nil, T.nilable(String))
@country = T.let(nil, T.nilable(String))
@country_code = T.let(nil, T.nilable(String))
@country_name = T.let(nil, T.nilable(String))
Expand Down Expand Up @@ -89,8 +88,6 @@ def initialize(session: ShopifyAPI::Context.active_session)
sig { returns(T.nilable(String)) }
attr_reader :city
sig { returns(T.nilable(String)) }
attr_reader :cookie_consent_level
sig { returns(T.nilable(String)) }
attr_reader :country
sig { returns(T.nilable(String)) }
attr_reader :country_code
Expand Down
6 changes: 1 addition & 5 deletions lib/shopify_api/rest/resources/2023_01/variant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def initialize(session: ShopifyAPI::Context.active_session)
@inventory_management = T.let(nil, T.nilable(String))
@inventory_policy = T.let(nil, T.nilable(String))
@inventory_quantity = T.let(nil, T.nilable(Integer))
@inventory_quantity_adjustment = T.let(nil, T.nilable(Integer))
@old_inventory_quantity = T.let(nil, T.nilable(Integer))
@option = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
@position = T.let(nil, T.nilable(Integer))
Expand Down Expand Up @@ -55,8 +54,7 @@ def initialize(session: ShopifyAPI::Context.active_session)
{http_method: :put, operation: :put, ids: [:id], path: "variants/<id>.json"}
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
@read_only_attributes = T.let([
:inventory_quantity,
:inventory_quantity_adjustment
:inventory_quantity
], T::Array[Symbol])

sig { returns(T.nilable(String)) }
Expand All @@ -82,8 +80,6 @@ def initialize(session: ShopifyAPI::Context.active_session)
sig { returns(T.nilable(Integer)) }
attr_reader :inventory_quantity
sig { returns(T.nilable(Integer)) }
attr_reader :inventory_quantity_adjustment
sig { returns(T.nilable(Integer)) }
attr_reader :old_inventory_quantity
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
attr_reader :option
Expand Down
4 changes: 4 additions & 0 deletions lib/shopify_api/rest/resources/2023_04/balance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Balance < ShopifyAPI::Rest::Base
def initialize(session: ShopifyAPI::Context.active_session)
super(session: session)

@balance = T.let(nil, T.nilable(T::Array[T.untyped]))
end

@has_one = T.let({}, T::Hash[Symbol, Class])
Expand All @@ -24,6 +25,9 @@ def initialize(session: ShopifyAPI::Context.active_session)
{http_method: :get, operation: :get, ids: [], path: "shopify_payments/balance.json"}
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])

sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
attr_reader :balance

class << self
sig do
params(
Expand Down
3 changes: 3 additions & 0 deletions lib/shopify_api/rest/resources/2023_04/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def initialize(session: ShopifyAPI::Context.active_session)
@client_details = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
@closed_at = T.let(nil, T.nilable(String))
@company = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
@confirmation_number = T.let(nil, T.nilable(String))
@created_at = T.let(nil, T.nilable(String))
@currency = T.let(nil, T.nilable(String))
@current_subtotal_price = T.let(nil, T.nilable(String))
Expand Down Expand Up @@ -144,6 +145,8 @@ def initialize(session: ShopifyAPI::Context.active_session)
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
attr_reader :company
sig { returns(T.nilable(String)) }
attr_reader :confirmation_number
sig { returns(T.nilable(String)) }
attr_reader :created_at
sig { returns(T.nilable(String)) }
attr_reader :currency
Expand Down
3 changes: 0 additions & 3 deletions lib/shopify_api/rest/resources/2023_04/shop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def initialize(session: ShopifyAPI::Context.active_session)
@address2 = T.let(nil, T.nilable(String))
@checkout_api_supported = T.let(nil, T.nilable(T::Boolean))
@city = T.let(nil, T.nilable(String))
@cookie_consent_level = T.let(nil, T.nilable(String))
@country = T.let(nil, T.nilable(String))
@country_code = T.let(nil, T.nilable(String))
@country_name = T.let(nil, T.nilable(String))
Expand Down Expand Up @@ -89,8 +88,6 @@ def initialize(session: ShopifyAPI::Context.active_session)
sig { returns(T.nilable(String)) }
attr_reader :city
sig { returns(T.nilable(String)) }
attr_reader :cookie_consent_level
sig { returns(T.nilable(String)) }
attr_reader :country
sig { returns(T.nilable(String)) }
attr_reader :country_code
Expand Down
6 changes: 1 addition & 5 deletions lib/shopify_api/rest/resources/2023_04/variant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def initialize(session: ShopifyAPI::Context.active_session)
@inventory_management = T.let(nil, T.nilable(String))
@inventory_policy = T.let(nil, T.nilable(String))
@inventory_quantity = T.let(nil, T.nilable(Integer))
@inventory_quantity_adjustment = T.let(nil, T.nilable(Integer))
@old_inventory_quantity = T.let(nil, T.nilable(Integer))
@option = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
@position = T.let(nil, T.nilable(Integer))
Expand Down Expand Up @@ -55,8 +54,7 @@ def initialize(session: ShopifyAPI::Context.active_session)
{http_method: :put, operation: :put, ids: [:id], path: "variants/<id>.json"}
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
@read_only_attributes = T.let([
:inventory_quantity,
:inventory_quantity_adjustment
:inventory_quantity
], T::Array[Symbol])

sig { returns(T.nilable(String)) }
Expand All @@ -82,8 +80,6 @@ def initialize(session: ShopifyAPI::Context.active_session)
sig { returns(T.nilable(Integer)) }
attr_reader :inventory_quantity
sig { returns(T.nilable(Integer)) }
attr_reader :inventory_quantity_adjustment
sig { returns(T.nilable(Integer)) }
attr_reader :old_inventory_quantity
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
attr_reader :option
Expand Down
4 changes: 4 additions & 0 deletions lib/shopify_api/rest/resources/2023_07/balance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Balance < ShopifyAPI::Rest::Base
def initialize(session: ShopifyAPI::Context.active_session)
super(session: session)

@balance = T.let(nil, T.nilable(T::Array[T.untyped]))
end

@has_one = T.let({}, T::Hash[Symbol, Class])
Expand All @@ -24,6 +25,9 @@ def initialize(session: ShopifyAPI::Context.active_session)
{http_method: :get, operation: :get, ids: [], path: "shopify_payments/balance.json"}
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])

sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
attr_reader :balance

class << self
sig do
params(
Expand Down
3 changes: 3 additions & 0 deletions lib/shopify_api/rest/resources/2023_07/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def initialize(session: ShopifyAPI::Context.active_session)
@client_details = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
@closed_at = T.let(nil, T.nilable(String))
@company = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
@confirmation_number = T.let(nil, T.nilable(String))
@created_at = T.let(nil, T.nilable(String))
@currency = T.let(nil, T.nilable(String))
@current_subtotal_price = T.let(nil, T.nilable(String))
Expand Down Expand Up @@ -145,6 +146,8 @@ def initialize(session: ShopifyAPI::Context.active_session)
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
attr_reader :company
sig { returns(T.nilable(String)) }
attr_reader :confirmation_number
sig { returns(T.nilable(String)) }
attr_reader :created_at
sig { returns(T.nilable(String)) }
attr_reader :currency
Expand Down
121 changes: 121 additions & 0 deletions lib/shopify_api/rest/resources/2023_07/report.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# typed: false
# frozen_string_literal: true

########################################################################################################################
# This file is auto-generated. If you have an issue, please create a GitHub issue. #
########################################################################################################################

module ShopifyAPI
class Report < ShopifyAPI::Rest::Base
extend T::Sig

@prev_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
@next_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)

sig { params(session: T.nilable(ShopifyAPI::Auth::Session)).void }
def initialize(session: ShopifyAPI::Context.active_session)
super(session: session)

@category = T.let(nil, T.nilable(String))
@id = T.let(nil, T.nilable(Integer))
@name = T.let(nil, T.nilable(String))
@shopify_ql = T.let(nil, T.nilable(String))
@updated_at = T.let(nil, T.nilable(String))
end

@has_one = T.let({}, T::Hash[Symbol, Class])
@has_many = T.let({}, T::Hash[Symbol, Class])
@paths = T.let([
{http_method: :delete, operation: :delete, ids: [:id], path: "reports/<id>.json"},
{http_method: :get, operation: :get, ids: [], path: "reports.json"},
{http_method: :get, operation: :get, ids: [:id], path: "reports/<id>.json"},
{http_method: :post, operation: :post, ids: [], path: "reports.json"},
{http_method: :put, operation: :put, ids: [:id], path: "reports/<id>.json"}
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])

sig { returns(T.nilable(String)) }
attr_reader :category
sig { returns(T.nilable(Integer)) }
attr_reader :id
sig { returns(T.nilable(String)) }
attr_reader :name
sig { returns(T.nilable(String)) }
attr_reader :shopify_ql
sig { returns(T.nilable(String)) }
attr_reader :updated_at

class << self
sig do
params(
id: T.any(Integer, String),
fields: T.untyped,
session: Auth::Session
).returns(T.nilable(Report))
end
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(Report))
end

sig do
params(
id: T.any(Integer, String),
session: Auth::Session
).returns(T.untyped)
end
def delete(
id:,
session: ShopifyAPI::Context.active_session
)
request(
http_method: :delete,
operation: :delete,
session: session,
ids: {id: id},
params: {},
)
end

sig do
params(
ids: T.untyped,
limit: T.untyped,
since_id: T.untyped,
updated_at_min: T.untyped,
updated_at_max: T.untyped,
fields: T.untyped,
session: Auth::Session,
kwargs: T.untyped
).returns(T::Array[Report])
end
def all(
ids: nil,
limit: nil,
since_id: nil,
updated_at_min: nil,
updated_at_max: nil,
fields: nil,
session: ShopifyAPI::Context.active_session,
**kwargs
)
response = base_find(
session: session,
ids: {},
params: {ids: ids, limit: limit, since_id: since_id, updated_at_min: updated_at_min, updated_at_max: updated_at_max, fields: fields}.merge(kwargs).compact,
)

T.cast(response, T::Array[Report])
end

end

end
end
3 changes: 0 additions & 3 deletions lib/shopify_api/rest/resources/2023_07/shop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def initialize(session: ShopifyAPI::Context.active_session)
@address2 = T.let(nil, T.nilable(String))
@checkout_api_supported = T.let(nil, T.nilable(T::Boolean))
@city = T.let(nil, T.nilable(String))
@cookie_consent_level = T.let(nil, T.nilable(String))
@country = T.let(nil, T.nilable(String))
@country_code = T.let(nil, T.nilable(String))
@country_name = T.let(nil, T.nilable(String))
Expand Down Expand Up @@ -89,8 +88,6 @@ def initialize(session: ShopifyAPI::Context.active_session)
sig { returns(T.nilable(String)) }
attr_reader :city
sig { returns(T.nilable(String)) }
attr_reader :cookie_consent_level
sig { returns(T.nilable(String)) }
attr_reader :country
sig { returns(T.nilable(String)) }
attr_reader :country_code
Expand Down
6 changes: 1 addition & 5 deletions lib/shopify_api/rest/resources/2023_07/variant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def initialize(session: ShopifyAPI::Context.active_session)
@inventory_management = T.let(nil, T.nilable(String))
@inventory_policy = T.let(nil, T.nilable(String))
@inventory_quantity = T.let(nil, T.nilable(Integer))
@inventory_quantity_adjustment = T.let(nil, T.nilable(Integer))
@old_inventory_quantity = T.let(nil, T.nilable(Integer))
@option = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
@position = T.let(nil, T.nilable(Integer))
Expand Down Expand Up @@ -55,8 +54,7 @@ def initialize(session: ShopifyAPI::Context.active_session)
{http_method: :put, operation: :put, ids: [:id], path: "variants/<id>.json"}
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
@read_only_attributes = T.let([
:inventory_quantity,
:inventory_quantity_adjustment
:inventory_quantity
], T::Array[Symbol])

sig { returns(T.nilable(String)) }
Expand All @@ -82,8 +80,6 @@ def initialize(session: ShopifyAPI::Context.active_session)
sig { returns(T.nilable(Integer)) }
attr_reader :inventory_quantity
sig { returns(T.nilable(Integer)) }
attr_reader :inventory_quantity_adjustment
sig { returns(T.nilable(Integer)) }
attr_reader :old_inventory_quantity
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
attr_reader :option
Expand Down
Loading

0 comments on commit 51e509a

Please sign in to comment.