Skip to content

Commit

Permalink
convert address dataobjects into one
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenebak committed Jan 7, 2024
1 parent 578c066 commit 8e3f51d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Netbums\Quickpay\DataObjects;

readonly class InvoiceAddress
readonly class OptionalAddress
{
public function __construct(
public ?string $name,
Expand Down
13 changes: 7 additions & 6 deletions src/DataObjects/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
readonly class Payment
{
public function __construct(
public string $currency,
public string $order_id,
public Basket $basket,
public ?InvoiceAddress $invoice_address,
public ?ShippingAddress $shipping_address,
) {
public string $currency,
public string $order_id,
public Basket $basket,
public ?OptionalAddress $invoice_address,
public ?OptionalAddress $shipping_address,
)
{
}
}
64 changes: 0 additions & 64 deletions src/DataObjects/ShippingAddress.php

This file was deleted.

0 comments on commit 8e3f51d

Please sign in to comment.