Class: Basecamp::Types::Preferences

Inherits:
Object
  • Object
show all
Includes:
TypeHelpers
Defined in:
lib/basecamp/generated/types.rb

Overview

Preferences

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ Preferences

Returns a new instance of Preferences.



3086
3087
3088
3089
3090
3091
3092
# File 'lib/basecamp/generated/types.rb', line 3086

def initialize(data = {})
  @app_url = data["app_url"]
  @first_week_day = data["first_week_day"]
  @time_format = data["time_format"]
  @time_zone_name = data["time_zone_name"]
  @url = data["url"]
end

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



3084
3085
3086
# File 'lib/basecamp/generated/types.rb', line 3084

def app_url
  @app_url
end

#first_week_dayObject

Returns the value of attribute first_week_day.



3084
3085
3086
# File 'lib/basecamp/generated/types.rb', line 3084

def first_week_day
  @first_week_day
end

#time_formatObject

Returns the value of attribute time_format.



3084
3085
3086
# File 'lib/basecamp/generated/types.rb', line 3084

def time_format
  @time_format
end

#time_zone_nameObject

Returns the value of attribute time_zone_name.



3084
3085
3086
# File 'lib/basecamp/generated/types.rb', line 3084

def time_zone_name
  @time_zone_name
end

#urlObject

Returns the value of attribute url.



3084
3085
3086
# File 'lib/basecamp/generated/types.rb', line 3084

def url
  @url
end

Instance Method Details

#to_hObject



3094
3095
3096
3097
3098
3099
3100
3101
3102
# File 'lib/basecamp/generated/types.rb', line 3094

def to_h
  {
    "app_url" => @app_url,
    "first_week_day" => @first_week_day,
    "time_format" => @time_format,
    "time_zone_name" => @time_zone_name,
    "url" => @url,
  }.compact
end

#to_json(*args) ⇒ Object



3104
3105
3106
# File 'lib/basecamp/generated/types.rb', line 3104

def to_json(*args)
  to_h.to_json(*args)
end