# Address

**Kind:** Class

**Source:** `Pams/Web/Pams.Web/Client/app/models/common/address.model.ts` (line 6)

**Part of:** [Pams](subsystem-pams)

`Address` represents address data in the client-side model layer. Its `clone()` method creates a separate `Address` instance for workflows that need to copy address data before editing or passing it to another part of the application.

## Methods

| Method | Signature | Returns |
|---|---|---|
| `clone` | `clone(ad: Address)` | `void` |

## Properties

| Property | Type |
|---|---|
| `AddressID` | `number` |
| `AddressLine` | `string` |
| `CountryCode` | `string` |
| `CountryName` | `string` |
| `Destination` | `string` |
| `City` | `string` |
| `State` | `string` |
| `PostalCode` | `string` |
| `ZipCode` | `string` |
| `RowGuid` | `string` |
| `AddressTypeID` | `number` |
| `GovernateID` | `number` |
| `HasMarker` | `boolean` |
| `latitude` | `number` |
| `longitude` | `number` |
| `RelatedToID` | `number` |
| `RelatedTypeID` | `number` |
| `_RelatedToName` | `string` |

## Diagram

```mermaid
graph LR
    Source[Address instance] --> Clone[clone()]
    Clone --> Copy[New Address instance]
```

## Usage

```ts
import { Address } from "../models/common/address.model";

function createEditableAddress(address: Address): Address {
  const editableAddress = address.clone();

  // Update the copied address without changing the source instance.
  return editableAddress;
}
```

## AI Coding Instructions

- Use `clone()` before editing address data that may also be referenced by existing UI state or API models.
- Treat the cloned result as a separate `Address` instance from the source object.
- Keep address-specific transformations close to the caller that owns the edit workflow.
- Avoid mutating a shared `Address` instance when a copy is required for comparison, cancellation, or form editing.

## Used by

13 references from 13 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Imported by (13)

- `BranchDetailsComponent` — `Pams/Web/Pams.Web/Client/app/components/configuration/company/main-branch/branch-details.component.ts`:1
- `NewBranchComponent` — `Pams/Web/Pams.Web/Client/app/components/configuration/company/main-branch/new.branch.component.ts`:1
- `InvoiceDetailsComponent` — `Pams/Web/Pams.Web/Client/app/components/invoices/invoice-details/invoice-details.component.ts`:1
- `AccountDetailsComponent` — `Pams/Web/Pams.Web/Client/app/components/market/account-details/account-details.component.ts`:1
- `ClientViewEditComponent` — `Pams/Web/Pams.Web/Client/app/components/market/client/client-view-edit/client-view-edit.component.ts`:1
- `PrincipalViewEditComponent` — `Pams/Web/Pams.Web/Client/app/components/market/principles/principles-view-edit/principles-view-edit.component.ts`:1
- `AddressComponent` — `Pams/Web/Pams.Web/Client/app/components/shared/address/address.component.ts`:1
- `LocationDropdownComponent` — `Pams/Web/Pams.Web/Client/app/components/shared/dropdown/location-dropdown/location-dropdown.component.ts`:1

…and 5 more.
