public async Task Should_Retrieve_Sub_Merchant() { string subMerchantExternalId = RandomGenerator.RandomId; CreateSubMerchantRequest createLimitedCompanySubMerchantRequest = CreateSubMerchantRequestBuilder.Create() .LimitedCompanySubMerchantRequest() .SubMerchantExternalId(subMerchantExternalId) .Build(); await SubMerchant.CreateAsync(createLimitedCompanySubMerchantRequest, Options); RetrieveSubMerchantRequest request = RetrieveSubMerchantRequestBuilder.Create() .SubMerchantExternalId(subMerchantExternalId) .Build(); SubMerchant subMerchant = await SubMerchant.RetrieveAsync(request, Options); PrintResponse(subMerchant); Assert.AreEqual(Status.SUCCESS.ToString(), subMerchant.Status); Assert.AreEqual(Locale.TR.ToString(), subMerchant.Locale); Assert.AreEqual("123456789", subMerchant.ConversationId); Assert.AreEqual("9261877", subMerchant.TaxNumber); Assert.AreEqual("TR180006200119000006672315", subMerchant.Iban); Assert.AreEqual("Tax office", subMerchant.TaxOffice); Assert.AreEqual(subMerchantExternalId, subMerchant.SubMerchantExternalId); Assert.NotNull(subMerchant.SystemTime); Assert.Null(subMerchant.ErrorCode); Assert.Null(subMerchant.ErrorMessage); Assert.Null(subMerchant.ErrorGroup); }
public async Task <IActionResult> GetSubMerchant(int id) { RetrieveSubMerchantRequest request = new RetrieveSubMerchantRequest { Locale = Locale.TR.ToString(), SubMerchantExternalId = "mor1", ConversationId = "123456789" }; MerchantVM.SubMerchant = await SubMerchant.RetrieveAsync(request, option); return(View(MerchantVM)); }
public async Task Should_Retrieve_Sub_Merchant() { RetrieveSubMerchantRequest request = new RetrieveSubMerchantRequest { Locale = Locale.TR.ToString(), ConversationId = "123456789", SubMerchantExternalId = "AS49224" }; SubMerchant subMerchant = await SubMerchant.RetrieveAsync(request, Options); PrintResponse(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); }