Class: Google::Apis::PlusV1::Person::AgeRange

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

Overview

The age range of the person. Valid ranges are 17 or younger, 18 to 20, and 21 or older. Age is determined from the user's birthday using Western age reckoning.

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) ⇒ AgeRange

Returns a new instance of AgeRange.


1622
1623
1624
# File 'generated/google/apis/plus_v1/classes.rb', line 1622

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

Instance Attribute Details

#maxFixnum

The age range's upper bound, if any. Possible values include, but are not limited to, the following:

  • "17" - for age 17
  • "20" - for age 20 Corresponds to the JSON property max

Returns:

  • (Fixnum)

1612
1613
1614
# File 'generated/google/apis/plus_v1/classes.rb', line 1612

def max
  @max
end

#minFixnum

The age range's lower bound, if any. Possible values include, but are not limited to, the following:

  • "21" - for age 21
  • "18" - for age 18 Corresponds to the JSON property min

Returns:

  • (Fixnum)

1620
1621
1622
# File 'generated/google/apis/plus_v1/classes.rb', line 1620

def min
  @min
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


1627
1628
1629
1630
# File 'generated/google/apis/plus_v1/classes.rb', line 1627

def update!(**args)
  @max = args[:max] if args.key?(:max)
  @min = args[:min] if args.key?(:min)
end