Class: Google::Apis::MerchantapiProductsV1beta::LoyaltyPoints

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

Overview

A message that represents loyalty points.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LoyaltyPoints

Returns a new instance of LoyaltyPoints.



1048
1049
1050
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1048

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

Instance Attribute Details

#nameString

Name of loyalty points program. It is recommended to limit the name to 12 full- width characters or 24 Roman characters. Corresponds to the JSON property name

Returns:

  • (String)


1035
1036
1037
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1035

def name
  @name
end

#points_valueFixnum

The retailer's loyalty points in absolute value. Corresponds to the JSON property pointsValue

Returns:

  • (Fixnum)


1040
1041
1042
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1040

def points_value
  @points_value
end

#ratioFloat

The ratio of a point when converted to currency. Google assumes currency based on Merchant Center settings. If ratio is left out, it defaults to 1.0. Corresponds to the JSON property ratio

Returns:

  • (Float)


1046
1047
1048
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1046

def ratio
  @ratio
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1053
1054
1055
1056
1057
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1053

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @points_value = args[:points_value] if args.key?(:points_value)
  @ratio = args[:ratio] if args.key?(:ratio)
end