# Migration v19

Contains 1 breaking change of the SDK interface.

## Changes

- [change to FulfilmentOption](#change-to-FulfilmentOption)

### change to FulfilmentOption

Print Fulfilment Options endpoint was extended to support USA/CAN addresses. That's the reason membership-sdk FulfilmentOption is updated to receive a new `addresstype` parameter and return new response properties as well. 

New parameter:
- **addressType** - optional parameter. Default value = “default”

New response properties:
- **flightMarketSupport** - if the distributor is in a fly market or not (newspapers shipping may be affected by flight schedule changes)
- **deliveryOnEditionDate** - true if the distributor can deliver on the publication date, otherwise there will be 1-3 days delay in deliveries
- **mailDelivery** - true if the distributor fulfilment type is mail,  otherwise is hand delivery

Changes in `src/print-fulfilment.ts`
```diff
-       public async getOptions(countryCode: string, postcode: string, productCode: string): Promise<Array<FulfilmentOption>> {
-               const url = `${this.membershipApi}/newspaper/fulfilment/options?countryCode=${countryCode}&postCode=${postcode}&productCode=${productCode}`;
+       public async getOptions(countryCode: string, postcode: string, productCode: string, addressType: string = 'default'): Promise<Array<FulfilmentOption>> {
+               const url = `${this.membershipApi}/newspaper/fulfilment/options?countryCode=${countryCode}&postCode=${postcode}&productCode=${productCode}&addressType=${addressType}`;
```

Changes in `src/models/fulfilment-option.ts`
```diff
export class FulfilmentOption {
-       public code: string;
-       public displayName: string;
-       public deliveryCompany: string;
-       public deliveryCompanyCode: string;
-       public leadDeliveryTime: number;
+       public code!: string;
+       public displayName!: string;
+       public deliveryCompany!: string;
+       public deliveryCompanyCode!: string;
+       public leadDeliveryTime!: number;
+       public flightMarketSupport!: boolean;
+       public deliveryOnEditionDate!: boolean;
+       public mailDelivery!: boolean;
 
        constructor(fulfilmentOptionData: FulfilmentOption) {
-               this.code = fulfilmentOptionData.code;
-               this.displayName = fulfilmentOptionData.displayName;
-               this.deliveryCompany = fulfilmentOptionData.deliveryCompany;
-               this.deliveryCompanyCode = fulfilmentOptionData.deliveryCompanyCode;
-               this.leadDeliveryTime = fulfilmentOptionData.leadDeliveryTime;
+               Object.assign(this, fulfilmentOptionData);
        }

```
