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

- old
+ new

@@ -58,20 +58,20 @@ # Defines the related object. attr_accessor :related_object_type attr_accessor :related_object_id - attr_accessor :voucher - attr_accessor :promotion_tier attr_accessor :reward attr_accessor :gift attr_accessor :loyalty_card + attr_accessor :voucher + # System generated cause for the redemption being invalid in the context of the provided parameters. attr_accessor :reason class EnumAttributeValidator attr_reader :datatype @@ -114,15 +114,15 @@ :'order' => :'order', :'channel' => :'channel', :'customer' => :'customer', :'related_object_type' => :'related_object_type', :'related_object_id' => :'related_object_id', - :'voucher' => :'voucher', :'promotion_tier' => :'promotion_tier', :'reward' => :'reward', :'gift' => :'gift', :'loyalty_card' => :'loyalty_card', + :'voucher' => :'voucher', :'reason' => :'reason' } end # Returns all the JSON keys this model knows about @@ -149,15 +149,15 @@ :'order' => :'RedemptionEntryOrder', :'channel' => :'RedemptionEntryChannel', :'customer' => :'RedemptionEntryCustomer', :'related_object_type' => :'String', :'related_object_id' => :'String', - :'voucher' => :'RedemptionEntryVoucher', :'promotion_tier' => :'RedemptionEntryPromotionTier', :'reward' => :'RedemptionRewardResult', :'gift' => :'RedemptionEntryGift', :'loyalty_card' => :'RedemptionEntryLoyaltyCard', + :'voucher' => :'RedemptionEntryVoucher', :'reason' => :'String' } end # List of attributes with nullable: true @@ -179,14 +179,14 @@ :'order', :'channel', :'customer', :'related_object_type', :'related_object_id', - :'voucher', :'promotion_tier', :'gift', :'loyalty_card', + :'voucher', :'reason' ]) end # Initializes the object @@ -267,14 +267,10 @@ if attributes.key?(:'related_object_id') self.related_object_id = attributes[:'related_object_id'] end - if attributes.key?(:'voucher') - self.voucher = attributes[:'voucher'] - end - if attributes.key?(:'promotion_tier') self.promotion_tier = attributes[:'promotion_tier'] end if attributes.key?(:'reward') @@ -287,10 +283,14 @@ if attributes.key?(:'loyalty_card') self.loyalty_card = attributes[:'loyalty_card'] end + if attributes.key?(:'voucher') + self.voucher = attributes[:'voucher'] + end + if attributes.key?(:'reason') self.reason = attributes[:'reason'] end end @@ -338,15 +338,15 @@ order == o.order && channel == o.channel && customer == o.customer && related_object_type == o.related_object_type && related_object_id == o.related_object_id && - voucher == o.voucher && promotion_tier == o.promotion_tier && reward == o.reward && gift == o.gift && loyalty_card == o.loyalty_card && + voucher == o.voucher && reason == o.reason end # @see the `==` method # @param [Object] Object to be compared @@ -355,10 +355,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, object, date, customer_id, tracking_id, metadata, amount, redemption, result, status, related_redemptions, failure_code, failure_message, order, channel, customer, related_object_type, related_object_id, voucher, promotion_tier, reward, gift, loyalty_card, reason].hash + [id, object, date, customer_id, tracking_id, metadata, amount, redemption, result, status, related_redemptions, failure_code, failure_message, order, channel, customer, related_object_type, related_object_id, promotion_tier, reward, gift, loyalty_card, voucher, reason].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself