From f7fcfa623e670dc533bb378912829c73a3593e63 Mon Sep 17 00:00:00 2001 From: s Date: Mon, 3 Nov 2025 21:17:12 -0500 Subject: hi --- internal/models/skiptrace.go | 92 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 internal/models/skiptrace.go (limited to 'internal/models/skiptrace.go') diff --git a/internal/models/skiptrace.go b/internal/models/skiptrace.go new file mode 100644 index 0000000..c87fe72 --- /dev/null +++ b/internal/models/skiptrace.go @@ -0,0 +1,92 @@ +package models + +import "encoding/json" + +type SkiptraceParams struct { + FirstName string `json:"first_name"` + LastName string `json:"last_name"` + City string `json:"city,omitempty"` + State string `json:"state,omitempty"` + Age string `json:"age,omitempty"` +} + +type SkiptraceResponse struct { + Data map[string]interface{} `json:"-"` + SXKey string `json:"sx_key,omitempty"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` +} + +func (s *SkiptraceResponse) UnmarshalJSON(data []byte) error { + type Alias SkiptraceResponse + aux := &struct { + *Alias + }{ + Alias: (*Alias)(s), + } + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + s.Data = make(map[string]interface{}) + return json.Unmarshal(data, &s.Data) +} + +type SkiptraceReportResponse struct { + Data map[string]interface{} `json:"-"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` +} + +func (s *SkiptraceReportResponse) UnmarshalJSON(data []byte) error { + type Alias SkiptraceReportResponse + aux := &struct { + *Alias + }{ + Alias: (*Alias)(s), + } + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + s.Data = make(map[string]interface{}) + return json.Unmarshal(data, &s.Data) +} + +type SkiptracePhoneResponse struct { + Data map[string]interface{} `json:"-"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` +} + +func (s *SkiptracePhoneResponse) UnmarshalJSON(data []byte) error { + type Alias SkiptracePhoneResponse + aux := &struct { + *Alias + }{ + Alias: (*Alias)(s), + } + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + s.Data = make(map[string]interface{}) + return json.Unmarshal(data, &s.Data) +} + +type SkiptraceEmailResponse struct { + Data map[string]interface{} `json:"-"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` +} + +func (s *SkiptraceEmailResponse) UnmarshalJSON(data []byte) error { + type Alias SkiptraceEmailResponse + aux := &struct { + *Alias + }{ + Alias: (*Alias)(s), + } + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + s.Data = make(map[string]interface{}) + return json.Unmarshal(data, &s.Data) +} -- cgit v1.2.3