Skip to content

Commit

Permalink
fix!: shipping option ID type and merchant urls interface name
Browse files Browse the repository at this point in the history
  • Loading branch information
HormCodes committed Jan 5, 2022
1 parent e0e775c commit 13f7f64
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/api/checkout-v3/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface IOrderLine {
merchant_data?: string;
}

export interface IMerchantObj {
export interface IMerchantUrls {
terms: string;
checkout: string;
confirmation: string;
Expand All @@ -29,15 +29,15 @@ export interface IOrderBody {
order_amount: number;
order_tax_amount: number;
order_lines: Array<IOrderLine>;
merchant_urls: IMerchantObj;
merchant_urls: IMerchantUrls;
recurring?: boolean;
shipping_options?: IShippingOption[];
merchant_reference1?: string;
merchant_reference2?: string;
}

export interface IShippingOption {
id: number;
id: string;
name: string;
description?: string;
promo?: string;
Expand Down Expand Up @@ -98,7 +98,7 @@ export interface IOrder {
order_amount: number;
order_tax_amount: number;
order_lines: Array<IOrderLine>;
merchant_urls: IMerchantObj;
merchant_urls: IMerchantUrls;
billing_address: IAddress;
shipping_address: IAddress;
html_snippet: string;
Expand Down
6 changes: 3 additions & 3 deletions src/crystallize-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
IMerchantObj,
IMerchantUrls,
IShippingOption,
IOrderBody,
IOrderLine,
Expand All @@ -10,7 +10,7 @@ export interface IDefaults {
purchase_country?: string;
purchase_currency?: string;
locale?: string;
merchant_urls?: IMerchantObj;
merchant_urls?: IMerchantUrls;
shipping_options?: Array<IShippingOption>;
}

Expand Down Expand Up @@ -73,7 +73,7 @@ function getPackageDefaults(host_uri: string): IDefaults {
},
shipping_options: [
{
id: 1,
id: '1',
name: 'Hjemlevering',
description: 'Rett i postkassen',
price: 4900,
Expand Down

0 comments on commit 13f7f64

Please sign in to comment.