Explorar o código

AssistantCallback

- add `Bytes` helper
Alexey Kim hai 1 ano
pai
achega
230868e019
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      v2/assistant_callback.go

+ 12 - 0
v2/assistant_callback.go

@@ -0,0 +1,12 @@
+package ticket
+
+import "google.golang.org/protobuf/encoding/protojson"
+
+func (x *AssistantCallback) Bytes() []byte {
+	j, err := protojson.Marshal(x)
+	if err != nil {
+		return nil
+	}
+
+	return j
+}