Class: Google::Apis::WalletobjectsV1::LoyaltyPoints

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

Returns a new instance of LoyaltyPoints.



5537
5538
5539
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5537

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

Instance Attribute Details

#balanceGoogle::Apis::WalletobjectsV1::LoyaltyPointsBalance

The account holder's loyalty point balance, such as "500" or "$10.00". Recommended maximum length is 7 characters. This is a required field of loyaltyPoints and secondaryLoyaltyPoints. Corresponds to the JSON property balance



5524
5525
5526
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5524

def balance
  @balance
end

#labelString

The loyalty points label, such as "Points". Recommended maximum length is 9 characters. Corresponds to the JSON property label

Returns:

  • (String)


5530
5531
5532
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5530

def label
  @label
end

#localized_labelGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the label. Recommended maximum length is 9 characters. Corresponds to the JSON property localizedLabel



5535
5536
5537
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5535

def localized_label
  @localized_label
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5542
5543
5544
5545
5546
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5542

def update!(**args)
  @balance = args[:balance] if args.key?(:balance)
  @label = args[:label] if args.key?(:label)
  @localized_label = args[:localized_label] if args.key?(:localized_label)
end