Class: ShopifyAPI::StorefrontAccessToken
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::StorefrontAccessToken
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2022_04/storefront_access_token.rb,
lib/shopify_api/rest/resources/2022_07/storefront_access_token.rb,
lib/shopify_api/rest/resources/2022_10/storefront_access_token.rb,
lib/shopify_api/rest/resources/2023_01/storefront_access_token.rb,
lib/shopify_api/rest/resources/2023_04/storefront_access_token.rb,
lib/shopify_api/rest/resources/2023_07/storefront_access_token.rb,
lib/shopify_api/rest/resources/2023_10/storefront_access_token.rb,
lib/shopify_api/rest/resources/2024_01/storefront_access_token.rb,
lib/shopify_api/rest/resources/2024_04/storefront_access_token.rb,
lib/shopify_api/rest/resources/2024_07/storefront_access_token.rb,
lib/shopify_api/rest/resources/2024_10/storefront_access_token.rb
Instance Attribute Summary collapse
-
#access_scope ⇒ Object
readonly
Returns the value of attribute access_scope.
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Attributes inherited from Rest::Base
Class Method Summary collapse
- .all(session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
- .delete(id:, session: ShopifyAPI::Context.active_session) ⇒ Object
Instance Method Summary collapse
-
#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ StorefrontAccessToken
constructor
A new instance of StorefrontAccessToken.
Methods inherited from Rest::Base
api_call_limit, base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, get_path_ids, has_many?, has_one?, inherited, json_body_name, json_response_body_names, #method_missing, next_page?, next_page_info, prev_page?, prev_page_info, primary_key, read_only_attributes, request, #respond_to_missing?, retry_request_after, #save, #save!, #to_hash
Constructor Details
#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ StorefrontAccessToken
Returns a new instance of StorefrontAccessToken.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/shopify_api/rest/resources/2022_04/storefront_access_token.rb', line 19 def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) @title = T.let(nil, T.nilable(String)) @access_scope = T.let(nil, T.nilable(String)) @access_token = T.let(nil, T.nilable(String)) @created_at = T.let(nil, T.nilable(String)) @id = T.let(nil, T.nilable(Integer)) super(session: session, from_hash: from_hash) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ShopifyAPI::Rest::Base
Instance Attribute Details
#access_scope ⇒ Object (readonly)
Returns the value of attribute access_scope.
41 42 43 |
# File 'lib/shopify_api/rest/resources/2022_04/storefront_access_token.rb', line 41 def access_scope @access_scope end |
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
43 44 45 |
# File 'lib/shopify_api/rest/resources/2022_04/storefront_access_token.rb', line 43 def access_token @access_token end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
45 46 47 |
# File 'lib/shopify_api/rest/resources/2022_04/storefront_access_token.rb', line 45 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
47 48 49 |
# File 'lib/shopify_api/rest/resources/2022_04/storefront_access_token.rb', line 47 def id @id end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
39 40 41 |
# File 'lib/shopify_api/rest/resources/2022_04/storefront_access_token.rb', line 39 def title @title end |
Class Method Details
.all(session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/shopify_api/rest/resources/2022_04/storefront_access_token.rb', line 75 def all( session: ShopifyAPI::Context.active_session, **kwargs ) response = base_find( session: session, ids: {}, params: {}.merge(kwargs).compact, ) T.cast(response, T::Array[StorefrontAccessToken]) end |
.delete(id:, session: ShopifyAPI::Context.active_session) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/shopify_api/rest/resources/2022_04/storefront_access_token.rb', line 56 def delete( id:, session: ShopifyAPI::Context.active_session ) request( http_method: :delete, operation: :delete, session: session, ids: {id: id}, params: {}, ) end |