Class: Recurly::Resources::CouponMini

Inherits:
Recurly::Resource show all
Defined in:
lib/recurly/resources/coupon_mini.rb

Instance Attribute Summary collapse

Attributes inherited from Recurly::Resource

#attributes

Method Summary

Methods inherited from Recurly::Resource

#==, #get_response, #inspect, #requires_client?, #to_json, #to_s

Methods included from Schema::SchemaFactory

#schema

Methods included from Schema::ResourceCaster

#cast

Methods included from Schema::SchemaValidator

#get_did_you_mean, #validate!, #validate_attribute!

Instance Attribute Details

#codeString

Returns The code the customer enters to redeem the coupon.

Returns:

  • (String)

    The code the customer enters to redeem the coupon.



11
# File 'lib/recurly/resources/coupon_mini.rb', line 11

define_attribute :code, String

#coupon_typeString

Returns Whether the coupon is “single_code” or “bulk”. Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint.

Returns:

  • (String)

    Whether the coupon is “single_code” or “bulk”. Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint.



15
# File 'lib/recurly/resources/coupon_mini.rb', line 15

define_attribute :coupon_type, String

#discountCouponDiscount

Returns Details of the discount a coupon applies. Will contain a `type` property and one of the following properties: `percent`, `fixed`, `trial`.

Returns:

  • (CouponDiscount)

    Details of the discount a coupon applies. Will contain a `type` property and one of the following properties: `percent`, `fixed`, `trial`.



19
# File 'lib/recurly/resources/coupon_mini.rb', line 19

define_attribute :discount, :CouponDiscount

#expired_atDateTime

Returns The date and time the coupon was expired early or reached its `max_redemptions`.

Returns:

  • (DateTime)

    The date and time the coupon was expired early or reached its `max_redemptions`.



23
# File 'lib/recurly/resources/coupon_mini.rb', line 23

define_attribute :expired_at, DateTime

#idString

Returns Coupon ID.

Returns:

  • (String)

    Coupon ID



27
# File 'lib/recurly/resources/coupon_mini.rb', line 27

define_attribute :id, String

#nameString

Returns The internal name for the coupon.

Returns:

  • (String)

    The internal name for the coupon.



31
# File 'lib/recurly/resources/coupon_mini.rb', line 31

define_attribute :name, String

#objectString

Returns Object type.

Returns:

  • (String)

    Object type



35
# File 'lib/recurly/resources/coupon_mini.rb', line 35

define_attribute :object, String

#stateString

Returns Indicates if the coupon is redeemable, and if it is not, why.

Returns:

  • (String)

    Indicates if the coupon is redeemable, and if it is not, why.



39
# File 'lib/recurly/resources/coupon_mini.rb', line 39

define_attribute :state, String