Class: Basecamp::Types::UploadVersion
- Inherits:
-
Object
- Object
- Basecamp::Types::UploadVersion
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
UploadVersion
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.
-
#upload ⇒ Object
Returns the value of attribute upload.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ UploadVersion
constructor
A new instance of UploadVersion.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ UploadVersion
Returns a new instance of UploadVersion.
5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 |
# File 'lib/basecamp/generated/types.rb', line 5191 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") @upload = parse_type(data["upload"], "UploadVersionFile") end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
5184 5185 5186 |
# File 'lib/basecamp/generated/types.rb', line 5184 def action @action end |
#boosts_count ⇒ Object
Returns the value of attribute boosts_count.
5184 5185 5186 |
# File 'lib/basecamp/generated/types.rb', line 5184 def boosts_count @boosts_count end |
#boosts_url ⇒ Object
Returns the value of attribute boosts_url.
5184 5185 5186 |
# File 'lib/basecamp/generated/types.rb', line 5184 def boosts_url @boosts_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
5184 5185 5186 |
# File 'lib/basecamp/generated/types.rb', line 5184 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
5184 5185 5186 |
# File 'lib/basecamp/generated/types.rb', line 5184 def creator @creator end |
#details ⇒ Object
Returns the value of attribute details.
5184 5185 5186 |
# File 'lib/basecamp/generated/types.rb', line 5184 def details @details end |
#id ⇒ Object
Returns the value of attribute id.
5184 5185 5186 |
# File 'lib/basecamp/generated/types.rb', line 5184 def id @id end |
#recording_id ⇒ Object
Returns the value of attribute recording_id.
5184 5185 5186 |
# File 'lib/basecamp/generated/types.rb', line 5184 def recording_id @recording_id end |
#upload ⇒ Object
Returns the value of attribute upload.
5184 5185 5186 |
# File 'lib/basecamp/generated/types.rb', line 5184 def upload @upload end |
Class Method Details
.required_fields ⇒ Array<Symbol>
5187 5188 5189 |
# File 'lib/basecamp/generated/types.rb', line 5187 def self.required_fields %i[action created_at creator id recording_id].freeze end |
Instance Method Details
#to_h ⇒ Object
5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 |
# File 'lib/basecamp/generated/types.rb', line 5203 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, "upload" => @upload, }.compact end |
#to_json(*args) ⇒ Object
5217 5218 5219 |
# File 'lib/basecamp/generated/types.rb', line 5217 def to_json(*args) to_h.to_json(*args) end |