Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

try{

IntimeServiceV2_0Stub.Placement placement = new IntimeServiceV2_0Stub.Placement();

//referencing existing participants by External Id


IntimeServiceV2_0Stub.Worker worker = new IntimeServiceV2_0Stub.Worker();

worker.setExternalId("WKR_LTD_001");

worker.setEmail("x@x.com");

worker.setFirstname("Ltd");

worker.setLastname("Worker");

placement.setWorker(worker);


IntimeServiceV2_0Stub.Consultant consultant = new IntimeServiceV2_0Stub.Consultant();

consultant.setExternalId("CONS_001");

placementconsultant.setConsultant(consultantsetEmail("y@y.com");

consultant.setFirstname("Web");

IntimeServiceV2_0Stub.Client client = consultant.setLastname("Consultant");

placement.setConsultant(consultant);


IntimeServiceV2_0Stub.Client client = new IntimeServiceV2_0Stub.Client();

client.setExternalId("CLIENT_001");

client.setName("Web Client 001");

client.setTermsTemplateName("Default Charge Terms");

placement.setClient(client);


IntimeServiceV2_0Stub.Manager manager = new IntimeServiceV2_0Stub.Manager();

manager.setExternalId("MGR_001");

manager.setEmail("z@z.com");

placementmanager.setClientsetFirstname(client"Web");

IntimeServiceV2_0Stub.Manager manager = new IntimeServiceV2_0Stub.Manager(.setLastname("Manager");

manager.setExternalIdsetClientExternalId("MGRCLIENT_001");

placement.setManager(manager);


placement.setExternalId("WEB-PLC-001");

placement.setContractedHours(new BigDecimal(37.5));

placement.setCurrencyForCharge("GBP");

placement.setCurrencyForPayExpenses("GBP");

placement.setCurrencyForPayTimesheets("GBP");

placement.setChargeableExpenseApprovalRoute("Client Manager Approval");

placement.setNonChargeableExpenseApprovalRoute("Auto Approval");

placement.setTimesheetApprovalRoute("Auto Approval");

placement.setExpenseTemplate("Default");

placement.setHolidayAccuralRate(0.12);

placement.setJobDescription("Web Placement 1");

placement.setJobTitle("Web Test 001");

placement.setNoCommunications("");

placement.setPurchaseOrderNum("po_num");

placement.setSalesCostCentre("scc");

placement.setTimesheetDateCalculatorName("weekly");

placement.setPerm(false);


Calendar cal1 = Calendar.getInstance(java.util.TimeZone.getTimeZone("GMT"));

cal1.set(2017, 3, 1, 0, 0, 0);

placement.setStart(cal1);

Calendar cal2 = Calendar.getInstance(java.util.TimeZone.getTimeZone("GMT"));

cal2.set(2019, 3, 1, 0, 0, 0);

placement.setEnd(cal2);


IntimeServiceV2_0Stub.Rate[] rates = new IntimeServiceV2_0Stub.Rate[1];

IntimeServiceV2_0Stub.Rate rate1 = new IntimeServiceV2_0Stub.Rate();

rate1.setName("Standard DayHours");

rate1.setPay(new BigDecimal(999.99));

rate1.setCharge(new BigDecimal(11111.11));

rate1.setPayElementCode("001");

rate1.setPeriod("fixedHourly");

rate1.setPeriodDuration(48060);

rate1.setPriorityOrder(0);

rate1.setTimePattern("DEFAULT");

rate1.setTimesheetFields("DECIMALSTART_FINISH_BREAK");

rate1.setSelectableByWorkers(true);

rates[0] = rate1;

placement.setRates(rates);


IntimeServiceV2_0Stub.CreateOrUpdatePlacement request = new IntimeServiceV2_0Stub.CreateOrUpdatePlacement();

request.setToken(ticket);

request.setPlacement(placement);


IntimeServiceV2_0Stub.CreateOrUpdatePlacementResponse result=stub.createOrUpdatePlacement(request);

if (result != null) {

System.out.println("Created/updated Placement with ID:" + result.get_return());

}

} catch (java.lang.Exception e) {

System.out.println("Exception occurred: " + e);

}


...

Create or update a Timesheet

- ? submitTimesheet

- ? approveTimesheet

- readinvoices for timesheet



- getsingle signon Submit a Timesheet



Read a Timesheet including invoices



Get a Single Sign-on token






/********************************************

...