public SimCardsServiceTest(MockHttpClientFixture mockHttpClientFixture) : base(mockHttpClientFixture) { this.service = new SimCardsService(); this.listOptions = new ListOptions { PageNumber = 1, PageSize = 20, }; this.baseOptions = new BaseOptions(); this.baseOptions.AddExtraParam("include_sim_card_group", "true"); this.requestOptions = new RequestOptions(); this.updateSimCardOptions = new UpdateSimCardOptions() { Id = "001", SimCardGroupId = Guid.NewGuid(), Tags = new List <string>() { "personal", "active-customers", }, }; this.simCardRegisterOptions = new SimCardRegisterOptions { RegistrationCodes = new string[] { "0000000001", "0000000002", "0000000003", }, SimCardGroupId = "6a09cdc3-8948-47f0-aa62-74ac943d6c58", Tags = new string[] { "personal", "customers", "active-customers", }, }; this.simCardBulkNetworkPreferenceUpdateOptions = new SimCardBulkNetworkPreferenceUpdateOptions { SimCardIds = new string[] { "6b14e151-8493-4fa1-8664-1cc4e6d14158", "6b14e151-8493-4fa1-8664-1cc4e6d14158", }, MobileOperatorNetworksPreferences = new List <MobileOperatorNetworksPreferences>() { new MobileOperatorNetworksPreferences() { MobileOperatorNetworkId = new Guid("6a09cdc3-8948-47f0-aa62-74ac943d6c58"), Priority = 0, }, }, }; }
public async Task <TelnyxCollection <SimCardRecord> > RegisterAsync() { TelnyxCollection <SimCardRecord> result = new TelnyxCollection <SimCardRecord>(); SimCardRegisterOptions baseOptions = new SimCardRegisterOptions { RegistrationCodes = new string[] { "0000000001", "0000000002", "0000000003", }, SimCardGroupId = "6a09cdc3-8948-47f0-aa62-74ac943d6c58", Tags = new string[] { "personal", "customers", "active-customers", }, }; try { result = await service.RegisterAsync(baseOptions); Console.WriteLine(JsonConvert.SerializeObject(result)); } catch (TelnyxException ex) { Console.WriteLine("exception"); Console.WriteLine(JsonConvert.SerializeObject(ex)); } return(result); }
public SimCardRegisterServiceTest(MockHttpClientFixture mockHttpClientFixture) : base(mockHttpClientFixture) { this.service = new SimCardRegisterService(); this.simCardRegisterOptions = new SimCardRegisterOptions { RegistrationCodes = new string[] { "0000000001", "0000000002", "0000000003", }, SimCardGroupId = "6a09cdc3-8948-47f0-aa62-74ac943d6c58", Tags = new string[] { "personal", "customers", "active-customers", }, }; }