lib/ultracart_api/models/coupon.rb in ultracart_api-4.0.119.rc vs lib/ultracart_api/models/coupon.rb in ultracart_api-4.0.120.rc

- old
+ new

@@ -140,10 +140,13 @@ attr_accessor :restrict_by_screen_branding_theme_codes # Optional list of storefronts to limit coupon use to only those storefronts. attr_accessor :restrict_by_storefronts + # Skip this coupon when it is on a rebill of an auto order. + attr_accessor :skip_on_rebill + # Date/time when coupon is valid attr_accessor :start_dts # If true, this coupon can be used with ANY other coupon regardless of the other coupons configuration attr_accessor :super_coupon @@ -220,10 +223,11 @@ :'percent_off_subtotal_with_subtotal' => :'percent_off_subtotal_with_subtotal', :'quickbooks_code' => :'quickbooks_code', :'restrict_by_postal_codes' => :'restrict_by_postal_codes', :'restrict_by_screen_branding_theme_codes' => :'restrict_by_screen_branding_theme_codes', :'restrict_by_storefronts' => :'restrict_by_storefronts', + :'skip_on_rebill' => :'skip_on_rebill', :'start_dts' => :'start_dts', :'super_coupon' => :'super_coupon', :'tiered_amount_off_items' => :'tiered_amount_off_items', :'tiered_amount_off_subtotal' => :'tiered_amount_off_subtotal', :'tiered_percent_off_items' => :'tiered_percent_off_items', @@ -296,10 +300,11 @@ :'percent_off_subtotal_with_subtotal' => :'CouponPercentOffSubtotalWithSubtotal', :'quickbooks_code' => :'String', :'restrict_by_postal_codes' => :'Array<String>', :'restrict_by_screen_branding_theme_codes' => :'Array<CouponRestriction>', :'restrict_by_storefronts' => :'Array<CouponRestriction>', + :'skip_on_rebill' => :'Boolean', :'start_dts' => :'String', :'super_coupon' => :'Boolean', :'tiered_amount_off_items' => :'CouponTieredAmountOffItems', :'tiered_amount_off_subtotal' => :'CouponTieredAmountOffSubtotal', :'tiered_percent_off_items' => :'CouponTieredPercentOffItems', @@ -559,10 +564,14 @@ if (value = attributes[:'restrict_by_storefronts']).is_a?(Array) self.restrict_by_storefronts = value end end + if attributes.key?(:'skip_on_rebill') + self.skip_on_rebill = attributes[:'skip_on_rebill'] + end + if attributes.key?(:'start_dts') self.start_dts = attributes[:'start_dts'] end if attributes.key?(:'super_coupon') @@ -760,10 +769,11 @@ percent_off_subtotal_with_subtotal == o.percent_off_subtotal_with_subtotal && quickbooks_code == o.quickbooks_code && restrict_by_postal_codes == o.restrict_by_postal_codes && restrict_by_screen_branding_theme_codes == o.restrict_by_screen_branding_theme_codes && restrict_by_storefronts == o.restrict_by_storefronts && + skip_on_rebill == o.skip_on_rebill && start_dts == o.start_dts && super_coupon == o.super_coupon && tiered_amount_off_items == o.tiered_amount_off_items && tiered_amount_off_subtotal == o.tiered_amount_off_subtotal && tiered_percent_off_items == o.tiered_percent_off_items && @@ -780,10 +790,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, amount_shipping_with_subtotal, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, hide_from_customer, merchant_code, merchant_notes, more_loyalty_cashback, more_loyalty_points, multiple_amounts_off_items, no_discount, percent_more_loyalty_cashback, percent_more_loyalty_points, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_msrp_items, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, start_dts, super_coupon, tiered_amount_off_items, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, tiered_percent_off_subtotal_based_on_msrp, usable_by].hash + [affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, amount_shipping_with_subtotal, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, hide_from_customer, merchant_code, merchant_notes, more_loyalty_cashback, more_loyalty_points, multiple_amounts_off_items, no_discount, percent_more_loyalty_cashback, percent_more_loyalty_points, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_msrp_items, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, skip_on_rebill, start_dts, super_coupon, tiered_amount_off_items, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, tiered_percent_off_subtotal_based_on_msrp, usable_by].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself