Class: Google::Apis::ManufacturersV1::VoluntaryNutritionFact

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ VoluntaryNutritionFact

Returns a new instance of VoluntaryNutritionFact.



1066
1067
1068
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 1066

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

Instance Attribute Details

#daily_percentageFloat

Daily percentage. Corresponds to the JSON property dailyPercentage

Returns:

  • (Float)


1054
1055
1056
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 1054

def daily_percentage
  @daily_percentage
end

#nameString

Name. Corresponds to the JSON property name

Returns:

  • (String)


1059
1060
1061
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 1059

def name
  @name
end

#valueGoogle::Apis::ManufacturersV1::FloatUnit

Combination of float amout and unit. Corresponds to the JSON property value



1064
1065
1066
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 1064

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1071
1072
1073
1074
1075
# File 'lib/google/apis/manufacturers_v1/classes.rb', line 1071

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