PHP 트레잇 Laravel\Cashier\Billable

파일 보기 프로젝트 열기: laravel/cashier-braintree

공개 메소드들

메소드 설명
applyCoupon ( string $coupon, string $subscription = 'default', boolean $removeOthers = false ) : void Apply a coupon to the billable entity.
asBraintreeCustomer ( ) : Customer Get the Braintree customer for the user.
charge ( integer $amount, array $options = [] ) : Transaction Make a "one off" charge on the customer for the given amount.
createAsBraintreeCustomer ( string $token, array $options = [] ) : Customer Create a Braintree customer for the given user.
downloadInvoice ( string $id, array $data, string $storagePath = null ) : Response Create an invoice download Response.
findInvoice ( string $id ) : Invoice | null Find an invoice by ID.
findInvoiceOrFail ( string $id ) : Invoice Find an invoice or throw a 404 error.
hasBraintreeId ( ) : boolean Determine if the entity has a Braintree customer ID.
invoiceFor ( string $description, integer $amount, array $options = [] ) : Transaction Invoice the customer for the given amount.
invoices ( boolean $includePending = false, array $parameters = [] ) : Collection Get a collection of the entity's invoices.
invoicesIncludingPending ( array $parameters = [] ) : Collection Get an array of the entity's invoices.
newSubscription ( string $subscription, string $plan ) : SubscriptionBuilder Begin creating a new subscription.
onGenericTrial ( ) : boolean Determine if the user is on a "generic" trial at the user level.
onPlan ( string $plan ) : boolean Determine if the entity is on the given plan.
onTrial ( string $subscription = 'default', string | null $plan = null ) : boolean Determine if the user is on trial.
subscribed ( string $subscription = 'default', string | null $plan = null ) : boolean Determine if the user has a given subscription.
subscribedToPlan ( array | string $plans, string $subscription = 'default' ) : boolean Determine if the user is actively subscribed to one of the given plans.
subscription ( string $subscription = 'default' ) : Subscription | null Get a subscription instance by name.
subscriptions ( ) : Illuminate\Database\Eloquent\Collection Get all of the subscriptions for the user.
taxPercentage ( ) : integer Get the tax percentage to apply to the subscription.
updateCard ( string $token, array $options = [] ) : void Update customer's credit card.

보호된 메소드들

메소드 설명
updateSubscriptionsToPaymentMethod ( string $token ) : void Update the payment method token for all of the user's subscriptions.

메소드 상세

applyCoupon() 공개 메소드

Apply a coupon to the billable entity.
public applyCoupon ( string $coupon, string $subscription = 'default', boolean $removeOthers = false ) : void
$coupon string
$subscription string
$removeOthers boolean
리턴 void

asBraintreeCustomer() 공개 메소드

Get the Braintree customer for the user.
public asBraintreeCustomer ( ) : Customer
리턴 Braintree\Customer

charge() 공개 메소드

Make a "one off" charge on the customer for the given amount.
public charge ( integer $amount, array $options = [] ) : Transaction
$amount integer
$options array
리턴 Braintree\Transaction

createAsBraintreeCustomer() 공개 메소드

Create a Braintree customer for the given user.
public createAsBraintreeCustomer ( string $token, array $options = [] ) : Customer
$token string
$options array
리턴 Braintree\Customer

downloadInvoice() 공개 메소드

Create an invoice download Response.
public downloadInvoice ( string $id, array $data, string $storagePath = null ) : Response
$id string
$data array
$storagePath string
리턴 Symfony\Component\HttpFoundation\Response

findInvoice() 공개 메소드

Find an invoice by ID.
public findInvoice ( string $id ) : Invoice | null
$id string
리턴 Invoice | null

findInvoiceOrFail() 공개 메소드

Find an invoice or throw a 404 error.
public findInvoiceOrFail ( string $id ) : Invoice
$id string
리턴 Invoice

hasBraintreeId() 공개 메소드

Determine if the entity has a Braintree customer ID.
public hasBraintreeId ( ) : boolean
리턴 boolean

invoiceFor() 공개 메소드

Invoice the customer for the given amount.
public invoiceFor ( string $description, integer $amount, array $options = [] ) : Transaction
$description string
$amount integer
$options array
리턴 Braintree\Transaction

invoices() 공개 메소드

Get a collection of the entity's invoices.
public invoices ( boolean $includePending = false, array $parameters = [] ) : Collection
$includePending boolean
$parameters array
리턴 Illuminate\Support\Collection

invoicesIncludingPending() 공개 메소드

Get an array of the entity's invoices.
public invoicesIncludingPending ( array $parameters = [] ) : Collection
$parameters array
리턴 Illuminate\Support\Collection

newSubscription() 공개 메소드

Begin creating a new subscription.
public newSubscription ( string $subscription, string $plan ) : SubscriptionBuilder
$subscription string
$plan string
리턴 SubscriptionBuilder

onGenericTrial() 공개 메소드

Determine if the user is on a "generic" trial at the user level.
public onGenericTrial ( ) : boolean
리턴 boolean

onPlan() 공개 메소드

Determine if the entity is on the given plan.
public onPlan ( string $plan ) : boolean
$plan string
리턴 boolean

onTrial() 공개 메소드

Determine if the user is on trial.
public onTrial ( string $subscription = 'default', string | null $plan = null ) : boolean
$subscription string
$plan string | null
리턴 boolean

subscribed() 공개 메소드

Determine if the user has a given subscription.
public subscribed ( string $subscription = 'default', string | null $plan = null ) : boolean
$subscription string
$plan string | null
리턴 boolean

subscribedToPlan() 공개 메소드

Determine if the user is actively subscribed to one of the given plans.
public subscribedToPlan ( array | string $plans, string $subscription = 'default' ) : boolean
$plans array | string
$subscription string
리턴 boolean

subscription() 공개 메소드

Get a subscription instance by name.
public subscription ( string $subscription = 'default' ) : Subscription | null
$subscription string
리턴 Subscription | null

subscriptions() 공개 메소드

Get all of the subscriptions for the user.
public subscriptions ( ) : Illuminate\Database\Eloquent\Collection
리턴 Illuminate\Database\Eloquent\Collection

taxPercentage() 공개 메소드

Get the tax percentage to apply to the subscription.
public taxPercentage ( ) : integer
리턴 integer

updateCard() 공개 메소드

Update customer's credit card.
public updateCard ( string $token, array $options = [] ) : void
$token string
$options array
리턴 void

updateSubscriptionsToPaymentMethod() 보호된 메소드

Update the payment method token for all of the user's subscriptions.
protected updateSubscriptionsToPaymentMethod ( string $token ) : void
$token string
리턴 void