public void setOperation(DisplayOperation operation) { if (null == operation) { return; } if (operation is LineItemsAddedOperation) { this.lineItemsAddedOperation = JsonUtils.Serialize(operation); } else if (operation is LineItemsDeletedOperation) { this.lineItemsDeletedOperation = JsonUtils.Serialize(operation); } else if (operation is DiscountsDeletedOperation) { this.discountsDeletedOperation = JsonUtils.Serialize(operation); } else if (operation is DiscountsAddedOperation) { this.discountsAddedOperation = JsonUtils.Serialize(operation); } else if (operation is OrderDeletedOperation) { this.orderDeletedOperation = JsonUtils.Serialize(operation); } }
public PairingRequestMessage(PairingRequest pr, string remoteApplicationID, string remoteSourceSdk) { this.method = "PAIRING_REQUEST"; this.payload = JsonUtils.Serialize(pr); this.remoteApplicationID = remoteApplicationID; this.remoteSourceSDK = remoteSourceSdk; }
private void SendPairingRequest() { isPairing = true; PairingRequest pr = new PairingRequest(); pr.name = this.posName; pr.authenticationToken = this.pairingAuthToken; pr.serialNumber = this.serialNumber; PairingRequestMessage prm = new PairingRequestMessage(pr, cloverDeviceConfiguration.getRemoteApplicationID(), cloverDeviceConfiguration.getRemoteSdk(this)); sendMessage(JsonUtils.Serialize(prm)); }
private void SendPairingRequest() { isPairing = true; PairingRequest pr = new PairingRequest(); pr.name = this.posName; pr.authenticationToken = this.pairingAuthToken; pr.serialNumber = this.serialNumber; PairingRequestMessage prm = new PairingRequestMessage(pr); sendMessage(JsonUtils.Serialize(prm)); }
public static RemoteMessage createMessage(Methods meth, MessageTypes msgType, Message payload, string packageName, string remoteSourceSDK, string remoteApplicationID) { RemoteMessage msg = new RemoteMessage(); msg.method = meth; msg.type = msgType; if (null == payload) { payload = new Message(meth); } msg.payload = JsonUtils.Serialize(payload); msg.packageName = packageName; msg.remoteSourceSDK = remoteSourceSDK; msg.remoteApplicationID = remoteApplicationID; msg.id = nextID(); return(msg); }
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { writer.WriteValue(JsonUtils.Serialize(value)); }
public OrderUpdateMessage(DisplayOrder displayOrder) : base(Methods.SHOW_ORDER_SCREEN) { order = JsonUtils.Serialize(displayOrder); }
public PairingRequestMessage(PairingRequest pr) { method = "PAIRING_REQUEST"; payload = JsonUtils.Serialize(pr); }