Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit e41bbd0

Browse files
Merge pull request #27 from CyberfusionIO/bugfix/contact-dates
🐛 Fixed date format for several properties
2 parents 3b06361 + 44e8a39 commit e41bbd0

File tree

6 files changed

+21
-7
lines changed

6 files changed

+21
-7
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Please note this changelog affects
66
this package and not the Oxxa API.
77

8+
## [2.6.2]
9+
10+
### Fixed
11+
12+
- Fixed date format for the `execution_at` property of the Domain model.
13+
- Fixed date format for the `datebirth` and `idcarddate` property of the Identity model.
14+
815
## [2.6.1]
916

1017
### Fixed

pint.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"preset": "laravel",
33
"rules": {
44
"array_indentation": false,
5-
"phpdoc_align": false
5+
"phpdoc_align": false,
6+
"single_line_empty_body": false
67
}
78
}

src/Models/Domain.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ public function toArray(): array
5252
'lock' => $this->lock,
5353
'usetrustee' => $this->useTrustee,
5454
'premium_price' => $this->premiumPrice,
55-
'execution_at' => $this->executionAt,
55+
'execution_at' => $this
56+
->executionAt
57+
?->format('d-m-Y'),
5658
'trans_epp' => $this->transferCode,
5759
'dnssec_delete' => $this->dnssecDelete,
5860
]);

src/Models/Identity.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ public function toArray(): array
8787
'tel' => $this->tel,
8888
'fax' => $this->fax,
8989
'email' => $this->email,
90-
'datebirth' => $this->dateBirth,
90+
'datebirth' => $this
91+
->dateBirth
92+
?->format('d-m-Y'),
9193
'placebirth' => $this->placeBirth,
9294
'countrybirth' => $this->countryBirth,
9395
'postalbirth' => $this->postalBirth,
@@ -96,7 +98,9 @@ public function toArray(): array
9698
'vatnumber' => $this->vatNumber,
9799
'tmnumber' => $this->trademarkNumber,
98100
'tmcountry' => $this->trademarkCountry,
99-
'idcarddate' => $this->idCardDate,
101+
'idcarddate' => $this
102+
->idCardDate
103+
?->format('d-m-Y'),
100104
'idcardissuer' => $this->idCardIssuer,
101105
'xxxmemberid' => $this->xxxMemberId,
102106
'xxxpassword' => $this->xxxPassword,

src/Oxxa.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Oxxa implements OxxaClient
1515
{
1616
private const TIMEOUT = 180;
1717

18-
private const VERSION = '2.6.1';
18+
private const VERSION = '2.6.2';
1919

2020
private const USER_AGENT = 'oxxa-api-client/'.self::VERSION;
2121

tests/Unit/DomainTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function test_it_can_register_given_domain(): void
141141
Arr::get($request->data(), 'nsgroup') === 'ABCD123456' &&
142142
Arr::get($request->data(), 'dnstemplate') === 'ABCD123456' &&
143143
Arr::get($request->data(), 'lock') === 'Y' &&
144-
Arr::get($request->data(), 'execution_at') === '2020-01-01' &&
144+
Arr::get($request->data(), 'execution_at') === '01-01-2020' &&
145145
Arr::get($request->data(), 'test') === null;
146146
});
147147
}
@@ -180,7 +180,7 @@ public function test_it_can_transfer_given_domain(): void
180180
Arr::get($request->data(), 'nsgroup') === 'ABCD123456' &&
181181
Arr::get($request->data(), 'dnstemplate') === 'ABCD123456' &&
182182
Arr::get($request->data(), 'lock') === 'Y' &&
183-
Arr::get($request->data(), 'execution_at') === '2020-01-01' &&
183+
Arr::get($request->data(), 'execution_at') === '01-01-2020' &&
184184
Arr::get($request->data(), 'test') === null;
185185
});
186186
}

0 commit comments

Comments
 (0)