Methods |
public
|
listCardsByUserId(array $queryParameters = [], string $fetch = self::FETCH_OBJECT): PageCard|ResponseInterface|null
Lists all cards by a `user_id`.
Only cards with `limit_type = CARD` have `spend_controls`
Lists all cards by a user_id .
Only cards with limit_type = CARD have spend_controls
Parameters
$queryParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
|
#
|
public
|
createCard(
CreateCardRequest $requestBody,
array $headerParameters = [],
string $fetch = self::FETCH_OBJECT,
): Card|ResponseInterface|null
Creates a new card.
The `spend_controls` field is required when `limit_type` = `CARD`.
The `mailing_address` field is…
Creates a new card.
The spend_controls field is required when limit_type = CARD .
The mailing_address field is required for physical cards and is the shipping address used to send the card; it is not the same as the billing and mailing address used for online purchases.
The first 2 lines of this address must be under 60 characters long. Each user can only have up to 10 active physical cards.
Parameters
$headerParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
|
#
|
public
|
getCardById(string $id, string $fetch = self::FETCH_OBJECT): Card|ResponseInterface|null
Retrieves a card by ID. Only cards with `limit_type = CARD` have `spend_controls`
Retrieves a card by ID. Only cards with limit_type = CARD have spend_controls
Parameters
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
|
#
|
public
|
updateCard(
string $id,
UpdateCardRequest $requestBody,
array $headerParameters = [],
string $fetch = self::FETCH_OBJECT,
): Card|ResponseInterface|null
Update an existing vendor card
Update an existing vendor card
Parameters
$headerParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
|
#
|
public
|
lockCard(
string $id,
LockCardRequest $requestBody,
array $headerParameters = [],
string $fetch = self::FETCH_OBJECT,
): Card|ResponseInterface|null
Locks an existing, unlocked card. And the card owner will receive a notification about it.
Locks an existing, unlocked card. And the card owner will receive a notification about it.
Parameters
$headerParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
|
#
|
public
|
getCardNumber(string $id, string $fetch = self::FETCH_OBJECT): CardNumberResponse|ResponseInterface|null
Retrieves card number, CVV, and expiration date of a card by ID.
Retrieves card number, CVV, and expiration date of a card by ID.
Parameters
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
|
#
|
public
|
emailCardNumber(
string $id,
SecureEmailForCardDetailsRequest $requestBody,
array $headerParameters = [],
string $fetch = self::FETCH_OBJECT,
): ResponseInterface|null
Creates a secure email to send card number, CVV, and expiration date of a card by ID to the specified email.
Creates a secure email to send card number, CVV, and expiration date of a card by ID to the specified email.
This endpoint is currently gated. If you would like to request access, please reach out to
[email protected]
Parameters
$headerParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
|
#
|
public
|
terminateCard(
string $id,
TerminateCardRequest $requestBody,
array $headerParameters = [],
string $fetch = self::FETCH_OBJECT,
): Card|ResponseInterface|null
Terminates an existing card. The card owner will receive a notification about it.
Terminates an existing card. The card owner will receive a notification about it.
Parameters
$headerParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
|
#
|
public
|
unlockCard(string $id, array $headerParameters = [], string $fetch = self::FETCH_OBJECT): Card|ResponseInterface|null
Unlocks an existing card.
Unlocks an existing card.
Parameters
$headerParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
|
#
|
public
|
getCompany(string $fetch = self::FETCH_OBJECT): CompanyResponse|ResponseInterface|null
Parameters
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
Throws
|
#
|
public
|
listDepartments(
array $queryParameters = [],
string $fetch = self::FETCH_OBJECT,
): PageDepartmentResponse|ResponseInterface|null
This endpoint lists all departments.
This endpoint lists all departments.
Parameters
$queryParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
Throws
|
#
|
public
|
createDepartment(
CreateDepartmentRequest $requestBody,
array $headerParameters = [],
string $fetch = self::FETCH_OBJECT,
): DepartmentResponse|ResponseInterface|null
This endpoint creates a new department
This endpoint creates a new department
Parameters
$headerParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
Throws
|
#
|
public
|
getDepartmentById(string $id, string $fetch = self::FETCH_OBJECT): DepartmentResponse|ResponseInterface|null
This endpoint gets a department by ID.
This endpoint gets a department by ID.
Parameters
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
Throws
|
#
|
public
|
listLocations(
array $queryParameters = [],
string $fetch = self::FETCH_OBJECT,
): PageLocationResponse|ResponseInterface|null
This endpoint lists all locations.
This endpoint lists all locations.
Parameters
$queryParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
Throws
|
#
|
public
|
createLocation(
CreateLocationRequest $requestBody,
array $headerParameters = [],
string $fetch = self::FETCH_OBJECT,
): LocationResponse|ResponseInterface|null
This endpoint creates a new location.
This endpoint creates a new location.
Parameters
$headerParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
Throws
|
#
|
public
|
getLocationById(string $id, string $fetch = self::FETCH_OBJECT): LocationResponse|ResponseInterface|null
This endpoint gets a location by ID.
This endpoint gets a location by ID.
Parameters
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
Throws
|
#
|
public
|
listUsers(array $queryParameters = [], string $fetch = self::FETCH_OBJECT): PageUserResponse|ResponseInterface|null
This endpoint lists all users. To find a user id by email, you can filter using the `email` query parameter.
This endpoint lists all users. To find a user id by email, you can filter using the email query parameter.
Parameters
$queryParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
Throws
|
#
|
public
|
createUser(
CreateUserRequest $requestBody,
array $headerParameters = [],
string $fetch = self::FETCH_OBJECT,
): UserResponse|ResponseInterface|null
This endpoint invites a new user as an employee.
To update user's role, check out [this article](https://support.brex…
This endpoint invites a new user as an employee.
To update user's role, check out this article.
Parameters
$headerParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
Throws
|
#
|
public
|
getMe(string $fetch = self::FETCH_OBJECT): UserResponse|ResponseInterface|null
Parameters
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
Throws
|
#
|
public
|
getUserById(string $id, string $fetch = self::FETCH_OBJECT): UserResponse|ResponseInterface|null
This endpoint gets a user by ID.
This endpoint gets a user by ID.
Parameters
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
Throws
|
#
|
public
|
updateUser(
string $id,
UpdateUserRequest $requestBody,
array $headerParameters = [],
string $fetch = self::FETCH_OBJECT,
): UserResponse|ResponseInterface|null
This endpoint updates a user. Any parameters not provided will be left unchanged.
This endpoint updates a user. Any parameters not provided will be left unchanged.
Parameters
$headerParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
Throws
|
#
|
public
|
getUserLimit(string $id, string $fetch = self::FETCH_OBJECT): UserLimitResponse|ResponseInterface|null
This endpoint gets the monthly limit for the user including the monthly available limit.
This endpoint gets the monthly limit for the user including the monthly available limit.
Parameters
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
|
#
|
public
|
setUserLimit(
string $id,
SetUserLimitRequest $requestBody,
array $headerParameters = [],
string $fetch = self::FETCH_OBJECT,
): UserLimitResponse|ResponseInterface|null
This endpoint sets the monthly limit for a user.
The limit amount must be non-negative.
To unset the monthly limit of…
This endpoint sets the monthly limit for a user.
The limit amount must be non-negative.
To unset the monthly limit of the user, just set monthly_limit to null.
Parameters
$headerParameters |
{
|
$fetch |
Fetch mode to use (can be OBJECT or RESPONSE)
|
|
#
|
public
static
|
create($httpClient = null, array $additionalPlugins = [], array $additionalNormalizers = [])
|
#
|