lib/ultracart_api/models/coupon.rb in ultracart_api-3.8.2 vs lib/ultracart_api/models/coupon.rb in ultracart_api-3.8.5

- old
+ new

@@ -36,10 +36,12 @@ attr_accessor :amount_off_subtotal_with_items_purchase attr_accessor :amount_off_subtotal_with_purchase + attr_accessor :amount_shipping_with_subtotal + attr_accessor :automatically_apply_coupon_codes attr_accessor :buy_one_get_one # Calculated description displayed to the customer if no description is specified. @@ -162,10 +164,11 @@ :'amount_off_subtotal_and_free_shipping' => :'amount_off_subtotal_and_free_shipping', :'amount_off_subtotal_and_shipping' => :'amount_off_subtotal_and_shipping', :'amount_off_subtotal_with_block_purchase' => :'amount_off_subtotal_with_block_purchase', :'amount_off_subtotal_with_items_purchase' => :'amount_off_subtotal_with_items_purchase', :'amount_off_subtotal_with_purchase' => :'amount_off_subtotal_with_purchase', + :'amount_shipping_with_subtotal' => :'amount_shipping_with_subtotal', :'automatically_apply_coupon_codes' => :'automatically_apply_coupon_codes', :'buy_one_get_one' => :'buy_one_get_one', :'calculated_description' => :'calculated_description', :'can_be_used_with_other_coupons' => :'can_be_used_with_other_coupons', :'coupon_oid' => :'coupon_oid', @@ -227,10 +230,11 @@ :'amount_off_subtotal_and_free_shipping' => :'CouponAmountOffSubtotalFreeShippingWithPurchase', :'amount_off_subtotal_and_shipping' => :'CouponAmountOffSubtotalAndShipping', :'amount_off_subtotal_with_block_purchase' => :'CouponAmountOffSubtotalWithBlockPurchase', :'amount_off_subtotal_with_items_purchase' => :'CouponAmountOffSubtotalWithItemsPurchase', :'amount_off_subtotal_with_purchase' => :'CouponAmountOffSubtotalWithPurchase', + :'amount_shipping_with_subtotal' => :'CouponAmountShippingWithSubtotal', :'automatically_apply_coupon_codes' => :'CouponAutomaticallyApplyCouponCodes', :'buy_one_get_one' => :'CouponBuyOneGetOneLimit', :'calculated_description' => :'String', :'can_be_used_with_other_coupons' => :'BOOLEAN', :'coupon_oid' => :'Integer', @@ -330,10 +334,14 @@ if attributes.has_key?(:'amount_off_subtotal_with_purchase') self.amount_off_subtotal_with_purchase = attributes[:'amount_off_subtotal_with_purchase'] end + if attributes.has_key?(:'amount_shipping_with_subtotal') + self.amount_shipping_with_subtotal = attributes[:'amount_shipping_with_subtotal'] + end + if attributes.has_key?(:'automatically_apply_coupon_codes') self.automatically_apply_coupon_codes = attributes[:'automatically_apply_coupon_codes'] end if attributes.has_key?(:'buy_one_get_one') @@ -648,10 +656,11 @@ amount_off_subtotal_and_free_shipping == o.amount_off_subtotal_and_free_shipping && amount_off_subtotal_and_shipping == o.amount_off_subtotal_and_shipping && amount_off_subtotal_with_block_purchase == o.amount_off_subtotal_with_block_purchase && amount_off_subtotal_with_items_purchase == o.amount_off_subtotal_with_items_purchase && amount_off_subtotal_with_purchase == o.amount_off_subtotal_with_purchase && + amount_shipping_with_subtotal == o.amount_shipping_with_subtotal && automatically_apply_coupon_codes == o.automatically_apply_coupon_codes && buy_one_get_one == o.buy_one_get_one && calculated_description == o.calculated_description && can_be_used_with_other_coupons == o.can_be_used_with_other_coupons && coupon_oid == o.coupon_oid && @@ -707,10 +716,10 @@ end # Calculates hash code according to all attributes. # @return [Fixnum] 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, 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, multiple_amounts_off_items, no_discount, 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, 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, multiple_amounts_off_items, no_discount, 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, 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