Class: Google::Apis::UrlshortenerV1::AnalyticsSummary

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/urlshortener_v1/classes.rb,
generated/google/apis/urlshortener_v1/representations.rb,
generated/google/apis/urlshortener_v1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AnalyticsSummary

Returns a new instance of AnalyticsSummary



107
108
109
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 107

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#all_timeGoogle::Apis::UrlshortenerV1::AnalyticsSnapshot

Click analytics over all time. Corresponds to the JSON property allTime



85
86
87
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 85

def all_time
  @all_time
end

#dayGoogle::Apis::UrlshortenerV1::AnalyticsSnapshot

Click analytics over the last day. Corresponds to the JSON property day



90
91
92
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 90

def day
  @day
end

#monthGoogle::Apis::UrlshortenerV1::AnalyticsSnapshot

Click analytics over the last month. Corresponds to the JSON property month



95
96
97
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 95

def month
  @month
end

#two_hoursGoogle::Apis::UrlshortenerV1::AnalyticsSnapshot

Click analytics over the last two hours. Corresponds to the JSON property twoHours



100
101
102
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 100

def two_hours
  @two_hours
end

#weekGoogle::Apis::UrlshortenerV1::AnalyticsSnapshot

Click analytics over the last week. Corresponds to the JSON property week



105
106
107
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 105

def week
  @week
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



112
113
114
115
116
117
118
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 112

def update!(**args)
  @all_time = args[:all_time] if args.key?(:all_time)
  @day = args[:day] if args.key?(:day)
  @month = args[:month] if args.key?(:month)
  @two_hours = args[:two_hours] if args.key?(:two_hours)
  @week = args[:week] if args.key?(:week)
end