TimeTrex API Manual

DemoData
in package

Table of Contents

$create_data  : mixed
$user_wage_groups  : mixed
$admin_user_name_prefix  : mixed
$city_names  : mixed
$coordinates  : mixed
$enable_quick_punch  : mixed
$first_names  : mixed
$generated_sins  : mixed
$institute  : mixed
$last_names  : mixed
$major  : mixed
$max_random_users  : mixed
$minor  : mixed
$password  : mixed
$user_name_postfix  : mixed
$user_name_prefix  : mixed
$current_company  : mixed
$date  : mixed
$permission_presets  : mixed
$random_seed  : int
$Validator  : Validator
__construct()  : mixed
DemoData constructor.
createAbsence()  : bool
createAbsencePolicy()  : bool
createAccrualBalance()  : bool
createAccrualPolicy()  : bool
createAccrualPolicyAccount()  : bool
createAreaPolicy()  : bool
createAuthorization()  : bool
createAuthorizationHierarchyControl()  : bool
createAuthorizationHierarchyLevel()  : bool
createBranch()  : bool
createClient()  : bool
createClientContact()  : bool
createClientGroup()  : bool
createCompany()  : bool
createCompanyDeduction()  : bool
createContributingPayCodePolicy()  : bool
createContributingShiftPolicy()  : bool
createCurrency()  : bool
createCustomField()  : bool
createDepartment()  : bool
createDocument()  : bool
createDocumentAttachment()  : bool
createDocumentFilesByObjectType()  : bool
createDocumentRevision()  : bool
createEthnicGroup()  : bool
createExceptionPolicy()  : bool
createExpensePolicy()  : bool
createGEOFence()  : bool
createInvoice()  : bool
createInvoiceDistrict()  : bool
createJob()  : bool
createJobApplicant()  : bool
createJobApplicantEducation()  : bool
createJobApplicantEmployment()  : bool
createJobApplicantLanguage()  : bool
createJobApplicantLicense()  : bool
createJobApplicantLocation()  : bool
createJobApplicantMembership()  : bool
createJobApplicantReference()  : bool
createJobApplicantSkill()  : bool
createJobApplication()  : bool
createJobGroup()  : bool
createJobVacancy()  : bool
createKPI()  : bool
createKPIGroup()  : bool
createLegalEntity()  : bool
createMealPolicy()  : bool
createOverTimePolicy()  : bool
createPayCode()  : bool
createPayFormulaPolicy()  : bool
createPayPeriodSchedule()  : bool
createPayrollRemittanceAgency()  : bool
createPayStubAccount()  : bool
createPayStubAccountLink()  : bool
createPermissionGroups()  : bool
createPolicyGroup()  : bool
createPremiumPolicy()  : bool
createProduct()  : bool
createProductGroup()  : bool
createPunch()  : bool
createPunchPair()  : bool
createPunchTag()  : bool|string
createPunchTagGroup()  : bool
createQualification()  : bool
createQualificationGroup()  : bool
createRecruitmentPortalConfig()  : bool
createRecurringHolidays()  : bool
createRecurringSchedule()  : bool
createRecurringScheduleTemplate()  : bool
createRegularTimePolicy()  : bool
createRemittanceDestinationAccount()  : bool|int|string
createRemittanceSourceAccount()  : bool
createReportCustomColumn()  : bool
createRequest()  : bool
createRoundingPolicy()  : bool
createSchedule()  : bool
createSchedulePolicy()  : bool
createShippingPolicy()  : bool
createStation()  : bool
createTask()  : bool
createTaskGroup()  : bool
createTaxForms()  : bool
createTaxPolicy()  : bool
createTimeSheetVerification()  : bool
createUser()  : bool
createUserContact()  : bool
createUserDateTotal()  : bool
createUserDeduction()  : bool
createUserDefaults()  : bool
createUserEducation()  : bool
createUserExpense()  : bool
createUserGroup()  : bool
createUserLanguage()  : bool
createUserLicense()  : bool
createUserMembership()  : bool
createUserPermission()  : bool
createUserPreference()  : bool
createUserReview()  : bool
createUserReviewControl()  : bool
createUserSkill()  : bool
createUserTitle()  : bool
createUserWage()  : bool
createUserWageGroups()  : bool
deleteAbsence()  : bool
deletePunch()  : bool
deleteSchedule()  : bool
editPunch()  : bool
editSchedule()  : bool
generateData()  : bool
generateSIN()  : int|string
Generate a unique sin
getAdminUserNamePrefix()  : bool|string
getDate()  : bool|int
getEnableQuickPunch()  : bool
getLegalEntityObject()  : bool
getMaxRandomUsers()  : bool|int
getPassword()  : bool|string
getRandomArrayValue()  : mixed
getRandomCoordinates()  : float
getRandomFirstName()  : bool|mixed
getRandomLastName()  : bool|mixed
getRandomSeed()  : bool|int
getUserNamePostfix()  : bool|string
getUserNamePrefix()  : bool|string
setAdminUserNamePrefix()  : bool
setDate()  : bool
Sets the date that is used to base all other dates from.
setEnableQuickPunch()  : bool
setMaxRandomUsers()  : bool
setNotificationsAsRead()  : bool
Mark notifications read.
setPassword()  : bool
setRandomSeed()  : bool
Sets the date that is used to base all other dates from.
setUserNamePostfix()  : bool
setUserNamePrefix()  : bool

Properties

$create_data

public mixed $create_data = ['schedule' => \true, 'punch' => \true, 'pay_stub' => \true, 'invoice' => \true, 'expense' => \true, 'document' => \true, 'hr' => \true]

$admin_user_name_prefix

protected mixed $admin_user_name_prefix = 'demoadmin'

$city_names

protected mixed $city_names = ['Richmond', 'Southampton', 'Stratford', 'Wellington', 'Jasper', 'Flatrock', 'Carleton', 'Belmont', 'Armstrong']

$coordinates

protected mixed $coordinates = [ //NOTE: If these change update array_slice() calls on this to correspond. [40.7331043902, -74.01004796505001], // New York [40.7314133588, -73.990341086388], [40.727014849905, -74.007800092697], [40.704895945126, -73.981407880783], [40.722071261881, -74.01099357414201], [40.718688595346, -73.935745954514], [40.763478722865, -73.93007040023799], [40.656778234208, -73.975642421722], [40.723112047769, -74.058443098068], [40.693963891348, -74.057968854904], [47.773829, -122.38306], // Seattle [47.473010966814, -122.11257896423], [47.785653130062, -122.12741374969], [47.708086640739, -121.9173002243], [47.759983573294, -122.65153160095], [47.765522347356, -122.021], [47.721397737032, -122.30561971664], [47.578552237571, -122.29298259735], [47.503460631986, -122.25512981415], [47.755367, -122.715569], [47.537310405077, -122.8613948822], [47.783635, -122.652912], [34.256081384717, -100.73295593262], // outside New York, Seattle [34.037866684604, -90.626561401367], [31.858065081209, -92.28123718261701], [30.6931993, -95.64559149999999], [29.4068375, -98.51819159999999], [28.6415717, -106.0785596], [33.474184, -112.1011934], [40.8230805, -96.7074882], [40.7160846, -111.9110708], [35.4674472, -97.54807769999999], [42.8376525, -106.3263868], [39.5306376, -119.7937269], [32.7949408, -96.9466828], [34.7198707, -92.2848841], [37.7802258, -81.1810323], ]

$first_names

protected mixed $first_names = ['Sidney', 'Vi', 'Lena', 'Carlee', 'Mohammad', 'Pat', 'Lashell', 'Denis', 'Jeffry', 'Cleo', 'Nikia', 'Vallie', 'Shari', 'Daniel', 'Laurena', 'Elbert', 'Cortney', 'Ferne', 'Willetta', 'Mitzi', 'Stacey', 'Mireya', 'Reita', 'Rivka', 'Tu', 'Hiram', 'Giuseppina', 'Reda', 'Dion', 'Izola', 'Bobbye', 'Chanelle', 'Clemmie', 'Karri', 'Kylee', 'Gillian', 'Octavia', 'Marielle', 'Romelia', 'Stephania', 'Sherryl', 'Malka', 'Kristan', 'Jolynn', 'Star', 'Cinthia', 'Vern', 'Felipa', 'Alayna', 'Lorenzo', 'Agnus', 'Hyman', 'Floretta', 'Rosella', 'Sabina', 'Regan', 'Yu', 'Muoi', 'Tomiko', 'Ada', 'Lyla', 'Madelene', 'Rosaura', 'Berenice', 'Georgine', 'Vada', 'Ray', 'Martin', 'Kathryn', 'Dolly', 'Clayton', 'Arica', 'Britany', 'Rolland', 'Mellissa', 'Kymberly', 'Claude', 'Doyle', 'Hector', 'Arlen', 'Debra', 'Tami', 'Catharine', 'Su', 'Danica', 'Shandra', 'Latrina', 'Orval', 'Clifton', 'Jena', 'Oliver', 'Haydee', 'Julie', 'Xochitl', 'Adrian', 'Winfred', 'Eldora', 'Sook', 'Antonette']

$institute

protected mixed $institute = ['Harvard University', 'Princeton University', 'Yale University', 'University of Pennsylvania', 'Duke University', 'Stanford University', 'California Institute of Technology', 'Massachusetts Inst. of Technology', 'Columbia University', 'Dartmouth College']

$last_names

protected mixed $last_names = ['Lecompte', 'Jepko', 'Godzik', 'Bereda', 'Lamers', 'Errett', 'Farm', 'Adamski', 'Fadri', 'Gerhart', 'Lubic', 'Jost', 'Manginelli', 'Farris', 'Otiz', 'Huso', 'Hutchens', 'Mani', 'Galland', 'Laforest', 'Labatt', 'Burr', 'Clemmens', 'Gode', 'Kapsner', 'Harben', 'Aumend', 'Lauck', 'Lassere', 'Center', 'Barlow', 'Hudgens', 'Fimbres', 'Northcut', 'Newstrom', 'Floerchinger', 'Goetting', 'Binienda', 'Dardagnac', 'Graper', 'Cadarette', 'Castaneda', 'Grosvenor', 'Mccurren', 'Feuerstein', 'Parizek', 'Haner', 'Beyer', 'Lollis', 'Osten', 'Baginski', 'Fusca', 'Hardiman', 'Rechkemmer', 'Ellerbrock', 'Macvicar', 'Golberg', 'Benassi', 'Hirons', 'Lineberry', 'Flamino', 'Pickard', 'Grohmann', 'Parkers', 'Hebrard', 'Glade', 'Haughney', 'Levering', 'Kudo', 'Hoffschneider', 'Mussa', 'Fitzloff', 'Matelic', 'Maillard', 'Carswell', 'Becera', 'Gonsior', 'Qureshi', 'Armel', 'Broadnay', 'Boulch', 'Flamio', 'Heaston', 'Kristen', 'Chambless', 'Lamarch', 'Jedan', 'Fijal', 'Jesmer', 'Capraro', 'Hemrich', 'Prudente', 'Cochren', 'Karroach', 'Guillotte', 'Musinski', 'Eflin', 'Palumbo', 'Legendre', 'Afton']

$major

protected mixed $major = ['Biological Engineering', 'Public Management', 'Vehicle Engineering', 'Industrial Design', 'Civil Engineering', 'Communication Engineering', 'Finance', 'Financial Management']

$minor

protected mixed $minor = ['Physical Education Section', 'Arts and Design Department/Section', 'Social Science Department/Section', 'Foreign language and literature department', 'Economics', 'Automation', 'Business Administration']

Methods

__construct()

DemoData constructor.

public __construct() : mixed
Return values
mixed

createAbsence()

public createAbsence(string $user_id, int $date_stamp,  $total_time, string $absence_policy_id[, bool $override = false ]) : bool
Parameters
$user_id : string

UUID

$date_stamp : int

EPOCH

$total_time :
$absence_policy_id : string

UUID

$override : bool = false
Return values
bool

createAbsencePolicy()

public createAbsencePolicy(string $company_id,  $type, int $pay_code_id) : bool
Parameters
$company_id : string

UUID

$type :
$pay_code_id : int
Return values
bool

createAccrualBalance()

public createAccrualBalance(string $user_id, string $accrual_policy_account_id[, int $type = 30 ]) : bool
Parameters
$user_id : string

UUID

$accrual_policy_account_id : string

UUID

$type : int = 30
Return values
bool

createAccrualPolicy()

public createAccrualPolicy(string $company_id,  $type, string $accrual_policy_account_id) : bool
Parameters
$company_id : string

UUID

$type :
$accrual_policy_account_id : string

UUID

Return values
bool

createAccrualPolicyAccount()

public createAccrualPolicyAccount(string $company_id,  $type) : bool
Parameters
$company_id : string

UUID

$type :
Return values
bool

createAreaPolicy()

public createAreaPolicy(string $company_id,  $type[, bool $invoice_district_ids = false ]) : bool
Parameters
$company_id : string

UUID

$type :
$invoice_district_ids : bool = false
Return values
bool

createAuthorization()

public createAuthorization(int $object_type_id, string $object_id, string $user_id[, bool $authorize = true ]) : bool
Parameters
$object_type_id : int
$object_id : string

UUID

$user_id : string

UUID

$authorize : bool = true
Return values
bool

createAuthorizationHierarchyControl()

public createAuthorizationHierarchyControl(string $company_id, string|array<string|int, mixed> $child_user_ids) : bool
Parameters
$company_id : string

UUID

$child_user_ids : string|array<string|int, mixed>

UUID

Return values
bool

createAuthorizationHierarchyLevel()

public createAuthorizationHierarchyLevel(string $company_id, string $hierarchy_id, string $root_user_id,  $level) : bool
Parameters
$company_id : string

UUID

$hierarchy_id : string

UUID

$root_user_id : string

UUID

$level :
Return values
bool

createBranch()

public createBranch(string $company_id,  $type[, string|array<string|int, mixed> $geo_fence_ids = null ]) : bool
Parameters
$company_id : string

UUID

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

UUID

Return values
bool

createClient()

public createClient(string $company_id,  $type[, string|array<string|int, mixed> $user_ids = null ][, string|array<string|int, mixed> $client_group_ids = null ]) : bool
Parameters
$company_id : string

UUID

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

UUID

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

UUID

Return values
bool

createClientContact()

public createClientContact(string $client_id,  $type, string|array<string|int, mixed> $invoice_district_ids, string $default_currency_id) : bool
Parameters
$client_id : string

UUID

$type :
$invoice_district_ids : string|array<string|int, mixed>

UUID

$default_currency_id : string

UUID

Return values
bool

createClientGroup()

public createClientGroup(string $company_id,  $type, int $parent_id) : bool
Parameters
$company_id : string

UUID

$type :
$parent_id : int
Return values
bool

createCompany()

public createCompany() : bool
Return values
bool

createCompanyDeduction()

public createCompanyDeduction(string $company_id, string $current_user_id,  $legal_entity_id) : bool
Parameters
$company_id : string

UUID

$current_user_id : string

UUID

$legal_entity_id :
Return values
bool

createContributingPayCodePolicy()

public createContributingPayCodePolicy(string $company_id,  $type, int $pay_code_ids) : bool
Parameters
$company_id : string

UUID

$type :
$pay_code_ids : int
Return values
bool

createContributingShiftPolicy()

public createContributingShiftPolicy(string $company_id,  $type, string $contributing_pay_code_policy_id[, string $holiday_policy_id = null ]) : bool
Parameters
$company_id : string

UUID

$type :
$contributing_pay_code_policy_id : string

UUID

$holiday_policy_id : string = null

UUID

Return values
bool

createCurrency()

public createCurrency(string $company_id,  $type) : bool
Parameters
$company_id : string

UUID

$type :
Return values
bool

createCustomField()

public createCustomField(string $company_id, string $name, string $parent_table, int $type_id[, mixed $meta_data = null ]) : bool
Parameters
$company_id : string

UUID

$name : string
$parent_table : string
$type_id : int
$meta_data : mixed = null
Return values
bool

createDepartment()

public createDepartment(string $company_id,  $type[, string|array<string|int, mixed> $branch_ids = null ][, string|array<string|int, mixed> $geo_fence_ids = null ]) : bool
Parameters
$company_id : string

UUID

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

UUID

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

UUID

Return values
bool

createDocument()

public createDocument(string $company_id, int $object_type_id,  $type) : bool
Parameters
$company_id : string

UUID

$object_type_id : int
$type :
Return values
bool

createDocumentAttachment()

public createDocumentAttachment(string $document_id, int $object_type_id, string $object_id) : bool
Parameters
$document_id : string

UUID

$object_type_id : int
$object_id : string

UUID

Return values
bool

createDocumentFilesByObjectType()

public createDocumentFilesByObjectType(string $company_id, int $object_type_id,  $type,  $dir) : bool
Parameters
$company_id : string

UUID

$object_type_id : int
$type :
$dir :
Return values
bool

createDocumentRevision()

public createDocumentRevision( $company_id, string $document_id,  $object_type_id,  $type,  $revision) : bool
Parameters
$company_id :
$document_id : string

UUID

$object_type_id :
$type :
$revision :
Tags
throws
DBError
throws
GeneralError
Return values
bool

createEthnicGroup()

public createEthnicGroup(string $company_id,  $type) : bool
Parameters
$company_id : string

UUID

$type :
Return values
bool

createExceptionPolicy()

public createExceptionPolicy(string $company_id) : bool
Parameters
$company_id : string

UUID

Return values
bool

createExpensePolicy()

public createExpensePolicy(string $company_id,  $type[, string|array<string|int, mixed> $taxes_policy_ids = null ]) : bool
Parameters
$company_id : string

UUID

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

UUID

Return values
bool

createGEOFence()

public createGEOFence(string $company_id,  $type) : bool
Parameters
$company_id : string

UUID

$type :
Return values
bool

createInvoice()

public createInvoice(string $company_id, string $client_id, string $currency_id,  $products[, int $status_id = 10 ][, null $payments = null ][, string $user_ids = null ][, string|array<string|int, mixed> $shipping_policy_ids = null ]) : bool
Parameters
$company_id : string

UUID

$client_id : string

UUID

$currency_id : string

UUID

$products :
$status_id : int = 10
$payments : null = null
$user_ids : string = null

UUID

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

UUID

Return values
bool

createInvoiceDistrict()

public createInvoiceDistrict(string $company_id,  $type) : bool
Parameters
$company_id : string

UUID

$type :
Return values
bool

createJob()

public createJob(string $company_id,  $type, string $item_id, int $job_group_id, int $branch_id, int $department_id[, string $client_id = null ][, string|array<string|int, mixed> $geo_fence_ids = null ]) : bool
Parameters
$company_id : string

UUID

$type :
$item_id : string

UUID

$job_group_id : int
$branch_id : int
$department_id : int
$client_id : string = null

UUID

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

UUID

Return values
bool

createJobApplicant()

public createJobApplicant(string $company_id) : bool
Parameters
$company_id : string

UUID

Return values
bool

createJobApplicantEducation()

public createJobApplicantEducation(string $job_applicant_id, string $qualification_id) : bool
Parameters
$job_applicant_id : string

UUID

$qualification_id : string

UUID

Return values
bool

createJobApplicantEmployment()

public createJobApplicantEmployment(string $job_applicant_id,  $type) : bool
Parameters
$job_applicant_id : string

UUID

$type :
Return values
bool

createJobApplicantLanguage()

public createJobApplicantLanguage(string $job_applicant_id, string $qualification_id) : bool
Parameters
$job_applicant_id : string

UUID

$qualification_id : string

UUID

Return values
bool

createJobApplicantLicense()

public createJobApplicantLicense(string $job_applicant_id, string $qualification_id) : bool
Parameters
$job_applicant_id : string

UUID

$qualification_id : string

UUID

Return values
bool

createJobApplicantLocation()

public createJobApplicantLocation(string $job_applicant_id) : bool
Parameters
$job_applicant_id : string

UUID

Return values
bool

createJobApplicantMembership()

public createJobApplicantMembership(string $job_applicant_id, string $qualification_id, string $default_currency_id) : bool
Parameters
$job_applicant_id : string

UUID

$qualification_id : string

UUID

$default_currency_id : string

UUID

Return values
bool

createJobApplicantReference()

public createJobApplicantReference(string $job_applicant_id) : bool
Parameters
$job_applicant_id : string

UUID

Return values
bool

createJobApplicantSkill()

public createJobApplicantSkill(string $job_applicant_id, string $qualification_id) : bool
Parameters
$job_applicant_id : string

UUID

$qualification_id : string

UUID

Return values
bool

createJobApplication()

public createJobApplication(string $job_applicant_id, string $job_vacancy_id, string $user_id) : bool
Parameters
$job_applicant_id : string

UUID

$job_vacancy_id : string

UUID

$user_id : string

UUID

Return values
bool

createJobGroup()

public createJobGroup(string $company_id,  $type, int $parent_id) : bool
Parameters
$company_id : string

UUID

$type :
$parent_id : int
Return values
bool

createJobVacancy()

public createJobVacancy(string $company_id, string $user_id, int $user_title_id, int $default_branch_id, int $default_department_id) : bool
Parameters
$company_id : string

UUID

$user_id : string

UUID

$user_title_id : int
$default_branch_id : int
$default_department_id : int
Return values
bool

createKPI()

public createKPI(string $company_id,  $type,  $rate_type[, string|array<string|int, mixed> $kpi_group_ids = null ]) : bool
Parameters
$company_id : string

UUID

$type :
$rate_type :
$kpi_group_ids : string|array<string|int, mixed> = null

UUID

Return values
bool

createKPIGroup()

public createKPIGroup(string $company_id,  $type, int $parent_id) : bool
Parameters
$company_id : string

UUID

$type :
$parent_id : int
Return values
bool

createLegalEntity()

public createLegalEntity(string $company_id,  $type[, int $status_id = 10 ]) : bool
Parameters
$company_id : string

UUID

$type :
$status_id : int = 10
Return values
bool

createMealPolicy()

public createMealPolicy(string $company_id, int $pay_code_id) : bool
Parameters
$company_id : string

UUID

$pay_code_id : int
Return values
bool

createOverTimePolicy()

public createOverTimePolicy(string $company_id,  $type, int $contributing_shift_policy_id, int $pay_code_id[, mixed $punch_tags = [] ]) : bool
Parameters
$company_id : string

UUID

$type :
$contributing_shift_policy_id : int
$pay_code_id : int
$punch_tags : mixed = []
Return values
bool

createPayCode()

public createPayCode(string $company_id,  $type, int $pay_formula_policy_id) : bool
Parameters
$company_id : string

UUID

$type :
$pay_formula_policy_id : int
Return values
bool

createPayFormulaPolicy()

public createPayFormulaPolicy(string $company_id,  $type, int $accrual_policy_account_id) : bool
Parameters
$company_id : string

UUID

$type :
$accrual_policy_account_id : int
Return values
bool

createPayPeriodSchedule()

public createPayPeriodSchedule(string $company_id, string $user_ids) : bool
Parameters
$company_id : string

UUID

$user_ids : string

UUID

Return values
bool

createPayrollRemittanceAgency()

public createPayrollRemittanceAgency(string $company_id, string $current_user_id,  $legal_entity_id[, string $country = 'US' ]) : bool
Parameters
$company_id : string

UUID

$current_user_id : string

UUID

$legal_entity_id :
$country : string = 'US'
Return values
bool

createPayStubAccount()

public createPayStubAccount(string $company_id) : bool
Parameters
$company_id : string

UUID

Return values
bool
public createPayStubAccountLink(string $company_id) : bool
Parameters
$company_id : string

UUID

Return values
bool

createPermissionGroups()

public createPermissionGroups(string $company_id[, null $filter_preset_options = null ]) : bool
Parameters
$company_id : string

UUID

$filter_preset_options : null = null
Return values
bool

createPolicyGroup()

public createPolicyGroup(string $company_id[, string|array<string|int, mixed> $meal_policy_ids = null ][, string|array<string|int, mixed> $exception_policy_id = null ][, string|array<string|int, mixed> $holiday_policy_ids = null ][, string|array<string|int, mixed> $over_time_policy_ids = null ][, string|array<string|int, mixed> $premium_policy_ids = null ][, string|array<string|int, mixed> $rounding_policy_ids = null ][, string|array<string|int, mixed> $user_ids = null ][, string|array<string|int, mixed> $break_policy_ids = null ][, string|array<string|int, mixed> $accrual_policy_ids = null ][, string|array<string|int, mixed> $expense_policy_ids = null ][, string|array<string|int, mixed> $absence_policy_ids = null ][, string|array<string|int, mixed> $regular_policy_ids = null ]) : bool
Parameters
$company_id : string

UUID

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

UUID

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

UUID

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

UUID

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

UUID

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

UUID

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

UUID

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

UUID

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

UUID

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

UUID

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

UUID

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

UUID

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

UUID

Return values
bool

createPremiumPolicy()

public createPremiumPolicy(string $company_id,  $type, int $contributing_shift_policy_id, int $pay_code_id[, mixed $punch_tags = [] ]) : bool
Parameters
$company_id : string

UUID

$type :
$contributing_shift_policy_id : int
$pay_code_id : int
$punch_tags : mixed = []
Return values
bool

createProduct()

public createProduct(string $company_id, string|array<string|int, mixed> $group_ids,  $type, string $currency_id) : bool
Parameters
$company_id : string

UUID

$group_ids : string|array<string|int, mixed>

UUID

$type :
$currency_id : string

UUID

Return values
bool

createProductGroup()

public createProductGroup(string $company_id,  $type, int $parent_id) : bool
Parameters
$company_id : string

UUID

$type :
$parent_id : int
Return values
bool

createPunch()

public createPunch(string $user_id, int $type_id, int $status_id,  $time_stamp,  $data[, null $coordinates = null ][, bool $calc_total_time = true ]) : bool
Parameters
$user_id : string

UUID

$type_id : int
$status_id : int
$time_stamp :
$data :
$coordinates : null = null
$calc_total_time : bool = true
Return values
bool

createPunchPair()

public createPunchPair(string $user_id,  $in_time_stamp,  $out_time_stamp[, null $data = null ][, bool $calc_total_time = true ][, bool $disable_rounding = false ]) : bool
Parameters
$user_id : string

UUID

$in_time_stamp :
$out_time_stamp :
$data : null = null
$calc_total_time : bool = true
$disable_rounding : bool = false
Tags
throws
DBError
throws
GeneralError
Return values
bool

createPunchTag()

public createPunchTag( $company_id,  $group_id,  $manual_id,  $name,  $data) : bool|string
Parameters
$company_id :
$group_id :
$manual_id :
$name :
$data :
Return values
bool|string

createPunchTagGroup()

public createPunchTagGroup(string $company_id,  $type, int $parent_id) : bool
Parameters
$company_id : string

UUID

$type :
$parent_id : int
Return values
bool

createQualification()

public createQualification(string $company_id,  $type, string $qualification_group_id) : bool
Parameters
$company_id : string

UUID

$type :
$qualification_group_id : string

UUID

Return values
bool

createQualificationGroup()

public createQualificationGroup(string $company_id,  $type, int $parent_id) : bool
Parameters
$company_id : string

UUID

$type :
$parent_id : int
Return values
bool

createRecruitmentPortalConfig()

public createRecruitmentPortalConfig(string $company_id) : bool
Parameters
$company_id : string

UUID

Return values
bool

createRecurringHolidays()

public createRecurringHolidays(string $company_id, string $current_user_id) : bool
Parameters
$company_id : string

UUID

$current_user_id : string

UUID

Return values
bool

createRecurringSchedule()

public createRecurringSchedule(string $company_id, string $template_id, int $start_date, int $end_date, string|array<string|int, string> $user_ids[, mixed $display_weeks = 4 ]) : bool
Parameters
$company_id : string

UUID

$template_id : string

UUID

$start_date : int

EPOCH

$end_date : int

EPOCH

$user_ids : string|array<string|int, string>

UUID

$display_weeks : mixed = 4
Return values
bool

createRecurringScheduleTemplate()

public createRecurringScheduleTemplate(string $company_id,  $type[, string $schedule_policy_id = null ][, int $open_shift_multiplier = 1 ]) : bool
Parameters
$company_id : string

UUID

$type :
$schedule_policy_id : string = null

UUID

$open_shift_multiplier : int = 1
Tags
throws
DBError
throws
GeneralError
throws
ReflectionException
Return values
bool

createRegularTimePolicy()

public createRegularTimePolicy(string $company_id,  $type, int $contributing_shift_policy_id, int $pay_code_id[, mixed $punch_tags = [] ]) : bool
Parameters
$company_id : string

UUID

$type :
$contributing_shift_policy_id : int
$pay_code_id : int
$punch_tags : mixed = []
Return values
bool

createRemittanceDestinationAccount()

public createRemittanceDestinationAccount(string $user_id, string $currency_id, string $legal_entity_id, string $remittance_source_account_id, int $type_id[, null $percent_amount = null ]) : bool|int|string
Parameters
$user_id : string

UUID

$currency_id : string

UUID

$legal_entity_id : string

UUID

$remittance_source_account_id : string

UUID

$type_id : int
$percent_amount : null = null
Tags
throws
DBError
throws
GeneralError
throws
ReflectionException
Return values
bool|int|string

createRemittanceSourceAccount()

public createRemittanceSourceAccount( $company_id, string $legal_entity_id, string $currency_id,  $type) : bool
Parameters
$company_id :
$legal_entity_id : string

UUID

$currency_id : string

UUID

$type :
Tags
throws
DBError
throws
GeneralError
Return values
bool

createReportCustomColumn()

public createReportCustomColumn(string $company_id,  $report,  $type) : bool
Parameters
$company_id : string

UUID

$report :
$type :
Return values
bool

createRequest()

public createRequest( $type, string $user_id, int $date_stamp[, int $absence_policy_id = null ]) : bool
Parameters
$type :
$user_id : string

UUID

$date_stamp : int

EPOCH

$absence_policy_id : int = null
Return values
bool

createRoundingPolicy()

public createRoundingPolicy(string $company_id,  $type) : bool
Parameters
$company_id : string

UUID

$type :
Return values
bool

createSchedule()

public createSchedule(string $company_id, string $user_id, int $date_stamp[, null $data = null ]) : bool
Parameters
$company_id : string

UUID

$user_id : string

UUID

$date_stamp : int

EPOCH

$data : null = null
Return values
bool

createSchedulePolicy()

public createSchedulePolicy(string $company_id, string $meal_policy_id) : bool
Parameters
$company_id : string

UUID

$meal_policy_id : string

UUID

Return values
bool

createShippingPolicy()

public createShippingPolicy(string $company_id, string $product_id,  $type, string $currency_id[, bool $include_area_policy_ids = false ][, bool $exclude_area_policy_ids = false ]) : bool
Parameters
$company_id : string

UUID

$product_id : string

UUID

$type :
$currency_id : string

UUID

$include_area_policy_ids : bool = false
$exclude_area_policy_ids : bool = false
Return values
bool

createStation()

public createStation(string $company_id, mixed $type_id[, string $source = 'ANY' ][, string $station = 'ANY' ]) : bool
Parameters
$company_id : string

UUID

$type_id : mixed
$source : string = 'ANY'
$station : string = 'ANY'
Return values
bool

createTask()

public createTask(string $company_id,  $type, string $group_id[, string $product_id = null ]) : bool
Parameters
$company_id : string

UUID

$type :
$group_id : string

UUID

$product_id : string = null

UUID

Return values
bool

createTaskGroup()

public createTaskGroup(string $company_id,  $type, int $parent_id) : bool
Parameters
$company_id : string

UUID

$type :
$parent_id : int
Return values
bool

createTaxForms()

public createTaxForms(string $company_id, string $user_id) : bool
Parameters
$company_id : string

UUID

$user_id : string

UUID

Return values
bool

createTaxPolicy()

public createTaxPolicy(string $company_id, string $product_id[, bool $include_area_policy_ids = false ][, bool $exclude_area_policy_ids = false ]) : bool
Parameters
$company_id : string

UUID

$product_id : string

UUID

$include_area_policy_ids : bool = false
$exclude_area_policy_ids : bool = false
Return values
bool

createTimeSheetVerification()

public createTimeSheetVerification(string $user_id, string $pay_period_id, string $current_user_id) : bool
Parameters
$user_id : string

UUID

$pay_period_id : string

UUID

$current_user_id : string

UUID

Return values
bool

createUser()

public createUser(string $company_id, string $legal_entity_id,  $type[, int $policy_group_id = null ][, int $default_branch_id = null ][, int $default_department_id = null ][, int $default_currency_id = null ][, int $user_group_id = null ][, int $user_title_id = null ][, string|array<string|int, mixed> $ethnic_group_ids = null ][, null $remittance_source_account_ids = null ][, null $coordinates = null ][, null $default_job_id = null ][, null $default_job_item_id = null ][, mixed $hire_date = null ][, mixed $default_punch_tag_id = [] ][, mixed $custom_fields = null ]) : bool
Parameters
$company_id : string

UUID

$legal_entity_id : string

UUID

$type :
$policy_group_id : int = null
$default_branch_id : int = null
$default_department_id : int = null
$default_currency_id : int = null
$user_group_id : int = null
$user_title_id : int = null
$ethnic_group_ids : string|array<string|int, mixed> = null

UUID

$remittance_source_account_ids : null = null
$coordinates : null = null
$default_job_id : null = null
$default_job_item_id : null = null
$hire_date : mixed = null
$default_punch_tag_id : mixed = []
$custom_fields : mixed = null
Tags
throws
DBError
throws
GeneralError
throws
ReflectionException
Return values
bool

createUserContact()

public createUserContact(string $user_id) : bool
Parameters
$user_id : string

UUID

Return values
bool

createUserDateTotal()

public createUserDateTotal(string $user_id, int $date_stamp,  $total_time, int $branch_id, int $department_id) : bool
Parameters
$user_id : string

UUID

$date_stamp : int

EPOCH

$total_time :
$branch_id : int
$department_id : int
Return values
bool

createUserDeduction()

public createUserDeduction(string $company_id,  $legal_entity_id, string $user_id) : bool
Parameters
$company_id : string

UUID

$legal_entity_id :
$user_id : string

UUID

Tags
throws
DBError
throws
GeneralError
Return values
bool

createUserDefaults()

public createUserDefaults(string $company_id, string $legal_entity_id) : bool
Parameters
$company_id : string

UUID

$legal_entity_id : string

UUID

Return values
bool

createUserEducation()

public createUserEducation(string $user_id, int $qualification_id) : bool
Parameters
$user_id : string

UUID

$qualification_id : int
Return values
bool

createUserExpense()

public createUserExpense(string $user_id, string $expense_policy_id, int $default_branch_id, int $default_department_id, int $default_currency_id, int $job_id, int $job_item_id[, bool $reimburse = true ]) : bool
Parameters
$user_id : string

UUID

$expense_policy_id : string

UUID

$default_branch_id : int
$default_department_id : int
$default_currency_id : int
$job_id : int
$job_item_id : int
$reimburse : bool = true
Return values
bool

createUserGroup()

public createUserGroup(string $company_id,  $type, int $parent_id) : bool
Parameters
$company_id : string

UUID

$type :
$parent_id : int
Return values
bool

createUserLanguage()

public createUserLanguage(string $user_id,  $type, int $qualification_id) : bool
Parameters
$user_id : string

UUID

$type :
$qualification_id : int
Return values
bool

createUserLicense()

public createUserLicense(string $user_id, int $qualification_id) : bool
Parameters
$user_id : string

UUID

$qualification_id : int
Return values
bool

createUserMembership()

public createUserMembership(string $user_id,  $type, string $qualification_id, string $default_currency_id) : bool
Parameters
$user_id : string

UUID

$type :
$qualification_id : string

UUID

$default_currency_id : string

UUID

Return values
bool

createUserPermission()

public createUserPermission(string $user_id, string $preset_id) : bool
Parameters
$user_id : string

UUID

$preset_id : string

UUID

Return values
bool

createUserPreference()

public createUserPreference(string $user_id) : bool
Parameters
$user_id : string

UUID

Return values
bool

createUserReview()

public createUserReview(string $user_review_control_id,  $type, string $kpi_id) : bool
Parameters
$user_review_control_id : string

UUID

$type :
$kpi_id : string

UUID

Return values
bool

createUserReviewControl()

public createUserReviewControl(string $user_id, string $reviewer_user_id) : bool
Parameters
$user_id : string

UUID

$reviewer_user_id : string

UUID

Return values
bool

createUserSkill()

public createUserSkill(string $user_id,  $type, int $qualification_id) : bool
Parameters
$user_id : string

UUID

$type :
$qualification_id : int
Return values
bool

createUserTitle()

public createUserTitle(string $company_id,  $type) : bool
Parameters
$company_id : string

UUID

$type :
Return values
bool

createUserWage()

public createUserWage(string $user_id,  $rate, int $effective_date, int $wage_group_id) : bool
Parameters
$user_id : string

UUID

$rate :
$effective_date : int

EPOCH

$wage_group_id : int
Return values
bool

createUserWageGroups()

public createUserWageGroups(string $company_id) : bool
Parameters
$company_id : string

UUID

Return values
bool

deleteAbsence()

public deleteAbsence(string $id) : bool
Parameters
$id : string

UUID

Return values
bool

deletePunch()

public deletePunch(string $id) : bool
Parameters
$id : string

UUID

Return values
bool

deleteSchedule()

public deleteSchedule(string $id) : bool
Parameters
$id : string

UUID

Return values
bool

editPunch()

public editPunch(string $id[, null $data = null ]) : bool
Parameters
$id : string

UUID

$data : null = null
Return values
bool

editSchedule()

public editSchedule(string $id[, null $data = null ]) : bool
Parameters
$id : string

UUID

$data : null = null
Return values
bool

generateData()

public generateData() : bool
Return values
bool

generateSIN()

Generate a unique sin

public generateSIN( $company_id[, string $country = 'CA' ]) : int|string
Parameters
$company_id :
$country : string = 'CA'
Return values
int|string

getAdminUserNamePrefix()

public getAdminUserNamePrefix() : bool|string
Return values
bool|string

getDate()

public getDate() : bool|int
Return values
bool|int

getEnableQuickPunch()

public getEnableQuickPunch() : bool
Return values
bool

getLegalEntityObject()

public getLegalEntityObject( $legal_entity_id) : bool
Parameters
$legal_entity_id :
Return values
bool

getMaxRandomUsers()

public getMaxRandomUsers() : bool|int
Return values
bool|int

getPassword()

public getPassword() : bool|string
Return values
bool|string

getRandomArrayValue()

public getRandomArrayValue( $arr) : mixed
Parameters
$arr :
Return values
mixed

getRandomCoordinates()

public getRandomCoordinates([string $type = 'longitude' ]) : float
Parameters
$type : string = 'longitude'
Return values
float

getRandomFirstName()

public getRandomFirstName() : bool|mixed
Return values
bool|mixed

getRandomLastName()

public getRandomLastName() : bool|mixed
Return values
bool|mixed

getRandomSeed()

public getRandomSeed() : bool|int
Return values
bool|int

getUserNamePostfix()

public getUserNamePostfix() : bool|string
Return values
bool|string

getUserNamePrefix()

public getUserNamePrefix() : bool|string
Return values
bool|string

setAdminUserNamePrefix()

public setAdminUserNamePrefix( $val) : bool
Parameters
$val :
Return values
bool

setDate()

Sets the date that is used to base all other dates from.

public setDate( $val) : bool
Parameters
$val :
Return values
bool

setEnableQuickPunch()

public setEnableQuickPunch( $val) : bool
Parameters
$val :
Return values
bool

setMaxRandomUsers()

public setMaxRandomUsers( $val) : bool
Parameters
$val :
Return values
bool

setNotificationsAsRead()

Mark notifications read.

public setNotificationsAsRead( $company_id,  $user_id[, int $total_to_leave_unread = 5 ]) : bool
Parameters
$company_id :
$user_id :
$total_to_leave_unread : int = 5
Tags
throws
DBError
throws
GeneralError
throws
ReflectionException
Return values
bool

setPassword()

public setPassword( $val) : bool
Parameters
$val :
Return values
bool

setRandomSeed()

Sets the date that is used to base all other dates from.

public setRandomSeed( $val) : bool
Parameters
$val :
Return values
bool

setUserNamePostfix()

public setUserNamePostfix( $val) : bool
Parameters
$val :
Return values
bool

setUserNamePrefix()

public setUserNamePrefix( $val) : bool
Parameters
$val :
Return values
bool

Search results