Skip to content

Commit 0ba5a88

Browse files
authored
Merge pull request #9 from devimteam/develop
rename date format
2 parents 5d77473 + 935cc9f commit 0ba5a88

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎pkg/client/client.go‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ func (client creditInfo) GetIndividualReport(nationalId *string, phone *string,
4848
messageId := uuid.NewV4().String()
4949
dataId := uuid.NewV4().String()
5050
connectorGuuid := client.params.ConnectorId
51+
var birthDdateFormat string
52+
if birthDate != nil {
53+
birthDdateFormat = birthDate.Format("2006-01-02")
54+
}
5155

5256
return client.svc.Query(&connector.Query{
5357
Request: &request.MultiConnectorRequest{
@@ -67,7 +71,7 @@ func (client creditInfo) GetIndividualReport(nationalId *string, phone *string,
6771
},
6872
CustomFields: &request.CustomFields{
6973
MobilePhone: phone,
70-
DateOfBirth: birthDate,
74+
DateOfBirth: &birthDdateFormat,
7175
},
7276
Consent: true,
7377
},

‎pkg/request/request.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ type Cb5SearchParameters struct {
6767
}
6868

6969
type CustomFields struct {
70-
MobilePhone *string `xml:"MobilePhone,omitempty" json:"Timeout,omitempty" yaml:"Timeout,omitempty"`
71-
DateOfBirth *time.Time `xml:"DateOfBirth,omitempty" json:"DateOfBirth,omitempty" yaml:"DateOfBirth,omitempty"`
70+
MobilePhone *string `xml:"MobilePhone,omitempty" json:"Timeout,omitempty" yaml:"Timeout,omitempty"`
71+
DateOfBirth *string `xml:"DateOfBirth,omitempty" json:"DateOfBirth,omitempty" yaml:"DateOfBirth,omitempty"`
7272
}

0 commit comments

Comments
 (0)