Object

org.mdedetrich.stripe.v1

Coupons

Related Doc: package v1

Permalink

object Coupons extends LazyLogging

Linear Supertypes
LazyLogging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Coupons
  2. LazyLogging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Coupon(id: String, amountOff: Option[Long], created: OffsetDateTime, currency: Option[Currency], duration: Duration, durationInMonths: Option[Long], livemode: Boolean, maxRedemptions: Option[Long], metadata: Option[Map[String, String]], percentOff: Option[BigDecimal], redeemBy: Option[OffsetDateTime], timesRedeemed: Long, valid: Boolean) extends StripeObject with Product with Serializable

    Permalink

    amountOff

    Amount (in the currency specified) that will be taken off the subtotal of any invoices for this customer.

    currency

    If amountOff has been set, the currency of the amount to take off.

    duration

    One of Duration.Forever, Duration.Once, and Duration.Repeating. Describes how long a customer who applies this coupon will get the discount.

    durationInMonths

    If duration is repeating, the number of months the coupon applies. None if coupon duration is forever or once.

    maxRedemptions

    Maximum number of times this coupon can be redeemed, in total, before it is no longer valid.

    metadata

    A set of key/value pairs that you can attach to a coupon object. It can be useful for storing additional information about the coupon in a structured format.

    percentOff

    Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percentOff of 50 will make a $100 invoice $50 instead.

    redeemBy

    Date after which the coupon can no longer be redeemed

    timesRedeemed

    Number of times this coupon has been applied to a customer.

    valid

    Taking account of the above properties, whether this coupon can still be applied to a customer

    See also

    https://stripe.com/docs/api#coupons

  2. case class CouponInput(id: Option[String], duration: Duration, amountOff: Option[Long], currency: Option[Currency], durationInMonths: Option[Long], maxRedemptions: Option[Long], metadata: Option[Map[String, String]], percentOff: Option[BigDecimal], redeemBy: Option[OffsetDateTime]) extends Product with Serializable

    Permalink

    id

    Unique string of your choice that will be used to identify this coupon when applying it to a customer. This is often a specific code you’ll give to your customer to use when signing up (e.g. FALL25OFF). If you don’t want to specify a particular code, you can leave the ID blank and we’ll generate a random code for you.

    duration

    Specifies how long the discount will be in effect. Can be Duration.Forever, Duration.Once, or Duration.Repeating.

    amountOff

    A positive integer representing the amount to subtract from an invoice total (required if percentOff is not passed)

    currency

    Currency of the amountOff parameter (required if amountOff is passed)

    durationInMonths

    Required only if duration is Duration.Repeating, in which case it must be a positive integer that specifies the number of months the discount will be in effect.

    maxRedemptions

    A positive integer specifying the number of times the coupon can be redeemed before it’s no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.

    metadata

    A set of key/value pairs that you can attach to a coupon object. It can be useful for storing additional information about the coupon in a structured format. This will be unset if you POST an empty value.

    percentOff

    A positive integer between 1 and 100 that represents the discount the coupon will apply (required if amountOff is not passed)

    redeemBy

    Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeemBy date, the coupon can no longer be applied to new customers.

    See also

    https://stripe.com/docs/api#create_coupon

  3. case class CouponList(url: String, hasMore: Boolean, data: List[Coupon], totalCount: Option[Long]) extends List[Coupon] with Product with Serializable

    Permalink
  4. case class CouponListInput(created: Option[ListFilterInput], endingBefore: Option[String], limit: Option[Long], startingAfter: Option[String]) extends Product with Serializable

    Permalink

    created

    A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

    endingBefore

    A cursor for use in pagination. endingBefore is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include endingBefore=obj_bar in order to fetch the previous page of the list.

    limit

    A limit on the number of objects to be returned. Limit can range between 1 and 100 items.

    startingAfter

    A cursor for use in pagination. startingAfter is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include startingAfter=obj_foo in order to fetch the next page of the list.

    See also

    https://stripe.com/docs/api#list_coupons

  5. sealed abstract class Duration extends EnumEntry

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object Coupon extends Serializable

    Permalink
  5. object CouponInput extends Serializable

    Permalink
  6. object CouponList extends ListJsonMappers[Coupon] with Serializable

    Permalink
  7. object CouponListInput extends Serializable

    Permalink
  8. object Duration extends Enum[Duration]

    Permalink
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. implicit val couponInputReads: Reads[CouponInput]

    Permalink
  12. implicit val couponInputWrites: Writes[CouponInput]

    Permalink
  13. implicit val couponReads: Reads[Coupon]

    Permalink
  14. implicit val couponWrites: Writes[Coupon]

    Permalink
  15. def create(couponInput: CouponInput)(idempotencyKey: Option[IdempotencyKey] = None)(implicit apiKey: ApiKey, endpoint: Endpoint): Future[Try[Coupon]]

    Permalink
  16. def delete(id: String)(idempotencyKey: Option[IdempotencyKey] = None)(implicit apiKey: ApiKey, endpoint: Endpoint): Future[Try[DeleteResponse]]

    Permalink
  17. implicit val durationFormats: Format[Duration]

    Permalink
  18. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def get(id: String)(implicit apiKey: ApiKey, endpoint: Endpoint): Future[Try[Coupon]]

    Permalink
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def list(couponListInput: CouponListInput, includeTotalCount: Boolean)(implicit apiKey: ApiKey, endpoint: Endpoint): Future[Try[CouponList]]

    Permalink
  26. lazy val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    LazyLogging
  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from LazyLogging

Inherited from AnyRef

Inherited from Any

Ungrouped