Class: Basecamp::Types::Notification
- Inherits:
-
Object
- Object
- Basecamp::Types::Notification
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
Notification
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#bookmark_url ⇒ Object
Returns the value of attribute bookmark_url.
-
#bubble_up_at ⇒ Object
Returns the value of attribute bubble_up_at.
-
#bubble_up_url ⇒ Object
Returns the value of attribute bubble_up_url.
-
#bucket_name ⇒ Object
Returns the value of attribute bucket_name.
-
#content_excerpt ⇒ Object
Returns the value of attribute content_excerpt.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#creator ⇒ Object
Returns the value of attribute creator.
-
#id ⇒ Object
Returns the value of attribute id.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#memory_url ⇒ Object
Returns the value of attribute memory_url.
-
#named ⇒ Object
Returns the value of attribute named.
-
#participants ⇒ Object
Returns the value of attribute participants.
-
#previewable_attachments ⇒ Object
Returns the value of attribute previewable_attachments.
-
#read_at ⇒ Object
Returns the value of attribute read_at.
-
#readable_identifier ⇒ Object
Returns the value of attribute readable_identifier.
-
#readable_sgid ⇒ Object
Returns the value of attribute readable_sgid.
-
#section ⇒ Object
Returns the value of attribute section.
-
#subscribed ⇒ Object
Returns the value of attribute subscribed.
-
#subscription_url ⇒ Object
Returns the value of attribute subscription_url.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#unread_at ⇒ Object
Returns the value of attribute unread_at.
-
#unread_count ⇒ Object
Returns the value of attribute unread_count.
-
#unread_url ⇒ Object
Returns the value of attribute unread_url.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Notification
constructor
A new instance of Notification.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Notification
Returns a new instance of Notification.
2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 |
# File 'lib/basecamp/generated/types.rb', line 2604 def initialize(data = {}) @created_at = parse_datetime(data["created_at"]) @id = parse_integer(data["id"]) @updated_at = parse_datetime(data["updated_at"]) @app_url = data["app_url"] @bookmark_url = data["bookmark_url"] @bubble_up_at = parse_datetime(data["bubble_up_at"]) @bubble_up_url = data["bubble_up_url"] @bucket_name = data["bucket_name"] @content_excerpt = data["content_excerpt"] @creator = parse_type(data["creator"], "Person") @image_url = data["image_url"] @memory_url = data["memory_url"] @named = parse_boolean(data["named"]) @participants = parse_array(data["participants"], "Person") @previewable_attachments = parse_array(data["previewable_attachments"], "PreviewableAttachment") @read_at = parse_datetime(data["read_at"]) @readable_identifier = data["readable_identifier"] @readable_sgid = data["readable_sgid"] @section = data["section"] @subscribed = parse_boolean(data["subscribed"]) @subscription_url = data["subscription_url"] @title = data["title"] @type = data["type"] @unread_at = parse_datetime(data["unread_at"]) @unread_count = parse_integer(data["unread_count"]) @unread_url = data["unread_url"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def app_url @app_url end |
#bookmark_url ⇒ Object
Returns the value of attribute bookmark_url.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def bookmark_url @bookmark_url end |
#bubble_up_at ⇒ Object
Returns the value of attribute bubble_up_at.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def bubble_up_at @bubble_up_at end |
#bubble_up_url ⇒ Object
Returns the value of attribute bubble_up_url.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def bubble_up_url @bubble_up_url end |
#bucket_name ⇒ Object
Returns the value of attribute bucket_name.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def bucket_name @bucket_name end |
#content_excerpt ⇒ Object
Returns the value of attribute content_excerpt.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def content_excerpt @content_excerpt end |
#created_at ⇒ Object
Returns the value of attribute created_at.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def creator @creator end |
#id ⇒ Object
Returns the value of attribute id.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def id @id end |
#image_url ⇒ Object
Returns the value of attribute image_url.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def image_url @image_url end |
#memory_url ⇒ Object
Returns the value of attribute memory_url.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def memory_url @memory_url end |
#named ⇒ Object
Returns the value of attribute named.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def named @named end |
#participants ⇒ Object
Returns the value of attribute participants.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def participants @participants end |
#previewable_attachments ⇒ Object
Returns the value of attribute previewable_attachments.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def @previewable_attachments end |
#read_at ⇒ Object
Returns the value of attribute read_at.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def read_at @read_at end |
#readable_identifier ⇒ Object
Returns the value of attribute readable_identifier.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def readable_identifier @readable_identifier end |
#readable_sgid ⇒ Object
Returns the value of attribute readable_sgid.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def readable_sgid @readable_sgid end |
#section ⇒ Object
Returns the value of attribute section.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def section @section end |
#subscribed ⇒ Object
Returns the value of attribute subscribed.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def subscribed @subscribed end |
#subscription_url ⇒ Object
Returns the value of attribute subscription_url.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def subscription_url @subscription_url end |
#title ⇒ Object
Returns the value of attribute title.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def type @type end |
#unread_at ⇒ Object
Returns the value of attribute unread_at.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def unread_at @unread_at end |
#unread_count ⇒ Object
Returns the value of attribute unread_count.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def unread_count @unread_count end |
#unread_url ⇒ Object
Returns the value of attribute unread_url.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def unread_url @unread_url end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
2597 2598 2599 |
# File 'lib/basecamp/generated/types.rb', line 2597 def updated_at @updated_at end |
Class Method Details
.required_fields ⇒ Array<Symbol>
2600 2601 2602 |
# File 'lib/basecamp/generated/types.rb', line 2600 def self.required_fields %i[created_at id updated_at].freeze end |
Instance Method Details
#to_h ⇒ Object
2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 |
# File 'lib/basecamp/generated/types.rb', line 2633 def to_h { "created_at" => @created_at, "id" => @id, "updated_at" => @updated_at, "app_url" => @app_url, "bookmark_url" => @bookmark_url, "bubble_up_at" => @bubble_up_at, "bubble_up_url" => @bubble_up_url, "bucket_name" => @bucket_name, "content_excerpt" => @content_excerpt, "creator" => @creator, "image_url" => @image_url, "memory_url" => @memory_url, "named" => @named, "participants" => @participants, "previewable_attachments" => @previewable_attachments, "read_at" => @read_at, "readable_identifier" => @readable_identifier, "readable_sgid" => @readable_sgid, "section" => @section, "subscribed" => @subscribed, "subscription_url" => @subscription_url, "title" => @title, "type" => @type, "unread_at" => @unread_at, "unread_count" => @unread_count, "unread_url" => @unread_url, }.compact end |
#to_json(*args) ⇒ Object
2664 2665 2666 |
# File 'lib/basecamp/generated/types.rb', line 2664 def to_json(*args) to_h.to_json(*args) end |