Skip to content

Commit

Permalink
Add includeSensitive & onlyAccountedPayments to getPaymentMethods
Browse files Browse the repository at this point in the history
  • Loading branch information
smell-of-curry committed Nov 12, 2024
1 parent 21814f3 commit 3e6fc32
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Client/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,17 @@ public function getAllInvoicesWithFilter(
/**
* @return InvoicePaymentMethod[]
*/
public function getPaymentMethods(string $storeId, string $invoiceId): array
{
public function getPaymentMethods(
string $storeId,
string $invoiceId,
bool $includeSensitive = false,
bool $onlyAccountedPayments = true
): array {
$method = 'GET';
$url = $this->getApiUrl() . 'stores/' . urlencode($storeId) . '/invoices/'
. urlencode($invoiceId) . '/payment-methods';
$url .= '?includeSensitive=' . ($includeSensitive ? 'true' : 'false');
$url .= '&onlyAccountedPayments=' . ($onlyAccountedPayments ? 'true' : 'false');
$headers = $this->getRequestHeaders();
$response = $this->getHttpClient()->request($method, $url, $headers);

Expand Down

0 comments on commit 3e6fc32

Please sign in to comment.