-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
358 changed files
with
38,094 additions
and
2,016 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.