PHP Класс Laravel\Cashier\Invoice

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$transaction Braintree\Transaction The Braintree transaction instance.
$user Illuminate\Database\Eloquent\Model The user instance.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
formatAmount ( integer $amount ) : string Format the given amount into a string based on the user's preferences.

Описание методов

__construct() публичный Метод

Create a new invoice instance.
public __construct ( Model $user, Transaction $transaction ) : void
$user Illuminate\Database\Eloquent\Model
$transaction Braintree\Transaction
Результат void

__get() публичный Метод

Dynamically get values from the Braintree transaction.
public __get ( string $key ) : mixed
$key string
Результат mixed

addOn() публичный Метод

Get the discount amount.
public addOn ( ) : string
Результат string

addOnAmount() публичный Метод

Get the raw add-on amount.
public addOnAmount ( ) : float
Результат float

addOns() публичный Метод

Get the add-on codes applied to the invoice.
public addOns ( ) : array
Результат array

amountOff() публичный Метод

Get the discount amount for the invoice.
public amountOff ( ) : string
Результат string

asBraintreeTransaction() публичный Метод

Get the Braintree transaction instance.
public asBraintreeTransaction ( ) : Transaction
Результат Braintree\Transaction

coupons() публичный Метод

Get the coupon codes applied to the invoice.
public coupons ( ) : array
Результат array

date() публичный Метод

Get a Carbon date for the invoice.
public date ( DateTimeZone | string $timezone = null ) : Carbon\Carbon
$timezone DateTimeZone | string
Результат Carbon\Carbon

discount() публичный Метод

Get the discount amount.
public discount ( ) : string
Результат string

discountAmount() публичный Метод

Get the raw discount amount.
public discountAmount ( ) : float
Результат float

download() публичный Метод

Create an invoice download response.
public download ( array $data ) : Response
$data array
Результат Symfony\Component\HttpFoundation\Response

formatAmount() защищенный Метод

Format the given amount into a string based on the user's preferences.
protected formatAmount ( integer $amount ) : string
$amount integer
Результат string

hasAddon() публичный Метод

Determine if the invoice has any add-ons.
public hasAddon ( ) : boolean
Результат boolean

hasDiscount() публичный Метод

Determine if the invoice has a discount.
public hasDiscount ( ) : boolean
Результат boolean

pdf() публичный Метод

Capture the invoice as a PDF and return the raw bytes.
public pdf ( array $data ) : string
$data array
Результат string

rawTotal() публичный Метод

Get the raw total amount that was paid (or will be paid).
public rawTotal ( ) : float
Результат float

subtotal() публичный Метод

Get the total of the invoice (before discounts).
public subtotal ( ) : string
Результат string

total() публичный Метод

Get the total amount that was paid (or will be paid).
public total ( ) : string
Результат string

view() публичный Метод

Get the View instance for the invoice.
public view ( array $data ) : Illuminate\View\View
$data array
Результат Illuminate\View\View

Описание свойств

$transaction защищенное свойство

The Braintree transaction instance.
protected Transaction,Braintree $transaction
Результат Braintree\Transaction

$user защищенное свойство

The user instance.
protected Model,Illuminate\Database\Eloquent $user
Результат Illuminate\Database\Eloquent\Model