8000 [Notifier] [GatewayAPI] Add support for label parameter · symfony/symfony@67c136e · GitHub
[go: up one dir, main page]

Skip to content

Commit 67c136e

Browse files
Nico Hiort af Ornäsnicolas-grekas
Nico Hiort af Ornäs
authored andcommitted
[Notifier] [GatewayAPI] Add support for label parameter
1 parent 434e901 commit 67c136e

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

src/Symfony/Component/Notifier/Bridge/GatewayApi/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
7.2
5+
---
6+
7+
* Add label option to `GatewayApiOptions` class
8+
49
6.3
510
---
611

src/Symfony/Component/Notifier/Bridge/GatewayApi/GatewayApiOptions.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ public function callbackUrl(string $callbackUrl): static
5858
return $this;
5959
}
6060

61+
/**
62+
* @return $this
63+
*/
64+
public function label(string $label): static
65+
{
66+
$this->options['label'] = $label;
67+
68+
return $this;
69+
}
70+
6171
public function toArray(): array
6272
{
6373
return $this->options;

src/Symfony/Component/Notifier/Bridge/GatewayApi/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ $options = (new GatewayApiOptions())
3232
->class('standard')
3333
->callbackUrl('https://my-callback-url')
3434
->userRef('user_ref')
35+
->label('label')
3536
// ...
3637
;
3738

src/Symfony/Component/Notifier/Bridge/GatewayApi/Tests/GatewayApiOptionsTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ public function testGatewayApiOptions()
2121
$gatewayApiOptions = (new GatewayApiOptions())
2222
->class('test_class')
2323
->callbackUrl('test_callback_url')
24-
->userRef('test_user_ref');
24+
->userRef('test_user_ref')
25+
->label('test_label');
2526

2627
self::assertSame([
2728
'class' => 'test_class',
2829
'callback_url' => 'test_callback_url',
2930
'userref' => 'test_user_ref',
31+
'label' => 'test_label',
3032
], $gatewayApiOptions->toArray());
3133
}
3234
}

0 commit comments

Comments
 (0)
0