コード例 #1
0
 public void convertSDKToSDK()
 {
     sdkTransactionRetention1 = new TransactionRetention();
     sdkTransactionRetention2 = new TransactionRetentionConverter(sdkTransactionRetention1).ToSDKTransactionRetention();
     Assert.IsNotNull(sdkTransactionRetention2);
     Assert.AreEqual(sdkTransactionRetention2, sdkTransactionRetention1);
 }
コード例 #2
0
        public TransactionRetention Build()
        {
            TransactionRetention result = new TransactionRetention();

            result.Draft     = draft;
            result.Sent      = sent;
            result.Completed = completed;
            result.OptedOut  = optedOut;
            result.Expired   = expired;
            result.Declined  = declined;
            result.Archived  = archived;
            return(result);
        }
コード例 #3
0
        public void convertSDKToAPI()
        {
            sdkTransactionRetention1 = buildSdkTransactionRetention();
            apiTransactionRetention1 = new TransactionRetentionConverter(sdkTransactionRetention1).ToAPITransactionRetention();

            Assert.IsNotNull(apiTransactionRetention1);
            Assert.AreEqual(apiTransactionRetention1.Expired, 10);
            Assert.AreEqual(apiTransactionRetention1.Sent, 20);
            Assert.AreEqual(apiTransactionRetention1.Archived, 30);
            Assert.AreEqual(apiTransactionRetention1.Completed, 40);
            Assert.AreEqual(apiTransactionRetention1.Declined, 50);
            Assert.AreEqual(apiTransactionRetention1.Draft, 60);
            Assert.AreEqual(apiTransactionRetention1.OptedOut, 70);
        }
コード例 #4
0
        internal OneSpanSign.Sdk.TransactionRetention ToSDKTransactionRetention()
        {
            if (apiTransactionRetention == null)
            {
                return(sdkTransactionRetention);
            }
            sdkTransactionRetention           = new TransactionRetention();
            sdkTransactionRetention.Sent      = apiTransactionRetention.Sent;
            sdkTransactionRetention.Draft     = apiTransactionRetention.Draft;
            sdkTransactionRetention.Declined  = apiTransactionRetention.Declined;
            sdkTransactionRetention.Completed = apiTransactionRetention.Completed;
            sdkTransactionRetention.Expired   = apiTransactionRetention.Expired;
            sdkTransactionRetention.Archived  = apiTransactionRetention.Archived;
            sdkTransactionRetention.OptedOut  = apiTransactionRetention.OptedOut;

            return(sdkTransactionRetention);
        }
コード例 #5
0
        public TransactionRetention Build()
        {
            TransactionRetention result = new TransactionRetention();

            result.Draft     = draft;
            result.Sent      = sent;
            result.Completed = completed;
            result.OptedOut  = optedOut;
            result.Expired   = expired;
            result.Declined  = declined;
            result.Archived  = archived;
            if (lifetimeTotal != null)
            {
                result.LifetimeTotal = lifetimeTotal;
            }
            if (lifetimeUntilCompletion != null)
            {
                result.LifetimeUntilCompletion = lifetimeUntilCompletion;
            }

            return(result);
        }
コード例 #6
0
 public DataManagementPolicyBuilder WithTransactionRetention(TransactionRetention transactionRetention)
 {
     this.transactionRetention = transactionRetention;
     return(this);
 }
コード例 #7
0
 public TransactionRetentionConverter(TransactionRetention sdkTransactionRetention)
 {
     this.sdkTransactionRetention = sdkTransactionRetention;
 }
コード例 #8
0
 public void convertNullSDKToSDK()
 {
     sdkTransactionRetention1 = null;
     converter = new TransactionRetentionConverter(sdkTransactionRetention1);
     Assert.IsNull(converter.ToSDKTransactionRetention());
 }