public WithClientCertificates(TrustlyApiClientSettings settings, AsymmetricKeyParameter clientPublicKey, AsymmetricKeyParameter clientPrivateKey)
        {
            this.Settings = settings;

            this.Settings.ClientPrivateKey = clientPrivateKey;
            this.Settings.ClientPublicKey  = clientPublicKey;
        }
Пример #2
0
        public TrustlyApiClient(TrustlyApiClientSettings settings)
        {
            this.Settings = settings;
            this._signer  = new JsonRpcSigner(serializer, this.Settings);

            this._methodToNotificationMapper.Add("account", (json, ok, error) => this.HandleNotificationFromString(json, this.OnAccount, ok, error));
            this._methodToNotificationMapper.Add("cancel", (json, ok, error) => this.HandleNotificationFromString(json, this.OnCancel, ok, error));
            this._methodToNotificationMapper.Add("credit", (json, ok, error) => this.HandleNotificationFromString(json, this.OnCredit, ok, error));
            this._methodToNotificationMapper.Add("debit", (json, ok, error) => this.HandleNotificationFromString(json, this.OnDebit, ok, error));
            this._methodToNotificationMapper.Add("payoutconfirmation", (json, ok, error) => this.HandleNotificationFromString(json, this.OnPayoutConfirmation, ok, error));
            this._methodToNotificationMapper.Add("pending", (json, ok, error) => this.HandleNotificationFromString(json, this.OnPending, ok, error));

            this._methodToNotificationMapper.Add(string.Empty, (json, ok, error) => this.HandleNotificationFromString(json, this.OnUnknownNotification, ok, error));

            TrustlyApiClient._staticRegisteredClients.Add(this);
        }
Пример #3
0
 public JsonRpcSigner(Serializer serializer, TrustlyApiClientSettings settings)
 {
     this._serializer = serializer;
     this._settings   = settings;
 }
 public WithCredentials(TrustlyApiClientSettings settings, string username, string password)
 {
     this.Settings          = settings;
     this.Settings.Username = username;
     this.Settings.Password = password;
 }
 public WithEnvironment(TrustlyApiClientSettings settings, string url)
 {
     this.Settings     = settings;
     this.Settings.URL = url;
 }