/// <inheritdoc cref="MoneybirdRepositoryBase"/> public MoneybirdRepositoryRead( string apiPath, IMoneybirdClient moneybirdClient, IMoneybirdAdministrationAccessor administrationAccessor = default) : base(apiPath, moneybirdClient, administrationAccessor) { }
/// <summary> /// Moneybird repository base. /// </summary> /// <param name="apiPath">Api path for the entity (eg: contacts).</param> /// <param name="moneybirdClient">Moneybird client</param> /// <param name="administrationAccessor">Administration accessor</param> protected MoneybirdRepositoryBase( string apiPath, IMoneybirdClient moneybirdClient, IMoneybirdAdministrationAccessor administrationAccessor = default) { _apiPath = apiPath; Client = moneybirdClient ?? throw new ArgumentNullException(nameof(moneybirdClient)); _administrationAccessor = administrationAccessor; }
/// <summary> /// Moneybird Repository for storing new entities (POST). /// </summary> /// <param name="apiPath">Api path for the entity (eg: contacts).</param> /// <param name="objectKey">Object key for the POST body (eg: contact).</param> /// <param name="moneybirdClient">Moneybird client</param> /// <param name="administrationAccessor">Administration accessor</param> /// <exception cref="ArgumentNullException">Thrown when administrationAccessor is null.</exception> public MoneybirdRepositoryUpdate( string apiPath, string objectKey, IMoneybirdClient moneybirdClient, IMoneybirdAdministrationAccessor administrationAccessor) : base(apiPath, moneybirdClient, administrationAccessor) { if (administrationAccessor == null) { throw new ArgumentNullException(nameof(administrationAccessor)); } _objectKey = objectKey; }