Class: ShopifyAPI::User
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::User
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2022_04/user.rb,
lib/shopify_api/rest/resources/2022_07/user.rb,
lib/shopify_api/rest/resources/2022_10/user.rb,
lib/shopify_api/rest/resources/2023_01/user.rb,
lib/shopify_api/rest/resources/2023_04/user.rb,
lib/shopify_api/rest/resources/2023_07/user.rb
Instance Attribute Summary collapse
-
#account_owner ⇒ Object
readonly
Returns the value of attribute account_owner.
-
#bio ⇒ Object
readonly
Returns the value of attribute bio.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#im ⇒ Object
readonly
Returns the value of attribute im.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#permissions ⇒ Object
readonly
Returns the value of attribute permissions.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#receive_announcements ⇒ Object
readonly
Returns the value of attribute receive_announcements.
-
#screen_name ⇒ Object
readonly
Returns the value of attribute screen_name.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#user_type ⇒ Object
readonly
Returns the value of attribute user_type.
Attributes inherited from Rest::Base
Class Method Summary collapse
- .all(limit: nil, page_info: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
- .current(session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
- .find(id:, session: ShopifyAPI::Context.active_session) ⇒ Object
Instance Method Summary collapse
-
#initialize(session: ShopifyAPI::Context.active_session) ⇒ User
constructor
A new instance of User.
Methods inherited from Rest::Base
base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, has_many?, has_one?, 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?, #save, #save!, #to_hash
Constructor Details
#initialize(session: ShopifyAPI::Context.active_session) ⇒ User
Returns a new instance of User.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 16 def initialize(session: ShopifyAPI::Context.active_session) super(session: session) @account_owner = T.let(nil, T.nilable(T::Boolean)) @bio = T.let(nil, T.nilable(String)) @email = T.let(nil, T.nilable(String)) @first_name = T.let(nil, T.nilable(String)) @id = T.let(nil, T.nilable(Integer)) @im = T.let(nil, T.nilable(String)) @last_name = T.let(nil, T.nilable(String)) @locale = T.let(nil, T.nilable(String)) @permissions = T.let(nil, T.nilable(T::Array[T.untyped])) @phone = T.let(nil, T.nilable(String)) @receive_announcements = T.let(nil, T.nilable(Integer)) @screen_name = T.let(nil, T.nilable(String)) @url = T.let(nil, T.nilable(String)) @user_type = T.let(nil, T.nilable(String)) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ShopifyAPI::Rest::Base
Instance Attribute Details
#account_owner ⇒ Object (readonly)
Returns the value of attribute account_owner.
44 45 46 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 44 def account_owner @account_owner end |
#bio ⇒ Object (readonly)
Returns the value of attribute bio.
46 47 48 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 46 def bio @bio end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
48 49 50 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 48 def email @email end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
50 51 52 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 50 def first_name @first_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
52 53 54 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 52 def id @id end |
#im ⇒ Object (readonly)
Returns the value of attribute im.
54 55 56 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 54 def im @im end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
56 57 58 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 56 def last_name @last_name end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
58 59 60 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 58 def locale @locale end |
#permissions ⇒ Object (readonly)
Returns the value of attribute permissions.
60 61 62 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 60 def @permissions end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
62 63 64 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 62 def phone @phone end |
#receive_announcements ⇒ Object (readonly)
Returns the value of attribute receive_announcements.
64 65 66 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 64 def receive_announcements @receive_announcements end |
#screen_name ⇒ Object (readonly)
Returns the value of attribute screen_name.
66 67 68 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 66 def screen_name @screen_name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
68 69 70 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 68 def url @url end |
#user_type ⇒ Object (readonly)
Returns the value of attribute user_type.
70 71 72 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 70 def user_type @user_type end |
Class Method Details
.all(limit: nil, page_info: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 99 def all( limit: nil, page_info: nil, session: ShopifyAPI::Context.active_session, **kwargs ) response = base_find( session: session, ids: {}, params: {limit: limit, page_info: page_info}.merge(kwargs).compact, ) T.cast(response, T::Array[User]) end |
.current(session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 120 def current( session: ShopifyAPI::Context.active_session, **kwargs ) request( http_method: :get, operation: :current, session: session, ids: {}, params: {}.merge(kwargs).compact, body: {}, entity: nil, ) end |
.find(id:, session: ShopifyAPI::Context.active_session) ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/shopify_api/rest/resources/2022_04/user.rb', line 79 def find( id:, session: ShopifyAPI::Context.active_session ) result = base_find( session: session, ids: {id: id}, params: {}, ) T.cast(result[0], T.nilable(User)) end |