PHP Class Laravel\Cashier\Invoice

Afficher le fichier Open project: laravel/cashier-braintree Class Usage Examples

Protected Properties

Свойство Type Description
$transaction Braintree\Transaction The Braintree transaction instance.
$user Illuminate\Database\Eloquent\Model The user instance.

Méthodes publiques

Méthode Description
__construct ( Model $user, Transaction $transaction ) : void Create a new invoice instance.
__get ( string $key ) : mixed Dynamically get values from the Braintree transaction.
addOn ( ) : string Get the discount amount.
addOnAmount ( ) : float Get the raw add-on amount.
addOns ( ) : array Get the add-on codes applied to the invoice.
amountOff ( ) : string Get the discount amount for the invoice.
asBraintreeTransaction ( ) : Transaction Get the Braintree transaction instance.
coupons ( ) : array Get the coupon codes applied to the invoice.
date ( DateTimeZone | string $timezone = null ) : Carbon\Carbon Get a Carbon date for the invoice.
discount ( ) : string Get the discount amount.
discountAmount ( ) : float Get the raw discount amount.
download ( array $data ) : Response Create an invoice download response.
hasAddon ( ) : boolean Determine if the invoice has any add-ons.
hasDiscount ( ) : boolean Determine if the invoice has a discount.
pdf ( array $data ) : string Capture the invoice as a PDF and return the raw bytes.
rawTotal ( ) : float Get the raw total amount that was paid (or will be paid).
subtotal ( ) : string Get the total of the invoice (before discounts).
total ( ) : string Get the total amount that was paid (or will be paid).
view ( array $data ) : Illuminate\View\View Get the View instance for the invoice.

Méthodes protégées

Méthode Description
formatAmount ( integer $amount ) : string Format the given amount into a string based on the user's preferences.

Method Details

__construct() public méthode

Create a new invoice instance.
public __construct ( Model $user, Transaction $transaction ) : void
$user Illuminate\Database\Eloquent\Model
$transaction Braintree\Transaction
Résultat void

__get() public méthode

Dynamically get values from the Braintree transaction.
public __get ( string $key ) : mixed
$key string
Résultat mixed

addOn() public méthode

Get the discount amount.
public addOn ( ) : string
Résultat string

addOnAmount() public méthode

Get the raw add-on amount.
public addOnAmount ( ) : float
Résultat float

addOns() public méthode

Get the add-on codes applied to the invoice.
public addOns ( ) : array
Résultat array

amountOff() public méthode

Get the discount amount for the invoice.
public amountOff ( ) : string
Résultat string

asBraintreeTransaction() public méthode

Get the Braintree transaction instance.
public asBraintreeTransaction ( ) : Transaction
Résultat Braintree\Transaction

coupons() public méthode

Get the coupon codes applied to the invoice.
public coupons ( ) : array
Résultat array

date() public méthode

Get a Carbon date for the invoice.
public date ( DateTimeZone | string $timezone = null ) : Carbon\Carbon
$timezone DateTimeZone | string
Résultat Carbon\Carbon

discount() public méthode

Get the discount amount.
public discount ( ) : string
Résultat string

discountAmount() public méthode

Get the raw discount amount.
public discountAmount ( ) : float
Résultat float

download() public méthode

Create an invoice download response.
public download ( array $data ) : Response
$data array
Résultat Symfony\Component\HttpFoundation\Response

formatAmount() protected méthode

Format the given amount into a string based on the user's preferences.
protected formatAmount ( integer $amount ) : string
$amount integer
Résultat string

hasAddon() public méthode

Determine if the invoice has any add-ons.
public hasAddon ( ) : boolean
Résultat boolean

hasDiscount() public méthode

Determine if the invoice has a discount.
public hasDiscount ( ) : boolean
Résultat boolean

pdf() public méthode

Capture the invoice as a PDF and return the raw bytes.
public pdf ( array $data ) : string
$data array
Résultat string

rawTotal() public méthode

Get the raw total amount that was paid (or will be paid).
public rawTotal ( ) : float
Résultat float

subtotal() public méthode

Get the total of the invoice (before discounts).
public subtotal ( ) : string
Résultat string

total() public méthode

Get the total amount that was paid (or will be paid).
public total ( ) : string
Résultat string

view() public méthode

Get the View instance for the invoice.
public view ( array $data ) : Illuminate\View\View
$data array
Résultat Illuminate\View\View

Property Details

$transaction protected_oe property

The Braintree transaction instance.
protected Transaction,Braintree $transaction
Résultat Braintree\Transaction

$user protected_oe property

The user instance.
protected Model,Illuminate\Database\Eloquent $user
Résultat Illuminate\Database\Eloquent\Model