예제 #1
0
        public void Should_Update_Personal_Sub_Merchant()
        {
            UpdateSubMerchantRequest request = new UpdateSubMerchantRequest();
            request.Locale = Locale.TR.ToString();
            request.ConversationId = "123456789";
            request.SubMerchantKey = "sub merchant key";
            request.Iban = "TR630006200027700006678204";
            request.Address = "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1";
            request.ContactName = "Jane";
            request.ContactSurname = "Doe";
            request.Email = "*****@*****.**";
            request.GsmNumber = "+905350000000";
            request.Name = "Jane's market";
            request.IdentityNumber = "31300864726";
            request.Currency = Currency.TRY.ToString();

            SubMerchant subMerchant = SubMerchant.Update(request, options);

            PrintResponse<SubMerchant>(subMerchant);

            Assert.AreEqual(Status.SUCCESS.ToString(), subMerchant.Status);
            Assert.AreEqual(Locale.TR.ToString(), subMerchant.Locale);
            Assert.AreEqual("123456789", subMerchant.ConversationId);
            Assert.IsNotNull(subMerchant.SystemTime);
            Assert.IsNull(subMerchant.ErrorCode);
            Assert.IsNull(subMerchant.ErrorMessage);
            Assert.IsNull(subMerchant.ErrorGroup);
        }
예제 #2
0
        public void Should_Update_Limited_Company_Sub_Merchant()
        {
            UpdateSubMerchantRequest request = new UpdateSubMerchantRequest();
            request.Locale = Locale.TR.ToString();
            request.ConversationId = "123456789";
            request.SubMerchantKey = "sub merchant key";
            request.Address = "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1";
            request.TaxOffice = "Tax office";
            request.TaxNumber = "9261877";
            request.LegalCompanyTitle = "ABC inc";
            request.Email = "*****@*****.**";
            request.GsmNumber = "+905350000000";
            request.Name = "Jane's market";
            request.Iban = "TR180006200119000006672315";
            request.Currency = Currency.TRY.ToString();

            SubMerchant subMerchant = SubMerchant.Update(request, options);

            PrintResponse<SubMerchant>(subMerchant);

            Assert.AreEqual(Status.SUCCESS.ToString(), subMerchant.Status);
            Assert.AreEqual(Locale.TR.ToString(), subMerchant.Locale);
            Assert.AreEqual("123456789", subMerchant.ConversationId);
            Assert.IsNotNull(subMerchant.SystemTime);
            Assert.IsNull(subMerchant.ErrorCode);
            Assert.IsNull(subMerchant.ErrorMessage);
            Assert.IsNull(subMerchant.ErrorGroup);
        }
예제 #3
0
 public static SubMerchant Update(UpdateSubMerchantRequest request, Options options)
 {
     return RestHttpClient.Create().Put<SubMerchant>(options.BaseUrl + "/onboarding/submerchant", GetHttpHeaders(request, options), request);
 }