Skip to content

Commit 24fc560

Browse files
committed
Added Wero Payment Wallet api response for the data provider
1 parent 2cabb42 commit 24fc560

File tree

11 files changed

+348
-5
lines changed

11 files changed

+348
-5
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,11 @@ Definition Files and Transfer Object generators have been tested against the fol
116116

117117
* [NASA Open Api](https://api.nasa.gov/neo/rest/v1/neo/2465633?api_key=DEMO_KEY)
118118
* [OpenWeather](https://openweathermap.org/current?collection=current_forecast#example_JSON)
119-
* [Content API for Shopping](https://developers.google.com/shopping-content/guides/products/products-api?hl=en)
120-
* [Frankfurter is a free, open-source currency data API](https://api.frankfurter.dev/v1/latest)
119+
* [Google Content API for Shopping](https://developers.google.com/shopping-content/guides/products/products-api?hl=en)
120+
* [Frankfurter - open-source currency data API](https://api.frankfurter.dev/v1/latest)
121121
* [Tagesschau API](https://tagesschau.api.bund.dev)
122122
* [Statistisches Bundesamt (Destatis)](https://www-genesis.destatis.de/genesisWS/swagger-ui/index.html#/find/findPost)
123+
* [Wero - Digital Payment Wallet](https://developerhub.ppro.com/global-api/docs/wero)
123124

124125
### Scenario
125126

tests/integration/DefinitionGenerator/DefinitionGeneratorFacadeTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Picamator\Tests\Integration\TransferObject\DefinitionGenerator\Generated\NasaNeo\AsteroidTransfer;
1818
use Picamator\Tests\Integration\TransferObject\DefinitionGenerator\Generated\OpenWeather\ForecastTransfer;
1919
use Picamator\Tests\Integration\TransferObject\DefinitionGenerator\Generated\Tagesschau\ArdNewsTransfer;
20+
use Picamator\Tests\Integration\TransferObject\DefinitionGenerator\Generated\Wero\PaymentChargesTransfer;
2021
use Picamator\Tests\Integration\TransferObject\Helper\DefinitionGeneratorTrait;
2122
use Picamator\Tests\Integration\TransferObject\Helper\FilterArrayTrait;
2223
use Picamator\Tests\Integration\TransferObject\Helper\TransferGeneratorTrait;
@@ -113,6 +114,12 @@ public static function generateDefinitionDataProvider(): Generator
113114
'sampleFileName' => 'genesis-destatis-find.json',
114115
'definitionFileName' => 'destatis.transfer.yml',
115116
];
117+
118+
yield 'Wero' => [
119+
'className' => 'PaymentCharges',
120+
'sampleFileName' => 'wero-payment-charges-v1.json',
121+
'definitionFileName' => 'paymentCharges.transfer.yml',
122+
];
116123
}
117124

118125
#[DataProvider('configPathDataProvider')]
@@ -160,6 +167,10 @@ public static function configPathDataProvider(): Generator
160167
yield 'Destatis' => [
161168
'genesis-destatis-find.json',
162169
];
170+
171+
yield 'Wero' => [
172+
'wero-payment-charges-v1.json',
173+
];
163174
}
164175

165176
#[DataProvider('matchDefinitionDataProvider')]
@@ -215,6 +226,11 @@ public static function matchDefinitionDataProvider(): Generator
215226
DestatisTransfer::class,
216227
'genesis-destatis-find.json',
217228
];
229+
230+
yield 'Wero' => [
231+
PaymentChargesTransfer::class,
232+
'wero-payment-charges-v1.json',
233+
];
218234
}
219235

220236
#[DataProvider('matchFilteredDefinitionDataProvider')]

tests/integration/DefinitionGenerator/Generated/Wero/AmountTransfer.php

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration/DefinitionGenerator/Generated/Wero/AuthenticationSettingsTransfer.php

Lines changed: 54 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration/DefinitionGenerator/Generated/Wero/ConsumerTransfer.php

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration/DefinitionGenerator/Generated/Wero/PaymentChargesTransfer.php

Lines changed: 91 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration/DefinitionGenerator/Generated/Wero/SettingsTransfer.php

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration/DefinitionGenerator/data/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ API Response Reference
44
| File | Source |
55
|---------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|
66
| [nasa-neo-rest-v1-neo-2465633.json](/tests/integration/DefinitionGenerator/data/api-response/nasa-neo-rest-v1-neo-2465633.json) | [NASA Open Api](https://api.nasa.gov/neo/rest/v1/neo/2465633?api_key=DEMO_KEY) |
7-
| [open-weather.json](/tests/integration/DefinitionGenerator/data/api-response/open-weather.json) | [OpenWeather](https://openweathermap.org/current?collection=current_forecast#example_JSON) |
8-
| [google-shopping-content.json](/tests/integration/DefinitionGenerator/data/api-response/google-shopping-content.json) | [Content API for Shopping](https://developers.google.com/shopping-content/guides/products/products-api?hl=en) |
9-
| [frankfurter-dev.json](/tests/integration/DefinitionGenerator/data/api-response/frankfurter-dev-v1.json) | [Frankfurter is a free, open-source currency data API](https://api.frankfurter.dev/v1/latest) |
7+
| [open-weather.json](/tests/integration/DefinitionGenerator/data/api-response/open-weather.json) | [OpenWeather](https://openweathermap.org/current?collection=current_forecast#example_JSON) |
8+
| [google-shopping-content.json](/tests/integration/DefinitionGenerator/data/api-response/google-shopping-content.json) | [Google Content API for Shopping](https://developers.google.com/shopping-content/guides/products/products-api?hl=en) |
9+
| [frankfurter-dev.json](/tests/integration/DefinitionGenerator/data/api-response/frankfurter-dev-v1.json) | [Frankfurter - open-source currency data API](https://api.frankfurter.dev/v1/latest) |
1010
| [tagesschau-api-bund-dev.json](/tests/integration/DefinitionGenerator/data/api-response/tagesschau-api-bund-dev-v2.json) | [Tagesschau API](https://tagesschau.api.bund.dev) |
1111
| [genesis-destatis-find.json](/tests/integration/DefinitionGenerator/data/api-response/genesis-destatis-find.json) | [Statistisches Bundesamt (Destatis)](https://www-genesis.destatis.de/genesisWS/swagger-ui/index.html#/find/findPost) |
12+
| [wero-payment-charges-v1.json](/tests/integration/DefinitionGenerator/data/api-response/wero-payment-charges-v1.json) | [Wero - Digital Payment Wallet](https://developerhub.ppro.com/global-api/docs/wero) |

tests/integration/DefinitionGenerator/data/api-response/wero-payment-charges-v1.json

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# $schema: https://raw.githubusercontent.com/picamator/transfer-object/main/schema/definition.schema.json
2+
3+
# PaymentCharges
4+
PaymentCharges:
5+
paymentMethod:
6+
type: string
7+
amount:
8+
type: Amount
9+
consumer:
10+
type: Consumer
11+
authenticationSettings:
12+
collectionType: AuthenticationSettings
13+
14+
# Amount
15+
Amount:
16+
value:
17+
type: int
18+
currency:
19+
type: string
20+
21+
# Consumer
22+
Consumer:
23+
country:
24+
type: string
25+
26+
# AuthenticationSettings
27+
AuthenticationSettings:
28+
type:
29+
type: string
30+
settings:
31+
type: Settings
32+
33+
# Settings
34+
Settings:
35+
returnUrl:
36+
type: string
37+

0 commit comments

Comments
 (0)