Menu

## Bill
in package

Bill.php : 20

##### Tags

author

  BitPay Integrations integrations@bitpay.com

license

  http://www.opensource.org/licenses/mit-license.php MIT

### Table of Contents

#### Properties

$address1 : string|null
$address2 : string|null
$cc : array<string|int, mixed>|null
$city : string|null
$country : string|null
$createDate : string|null
$currency : string|null
$dueDate : string|null
$email : string|null
$id : string|null
$items : array<string|int, mixed>
$merchant : string|null
$name : string|null
$number : string|null
$passProcessingFee : bool|null
$phone : string|null
$state : string|null
$status : string|null
$token : string|null
$url : string|null
$zip : string|null

#### Methods

__construct() : mixed
  Constructor, create a minimal request Bill object.
getAddress1() : string|null
  Gets Bill recipient's address
getAddress2() : string|null
  Gets Bill recipient's address
getCc() : array<string|int, mixed>|null
  Gets Bill cc
getCity() : string|null
  Gets Bill recipient's city
getCountry() : string|null
  Gets Bill recipient's country
getCreateDate() : string|null
  Gets bill create date
getCurrency() : string|null
  Gets bill currency
getDueDate() : string|null
  Gets Bill due date
getEmail() : string|null
  Gets bill email
getId() : string|null
  Gets bill id
getItems() : array<string|int, mixed>
  Gets items from bill
getItemsAsArray() : array<string|int, mixed>|null
  Gets items as array from bill
getMerchant() : string|null
  Gets bill merchant
getName() : string|null
  Gets Bill recipient's name
getNumber() : string|null
  Gets bill number
getPassProcessingFee() : bool|null
  Gets bill pass processing fee
getPhone() : string|null
  Gets Bill recipient's phone number
getState() : string|null
  Gets Bill recipient's state or province
getStatus() : string|null
  Gets bill status
getToken() : string|null
  Gets token
getUrl() : string|null
  Gets bill url
getZip() : string|null
  Gets Bill recipient's ZIP code
setAddress1() : void
  Sets Bill recipient's address
setAddress2() : void
  Sets Bill recipient's address
setCc() : void
  Sets Bill's cc
setCity() : void
  Sets Bill recipient's city
setCountry() : void
  Sets Bill recipient's country
setCreateDate() : void
  Sets Bill's create date
setCurrency() : void
  Sets Bill's currency
setDueDate() : void
  Sets Bill's due date
setEmail() : void
  Sets Bill's email
setId() : void
  Sets Bill's id
setItems() : void
  Sets Bill's items
setMerchant() : void
  Sets Bill's merchant
setName() : void
  Sets Bill recipient's name
setNumber() : void
  Sets Bill's number
setPassProcessingFee() : void
  Sets Bill's pass processing fee
setPhone() : void
  Sets Bill recipient's phone number
setState() : void
  Sets Bill recipient's state or province
setStatus() : void
  Sets Bill's status
setToken() : void
  Sets Bill's token
setUrl() : void
  Sets Bill's url
setZip() : void
  Sets Bill recipient's ZIP code
toArray() : array<string|int, mixed>
  Get bill data as array

### Properties

#### $address1

Bill.php : 28
`protected string|null $address1 = null`

#### $address2

Bill.php : 29
`protected string|null $address2 = null`

#### $cc

Bill.php : 34
`protected array<string|int, mixed>|null $cc = null`

#### $city

Bill.php : 30
`protected string|null $city = null`

#### $country

Bill.php : 33
`protected string|null $country = null`

#### $createDate

Bill.php : 40
`protected string|null $createDate = null`

#### $currency

Bill.php : 22
`protected string|null $currency = null`

#### $dueDate

Bill.php : 36
`protected string|null $dueDate = null`

#### $email

Bill.php : 24
`protected string|null $email = null`

#### $id

Bill.php : 41
`protected string|null $id = null`

#### $items

Bill.php : 25
`protected array<string|int, mixed> $items = []`

#### $merchant

Bill.php : 42
`protected string|null $merchant = null`

#### $name

Bill.php : 27
`protected string|null $name = null`

#### $number

Bill.php : 26
`protected string|null $number = null`

#### $passProcessingFee

Bill.php : 37
`protected bool|null $passProcessingFee = null`

#### $phone

Bill.php : 35
`protected string|null $phone = null`

#### $state

Bill.php : 31
`protected string|null $state = null`

#### $status

Bill.php : 38
`protected string|null $status = null`

#### $token

Bill.php : 23
`protected string|null $token = null`

#### $url

Bill.php : 39
`protected string|null $url = null`

#### $zip

Bill.php : 32
`protected string|null $zip = null`

### Methods

#### __construct()

Bill.php : 52

Constructor, create a minimal request Bill object.

`public __construct([string|null $number = null ][, string|null $currency = null ][, string|null $email = null ][, array<string|int, mixed>|null $items = null ]) : mixed`

##### Parameters

$number : string|null = null

  string A string for tracking purposes.

$currency : string|null = null

  string The three digit currency type used to compute the bill's amount.

$email : string|null = null

  string The email address of the receiver for this bill.

$items : array<string|int, mixed>|null = null

  array The list of items to add to this bill.

#### getAddress1()

Bill.php : 238

Gets Bill recipient's address

`public getAddress1() : string|null`

##### Return values

string|null —

the address1

#### getAddress2()

Bill.php : 258

Gets Bill recipient's address

`public getAddress2() : string|null`

##### Return values

string|null —

the address2

#### getCc()

Bill.php : 360

Gets Bill cc

`public getCc() : array<string|int, mixed>|null`

Email addresses to which a copy of the bill must be sent

##### Return values

array<string|int, mixed>|null —

the cc

#### getCity()

Bill.php : 278

Gets Bill recipient's city

`public getCity() : string|null`

##### Return values

string|null —

the city

#### getCountry()

Bill.php : 338

Gets Bill recipient's country

`public getCountry() : string|null`

##### Return values

string|null —

the country

#### getCreateDate()

Bill.php : 498

Gets bill create date

`public getCreateDate() : string|null`

Date and time of Bill creation, ISO-8601 format yyyy-mm-ddThh:mm:ssZ. (UTC)

##### Return values

string|null —

the creation date

#### getCurrency()

Bill.php : 101

Gets bill currency

`public getCurrency() : string|null`

ISO 4217 3-character currency code. This is the currency associated with the price field

##### Return values

string|null —

the bill currency

#### getDueDate()

Bill.php : 404

Gets Bill due date

`public getDueDate() : string|null`

Date and time at which a bill is due, ISO-8601 format yyyy-mm-ddThh:mm:ssZ. (UTC)

##### Return values

string|null —

the number

#### getEmail()

Bill.php : 128

Gets bill email

`public getEmail() : string|null`

##### Return values

string|null —

the email

#### getId()

Bill.php : 522

Gets bill id

`public getId() : string|null`

Bill resource id

##### Return values

string|null —

the id

#### getItems()

Bill.php : 148

Gets items from bill

`public getItems() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

Item[]

#### getItemsAsArray()

Bill.php : 158

Gets items as array from bill

`public getItemsAsArray() : array<string|int, mixed>|null`

##### Return values

array<string|int, mixed>|null —

items as array from bill

#### getMerchant()

Bill.php : 546

Gets bill merchant

`public getMerchant() : string|null`

Internal identifier for BitPay, this field can be ignored by the merchants.

##### Return values

string|null —

the merchant

#### getName()

Bill.php : 218

Gets Bill recipient's name

`public getName() : string|null`

##### Return values

string|null —

the name

#### getNumber()

Bill.php : 196

Gets bill number

`public getNumber() : string|null`

Bill identifier, specified by merchant

##### Return values

string|null —

the number

#### getPassProcessingFee()

Bill.php : 426

Gets bill pass processing fee

`public getPassProcessingFee() : bool|null`

##### Return values

bool|null —

the pass processing fee

#### getPhone()

Bill.php : 382

Gets Bill recipient's phone number

`public getPhone() : string|null`

##### Return values

string|null —

the phone

#### getState()

Bill.php : 298

Gets Bill recipient's state or province

`public getState() : string|null`

##### Return values

string|null —

the state

#### getStatus()

Bill.php : 450

Gets bill status

`public getStatus() : string|null`

Can "draft", "sent", "new", "paid", or "complete"

##### Return values

string|null —

the status

#### getToken()

Bill.php : 76

Gets token

`public getToken() : string|null`

API token for bill resource. This token is actually derived from the API token used to create the bill and is tied to the specific resource id created.

##### Return values

string|null —

the token

#### getUrl()

Bill.php : 474

Gets bill url

`public getUrl() : string|null`

Web address of bill

##### Return values

string|null —

the url

#### getZip()

Bill.php : 318

Gets Bill recipient's ZIP code

`public getZip() : string|null`

##### Return values

string|null —

the zip

#### setAddress1()

Bill.php : 248

Sets Bill recipient's address

`public setAddress1(string $address1) : void`

##### Parameters

$address1 : string

  Bill recipient's address

#### setAddress2()

Bill.php : 268

Sets Bill recipient's address

`public setAddress2(string $address2) : void`

##### Parameters

$address2 : string

  Bill recipient's address

#### setCc()

Bill.php : 372

Sets Bill's cc

`public setCc(array<string|int, mixed> $cc) : void`

Email addresses to which a copy of the bill must be sent

##### Parameters

$cc : array<string|int, mixed>

  Email addresses to which a copy of the bill must be sent

#### setCity()

Bill.php : 288

Sets Bill recipient's city

`public setCity(string $city) : void`

##### Parameters

$city : string

  Bill recipient's city

#### setCountry()

Bill.php : 348

Sets Bill recipient's country

`public setCountry(string $country) : void`

##### Parameters

$country : string

  Bill recipient's country

#### setCreateDate()

Bill.php : 510

Sets Bill's create date

`public setCreateDate(string $createDate) : void`

Date and time of Bill creation, ISO-8601 format yyyy-mm-ddThh:mm:ssZ. (UTC)

##### Parameters

$createDate : string

  Bill's create date

#### setCurrency()

Bill.php : 114

Sets Bill's currency

`public setCurrency(string $currency) : void`

ISO 4217 3-character currency code. This is the currency associated with the price field

##### Parameters

$currency : string

  3-character currency code

##### Tags

throws
  BitPayValidationException

#### setDueDate()

Bill.php : 416

Sets Bill's due date

`public setDueDate(string $dueDate) : void`

Date and time at which a bill is due, ISO-8601 format yyyy-mm-ddThh:mm:ssZ. (UTC)

##### Parameters

$dueDate : string

  Date and time at which a bill is due

#### setEmail()

Bill.php : 138

Sets Bill's email

`public setEmail(string $email) : void`

##### Parameters

$email : string

  Bill's email

#### setId()

Bill.php : 534

Sets Bill's id

`public setId(string $id) : void`

Bill resource id

##### Parameters

$id : string

  Bill resource id

#### setItems()

Bill.php : 174

Sets Bill's items

`public setItems(array<string|int, mixed> $items) : void`

##### Parameters

$items : array<string|int, mixed>

  Item[]

#### setMerchant()

Bill.php : 558

Sets Bill's merchant

`public setMerchant(string $merchant) : void`

Internal identifier for BitPay, this field can be ignored by the merchants.

##### Parameters

$merchant : string

  Internal identifier for BitPay

#### setName()

Bill.php : 228

Sets Bill recipient's name

`public setName(string $name) : void`

##### Parameters

$name : string

  Bill recipient's name

#### setNumber()

Bill.php : 208

Sets Bill's number

`public setNumber(string $number) : void`

Bill identifier, specified by merchant

##### Parameters

$number : string

  Bill identifier, specified by merchant

#### setPassProcessingFee()

Bill.php : 438

Sets Bill's pass processing fee

`public setPassProcessingFee(bool $passProcessingFee) : void`

If set to true, BitPay's processing fee will be included in the amount charged on the invoice

##### Parameters

$passProcessingFee : bool

  Bill's pass processing fee

#### setPhone()

Bill.php : 392

Sets Bill recipient's phone number

`public setPhone(string $phone) : void`

##### Parameters

$phone : string

  Bill recipient's phone number

#### setState()

Bill.php : 308

Sets Bill recipient's state or province

`public setState(string $state) : void`

##### Parameters

$state : string

  Bill recipient's state or province

#### setStatus()

Bill.php : 462

Sets Bill's status

`public setStatus(string $status) : void`

Can "draft", "sent", "new", "paid", or "complete"

##### Parameters

$status : string

  Bill's status

#### setToken()

Bill.php : 89

Sets Bill's token

`public setToken(string $token) : void`

API token for bill resource. This token is actually derived from the API token used to create the bill and is tied to the specific resource id created.

##### Parameters

$token : string

  API token for bill resource

#### setUrl()

Bill.php : 486

Sets Bill's url

`public setUrl(string $url) : void`

Web address of bill

##### Parameters

$url : string

  Web address of bill

#### setZip()

Bill.php : 328

Sets Bill recipient's ZIP code

`public setZip(string $zip) : void`

##### Parameters

$zip : string

  Bill recipient's ZIP code

#### toArray()

Bill.php : 568

Get bill data as array

`public toArray() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

bill data as array

## Search results