lib/recurly/resources/coupon.rb in recurly-3.28.0 vs lib/recurly/resources/coupon.rb in recurly-4.0.0

- old
+ new

@@ -9,25 +9,17 @@ # @!attribute applies_to_all_items # @return [Boolean] The coupon is valid for all items if true. If false then `items` will list the applicable items. define_attribute :applies_to_all_items, :Boolean # @!attribute applies_to_all_plans - # @return [Boolean] The coupon is valid for all plans if true. If false then `plans` and `plans_names` will list the applicable plans. + # @return [Boolean] The coupon is valid for all plans if true. If false then `plans` will list the applicable plans. define_attribute :applies_to_all_plans, :Boolean # @!attribute applies_to_non_plan_charges # @return [Boolean] The coupon is valid for one-time, non-plan charges if true. define_attribute :applies_to_non_plan_charges, :Boolean - # @!attribute bulk_coupon_code - # @return [String] The Coupon code of the parent Bulk Coupon - define_attribute :bulk_coupon_code, String - - # @!attribute bulk_coupon_id - # @return [String] The Coupon ID of the parent Bulk Coupon - define_attribute :bulk_coupon_id, String - # @!attribute code # @return [String] The code the customer enters to redeem the coupon. define_attribute :code, String # @!attribute coupon_type @@ -92,22 +84,14 @@ # @!attribute plans # @return [Array[PlanMini]] A list of plans for which this coupon applies. This will be `null` if `applies_to_all_plans=true`. define_attribute :plans, Array, { :item_type => :PlanMini } - # @!attribute plans_names - # @return [Array[String]] A list of plan names for which this coupon applies. - define_attribute :plans_names, Array, { :item_type => String } - # @!attribute redeem_by # @return [DateTime] The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time. define_attribute :redeem_by, DateTime - # @!attribute redeemed_at - # @return [DateTime] The date and time the unique coupon code was redeemed. This is only present for bulk coupons. - define_attribute :redeemed_at, DateTime - # @!attribute redemption_resource # @return [String] Whether the discount is for all eligible charges on the account, or only a specific subscription. define_attribute :redemption_resource, String # @!attribute state @@ -123,9 +107,13 @@ define_attribute :temporal_unit, String # @!attribute unique_code_template # @return [String] On a bulk coupon, the template from which unique coupon codes are generated. define_attribute :unique_code_template, String + + # @!attribute unique_coupon_code + # @return [Hash] Will be populated when the Coupon being returned is a `UniqueCouponCode`. + define_attribute :unique_coupon_code, Hash # @!attribute unique_coupon_codes_count # @return [Integer] When this number reaches `max_redemptions` the coupon will no longer be redeemable. define_attribute :unique_coupon_codes_count, Integer