Skip to content

[Notifier][GatewayAPI] Add support for label parameter #58427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

7.2
---

* Add label option to `GatewayApiOptions` class

6.3
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ public function callbackUrl(string $callbackUrl): static
return $this;
}

/**
* @return $this
*/
public function label(string $label): static
{
$this->options['label'] = $label;

return $this;
}

public function toArray(): array
{
return $this->options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ $options = (new GatewayApiOptions())
->class('standard')
->callbackUrl('https://my-callback-url')
->userRef('user_ref')
->label('label')
// ...
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ public function testGatewayApiOptions()
$gatewayApiOptions = (new GatewayApiOptions())
->class('test_class')
->callbackUrl('test_callback_url')
->userRef('test_user_ref');
->userRef('test_user_ref')
->label('test_label');

self::assertSame([
'class' => 'test_class',
'callback_url' => 'test_callback_url',
'userref' => 'test_user_ref',
'label' => 'test_label',
], $gatewayApiOptions->toArray());
}
}