@@ -299,10 +299,9 @@ describe("checkout", () => {
299299 const mockRequest = sinon . stub ( requestClient , "httpGet" ) . resolves ( mockGetResponse ) ;
300300 const checkout : CheckoutService = new CheckoutService ( requestClient ) ;
301301 const response = await checkout . getCheckout ( CERTIFICATE_CHECKOUT_ID ) ; ;
302- const data = response . value as ApiErrorResponse ;
303302
304- expect ( data . httpStatusCode ) . to . equal ( 401 ) ;
305- expect ( data . errors ) . to . equal ( "An error occurred" ) ;
303+ expect ( response . httpStatusCode ) . to . equal ( 401 ) ;
304+ expect ( response . resource ) . to . be . undefined ;
306305 } ) ;
307306
308307 it ( "should map generic fields correctly" , async ( ) => {
@@ -314,7 +313,7 @@ describe("checkout", () => {
314313 const mockRequest = sinon . stub ( requestClient , "httpGet" ) . resolves ( mockGetResponse ) ;
315314 const checkout : CheckoutService = new CheckoutService ( requestClient ) ;
316315 const response = await checkout . getCheckout ( CERTIFICATE_CHECKOUT_ID ) ;
317- const data = response . value as Checkout ;
316+ const data = response . resource as Checkout ;
318317
319318 expect ( data . paidAt ) . to . equal ( mockCertificateCheckoutResponseBody . paid_at ) ;
320319 expect ( data . checkedOutBy . id ) . to . equal ( mockCertificateCheckoutResponseBody . checked_out_by . id ) ;
@@ -374,7 +373,7 @@ describe("checkout", () => {
374373 sinon . stub ( requestClient , "httpGet" ) . resolves ( mockGetResponse ) ;
375374 const checkout : CheckoutService = new CheckoutService ( requestClient ) ;
376375 const response = await checkout . getCheckout ( CERTIFICATE_CHECKOUT_ID ) ;
377- const data = response . value as Checkout ;
376+ const data = response . resource as Checkout ;
378377
379378 const item = data . items [ 0 ] ;
380379 const itemResource = mockCertificateCheckoutResponseBody . items [ 0 ] ;
@@ -405,7 +404,7 @@ describe("checkout", () => {
405404 sinon . stub ( requestClient , "httpGet" ) . resolves ( mockGetResponse ) ;
406405 const checkout : CheckoutService = new CheckoutService ( requestClient ) ;
407406 const response = await checkout . getCheckout ( CERTIFIED_COPY_CHECKOUT_ID ) ;
408- const data = response . value as Checkout ;
407+ const data = response . resource as Checkout ;
409408 const item = data . items [ 0 ] ;
410409 const itemResource = mockCertifiedCopyCheckoutResponseBody . items [ 0 ] ;
411410
@@ -431,7 +430,7 @@ describe("checkout", () => {
431430 sinon . stub ( requestClient , "httpGet" ) . resolves ( mockGetResponse ) ;
432431 const checkout : CheckoutService = new CheckoutService ( requestClient ) ;
433432 const response = await checkout . getCheckout ( MISSING_IMAGE_DELIVERY_CHECKOUT_ID ) ;
434- const data = response . value as Checkout ;
433+ const data = response . resource as Checkout ;
435434
436435 const item = data . items [ 0 ] ;
437436 const itemResource = mockMissingImageDeliveryCheckoutResponseBody . items [ 0 ] ;
0 commit comments