Created
October 29, 2013 16:21
-
-
Save IntuitDeveloperRelations/7217848 to your computer and use it in GitHub Desktop.
IPP Java SDK v3 - QBO - Set Request Id for Batch operation #JavaSDKV3 #QBO #Batch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Request Id support was added in 1.0.9 | |
//https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v3/010_calling_data_services/00100_requests_and_responses/requestid | |
context = new Context(oauth, appToken, ServiceType.QBD, realmID); | |
Customer customer = new Customer(); | |
customer.setGivenName("Mac Berry"); | |
customer.setDisplayName("L 34"); | |
BatchOperation batchOperation = new BatchOperation(); | |
batchOperation.addEntity(customer, OperationEnum.CREATE, "12"); | |
Customer c = GenerateQuery.createQueryEntity(Customer.class); | |
String query = select($(c.getId()), $(c.getDisplayName())).generate(); | |
batchOperation.addQuery(query, "13"); | |
Context.setRequestID("987654321099"); | |
DataService service = new DataService(context); | |
service.executeBatch(batchOperation); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment