Class: Google::Apis::GamesConfigurationV1configuration::GamesNumberFormatConfiguration

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

Overview

This is a JSON template for a number format resource.

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

Returns a new instance of GamesNumberFormatConfiguration.



255
256
257
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 255

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

Instance Attribute Details

#currency_codeString

The curreny code string. Only used for CURRENCY format type. Corresponds to the JSON property currencyCode

Returns:

  • (String)


232
233
234
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 232

def currency_code
  @currency_code
end

#num_decimal_placesFixnum

The number of decimal places for number. Only used for NUMERIC format type. Corresponds to the JSON property numDecimalPlaces

Returns:

  • (Fixnum)


237
238
239
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 237

def num_decimal_places
  @num_decimal_places
end

#number_format_typeString

The formatting for the number. Possible values are:

  • "NUMERIC" - Numbers are formatted to have no digits or a fixed number of digits after the decimal point according to locale. An optional custom unit can be added.
  • "TIME_DURATION" - Numbers are formatted to hours, minutes and seconds.
  • "CURRENCY" - Numbers are formatted to currency according to locale. Corresponds to the JSON property numberFormatType

Returns:

  • (String)


248
249
250
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 248

def number_format_type
  @number_format_type
end

#suffixGoogle::Apis::GamesConfigurationV1configuration::GamesNumberAffixConfiguration

This is a JSON template for a number affix resource. Corresponds to the JSON property suffix



253
254
255
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 253

def suffix
  @suffix
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



260
261
262
263
264
265
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 260

def update!(**args)
  @currency_code = args[:currency_code] if args.key?(:currency_code)
  @num_decimal_places = args[:num_decimal_places] if args.key?(:num_decimal_places)
  @number_format_type = args[:number_format_type] if args.key?(:number_format_type)
  @suffix = args[:suffix] if args.key?(:suffix)
end