Class: Basecamp::Types::MyNote
- Inherits:
-
Object
- Object
- Basecamp::Types::MyNote
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
MyNote
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#content ⇒ Object
Returns the value of attribute content.
-
#content_attachments ⇒ Object
Returns the value of attribute content_attachments.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ MyNote
constructor
A new instance of MyNote.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ MyNote
Returns a new instance of MyNote.
2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 |
# File 'lib/basecamp/generated/types.rb', line 2540 def initialize(data = {}) @app_url = data["app_url"] @content = data["content"] @content_attachments = parse_array(data["content_attachments"], "RichTextAttachment") @created_at = data["created_at"] @id = data["id"] @type = data["type"] @updated_at = data["updated_at"] @url = data["url"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
2533 2534 2535 |
# File 'lib/basecamp/generated/types.rb', line 2533 def app_url @app_url end |
#content ⇒ Object
Returns the value of attribute content.
2533 2534 2535 |
# File 'lib/basecamp/generated/types.rb', line 2533 def content @content end |
#content_attachments ⇒ Object
Returns the value of attribute content_attachments.
2533 2534 2535 |
# File 'lib/basecamp/generated/types.rb', line 2533 def @content_attachments end |
#created_at ⇒ Object
Returns the value of attribute created_at.
2533 2534 2535 |
# File 'lib/basecamp/generated/types.rb', line 2533 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
2533 2534 2535 |
# File 'lib/basecamp/generated/types.rb', line 2533 def id @id end |
#type ⇒ Object
Returns the value of attribute type.
2533 2534 2535 |
# File 'lib/basecamp/generated/types.rb', line 2533 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
2533 2534 2535 |
# File 'lib/basecamp/generated/types.rb', line 2533 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
2533 2534 2535 |
# File 'lib/basecamp/generated/types.rb', line 2533 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
2536 2537 2538 |
# File 'lib/basecamp/generated/types.rb', line 2536 def self.required_fields %i[app_url content content_attachments created_at id type updated_at url].freeze end |
Instance Method Details
#to_h ⇒ Object
2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 |
# File 'lib/basecamp/generated/types.rb', line 2551 def to_h { "app_url" => @app_url, "content" => @content, "content_attachments" => @content_attachments, "created_at" => @created_at, "id" => @id, "type" => @type, "updated_at" => @updated_at, "url" => @url, }.reject { |k, v| v.nil? && !["created_at", "id", "updated_at"].include?(k) } end |
#to_json(*args) ⇒ Object
2564 2565 2566 |
# File 'lib/basecamp/generated/types.rb', line 2564 def to_json(*args) to_h.to_json(*args) end |