\EventsForce\ResourcesInvoices

Class for handling invoices resource Api docs: http://docs.eventsforce.apiary.io/#reference/invoices

Summary

Methods
Properties
Constants
__construct()
genEndpoint()
argsMerge()
getAll()
get()
update()
updateExternalRef()
No public properties found
No constants found
No protected methods found
$client
$endpoint_prefix
N/A
No private methods found
No private properties found
N/A

Properties

$client

$client : \EventsForce\Client

Stores an instance of the client for resources to Access

Type

\EventsForce\Client

$endpoint_prefix

$endpoint_prefix : string

Stores the endpoint prefix prior to all requests

Type

string

Methods

__construct()

__construct(\EventsForce\Client  $client) 

BaseResource constructor.

Parameters

\EventsForce\Client $client

genEndpoint()

genEndpoint(  $suffix = '') : string

Method to generate the endpoint Accepts either string or array e.g string 2/attendees.json or array [2, 'attendees.json'] both return events/2/attendees.json when the endpoint_prefix is events

Parameters

$suffix

Returns

string

argsMerge()

argsMerge(  $args = null,   $defaults = null) : array

method to merge array of arguments with defaults

Parameters

$args
  • passed in arguments
$defaults
  • default argument array to merge with

Returns

array

getAll()

getAll(integer  $invoiceNumberAfter) : \Psr\Http\Message\StreamInterface

Method to get all Invoices Api Docs: http://docs.eventsforce.apiary.io/#reference/invoices/invoicesjsoninvoicenumberafter/get

Parameters

integer $invoiceNumberAfter
  • for paging

Throws

\EventsForce\Exceptions\InvalidArgumentException

Returns

\Psr\Http\Message\StreamInterface

get()

get(boolean  $invoice_id = false) : \Psr\Http\Message\StreamInterface

Method to get a single invoice Api docs: http://docs.eventsforce.apiary.io/#reference/invoices/invoicesinvoicenumberjson/get

Parameters

boolean $invoice_id

Throws

\EventsForce\Exceptions\EmptyResponseException
\EventsForce\Exceptions\ResourceNotFound

Returns

\Psr\Http\Message\StreamInterface

update()

update(boolean  $invoice_id = false, array  $data = array()) : \Psr\Http\Message\StreamInterface

Method to update an invoice with passed in data Api docs: http://docs.eventsforce.apiary.io/#reference/invoices/invoicesinvoicenumberjson/post

Parameters

boolean $invoice_id
array $data

Throws

\EventsForce\Exceptions\EmptyResponseException
\EventsForce\Exceptions\InvalidArgumentException
\EventsForce\Exceptions\ResourceNotFound

Returns

\Psr\Http\Message\StreamInterface

updateExternalRef()

updateExternalRef(boolean  $invoice_id = false, boolean  $external_reference = false) : \Psr\Http\Message\StreamInterface

Helper method that updates an invoice only on the external reference field Api docs: http://docs.eventsforce.apiary.io/#reference/invoices/invoicesinvoicenumberjson/post

Parameters

boolean $invoice_id
boolean $external_reference

Returns

\Psr\Http\Message\StreamInterface