lib/VoucherifySdk/models/campaign_base.rb in voucherify-6.0.0 vs lib/VoucherifySdk/models/campaign_base.rb in voucherify-7.0.0

- old
+ new

@@ -80,10 +80,13 @@ attr_accessor :creation_status # Indicates the status of the campaign's voucher generation. attr_accessor :vouchers_generation_status + # Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. + attr_accessor :readonly + # Indicates whether the resource can be deleted. attr_accessor :protected # Unique category ID that this campaign belongs to. attr_accessor :category_id @@ -144,10 +147,11 @@ :'created_at' => :'created_at', :'updated_at' => :'updated_at', :'category' => :'category', :'creation_status' => :'creation_status', :'vouchers_generation_status' => :'vouchers_generation_status', + :'readonly' => :'readonly', :'protected' => :'protected', :'category_id' => :'category_id', :'categories' => :'categories', :'object' => :'object', :'referral_program' => :'referral_program', @@ -184,10 +188,11 @@ :'created_at' => :'Time', :'updated_at' => :'Time', :'category' => :'String', :'creation_status' => :'String', :'vouchers_generation_status' => :'String', + :'readonly' => :'Boolean', :'protected' => :'Boolean', :'category_id' => :'String', :'categories' => :'Array<Category>', :'object' => :'String', :'referral_program' => :'ReferralProgram', @@ -215,10 +220,11 @@ :'created_at', :'updated_at', :'category', :'creation_status', :'vouchers_generation_status', + :'readonly', :'protected', :'category_id', :'categories', :'object', ]) @@ -324,10 +330,14 @@ if attributes.key?(:'vouchers_generation_status') self.vouchers_generation_status = attributes[:'vouchers_generation_status'] end + if attributes.key?(:'readonly') + self.readonly = attributes[:'readonly'] + end + if attributes.key?(:'protected') self.protected = attributes[:'protected'] end if attributes.key?(:'category_id') @@ -365,11 +375,11 @@ # 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' - campaign_type_validator = EnumAttributeValidator.new('String', ["LOYALTY_PROGRAM", "GIFT_VOUCHERS", "DISCOUNT_COUPONS", "PROMOTION", "REFERRAL_PROGRAM", "LUCKY_DRAW"]) + campaign_type_validator = EnumAttributeValidator.new('String', ["LOYALTY_PROGRAM", "GIFT_VOUCHERS", "DISCOUNT_COUPONS", "PROMOTION", "REFERRAL_PROGRAM"]) return false unless campaign_type_validator.valid?(@campaign_type) type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"]) return false unless type_validator.valid?(@type) creation_status_validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"]) return false unless creation_status_validator.valid?(@creation_status) @@ -404,10 +414,11 @@ created_at == o.created_at && updated_at == o.updated_at && category == o.category && creation_status == o.creation_status && vouchers_generation_status == o.vouchers_generation_status && + readonly == o.readonly && protected == o.protected && category_id == o.category_id && categories == o.categories && object == o.object && referral_program == o.referral_program && @@ -421,10 +432,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, name, description, campaign_type, type, voucher, auto_join, join_once, use_voucher_metadata_schema, validity_timeframe, validity_day_of_week, validity_hours, activity_duration_after_publishing, vouchers_count, start_date, expiration_date, active, metadata, created_at, updated_at, category, creation_status, vouchers_generation_status, protected, category_id, categories, object, referral_program, loyalty_tiers_expiration].hash + [id, name, description, campaign_type, type, voucher, auto_join, join_once, use_voucher_metadata_schema, validity_timeframe, validity_day_of_week, validity_hours, activity_duration_after_publishing, vouchers_count, start_date, expiration_date, active, metadata, created_at, updated_at, category, creation_status, vouchers_generation_status, readonly, protected, category_id, categories, object, referral_program, loyalty_tiers_expiration].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself