public void PayoutCreateAndGetTest()
        {
            try
            {
                var apiContext = TestingUtil.GetApiContext();
                this.RecordConnectionDetails();

                var payout = PayoutTest.GetPayout();
                var payoutSenderBatchId = "batch_" + System.Guid.NewGuid().ToString().Substring(0, 8);
                payout.sender_batch_header.sender_batch_id = payoutSenderBatchId;
                var createdPayout = payout.Create(apiContext, false);
                this.RecordConnectionDetails();

                Assert.IsNotNull(createdPayout);
                Assert.IsTrue(!string.IsNullOrEmpty(createdPayout.batch_header.payout_batch_id));
                Assert.AreEqual(payoutSenderBatchId, createdPayout.batch_header.sender_batch_header.sender_batch_id);

                var payoutBatchId   = createdPayout.batch_header.payout_batch_id;
                var retrievedPayout = Payout.Get(apiContext, payoutBatchId);
                this.RecordConnectionDetails();

                Assert.IsNotNull(payout);
                Assert.AreEqual(payoutBatchId, retrievedPayout.batch_header.payout_batch_id);
            }
            catch (ConnectionException)
            {
                this.RecordConnectionDetails(false);
                throw;
            }
        }
Beispiel #2
0
        public void PayoutCreateTest()
        {
            var payout = PayoutTest.GetPayout();
            var payoutSenderBatchId = "batch_" + System.Guid.NewGuid().ToString().Substring(0, 8);

            payout.sender_batch_header.sender_batch_id = payoutSenderBatchId;
            var createdPayout = payout.Create(TestingUtil.GetApiContext(), false);

            Assert.IsNotNull(createdPayout);
            Assert.IsTrue(!string.IsNullOrEmpty(createdPayout.batch_header.payout_batch_id));
            Assert.AreEqual(payoutSenderBatchId, createdPayout.batch_header.sender_batch_header.sender_batch_id);
        }