File tree Expand file tree Collapse file tree 3 files changed +91
-0
lines changed Expand file tree Collapse file tree 3 files changed +91
-0
lines changed Original file line number Diff line number Diff line change @@ -323,4 +323,70 @@ public function setTimestamp(DateTimeInterface $timestamp): self
323
323
{
324
324
return $ this ->setParameter ('timestamp ' , $ timestamp );
325
325
}
326
+
327
+ /**
328
+ * Get the city.
329
+ *
330
+ * @return string
331
+ */
332
+ public function getCity (): string
333
+ {
334
+ return $ this ->getParameter ('city ' );
335
+ }
336
+
337
+ /**
338
+ * Sets the city.
339
+ *
340
+ * @param string $city
341
+ *
342
+ * @return self
343
+ */
344
+ public function setCity (string $ city ): self
345
+ {
346
+ return $ this ->setParameter ('city ' , $ city );
347
+ }
348
+
349
+ /**
350
+ * Gets the postal code.
351
+ *
352
+ * @return string
353
+ */
354
+ public function getPostalCode (): string
355
+ {
356
+ return $ this ->getParameter ('postalCode ' );
357
+ }
358
+
359
+ /**
360
+ * Sets the postal code.
361
+ *
362
+ * @param string $postalCode
363
+ *
364
+ * @return self
365
+ */
366
+ public function setPostalCode (string $ postalCode ): self
367
+ {
368
+ return $ this ->setParameter ('postalCode ' , $ postalCode );
369
+ }
370
+
371
+ /**
372
+ * Gets the street.
373
+ *
374
+ * @return string
375
+ */
376
+ public function getStreet (): string
377
+ {
378
+ return $ this ->getParameter ('street ' );
379
+ }
380
+
381
+ /**
382
+ * Sets the street.
383
+ *
384
+ * @param string $street
385
+ *
386
+ * @return self
387
+ */
388
+ public function setStreet (string $ street ): self
389
+ {
390
+ return $ this ->setParameter ('street ' , $ street );
391
+ }
326
392
}
Original file line number Diff line number Diff line change @@ -44,6 +44,17 @@ public function getData(): array
44
44
'IssuerCode ' => $ this ->getIssuerCode (),
45
45
'AmountInCents ' => $ this ->getAmountInteger (),
46
46
'CurrencyCode ' => $ this ->getCurrencyCode (),
47
+ 'Consumer ' => [
48
+ 'Address ' => [
49
+ 'CareOf ' => null ,
50
+ 'City ' => $ this ->getCity (),
51
+ 'CountryCode ' => $ this ->getCountryCode (),
52
+ 'HouseNumber ' => null ,
53
+ 'PostalCode ' => $ this ->getPostalCode (),
54
+ 'Street ' => $ this ->getStreet (),
55
+ ],
56
+ 'Category ' => 'Person ' ,
57
+ ],
47
58
'Timestamp ' => $ this ->getTimestamp ()->format (self ::TIMESTAMP_FORMAT ),
48
59
'LanguageCode ' => $ this ->getLanguageCode (),
49
60
'CountryCode ' => $ this ->getCountryCode (),
Original file line number Diff line number Diff line change @@ -49,6 +49,9 @@ public function testGetData(): void
49
49
$ this ->request ->setLanguageCode ('nl ' );
50
50
$ this ->request ->setCountryCode ('NL ' );
51
51
$ this ->request ->setTimestamp (new DateTime ('2019-03-09T12:00:00 ' ));
52
+ $ this ->request ->setCity ('Bree duh ' );
53
+ $ this ->request ->setStreet ('Quite 18 ' );
54
+ $ this ->request ->setPostalCode ('4817 HX ' );
52
55
$ this ->request ->setDescription ('2fad9b1b-a2d3-455c-bc29-b79516fd3257-random-uuid-hex ' );
53
56
54
57
$ expectedData = [
@@ -78,6 +81,17 @@ public function testGetData(): void
78
81
'IssuerCode ' => 'ABNAMRO ' ,
79
82
'AmountInCents ' => 1337 ,
80
83
'CurrencyCode ' => 'EUR ' ,
84
+ 'Consumer ' => [
85
+ 'Address ' => [
86
+ 'CareOf ' => null ,
87
+ 'City ' => 'Bree duh ' ,
88
+ 'CountryCode ' => 'NL ' ,
89
+ 'HouseNumber ' => null ,
90
+ 'PostalCode ' => '4817 HX ' ,
91
+ 'Street ' => 'Quite 18 ' ,
92
+ ],
93
+ 'Category ' => 'Person ' ,
94
+ ],
81
95
'Timestamp ' => '2019-03-09T12:00:00Z ' ,
82
96
'LanguageCode ' => 'nl ' ,
83
97
'CountryCode ' => 'NL ' ,
You can’t perform that action at this time.
0 commit comments