Skip to content

Commit 9f1e26f

Browse files
authored
Merge pull request #256 from companieshouse/fix-checkouts
Add reference to enable calling of the getCheckout method in web app
2 parents 35a97a1 + 7c15ac9 commit 9f1e26f

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import CompanyOfficersService from "./services/company-officers/service";
33
import CompanyProfileService from "./services/company-profile/service";
44
import CompanyPscService from "./services/company-psc/service";
55
import { LateFilingPenaltyService } from "./services/lfp";
6-
import { BasketService, OrderService, CertificateService, CertifiedCopiesService, MidService } from "./services/order/";
6+
import { BasketService, CheckoutService, OrderService, CertificateService, CertifiedCopiesService, MidService } from "./services/order/";
77
import { PaymentService } from "./services/payment/";
88
import CompanyFilingHistoryService from "./services/company-filing-history/service";
99
import { RefreshTokenService } from "./services/refresh-token";
@@ -31,6 +31,7 @@ export default class ApiClient {
3131
public readonly certifiedCopies: CertifiedCopiesService;
3232
public readonly basket: BasketService;
3333
public readonly payment: PaymentService;
34+
public readonly checkout: CheckoutService;
3435
public readonly order: OrderService;
3536
public readonly mid : MidService;
3637
public readonly refreshToken: RefreshTokenService;
@@ -54,6 +55,7 @@ export default class ApiClient {
5455
this.certifiedCopies = new CertifiedCopiesService(apiClient);
5556
this.basket = new BasketService(apiClient);
5657
this.payment = new PaymentService(apiClient); // TODO split payments url/domain into a separate config item and http client
58+
this.checkout = new CheckoutService(apiClient);
5759
this.order = new OrderService(apiClient);
5860
this.mid = new MidService(apiClient);
5961
this.alphabeticalSearch = new AlphabeticalSearchService(apiClient);

src/services/order/checkout/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ApiResult } from "../../../services/resource";
44
import { failure, success } from "../../../services/result";
55
import CheckoutMapping from "./mapping";
66

7-
export default class OrderService {
7+
export default class CheckoutService {
88
constructor (private readonly client: IHttpClient) { }
99

1010
public async getCheckout (checkoutId: string): Promise<ApiResult<Checkout>> {

src/services/order/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export { default as BasketService } from "./basket/service";
2+
export { default as CheckoutService } from "./checkout/service"
23
export { default as OrderService } from "./order/service";
34
export { default as CertificateService } from "./certificates/service";
45
export { default as CertifiedCopiesService } from "./certified-copies/service";

0 commit comments

Comments
 (0)