Extract response exceptions
[smsapi-csharp.git] / smsapi / Api / MFAFactory.cs
blob6ed7439eaebced6c67df35717366fe1fb1744a8d
1 using SMSApi.Api.Action.MFA;
3 namespace SMSApi.Api;
5 public class MFAFactory : Factory
7 public MFAFactory(ProxyAddress address = ProxyAddress.SmsApiIo)
8 : base(address)
12 public MFAFactory(IClient client, ProxyAddress address = ProxyAddress.SmsApiIo)
13 : base(client, address)
17 public MFAFactory(IClient client, Proxy proxy)
18 : base(client, proxy)
22 public CreateMFACode CreateMfaCode(string phoneNumber)
24 var action = new CreateMFACode(phoneNumber);
25 action.Proxy(proxy);
27 return action;
30 public VerifyMFACode VerifyMfaCode(string phoneNumber, string code)
32 var action = new VerifyMFACode(phoneNumber, code);
33 action.Proxy(proxy);
35 return action;
39 public static class MFAFeatureRegister
41 public static MFAFactory MFA(this Features features)
43 return new MFAFactory(features.Client, features.Proxy);