Class: Google::Apis::ManufacturersV1::VoluntaryNutritionFact
- Inherits:
-
Object
- Object
- Google::Apis::ManufacturersV1::VoluntaryNutritionFact
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/manufacturers_v1/classes.rb,
lib/google/apis/manufacturers_v1/representations.rb,
lib/google/apis/manufacturers_v1/representations.rb
Overview
Voluntary Nutrition Facts.
Instance Attribute Summary collapse
-
#daily_percentage ⇒ Float
Daily percentage.
-
#name ⇒ String
Name.
-
#value ⇒ Google::Apis::ManufacturersV1::FloatUnit
Combination of float amount and unit.
Instance Method Summary collapse
-
#initialize(**args) ⇒ VoluntaryNutritionFact
constructor
A new instance of VoluntaryNutritionFact.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ VoluntaryNutritionFact
Returns a new instance of VoluntaryNutritionFact.
1317 1318 1319 |
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 1317 def initialize(**args) update!(**args) end |
Instance Attribute Details
#daily_percentage ⇒ Float
Daily percentage.
Corresponds to the JSON property dailyPercentage
1305 1306 1307 |
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 1305 def daily_percentage @daily_percentage end |
#name ⇒ String
Name.
Corresponds to the JSON property name
1310 1311 1312 |
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 1310 def name @name end |
#value ⇒ Google::Apis::ManufacturersV1::FloatUnit
Combination of float amount and unit.
Corresponds to the JSON property value
1315 1316 1317 |
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 1315 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1322 1323 1324 1325 1326 |
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 1322 def update!(**args) @daily_percentage = args[:daily_percentage] if args.key?(:daily_percentage) @name = args[:name] if args.key?(:name) @value = args[:value] if args.key?(:value) end |