Class: Basecamp::Types::Event
- Inherits:
-
Object
- Object
- Basecamp::Types::Event
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
Event
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#boosts_count ⇒ Object
Returns the value of attribute boosts_count.
-
#boosts_url ⇒ Object
Returns the value of attribute boosts_url.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#creator ⇒ Object
Returns the value of attribute creator.
-
#details ⇒ Object
Returns the value of attribute details.
-
#id ⇒ Object
Returns the value of attribute id.
-
#recording_id ⇒ Object
Returns the value of attribute recording_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Event
constructor
A new instance of Event.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Event
Returns a new instance of Event.
1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 |
# File 'lib/basecamp/generated/types.rb', line 1587 def initialize(data = {}) @action = data["action"] @created_at = parse_datetime(data["created_at"]) @creator = parse_type(data["creator"], "Person") @id = parse_integer(data["id"]) @recording_id = parse_integer(data["recording_id"]) @boosts_count = parse_integer(data["boosts_count"]) @boosts_url = data["boosts_url"] @details = parse_type(data["details"], "EventDetails") end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
1580 1581 1582 |
# File 'lib/basecamp/generated/types.rb', line 1580 def action @action end |
#boosts_count ⇒ Object
Returns the value of attribute boosts_count.
1580 1581 1582 |
# File 'lib/basecamp/generated/types.rb', line 1580 def boosts_count @boosts_count end |
#boosts_url ⇒ Object
Returns the value of attribute boosts_url.
1580 1581 1582 |
# File 'lib/basecamp/generated/types.rb', line 1580 def boosts_url @boosts_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
1580 1581 1582 |
# File 'lib/basecamp/generated/types.rb', line 1580 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
1580 1581 1582 |
# File 'lib/basecamp/generated/types.rb', line 1580 def creator @creator end |
#details ⇒ Object
Returns the value of attribute details.
1580 1581 1582 |
# File 'lib/basecamp/generated/types.rb', line 1580 def details @details end |
#id ⇒ Object
Returns the value of attribute id.
1580 1581 1582 |
# File 'lib/basecamp/generated/types.rb', line 1580 def id @id end |
#recording_id ⇒ Object
Returns the value of attribute recording_id.
1580 1581 1582 |
# File 'lib/basecamp/generated/types.rb', line 1580 def recording_id @recording_id end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1583 1584 1585 |
# File 'lib/basecamp/generated/types.rb', line 1583 def self.required_fields %i[action created_at creator id recording_id].freeze end |
Instance Method Details
#to_h ⇒ Object
1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 |
# File 'lib/basecamp/generated/types.rb', line 1598 def to_h { "action" => @action, "created_at" => @created_at, "creator" => @creator, "id" => @id, "recording_id" => @recording_id, "boosts_count" => @boosts_count, "boosts_url" => @boosts_url, "details" => @details, }.compact end |
#to_json(*args) ⇒ Object
1611 1612 1613 |
# File 'lib/basecamp/generated/types.rb', line 1611 def to_json(*args) to_h.to_json(*args) end |