ServiceInvoices extends AppModel
Service Invoice This is an association between services and the invoices created for adding or renewing them.
Table of Contents
Methods
| __construct() | Initialize language |
| add() | Adds the association between the given service and an invoice created for its addition or renewal |
| delete() | Deletes the association between the given service and invoices created for its addition or renewal |
| getAttemptTypes() | Gets a list of service attempt types handled by this model |
| getCancelOptions() | Returns a list with the client service cancel options |
| getRules() | Retrieves validation rules for ::add |
Methods
__construct()
Initialize language
public
__construct() : mixed
add()
Adds the association between the given service and an invoice created for its addition or renewal
public
add(array<string|int, mixed> $vars) : mixed
Parameters
- $vars : array<string|int, mixed>
-
An array of information including:
- service_id The service ID
- invoice_id The ID of the invoice
- type The type of action to queue, it could be 'provisioning', 'renewal', 'suspension', 'unsuspension' or 'cancelation'. 'provisioning' by default.
- maximum_attempts The maximum number of times the service will be reattempted to be renewed (optional)
- date_next_attempt The date for the next attempt to provision the service, if failed (optional)
delete()
Deletes the association between the given service and invoices created for its addition or renewal
public
delete(int $service_id[, int $invoice_id = null ][, int $type = null ]) : mixed
Parameters
- $service_id : int
-
The ID of the service
- $invoice_id : int = null
-
The ID of a particular invoice to delete for
- $type : int = null
-
The type of association to delete for
getAttemptTypes()
Gets a list of service attempt types handled by this model
public
getAttemptTypes() : array<string|int, mixed>
Return values
array<string|int, mixed> —A list of attempt types handled by the model
getCancelOptions()
Returns a list with the client service cancel options
public
getCancelOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —A list of service cancel options
getRules()
Retrieves validation rules for ::add
private
getRules(array<string|int, mixed> $vars) : array<string|int, mixed>
Parameters
- $vars : array<string|int, mixed>
-
An array of input data for validation
Return values
array<string|int, mixed> —The input validation rules