class Discount extends Resource implements DiscountInterface

A discount represents the actual application of a coupon to a particular customer.

It contains information about when the discount began and when it will end.

Properties

string $id A unique identifier for the resource. from Resource
protected mixed $response A response from Stripe. from Resource

Methods

string
getId()

Returns the unique identifier for this resource.

from Resource
mixed
getResponse()

Returns the raw Stripe response.

from Resource
void
setProperties()

Set the response data as properties on the class.

from Resource
deleteCustomerDiscount(CustomerInterface $customer, string $key = null)

Removes the currently applied discount on a customer.

deleteSubscriptionDiscount(SubscriptionInterface $subscription)

Removes the currently applied discount on a subscription.

void
customer($id, string $idempotencyKey = null)

No description

void
subscription($id, string $idempotencyKey = null)

No description

Details

in Resource at line 29
string getId()

Returns the unique identifier for this resource.

Return Value

string

in Resource at line 39
mixed getResponse()

Returns the raw Stripe response.

Return Value

mixed

in Resource at line 47
protected void setProperties()

Set the response data as properties on the class.

Return Value

void

at line 28
DiscountInterface deleteCustomerDiscount(CustomerInterface $customer, string $key = null)

Removes the currently applied discount on a customer.

Parameters

CustomerInterface $customer
string $key

Return Value

DiscountInterface

See also

at line 45
DiscountInterface deleteSubscriptionDiscount(SubscriptionInterface $subscription)

Removes the currently applied discount on a subscription.

Parameters

SubscriptionInterface $subscription

Return Value

DiscountInterface

See also

at line 54
protected void customer($id, string $idempotencyKey = null)

Parameters

$id
string $idempotencyKey

Return Value

void

at line 62
protected void subscription($id, string $idempotencyKey = null)

Parameters

$id
string $idempotencyKey

Return Value

void