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.
5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 |
# File 'lib/basecamp/generated/types.rb', line 5076 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.
5069 5070 5071 |
# File 'lib/basecamp/generated/types.rb', line 5069 def action @action end |
#boosts_count ⇒ Object
Returns the value of attribute boosts_count.
5069 5070 5071 |
# File 'lib/basecamp/generated/types.rb', line 5069 def boosts_count @boosts_count end |
#boosts_url ⇒ Object
Returns the value of attribute boosts_url.
5069 5070 5071 |
# File 'lib/basecamp/generated/types.rb', line 5069 def boosts_url @boosts_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
5069 5070 5071 |
# File 'lib/basecamp/generated/types.rb', line 5069 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
5069 5070 5071 |
# File 'lib/basecamp/generated/types.rb', line 5069 def creator @creator end |
#details ⇒ Object
Returns the value of attribute details.
5069 5070 5071 |
# File 'lib/basecamp/generated/types.rb', line 5069 def details @details end |
#id ⇒ Object
Returns the value of attribute id.
5069 5070 5071 |
# File 'lib/basecamp/generated/types.rb', line 5069 def id @id end |
#recording_id ⇒ Object
Returns the value of attribute recording_id.
5069 5070 5071 |
# File 'lib/basecamp/generated/types.rb', line 5069 def recording_id @recording_id end |
#upload ⇒ Object
Returns the value of attribute upload.
5069 5070 5071 |
# File 'lib/basecamp/generated/types.rb', line 5069 def upload @upload end |
Class Method Details
.required_fields ⇒ Array<Symbol>
5072 5073 5074 |
# File 'lib/basecamp/generated/types.rb', line 5072 def self.required_fields %i[action created_at creator id recording_id].freeze end |
Instance Method Details
#to_h ⇒ Object
5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 |
# File 'lib/basecamp/generated/types.rb', line 5088 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
5102 5103 5104 |
# File 'lib/basecamp/generated/types.rb', line 5102 def to_json(*args) to_h.to_json(*args) end |