diff --git a/src/main/java/com/ikea/isx/common/ErrorConstants.java b/src/main/java/com/ikea/isx/common/ErrorConstants.java index 6520473..e0552b0 100644 --- a/src/main/java/com/ikea/isx/common/ErrorConstants.java +++ b/src/main/java/com/ikea/isx/common/ErrorConstants.java @@ -11,4 +11,12 @@ public class ErrorConstants { public static final String RAW_EVENT_PERSIST_EXCEPTION = "error while persisting raw event"; + public static final String EMPTY_EVENT_HEADER = "event header can not be empty"; + + public static final String INVALID_EVENT_PAYLOAD = "event payload is invalid"; + + public static final String INVALID_EVENT_HEADER = "event header is invalid"; + + + } diff --git a/src/main/java/com/ikea/isx/gcp/service/dataflow/pipeline/DataflowPipelineBuilder.java b/src/main/java/com/ikea/isx/gcp/service/dataflow/pipeline/DataflowPipelineBuilder.java index c8b5c97..c0f8641 100644 --- a/src/main/java/com/ikea/isx/gcp/service/dataflow/pipeline/DataflowPipelineBuilder.java +++ b/src/main/java/com/ikea/isx/gcp/service/dataflow/pipeline/DataflowPipelineBuilder.java @@ -93,6 +93,7 @@ public Pipeline createDataPipeline(String[] args) { PCollection validatedMessagePayload = validatedMessagePayloadTuple.get(PUBSUB_MSG_VALIDATION_SUCCESS_TAG); + PCollectionTuple rawEventPersistDataTuple = validatedMessagePayload.apply( "Persist Raw Event Payload through raw API", diff --git a/src/main/java/com/ikea/isx/gcp/service/dataflow/pipeline/transform/function/EventPayloadMessageHeaderValidation.java b/src/main/java/com/ikea/isx/gcp/service/dataflow/pipeline/transform/function/EventPayloadMessageHeaderValidation.java index 1bb20cc..aeb8ed4 100644 --- a/src/main/java/com/ikea/isx/gcp/service/dataflow/pipeline/transform/function/EventPayloadMessageHeaderValidation.java +++ b/src/main/java/com/ikea/isx/gcp/service/dataflow/pipeline/transform/function/EventPayloadMessageHeaderValidation.java @@ -3,6 +3,7 @@ import com.ikea.isx.common.ErrorConstants; import com.ikea.isx.entities.EventPayload; +import com.ikea.isx.exception.DataPipelineException; import com.ikea.isx.gcp.service.dataflow.pipeline.DataflowPipelineBuilder; import com.ikea.isx.gcp.service.dataflow.pipeline.FailureMetaData; import com.ikea.isx.util.CommonUtil; @@ -17,44 +18,64 @@ @Slf4j public class EventPayloadMessageHeaderValidation extends DoFn { - private final String className = this.getClass().getSimpleName(); + private final String className = this.getClass().getSimpleName(); - @DoFn.ProcessElement - public void eventPayloadHeaderValidation( - @DoFn.Element PubsubMessage pubsubMessage, ProcessContext processContext) { + @DoFn.ProcessElement + public void eventPayloadHeaderValidation( + @DoFn.Element PubsubMessage pubsubMessage, ProcessContext processContext) { - // Read the event headers data and event payload - Map eventPayloadHeader = pubsubMessage.getAttributeMap(); - String eventPayloadMessage = new String(pubsubMessage.getPayload()); + // Read the event headers data and event payload + Map eventPayloadHeader = pubsubMessage.getAttributeMap(); + String eventPayloadMessage = new String(pubsubMessage.getPayload()); - if (StringUtils.isEmpty(eventPayloadMessage)) { - CommonUtil.setDataValidationFailureResponse( - className, ErrorConstants.EMPTY_EVENT_PAYLOAD, null, processContext); - return; + if (StringUtils.isEmpty(eventPayloadMessage)) { + CommonUtil.setDataValidationFailureResponse( + className, ErrorConstants.EMPTY_EVENT_PAYLOAD, null, processContext); + return; + } + log.info("Received the Payload from topic :{}", eventPayloadMessage); + String payloadMsgSize = CommonUtil.displaySizeByByteCount(eventPayloadMessage.length()); + log.info("Received the Payload from topic Payload Size: {}", payloadMsgSize); + log.debug("Validating event header"); + EventPayload eventPayload = new EventPayload(); + eventPayload.setHeader(eventPayloadHeader); + eventPayload.setPayload(eventPayloadMessage); + + try { + EventsSchemaValidation eventsSchemaValidation = new EventsSchemaValidation(processContext); + + // Event Header validation + if (eventPayloadHeader != null) { + boolean validationResult = eventsSchemaValidation.headerSchemaValidation(eventPayloadHeader); + if (validationResult == false) { + throw new DataPipelineException(ErrorConstants.INVALID_EVENT_HEADER); } - log.info("Received the Payload from topic :{}", eventPayloadMessage); - String payloadMsgSize = CommonUtil.displaySizeByByteCount(eventPayloadMessage.length()); - log.info("Received the Payload from topic Payload Size: {}", payloadMsgSize); - log.debug("Validating event header"); - EventPayload eventPayload = new EventPayload(); - eventPayload.setHeader(eventPayloadHeader); - eventPayload.setPayload(eventPayloadMessage); - - try { - EventsSchemaValidation eventsSchemaValidation = new EventsSchemaValidation(processContext); - if (eventPayloadHeader != null) { - eventsSchemaValidation.headerSchemaValidation(eventPayloadHeader); - } - eventsSchemaValidation.eventPayloadSchemaValidation(eventPayloadMessage); - - processContext.output( - DataflowPipelineBuilder.PUBSUB_MSG_HEADER_VALIDATION_SUCCESS_TAG, eventPayload); - } catch (Exception e) { - log.error("Exception Caught: " + e.getLocalizedMessage(), e.getCause()); - FailureMetaData failureMetaData = - CommonUtil.getExceptionFailureResponse(className, eventPayload.toString(), e); - processContext.output(DataflowPipelineBuilder.FAILURE_TAG, failureMetaData); + } else { + throw new DataPipelineException( + ErrorConstants.EMPTY_EVENT_HEADER + ); + } + + // Event Payload validation + if (eventPayloadMessage != null) { + boolean validationResult = eventsSchemaValidation.eventPayloadSchemaValidation(eventPayloadMessage); + if (validationResult == false) { + throw new DataPipelineException(ErrorConstants.INVALID_EVENT_PAYLOAD); } - } + } else { + throw new DataPipelineException( + ErrorConstants.EMPTY_EVENT_PAYLOAD + ); + } + + processContext.output( + DataflowPipelineBuilder.PUBSUB_MSG_HEADER_VALIDATION_SUCCESS_TAG, eventPayload); + } catch (Exception e) { + log.error("Exception Caught: " + e.getLocalizedMessage(), e.getCause()); + FailureMetaData failureMetaData = + CommonUtil.getExceptionFailureResponse(className, eventPayload.toString(), e); + processContext.output(DataflowPipelineBuilder.FAILURE_TAG, failureMetaData); + } + } } diff --git a/src/main/java/com/ikea/isx/util/EventsSchemaValidation.java b/src/main/java/com/ikea/isx/util/EventsSchemaValidation.java index 207e864..fded289 100644 --- a/src/main/java/com/ikea/isx/util/EventsSchemaValidation.java +++ b/src/main/java/com/ikea/isx/util/EventsSchemaValidation.java @@ -21,49 +21,52 @@ @Slf4j public class EventsSchemaValidation { - private JsonSchemaFactory factory; - private JsonSchema schema = null; - private ProcessingReport report; // We will use it in future - private DoFn.ProcessContext processContext; // We will use it in future + private JsonSchemaFactory factory; + private JsonSchema schema = null; + private ProcessingReport report; + private DoFn.ProcessContext processContext; // We will use it in future - public EventsSchemaValidation(DoFn.ProcessContext processContext) { - this.processContext = processContext; - } + public EventsSchemaValidation(DoFn.ProcessContext processContext) { + this.processContext = processContext; + } - public void headerSchemaValidation(Map headerData) { + public boolean headerSchemaValidation(Map headerData) { - ObjectMapper mapper = new ObjectMapper(); - try { - JsonNode eventsHeaderSchema = Resource.loadResource(Constants.EVENT_HEADER_SCHEMA_FILE_PATH); - JsonNode eventsHeaderData = mapper.valueToTree(headerData); + ObjectMapper mapper = new ObjectMapper(); + try { + JsonNode eventsHeaderSchema = Resource.loadResource(Constants.EVENT_HEADER_SCHEMA_FILE_PATH); + JsonNode eventsHeaderData = mapper.valueToTree(headerData); - factory = JsonSchemaFactory.byDefault(); - schema = factory.getJsonSchema(eventsHeaderSchema); - report = schema.validate(eventsHeaderData); + factory = JsonSchemaFactory.byDefault(); + schema = factory.getJsonSchema(eventsHeaderSchema); + report = schema.validate(eventsHeaderData); - log.info("header schema validation result: " + report); + log.info("header schema validation result: " + report); + return report.isSuccess(); - } catch (IOException | ProcessingException e) { - log.error("Exception Caught:" + e.getLocalizedMessage(), e.getCause()); - } + } catch (IOException | ProcessingException e) { + log.error("Exception Caught:" + e.getLocalizedMessage(), e.getCause()); + return false; } + } - public void eventPayloadSchemaValidation(String eventPayload) { - - ObjectMapper mapper = new ObjectMapper(); - try { + public boolean eventPayloadSchemaValidation(String eventPayload) { - JsonNode eventsSchema = Resource.loadResource(Constants.EVENT_PAYLOAD_SCHEMA_FILE_PATH); - JsonNode eventspayload = mapper.readTree(eventPayload); - factory = JsonSchemaFactory.byDefault(); - schema = factory.getJsonSchema(eventsSchema); - report = schema.validate(eventspayload); + ObjectMapper mapper = new ObjectMapper(); + try { + JsonNode eventsSchema = Resource.loadResource(Constants.EVENT_PAYLOAD_SCHEMA_FILE_PATH); + JsonNode eventspayload = mapper.readTree(eventPayload); + factory = JsonSchemaFactory.byDefault(); + schema = factory.getJsonSchema(eventsSchema); + report = schema.validate(eventspayload); - log.info("payload schema validation result: " + report); - } catch (IOException | ProcessingException e) { - log.error("Exception Caught:" + e.getLocalizedMessage(), e.getCause()); - } + log.info("payload schema validation result: " + report); + return report.isSuccess(); + } catch (IOException | ProcessingException e) { + log.error("Exception Caught:" + e.getLocalizedMessage(), e.getCause()); + return false; } + } } diff --git a/src/main/resources/com/ikea/isx/util/event-payload-schema.json b/src/main/resources/com/ikea/isx/util/event-payload-schema.json index 0168805..32b7f61 100644 --- a/src/main/resources/com/ikea/isx/util/event-payload-schema.json +++ b/src/main/resources/com/ikea/isx/util/event-payload-schema.json @@ -2,306 +2,2293 @@ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { - "DeliveryInformation": { + "payloadVersion": { + "type": "string", + "pattern": "^0.4$", + "description": "Payload should have 0.4 version" + }, + "countryCode": { + "type": "string" + }, + "sourceId": { + "type": "string" + }, + "eventType": { + "type": "string" + }, + "sacHead": { "type": "object", "properties": { - "GlobalCustomerId": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "updDate": { "type": "string" }, - "FirstName": { + "sacCreateDate": { "type": "string" }, - "LastName": { + "sacCreateUser": { "type": "string" }, - "PersonTitle": { + "sacCloseDate": { + "type": "null" + }, + "sacCloseUser": { + "type": "null" + }, + "sacComment": { "type": "string" }, - "Email": { + "prioLevel": { "type": "string" }, - "PhoneHome": { + "agreedPickupDate": { + "type": "null" + }, + "agreedDelDate": { + "type": "null" + }, + "cardNo": { + "type": "null" + }, + "cardName": { + "type": "null" + }, + "cardExpire": { + "type": "null" + }, + "businessArea": { "type": "string" }, - "PhoneMobile": { + "queueId": { "type": "string" }, - "Address1": { + "queueStatus": { "type": "string" }, - "Address2": { + "queueStartDate": { "type": "string" }, - "Address3": { + "sacTitle": { "type": "string" }, - "ZipCode": { + "cardIssueRef": { + "type": "null" + }, + "stoNo": { "type": "string" }, - "CityName": { + "queueNotification": { + "type": "boolean" + }, + "caseHandler": { "type": "string" }, - "PreferredLanguage": { + "expectedReturnDate": { + "type": "null" + }, + "workflowNotification": { + "type": "null" + }, + "queueUnit": { "type": "string" }, - "ContactType": { + "scheduleActionDate": { + "type": "null" + }, + "queueNotificationStartdate": { + "type": "null" + }, + "sacUnitBuType": { "type": "string" }, - "IkeaFamilyNumber": { + "queueUnitBuType": { "type": "string" }, - "OrganisationNo": { + "stoNoBuType": { "type": "string" }, - "TaxRegNo": { + "returnType": { "type": "string" + }, + "causingTsp": { + "type": "null" + }, + "causingSp": { + "type": "null" + }, + "causingTspDate": { + "type": "null" + }, + "causingSpDate": { + "type": "null" + }, + "causingTspIn": { + "type": "null" + }, + "causingSpIn": { + "type": "null" + }, + "causingTspDateIn": { + "type": "null" + }, + "causingSpDateIn": { + "type": "null" + }, + "custOrdIntegrationSystem": { + "type": "null" + }, + "supportEnquiryNo": { + "type": "null" + }, + "supportEnquiryId": { + "type": "null" + }, + "isSynchedWithIcsp": { + "type": "boolean" + }, + "createdBySystem": { + "type": "null" + }, + "accountNumberRefernceText": { + "type": "null" + }, + "casyId": { + "type": "null" } }, "required": [ - "GlobalCustomerId", - "FirstName", - "LastName", - "PersonTitle", - "Email", - "PhoneHome", - "PhoneMobile", - "Address1", - "Address2", - "Address3", - "ZipCode", - "CityName", - "PreferredLanguage", - "ContactType", - "IkeaFamilyNumber", - "OrganisationNo", - "TaxRegNo" + "sacUnit", + "sacNo", + "countryCode", + "updDate", + "sacCreateDate", + "sacCreateUser", + "sacCloseDate", + "sacCloseUser", + "sacComment", + "prioLevel", + "agreedPickupDate", + "agreedDelDate", + "cardNo", + "cardName", + "cardExpire", + "businessArea", + "queueId", + "queueStatus", + "queueStartDate", + "sacTitle", + "cardIssueRef", + "stoNo", + "queueNotification", + "caseHandler", + "expectedReturnDate", + "workflowNotification", + "queueUnit", + "scheduleActionDate", + "queueNotificationStartdate", + "sacUnitBuType", + "queueUnitBuType", + "stoNoBuType", + "returnType", + "causingTsp", + "causingSp", + "causingTspDate", + "causingSpDate", + "causingTspIn", + "causingSpIn", + "causingTspDateIn", + "causingSpDateIn", + "custOrdIntegrationSystem", + "supportEnquiryNo", + "supportEnquiryId", + "isSynchedWithIcsp", + "createdBySystem", + "accountNumberRefernceText", + "casyId" ] }, - "InvoiceInformation": { - "type": "object", - "properties": { - "GlobalCustomerId": { - "type": "string" + "customerInformation": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "globalCustomerId": { + "type": "string" + }, + "icmAddressId": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "address1": { + "type": "null" + }, + "address2": { + "type": "string" + }, + "address3": { + "type": "null" + }, + "postCode": { + "type": "string" + }, + "cityName": { + "type": "string" + }, + "county": { + "type": "null" + }, + "email": { + "type": "null" + }, + "telHome": { + "type": "string" + }, + "telWork": { + "type": "string" + }, + "telMobile": { + "type": "null" + }, + "fax": { + "type": "null" + }, + "country": { + "type": "null" + }, + "prefecture": { + "type": "null" + }, + "ward": { + "type": "null" + }, + "apartment": { + "type": "null" + }, + "passportNumber": { + "type": "null" + }, + "identityType": { + "type": "null" + }, + "identityNumber": { + "type": "null" + }, + "additionalAddressInfo": { + "type": "null" + }, + "careOfName": { + "type": "null" + }, + "middleName": { + "type": "null" + }, + "addressLine1": { + "type": "null" + }, + "addressLine2": { + "type": "null" + }, + "addressLine3": { + "type": "null" + }, + "houseNumber": { + "type": "null" + }, + "province": { + "type": "null" + }, + "state": { + "type": "null" + }, + "acceptEmailCom": { + "type": "boolean" + }, + "acceptTermsCond": { + "type": "null" + }, + "acceptPrivPolicy": { + "type": "null" + }, + "contactCompanyName": { + "type": "null" + }, + "contactEmail": { + "type": "null" + }, + "contactFirstName": { + "type": "null" + }, + "contactLastName": { + "type": "null" + }, + "contactMiddleName": { + "type": "null" + }, + "contactNameSuffix": { + "type": "null" + }, + "contactTitle": { + "type": "null" + }, + "faxExt": { + "type": "null" + }, + "telMobileExt": { + "type": "null" + }, + "telExt": { + "type": "null" + }, + "genderCode": { + "type": "null" + }, + "locale": { + "type": "null" + }, + "lastName2": { + "type": "null" + }, + "taxIdType": { + "type": "null" + }, + "foreignCountry": { + "type": "null" + }, + "socialSecurityNumber": { + "type": "null" + }, + "phoneticLastName": { + "type": "null" + }, + "phoneticFirstName": { + "type": "null" + }, + "phoneticCompanyName": { + "type": "null" + }, + "personTitle": { + "type": "null" + }, + "organisationNo": { + "type": "null" + }, + "customerNo": { + "type": "null" + }, + "custId": { + "type": "string" + }, + "custType": { + "type": "string" + }, + "taxRegNo": { + "type": "null" + }, + "sacContactType": { + "type": "null" + }, + "preferedCustLanguage": { + "type": "null" + }, + "ikeaFamilyNo": { + "type": "null" + }, + "companyName": { + "type": "null" + } + }, + "required": [ + "type", + "globalCustomerId", + "icmAddressId", + "lastName", + "firstName", + "address1", + "address2", + "address3", + "postCode", + "cityName", + "county", + "email", + "telHome", + "telWork", + "telMobile", + "fax", + "country", + "prefecture", + "ward", + "apartment", + "passportNumber", + "identityType", + "identityNumber", + "additionalAddressInfo", + "careOfName", + "middleName", + "addressLine1", + "addressLine2", + "addressLine3", + "houseNumber", + "province", + "state", + "acceptEmailCom", + "acceptTermsCond", + "acceptPrivPolicy", + "contactCompanyName", + "contactEmail", + "contactFirstName", + "contactLastName", + "contactMiddleName", + "contactNameSuffix", + "contactTitle", + "faxExt", + "telMobileExt", + "telExt", + "genderCode", + "locale", + "lastName2", + "taxIdType", + "foreignCountry", + "socialSecurityNumber", + "phoneticLastName", + "phoneticFirstName", + "phoneticCompanyName", + "personTitle", + "organisationNo", + "customerNo", + "custId", + "custType", + "taxRegNo", + "sacContactType", + "preferedCustLanguage", + "ikeaFamilyNo", + "companyName" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "globalCustomerId": { + "type": "string" + }, + "icmAddressId": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "address1": { + "type": "null" + }, + "address2": { + "type": "string" + }, + "address3": { + "type": "null" + }, + "postCode": { + "type": "string" + }, + "cityName": { + "type": "string" + }, + "county": { + "type": "null" + }, + "email": { + "type": "null" + }, + "telHome": { + "type": "string" + }, + "telWork": { + "type": "string" + }, + "telMobile": { + "type": "null" + }, + "fax": { + "type": "null" + }, + "country": { + "type": "null" + }, + "prefecture": { + "type": "null" + }, + "ward": { + "type": "null" + }, + "apartment": { + "type": "null" + }, + "passportNumber": { + "type": "null" + }, + "identityType": { + "type": "null" + }, + "identityNumber": { + "type": "null" + }, + "additionalAddressInfo": { + "type": "null" + }, + "careOfName": { + "type": "null" + }, + "middleName": { + "type": "null" + }, + "addressLine1": { + "type": "null" + }, + "addressLine2": { + "type": "null" + }, + "addressLine3": { + "type": "null" + }, + "houseNumber": { + "type": "null" + }, + "province": { + "type": "null" + }, + "state": { + "type": "null" + }, + "acceptEmailCom": { + "type": "boolean" + }, + "acceptTermsCond": { + "type": "null" + }, + "acceptPrivPolicy": { + "type": "null" + }, + "contactCompanyName": { + "type": "null" + }, + "contactEmail": { + "type": "null" + }, + "contactFirstName": { + "type": "null" + }, + "contactLastName": { + "type": "null" + }, + "contactMiddleName": { + "type": "null" + }, + "contactNameSuffix": { + "type": "null" + }, + "contactTitle": { + "type": "null" + }, + "faxExt": { + "type": "null" + }, + "telMobileExt": { + "type": "null" + }, + "telExt": { + "type": "null" + }, + "genderCode": { + "type": "null" + }, + "locale": { + "type": "null" + }, + "lastName2": { + "type": "null" + }, + "taxIdType": { + "type": "null" + }, + "foreignCountry": { + "type": "null" + }, + "socialSecurityNumber": { + "type": "null" + }, + "phoneticLastName": { + "type": "null" + }, + "phoneticFirstName": { + "type": "null" + }, + "phoneticCompanyName": { + "type": "null" + }, + "personTitle": { + "type": "null" + }, + "organisationNo": { + "type": "null" + }, + "customerNo": { + "type": "null" + }, + "custId": { + "type": "string" + }, + "custType": { + "type": "string" + }, + "taxRegNo": { + "type": "null" + }, + "sacContactType": { + "type": "null" + }, + "preferedCustLanguage": { + "type": "null" + }, + "ikeaFamilyNo": { + "type": "null" + }, + "companyName": { + "type": "null" + } + }, + "required": [ + "type", + "globalCustomerId", + "icmAddressId", + "lastName", + "firstName", + "address1", + "address2", + "address3", + "postCode", + "cityName", + "county", + "email", + "telHome", + "telWork", + "telMobile", + "fax", + "country", + "prefecture", + "ward", + "apartment", + "passportNumber", + "identityType", + "identityNumber", + "additionalAddressInfo", + "careOfName", + "middleName", + "addressLine1", + "addressLine2", + "addressLine3", + "houseNumber", + "province", + "state", + "acceptEmailCom", + "acceptTermsCond", + "acceptPrivPolicy", + "contactCompanyName", + "contactEmail", + "contactFirstName", + "contactLastName", + "contactMiddleName", + "contactNameSuffix", + "contactTitle", + "faxExt", + "telMobileExt", + "telExt", + "genderCode", + "locale", + "lastName2", + "taxIdType", + "foreignCountry", + "socialSecurityNumber", + "phoneticLastName", + "phoneticFirstName", + "phoneticCompanyName", + "personTitle", + "organisationNo", + "customerNo", + "custId", + "custType", + "taxRegNo", + "sacContactType", + "preferedCustLanguage", + "ikeaFamilyNo", + "companyName" + ] } - }, - "required": [ - "GlobalCustomerId" ] }, - "ReturnInformation": { + "sacReturnInformation": { "type": "object", "properties": { - "ReturnId": { + "sacUnit": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "buUnit": { + "type": "string" + }, + "buType": { "type": "string" }, - "ReturnBuType": { + "returnId": { "type": "string" }, - "ReturnDate": { + "returnDate": { + "type": "string" + }, + "rsNo": { + "type": "string" + }, + "rsCreateDate": { + "type": "null" + }, + "tenderTypeReturn": { + "type": "string" + }, + "rsCreateYear": { + "type": "string" + }, + "securityCheckReq": { + "type": "boolean" + }, + "rsNoType": { + "type": "null" + }, + "ikeaFamilyNumber": { + "type": "null" + }, + "employeeNumber": { + "type": "null" + }, + "employeeDiscount": { + "type": "null" + }, + "cardNo": { + "type": "null" + }, + "paymentMode": { + "type": "null" + }, + "countryCode": { "type": "string" } }, "required": [ - "ReturnId", - "ReturnBuType", - "ReturnDate" + "sacUnit", + "sacUnitBuType", + "sacNo", + "buUnit", + "buType", + "returnId", + "returnDate", + "rsNo", + "rsCreateDate", + "tenderTypeReturn", + "rsCreateYear", + "securityCheckReq", + "rsNoType", + "ikeaFamilyNumber", + "employeeNumber", + "employeeDiscount", + "cardNo", + "paymentMode", + "countryCode" ] }, - "ScheduleActions": { + "sacScheduleActions": { "type": "array", "items": [ { "type": "object", "properties": { - "ActionId": { + "sacUnit": { "type": "string" }, - "ActionType": { + "sacNo": { "type": "string" }, - "ActionComment": { + "countryCode": { "type": "string" }, - "ActionDate": { + "actionId": { "type": "string" - } - }, - "required": [ - "ActionId", - "ActionType", - "ActionComment", - "ActionDate" - ] - }, - { - "type": "object", - "properties": { - "ActionId": { + }, + "updDate": { + "type": "string" + }, + "actionType": { + "type": "string" + }, + "actionDate": { "type": "string" }, - "ActionType": { + "actionComment": { "type": "string" }, - "ActionComment": { + "sacUnitBuType": { "type": "string" }, - "ActionDate": { + "actionAmpm": { + "type": "null" + }, + "actionDatetime": { "type": "string" } }, "required": [ - "ActionId", - "ActionType", - "ActionComment", - "ActionDate" + "sacUnit", + "sacNo", + "countryCode", + "actionId", + "updDate", + "actionType", + "actionDate", + "actionComment", + "sacUnitBuType", + "actionAmpm", + "actionDatetime" ] } ] }, - "SacNo": { - "type": "string" - }, - "SacUnit": { - "type": "string" - }, - "SacUnitBuType": { - "type": "string" - }, - "SacTitle": { - "type": "string" - }, - "SacComment": { - "type": "string" - }, - "StoNo": { - "type": "string" - }, - "StoNoBuType": { - "type": "string" - }, - "Version": { - "type": "string" - }, - "PaNo": { - "type": "string" - }, - "ReasonCode": { - "type": "string" - }, - "SubReasonCode": { - "type": "string" - }, - "SacCreateDate": { - "type": "string" - }, - "UpdDate": { - "type": "string" - }, - "SacCloseDate": { - "type": "string" - }, - "SacCreateUser": { - "type": "string" - }, - "CaseHandler": { - "type": "string" - }, - "PrioLevel": { - "type": "string" - }, - "AgreedPickupDate": { - "type": "string" + "sacEvents": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "seqNo": { + "type": "string" + }, + "updDate": { + "type": "string" + }, + "eventType": { + "type": "string" + }, + "eventText": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "feedbackCode": { + "type": "string" + }, + "feedbackComment": { + "type": "null" + }, + "sacUnitBuType": { + "type": "string" + }, + "userSacUnit": { + "type": "string" + } + }, + "required": [ + "sacUnit", + "sacNo", + "countryCode", + "seqNo", + "updDate", + "eventType", + "eventText", + "userId", + "feedbackCode", + "feedbackComment", + "sacUnitBuType", + "userSacUnit" + ] + } + ] }, - "AgreedDelDate": { - "type": "string" + "sacBankDetail": { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "bankLine1": { + "type": "null" + }, + "bankLine2": { + "type": "string" + }, + "bankLine3": { + "type": "null" + }, + "bankLine4": { + "type": "string" + }, + "bankId": { + "type": "null" + }, + "paymentId": { + "type": "string" + }, + "createUser": { + "type": "string" + }, + "createDate": { + "type": "string" + }, + "updUser": { + "type": "string" + }, + "updDate": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + } + }, + "required": [ + "sacUnit", + "sacNo", + "countryCode", + "bankLine1", + "bankLine2", + "bankLine3", + "bankLine4", + "bankId", + "paymentId", + "createUser", + "createDate", + "updUser", + "updDate", + "sacUnitBuType" + ] }, - "NextContactDate": { - "type": "string" + "sacCardChanges": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "updUser": { + "type": "string" + }, + "cardValue": { + "type": "string" + }, + "updDate": { + "type": "string" + }, + "cardOldValue": { + "type": "null" + }, + "changeField": { + "type": "string" + }, + "seqNo": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + } + }, + "required": [ + "sacUnit", + "sacNo", + "countryCode", + "updUser", + "cardValue", + "updDate", + "cardOldValue", + "changeField", + "seqNo", + "sacUnitBuType" + ] + } + ] }, - "QueueId ": { - "type": "string" + "sacCustomerChanges": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "seqNo": { + "type": "string" + }, + "newValue": { + "type": "string" + }, + "oldValue": { + "type": "string" + }, + "changeField": { + "type": "string" + }, + "updUser": { + "type": "string" + }, + "updDate": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "sacUnit", + "sacNo", + "seqNo", + "newValue", + "oldValue", + "changeField", + "updUser", + "updDate", + "sacUnitBuType", + "countryCode" + ] + } + ] }, - "QueueUnit": { - "type": "string" + "sacCustomerOrders": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "seqNo": { + "type": "string" + }, + "orderType": { + "type": "string" + }, + "orderNumber": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "updDate": { + "type": "string" + }, + "origin": { + "type": "null" + }, + "orderSource": { + "type": "null" + }, + "externalOrderNo": { + "type": "null" + }, + "externalOrderSource": { + "type": "null" + }, + "deliveryType": { + "type": "null" + }, + "sacUnitBuType": { + "type": "string" + }, + "isellOrderType": { + "type": "null" + }, + "orderStatusLogistic": { + "type": "string" + } + }, + "required": [ + "sacUnit", + "sacNo", + "countryCode", + "seqNo", + "orderType", + "orderNumber", + "userId", + "updDate", + "origin", + "orderSource", + "externalOrderNo", + "externalOrderSource", + "deliveryType", + "sacUnitBuType", + "isellOrderType", + "orderStatusLogistic" + ] + } + ] }, - "QueueUnitBuType": { - "type": "string" + "sacCustRefTexts": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "textId": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "sacUnit", + "sacUnitBuType", + "sacNo", + "countryCode", + "textId", + "text" + ] + } + ] }, - "QueueStatus": { - "type": "string" + "sacLines": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "lineNo": { + "type": "string" + }, + "updDate": { + "type": "null" + }, + "lineType": { + "type": "string" + }, + "direction": { + "type": "string" + }, + "sourceId": { + "type": "string" + }, + "destId": { + "type": "string" + }, + "paymentId": { + "type": "string" + }, + "saTypeId": { + "type": "string" + }, + "saStatusId": { + "type": "string" + }, + "itemId": { + "type": "null" + }, + "itemName": { + "type": "string" + }, + "supl": { + "type": "null" + }, + "price": { + "type": "string" + }, + "qty": { + "type": "string" + }, + "actualQty": { + "type": "string" + }, + "reasonCode": { + "type": "string" + }, + "subReasonCode": { + "type": "string" + }, + "lineComment": { + "type": "null" + }, + "createDate": { + "type": "string" + }, + "createUser": { + "type": "string" + }, + "authDate": { + "type": "null" + }, + "authUserId": { + "type": "null" + }, + "exceptionStat": { + "type": "null" + }, + "exceptionNote": { + "type": "null" + }, + "stockCorrType": { + "type": "null" + }, + "stockCorrDate": { + "type": "null" + }, + "unit": { + "type": "null" + }, + "sparePartCode": { + "type": "boolean" + }, + "colorName": { + "type": "null" + }, + "paNo": { + "type": "null" + }, + "actionUnit": { + "type": "string" + }, + "doneDate": { + "type": "null" + }, + "returnState": { + "type": "null" + }, + "customerOrderNo": { + "type": "null" + }, + "manufactureWeekNo": { + "type": "null" + }, + "cancelRequested": { + "type": "null" + }, + "cancellationNote": { + "type": "null" + }, + "changeUser": { + "type": "null" + }, + "cancelUser": { + "type": "null" + }, + "receiptDate": { + "type": "null" + }, + "workflowStarted": { + "type": "null" + }, + "orderLineId": { + "type": "null" + }, + "requestedQuantity": { + "type": "null" + }, + "requestedMoney": { + "type": "null" + }, + "requestedValueChange": { + "type": "null" + }, + "moneyLineNo": { + "type": "null" + }, + "salesTaxCodeState": { + "type": "null" + }, + "salesTaxPercentageState": { + "type": "null" + }, + "salesTaxCodeProvince": { + "type": "null" + }, + "salesTaxPercentageProvince": { + "type": "null" + }, + "originalPrice": { + "type": "null" + }, + "priceAltered": { + "type": "null" + }, + "originalQty": { + "type": "null" + }, + "qtyAltered": { + "type": "null" + }, + "isCompensation": { + "type": "null" + }, + "sacUnitBuType": { + "type": "string" + }, + "actionUnitBuType": { + "type": "string" + }, + "externalOrderLineRef": { + "type": "null" + }, + "priceOverride": { + "type": "null" + }, + "returnToStock": { + "type": "null" + }, + "oversold": { + "type": "null" + }, + "serviceRefunds": { + "type": "null" + }, + "trash": { + "type": "null" + }, + "bargain": { + "type": "null" + }, + "subActionId": { + "type": "null" + }, + "subActionDoneDate": { + "type": "null" + }, + "sellingStore": { + "type": "null" + }, + "importedFromOrderNo": { + "type": "null" + }, + "isFreight": { + "type": "null" + }, + "custOrdIntegrationSystem": { + "type": "null" + }, + "reasonCodeText": { + "type": "null" + }, + "isprepaid": { + "type": "boolean" + }, + "importedfromordertype": { + "type": "null" + }, + "tillNo": { + "type": "null" + }, + "receiptId": { + "type": "null" + }, + "importedFromOrderNoSource": { + "type": "null" + }, + "includeInFulfilment": { + "type": "null" + }, + "receiptBuCode": { + "type": "null" + }, + "saTypeIsGlobal": { + "type": "boolean" + }, + "isManuallyAdded": { + "type": "boolean" + }, + "returnDestinationStore": { + "type": "boolean" + }, + "refundCncldPia": { + "type": "boolean" + }, + "importedOrderCreateDate": { + "type": "null" + }, + "receiptLessPrice": { + "type": "null" + }, + "stockCorrectionDone": { + "type": "boolean" + }, + "ctmDocumentNo": { + "type": "null" + }, + "ctmLineItemNo": { + "type": "null" + }, + "itemType": { + "type": "null" + }, + "currencyCode": { + "type": "string" + }, + "sacDeliveries": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "lineNo": { + "type": "string" + }, + "deliveryDateOld": { + "type": "string" + }, + "deliveryDateNew": { + "type": "string" + }, + "freightAmountOld": { + "type": "string" + }, + "freightAmountNew": { + "type": "string" + } + }, + "required": [ + "sacUnit", + "sacNo", + "countryCode", + "lineNo", + "deliveryDateOld", + "deliveryDateNew", + "freightAmountOld", + "freightAmountNew" + ] + } + ] + } + }, + "required": [ + "sacUnit", + "sacNo", + "countryCode", + "lineNo", + "updDate", + "lineType", + "direction", + "sourceId", + "destId", + "paymentId", + "saTypeId", + "saStatusId", + "itemId", + "itemName", + "supl", + "price", + "qty", + "actualQty", + "reasonCode", + "subReasonCode", + "lineComment", + "createDate", + "createUser", + "authDate", + "authUserId", + "exceptionStat", + "exceptionNote", + "stockCorrType", + "stockCorrDate", + "unit", + "sparePartCode", + "colorName", + "paNo", + "actionUnit", + "doneDate", + "returnState", + "customerOrderNo", + "manufactureWeekNo", + "cancelRequested", + "cancellationNote", + "changeUser", + "cancelUser", + "receiptDate", + "workflowStarted", + "orderLineId", + "requestedQuantity", + "requestedMoney", + "requestedValueChange", + "moneyLineNo", + "salesTaxCodeState", + "salesTaxPercentageState", + "salesTaxCodeProvince", + "salesTaxPercentageProvince", + "originalPrice", + "priceAltered", + "originalQty", + "qtyAltered", + "isCompensation", + "sacUnitBuType", + "actionUnitBuType", + "externalOrderLineRef", + "priceOverride", + "returnToStock", + "oversold", + "serviceRefunds", + "trash", + "bargain", + "subActionId", + "subActionDoneDate", + "sellingStore", + "importedFromOrderNo", + "isFreight", + "custOrdIntegrationSystem", + "reasonCodeText", + "isprepaid", + "importedfromordertype", + "tillNo", + "receiptId", + "importedFromOrderNoSource", + "includeInFulfilment", + "receiptBuCode", + "saTypeIsGlobal", + "isManuallyAdded", + "returnDestinationStore", + "refundCncldPia", + "importedOrderCreateDate", + "receiptLessPrice", + "stockCorrectionDone", + "ctmDocumentNo", + "ctmLineItemNo", + "itemType", + "currencyCode", + "sacDeliveries" + ] + } + ] }, - "QueueStartDate": { - "type": "string" + "sacInvoiceInformation": { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "buUnit": { + "type": "string" + }, + "buType": { + "type": "null" + }, + "invoiceNumber": { + "type": "string" + }, + "invoiceDate": { + "type": "null" + }, + "invoiceType": { + "type": "string" + } + }, + "required": [ + "sacUnit", + "sacUnitBuType", + "countryCode", + "sacNo", + "buUnit", + "buType", + "invoiceNumber", + "invoiceDate", + "invoiceType" + ] }, - "QueuePrioId": { - "type": "null" + "sacPaymentDetails": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "paymentMethod": { + "type": "string" + }, + "amountPaid": { + "type": "string" + }, + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + } + }, + "required": [ + "paymentMethod", + "amountPaid", + "sacUnit", + "sacNo", + "sacUnitBuType" + ] + } + ] }, - "QueueNotification": { - "type": "string" + "sacQueueLog": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "updDate": { + "type": "string" + }, + "queueId": { + "type": "string" + }, + "queueStatus": { + "type": "string" + }, + "queueStartDate": { + "type": "string" + }, + "queueEndDate": { + "type": "null" + }, + "queuePrioId": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + }, + "userSacUnit": { + "type": "null" + } + }, + "required": [ + "sacUnit", + "sacNo", + "countryCode", + "updDate", + "queueId", + "queueStatus", + "queueStartDate", + "queueEndDate", + "queuePrioId", + "userId", + "sacUnitBuType", + "userSacUnit" + ] + } + ] }, - "ActionUnit": { - "type": "string" + "sacReceiptInformation": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "receiptInformationType": { + "type": "string" + }, + "sequenceNumber": { + "type": "string" + }, + "cashierId": { + "type": "string" + }, + "cashierName": { + "type": "null" + }, + "tillNo": { + "type": "string" + }, + "receiptDate": { + "type": "string" + }, + "receiptId": { + "type": "string" + }, + "paymentMode": { + "type": "string" + }, + "cardExpireDate": { + "type": "null" + }, + "cardName": { + "type": "null" + }, + "storeNo": { + "type": "string" + }, + "cardNo": { + "type": "null" + }, + "time": { + "type": "string" + }, + "salesAmount": { + "type": "string" + }, + "discountAmount": { + "type": "string" + }, + "discountPercentage": { + "type": "string" + }, + "employeeDiscount": { + "type": "string" + }, + "discountType": { + "type": "string" + }, + "employeeNumber": { + "type": "null" + }, + "ikeaFamilyNumber": { + "type": "null" + }, + "realReceipt": { + "type": "null" + }, + "custTinId": { + "type": "null" + }, + "custServiceTaxRegId": { + "type": "null" + }, + "custPanId": { + "type": "null" + }, + "corporateIdNum": { + "type": "null" + }, + "invoiceId": { + "type": "null" + }, + "isManualTaxDocumentId": { + "type": "null" + } + }, + "required": [ + "sacUnit", + "sacUnitBuType", + "countryCode", + "sacNo", + "receiptInformationType", + "sequenceNumber", + "cashierId", + "cashierName", + "tillNo", + "receiptDate", + "receiptId", + "paymentMode", + "cardExpireDate", + "cardName", + "storeNo", + "cardNo", + "time", + "salesAmount", + "discountAmount", + "discountPercentage", + "employeeDiscount", + "discountType", + "employeeNumber", + "ikeaFamilyNumber", + "realReceipt", + "custTinId", + "custServiceTaxRegId", + "custPanId", + "corporateIdNum", + "invoiceId", + "isManualTaxDocumentId" + ] + } + ] }, - "ActionUnitBuType": { - "type": "string" + "sacSaLog": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "saLogId": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "updDate": { + "type": "string" + }, + "saTypeId": { + "type": "string" + }, + "saStatusId": { + "type": "string" + }, + "saEventId": { + "type": "string" + }, + "reqProgRef": { + "type": "null" + }, + "userId": { + "type": "string" + }, + "noteText": { + "type": "null" + }, + "actionUnit": { + "type": "string" + }, + "actionDone": { + "type": "boolean" + }, + "lineNo": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + }, + "actionUnitBuType": { + "type": "string" + }, + "userSacUnit": { + "type": "null" + }, + "saTypeIsGlobal": { + "type": "boolean" + } + }, + "required": [ + "sacUnit", + "sacNo", + "saLogId", + "countryCode", + "updDate", + "saTypeId", + "saStatusId", + "saEventId", + "reqProgRef", + "userId", + "noteText", + "actionUnit", + "actionDone", + "lineNo", + "sacUnitBuType", + "actionUnitBuType", + "userSacUnit", + "saTypeIsGlobal" + ] + } + ] }, - "CountryCode": { - "type": "string", - "pattern": "^[A-Z]{2}$" + "sacTaxRates": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "taxCode": { + "type": "string" + }, + "taxRate": { + "type": "string" + }, + "taxRateChange": { + "type": "string" + } + }, + "required": [ + "sacUnit", + "sacUnitBuType", + "countryCode", + "sacNo", + "taxCode", + "taxRate", + "taxRateChange" + ] + } + ] }, - "Source": { - "type": "string", - "pattern": "^SAMS$", - "description": "Source should be SAMS" + "sacTransportChanges": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "seqNo": { + "type": "string" + }, + "newValue": { + "type": "string" + }, + "oldValue": { + "type": "string" + }, + "changeField": { + "type": "string" + }, + "updUser": { + "type": "string" + }, + "updDate": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + } + }, + "required": [ + "sacUnit", + "sacNo", + "countryCode", + "seqNo", + "newValue", + "oldValue", + "changeField", + "updUser", + "updDate", + "sacUnitBuType" + ] + } + ] }, - "EventType": { - "type": "string", - "pattern": "^FullSAC$", - "description": "EventType should be FullSAC" + "sacTransportInformation": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "delTos": { + "type": "null" + }, + "delTname": { + "type": "null" + }, + "delVia": { + "type": "null" + }, + "delReference": { + "type": "null" + }, + "delCod": { + "type": "string" + }, + "delNorpa": { + "type": "string" + }, + "delComment": { + "type": "null" + }, + "retTos": { + "type": "null" + }, + "retTname": { + "type": "null" + }, + "retDestination": { + "type": "null" + }, + "retReference": { + "type": "null" + }, + "retNorpa": { + "type": "string" + }, + "retComment": { + "type": "null" + }, + "createUser": { + "type": "string" + }, + "createDate": { + "type": "string" + }, + "updUser": { + "type": "string" + }, + "updDate": { + "type": "string" + }, + "sacUnitBuType": { + "type": "string" + }, + "delSname": { + "type": "null" + }, + "retSname": { + "type": "null" + } + }, + "required": [ + "sacUnit", + "sacNo", + "countryCode", + "delTos", + "delTname", + "delVia", + "delReference", + "delCod", + "delNorpa", + "delComment", + "retTos", + "retTname", + "retDestination", + "retReference", + "retNorpa", + "retComment", + "createUser", + "createDate", + "updUser", + "updDate", + "sacUnitBuType", + "delSname", + "retSname" + ] + } + ] }, - "PayloadVersion": { - "type": "string", - "pattern": "^0.4$", - "description": "Payload should have 0.4 version" + "sacWorkflowLog": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "sacUnit": { + "type": "string" + }, + "sacNo": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "saLogId": { + "type": "string" + }, + "lineNo": { + "type": "string" + }, + "updDate": { + "type": "string" + }, + "saTypeId": { + "type": "string" + }, + "saStatusId": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "actionUnit": { + "type": "null" + }, + "sacUnitBuType": { + "type": "string" + }, + "actionUnitBuType": { + "type": "null" + }, + "saTypeIsGlobal": { + "type": "boolean" + } + }, + "required": [ + "sacUnit", + "sacNo", + "countryCode", + "saLogId", + "lineNo", + "updDate", + "saTypeId", + "saStatusId", + "userId", + "actionUnit", + "sacUnitBuType", + "actionUnitBuType", + "saTypeIsGlobal" + ] + } + ] } }, "required": [ - "DeliveryInformation", - "InvoiceInformation", - "ReturnInformation", - "ScheduleActions", - "SacNo", - "SacUnit", - "SacUnitBuType", - "SacTitle", - "SacComment", - "StoNo", - "StoNoBuType", - "Version", - "PaNo", - "ReasonCode", - "SubReasonCode", - "SacCreateDate", - "UpdDate", - "SacCloseDate", - "SacCreateUser", - "CaseHandler", - "PrioLevel", - "AgreedPickupDate", - "AgreedDelDate", - "NextContactDate", - "QueueId ", - "QueueUnit", - "QueueUnitBuType", - "QueueStatus", - "QueueStartDate", - "QueuePrioId", - "QueueNotification", - "ActionUnit", - "ActionUnitBuType", - "CountryCode", - "Source", - "EventType", - "PayloadVersion" + "payloadVersion", + "countryCode", + "sourceId", + "eventType", + "sacHead", + "customerInformation", + "sacReturnInformation", + "sacScheduleActions", + "sacEvents", + "sacBankDetail", + "sacCardChanges", + "sacCustomerChanges", + "sacCustomerOrders", + "sacCustRefTexts", + "sacLines", + "sacInvoiceInformation", + "sacPaymentDetails", + "sacQueueLog", + "sacReceiptInformation", + "sacSaLog", + "sacTaxRates", + "sacTransportChanges", + "sacTransportInformation", + "sacWorkflowLog" ] } \ No newline at end of file