Skip to content
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
8 changes: 7 additions & 1 deletion src/MercadoPago/Resources/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,23 @@ class Invoice extends MPResource
public ?string $reason;

/** The external reference for the invoice. */
public ?int $external_reference;
public ?string $external_reference;

/** The currency ID. */
public ?string $currency_id;

/** The transaction amount. */
public ?float $transaction_amount;

/** The date for the next retry attempt. */
public ?string $next_retry_date;

/** The debit date and time for the invoice. */
public ?string $debit_date;

/** The payment method ID. */
public ?string $payment_method_id;

/** The retry attempt count. */
public ?int $retry_attempt;

Expand Down
2 changes: 1 addition & 1 deletion src/MercadoPago/Resources/Invoice/InvoiceSearchResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class InvoiceSearchResult
public ?string $reason;

/** The external reference for the invoice. */
public ?int $external_reference;
public ?string $external_reference;

/** The currency ID. */
public ?string $currency_id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function testGetSuccess(): void
$this->assertSame("2022-01-01T11:12:25.892-04:00", $invoice->last_modified);
$this->assertSame("2c938084726fca480172750000000000", $invoice->preapproval_id);
$this->assertSame("Yoga classes", $invoice->reason);
$this->assertSame(23546246234, $invoice->external_reference);
$this->assertSame("YG-23546246234", $invoice->external_reference);
$this->assertSame("ARS", $invoice->currency_id);
$this->assertSame(10.0, $invoice->transaction_amount);
$this->assertSame("2022-01-01T11:12:25.892-04:00", $invoice->debit_date);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"last_modified": "2022-01-01T11:12:25.892-04:00",
"preapproval_id": "2c938084726fca480172750000000000",
"reason": "Yoga classes",
"external_reference": 23546246234,
"external_reference": "YG-23546246234",
"currency_id": "ARS",
"transaction_amount": 10,
"debit_date": "2022-01-01T11:12:25.892-04:00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"last_modified": "2022-01-01T11:12:25.892-04:00",
"preapproval_id": "2c938084726fca480172750000000000",
"reason": "Yoga classes",
"external_reference": 23546246234,
"external_reference": "YG-23546246234",
"currency_id": "ARS",
"transaction_amount": 10,
"debit_date": "2022-01-01T11:12:25.892-04:00",
Expand Down