Class: Hook0::Generated::OrganizationInfoUsers
- Inherits:
-
Object
- Object
- Hook0::Generated::OrganizationInfoUsers
- Defined in:
- lib/hook0/generated/models.rb
Overview
The OrganizationInfoUsers the API declares.
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Class Method Summary collapse
-
.from_json(value) ⇒ OrganizationInfoUsers
Read one out of what the API answered.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
(also: #eql?)
Whether that value carries the same members as this one.
-
#hash ⇒ Integer
A value two equal instances share, so that either may key a hash.
-
#initialize(email:, first_name:, last_name:, role:, user_id:) ⇒ OrganizationInfoUsers
constructor
A new instance of OrganizationInfoUsers.
-
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
Constructor Details
#initialize(email:, first_name:, last_name:, role:, user_id:) ⇒ OrganizationInfoUsers
Returns a new instance of OrganizationInfoUsers.
1865 1866 1867 1868 1869 1870 1871 1872 |
# File 'lib/hook0/generated/models.rb', line 1865 def initialize(email:, first_name:, last_name:, role:, user_id:) @email = email @first_name = first_name @last_name = last_name @role = role @user_id = user_id freeze end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
1854 1855 1856 |
# File 'lib/hook0/generated/models.rb', line 1854 def email @email end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
1854 1855 1856 |
# File 'lib/hook0/generated/models.rb', line 1854 def first_name @first_name end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
1854 1855 1856 |
# File 'lib/hook0/generated/models.rb', line 1854 def last_name @last_name end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
1854 1855 1856 |
# File 'lib/hook0/generated/models.rb', line 1854 def role @role end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
1854 1855 1856 |
# File 'lib/hook0/generated/models.rb', line 1854 def user_id @user_id end |
Class Method Details
.from_json(value) ⇒ OrganizationInfoUsers
Read one out of what the API answered.
1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 |
# File 'lib/hook0/generated/models.rb', line 1878 def self.from_json(value) fields = Runtime.as_fields(value, "OrganizationInfoUsers") new( email: Runtime.read(fields, "email", Runtime::TEXT), first_name: Runtime.read(fields, "first_name", Runtime::TEXT), last_name: Runtime.read(fields, "last_name", Runtime::TEXT), role: Runtime.read(fields, "role", Runtime::TEXT), user_id: Runtime.read(fields, "user_id", Runtime::UUID) ) end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
Whether that value carries the same members as this one.
1906 1907 1908 |
# File 'lib/hook0/generated/models.rb', line 1906 def ==(other) other.is_a?(OrganizationInfoUsers) && to_h == other.to_h end |
#hash ⇒ Integer
A value two equal instances share, so that either may key a hash.
1914 1915 1916 |
# File 'lib/hook0/generated/models.rb', line 1914 def hash to_h.hash end |
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
1892 1893 1894 1895 1896 1897 1898 1899 1900 |
# File 'lib/hook0/generated/models.rb', line 1892 def to_h out = {} out["email"] = @email out["first_name"] = @first_name out["last_name"] = @last_name out["role"] = @role out["user_id"] = @user_id out end |