\EventsForce\ResourcesInvoiceBasedResource

Abstract Class InvoiceBasedResource Abstract used by resources that depend upon an invoice E.g Payments // TODO: Improve the way the inherited resources work

Summary

Methods
Properties
Constants
__construct()
genEndpoint()
argsMerge()
setInvoice()
getInvoiceId()
No public properties found
No constants found
No protected methods found
$client
$endpoint_prefix
$invoice
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

Endpoint prefix

Type

string

$invoice

$invoice : integer

Invoice id which we'll be looking in

Type

integer

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

setInvoice()

setInvoice(boolean  $invoice_id = false) : $this

Method to set the current invoice we're looking up in

Parameters

boolean $invoice_id

Throws

\EventsForce\Exceptions\InvalidArgumentException

Returns

$this

getInvoiceId()

getInvoiceId() : integer

Getter for invoice id

Throws

\EventsForce\Exceptions\Exception

Returns

integer