Class: Google::Apis::WalletobjectsV1::Barcode
- Inherits:
-
Object
- Object
- Google::Apis::WalletobjectsV1::Barcode
- 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
-
#alternate_text ⇒ String
An optional text that will override the default text that shows under the barcode.
-
#kind ⇒ String
Identifies what kind of resource this is.
-
#render_encoding ⇒ String
The render encoding for the barcode.
-
#show_code_text ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Optional text that will be shown when the barcode is hidden behind a click action.
-
#type ⇒ String
The type of barcode.
-
#value ⇒ String
The value encoded in the barcode.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Barcode
constructor
A new instance of Barcode.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Barcode
Returns a new instance of Barcode.
307 308 309 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 307 def initialize(**args) update!(**args) end |
Instance Attribute Details
#alternate_text ⇒ String
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
276 277 278 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 276 def alternate_text @alternate_text end |
#kind ⇒ String
Identifies what kind of resource this is. Value: the fixed string "
walletobjects#barcode"
.
Corresponds to the JSON property kind
282 283 284 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 282 def kind @kind end |
#render_encoding ⇒ String
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
288 289 290 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 288 def render_encoding @render_encoding end |
#show_code_text ⇒ Google::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
295 296 297 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 295 def show_code_text @show_code_text end |
#type ⇒ String
The type of barcode.
Corresponds to the JSON property type
300 301 302 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 300 def type @type end |
#value ⇒ String
The value encoded in the barcode.
Corresponds to the JSON property value
305 306 307 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 305 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
312 313 314 315 316 317 318 319 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 312 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 |