lib/VoucherifySdk/models/campaign_loyalty_card.rb in voucherify-5.0.0 vs lib/VoucherifySdk/models/campaign_loyalty_card.rb in voucherify-6.0.0
- old
+ new
@@ -43,32 +43,25 @@
end
# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
+ :'points',
+ :'expiration_rules'
])
end
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
- if (!attributes.is_a?(Hash))
- fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::CampaignLoyaltyCard` initialize method"
- end
-
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
- if (!self.class.attribute_map.key?(k.to_sym))
- fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::CampaignLoyaltyCard`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
- end
h[k.to_sym] = v
}
if attributes.key?(:'points')
self.points = attributes[:'points']
- else
- self.points = nil
end
if attributes.key?(:'expiration_rules')
self.expiration_rules = attributes[:'expiration_rules']
end
@@ -77,21 +70,16 @@
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properties with the reasons
def list_invalid_properties
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
invalid_properties = Array.new
- if @points.nil?
- invalid_properties.push('invalid value for "points", points cannot be nil.')
- end
-
invalid_properties
end
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
warn '[DEPRECATED] the `valid?` method is obsolete'
- return false if @points.nil?
true
end
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared