Class: Google::Apis::WalletobjectsV1::Barcode

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Barcode

Returns a new instance of Barcode.



303
304
305
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 303

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

Instance Attribute Details

#alternate_textString

An optional text that will override the default text that shows under the barcode. This field is intended for a human readable equivalent of the barcode value, used when the barcode cannot be scanned. Corresponds to the JSON property alternateText

Returns:

  • (String)


272
273
274
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 272

def alternate_text
  @alternate_text
end

#kindString

Identifies what kind of resource this is. Value: the fixed string " walletobjects#barcode". Corresponds to the JSON property kind

Returns:

  • (String)


278
279
280
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 278

def kind
  @kind
end

#render_encodingString

The render encoding for the barcode. When specified, barcode is rendered in the given encoding. Otherwise best known encoding is chosen by Google. Corresponds to the JSON property renderEncoding

Returns:

  • (String)


284
285
286
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 284

def render_encoding
  @render_encoding
end

#show_code_textGoogle::Apis::WalletobjectsV1::LocalizedString

Optional text that will be shown when the barcode is hidden behind a click action. This happens in cases where a pass has Smart Tap enabled. If not specified, a default is chosen by Google. Corresponds to the JSON property showCodeText



291
292
293
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 291

def show_code_text
  @show_code_text
end

#typeString

The type of barcode. Corresponds to the JSON property type

Returns:

  • (String)


296
297
298
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 296

def type
  @type
end

#valueString

The value encoded in the barcode. Corresponds to the JSON property value

Returns:

  • (String)


301
302
303
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 301

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



308
309
310
311
312
313
314
315
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 308

def update!(**args)
  @alternate_text = args[:alternate_text] if args.key?(:alternate_text)
  @kind = args[:kind] if args.key?(:kind)
  @render_encoding = args[:render_encoding] if args.key?(:render_encoding)
  @show_code_text = args[:show_code_text] if args.key?(:show_code_text)
  @type = args[:type] if args.key?(:type)
  @value = args[:value] if args.key?(:value)
end