Newer
Older
InMemoryBus / src / ApplicationCore / Services / Fedex.cs
@Derek Comartin Derek Comartin on 17 Jan 2023 473 bytes Init
using System;

namespace Microsoft.eShopWeb.ApplicationCore.Services;

public class FedexClient
{
    private int _counter;
    public FedexShipment CreateShipment()
    {
        _counter++;
        //if (_counter % 2 == 0)
        //{
            //throw new InvalidOperationException("Yikes! Failed to create the shipping label.");
        //}

        return new FedexShipment(Guid.NewGuid().ToString());
    }
}

public record FedexShipment(string TrackingNumber);