Class: Hook0::Generated::OrganizationInfoQuotas
- Inherits:
-
Object
- Object
- Hook0::Generated::OrganizationInfoQuotas
- Defined in:
- lib/hook0/generated/models.rb
Overview
The OrganizationInfoQuotas the API declares.
Instance Attribute Summary collapse
-
#applications_per_organization_limit ⇒ Object
readonly
Returns the value of attribute applications_per_organization_limit.
-
#days_of_events_retention_limit ⇒ Object
readonly
Returns the value of attribute days_of_events_retention_limit.
-
#events_per_day_limit ⇒ Object
readonly
Returns the value of attribute events_per_day_limit.
-
#members_per_organization_limit ⇒ Object
readonly
Returns the value of attribute members_per_organization_limit.
Class Method Summary collapse
-
.from_json(value) ⇒ OrganizationInfoQuotas
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(applications_per_organization_limit:, days_of_events_retention_limit:, events_per_day_limit:, members_per_organization_limit:) ⇒ OrganizationInfoQuotas
constructor
A new instance of OrganizationInfoQuotas.
-
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
Constructor Details
#initialize(applications_per_organization_limit:, days_of_events_retention_limit:, events_per_day_limit:, members_per_organization_limit:) ⇒ OrganizationInfoQuotas
Returns a new instance of OrganizationInfoQuotas.
1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 |
# File 'lib/hook0/generated/models.rb', line 1792 def initialize( applications_per_organization_limit:, days_of_events_retention_limit:, events_per_day_limit:, members_per_organization_limit: ) @applications_per_organization_limit = applications_per_organization_limit @days_of_events_retention_limit = days_of_events_retention_limit @events_per_day_limit = events_per_day_limit @members_per_organization_limit = members_per_organization_limit freeze end |
Instance Attribute Details
#applications_per_organization_limit ⇒ Object (readonly)
Returns the value of attribute applications_per_organization_limit.
1783 1784 1785 |
# File 'lib/hook0/generated/models.rb', line 1783 def applications_per_organization_limit @applications_per_organization_limit end |
#days_of_events_retention_limit ⇒ Object (readonly)
Returns the value of attribute days_of_events_retention_limit.
1783 1784 1785 |
# File 'lib/hook0/generated/models.rb', line 1783 def days_of_events_retention_limit @days_of_events_retention_limit end |
#events_per_day_limit ⇒ Object (readonly)
Returns the value of attribute events_per_day_limit.
1783 1784 1785 |
# File 'lib/hook0/generated/models.rb', line 1783 def events_per_day_limit @events_per_day_limit end |
#members_per_organization_limit ⇒ Object (readonly)
Returns the value of attribute members_per_organization_limit.
1783 1784 1785 |
# File 'lib/hook0/generated/models.rb', line 1783 def members_per_organization_limit @members_per_organization_limit end |
Class Method Details
.from_json(value) ⇒ OrganizationInfoQuotas
Read one out of what the API answered.
1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 |
# File 'lib/hook0/generated/models.rb', line 1809 def self.from_json(value) fields = Runtime.as_fields(value, "OrganizationInfoQuotas") new( applications_per_organization_limit: Runtime.read( fields, "applications_per_organization_limit", Runtime::INTEGER ), days_of_events_retention_limit: Runtime.read(fields, "days_of_events_retention_limit", Runtime::INTEGER), events_per_day_limit: Runtime.read(fields, "events_per_day_limit", Runtime::INTEGER), members_per_organization_limit: Runtime.read(fields, "members_per_organization_limit", Runtime::INTEGER) ) end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
Whether that value carries the same members as this one.
1839 1840 1841 |
# File 'lib/hook0/generated/models.rb', line 1839 def ==(other) other.is_a?(OrganizationInfoQuotas) && to_h == other.to_h end |
#hash ⇒ Integer
A value two equal instances share, so that either may key a hash.
1847 1848 1849 |
# File 'lib/hook0/generated/models.rb', line 1847 def hash to_h.hash end |
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
1826 1827 1828 1829 1830 1831 1832 1833 |
# File 'lib/hook0/generated/models.rb', line 1826 def to_h out = {} out["applications_per_organization_limit"] = @applications_per_organization_limit out["days_of_events_retention_limit"] = @days_of_events_retention_limit out["events_per_day_limit"] = @events_per_day_limit out["members_per_organization_limit"] = @members_per_organization_limit out end |