internal Adlg2PathClient(string account, string key, HttpClient httpClient = null) { _account = account; _key = key; _httpClient = httpClient ?? Http.Client; _authorizationMethod = AuthorizationMethod.SharedKey; }
internal Adlg2PathClient(string account, string _, string sas, HttpClient httpClient = null) { _account = account; _sas = sas; _httpClient = httpClient ?? Http.Client; _authorizationMethod = AuthorizationMethod.SharedAccessSignature; }
internal static string ToSerializedValue(this AuthorizationMethod value) { switch (value) { case AuthorizationMethod.HEAD: return("HEAD"); case AuthorizationMethod.OPTIONS: return("OPTIONS"); case AuthorizationMethod.TRACE: return("TRACE"); case AuthorizationMethod.GET: return("GET"); case AuthorizationMethod.POST: return("POST"); case AuthorizationMethod.PUT: return("PUT"); case AuthorizationMethod.PATCH: return("PATCH"); case AuthorizationMethod.DELETE: return("DELETE"); } return(null); }
internal Adlg2PathClient(string account, string tenantId, string clientId, string clientSecret, HttpClient httpClient = null) { _account = account; _clientId = clientId; _clientSecret = clientSecret; _httpClient = httpClient ?? Http.Client; _tenantId = tenantId; _authorizationMethod = AuthorizationMethod.Oauth; }
/// <summary> /// Anonymous token constructor /// </summary> public Token(string nickname) { // create new user object with specified nickname and random other values this.OwnerUser = new FoolUser { Nickname = nickname, UserId = DateTime.Now.Ticks, Email = "", Password = "", Money = 0d }; this.authMethod = AuthorizationMethod.Anonymous; }
/// <param name="merchant">Detalhes do estabelecimento comercial</param> /// <param name="holder">Detalhes do portador do cartão</param> /// <param name="order">Detalhes do pedido</param> /// <param name="paymentMethod">Forma de pagamento</param> /// <param name="returnURL">URL de retorno</param> /// <param name="authorize">Método de autorização</param> /// <param name="capture">Determina se a transação deverá ser capturada automaticamente</param> public Transaction( Merchant merchant, Holder holder, Order order, PaymentMethod paymentMethod, String returnURL, AuthorizationMethod authorize, bool capture) { this.merchant = merchant; this.holder = holder; this.order = order; this.paymentMethod = paymentMethod; this.returnURL = returnURL; this.authorize = authorize; this.capture = capture; }
public override INotifier Create(ILogger logger, IConfigurationSection section) { using (logger.BeginScope(nameof(WebhookFactory))) { logger.LogInformation("Processing Webhook Config"); string url = section.GetValue <string>("Url"); AuthorizationMethod authentication = section.GetValue <AuthorizationMethod>("Authorization", AuthorizationMethod.None); string username = section.GetValue <string>("Username", null); string password = section.GetValue <string>("Password", null); string token = section.GetValue <string>("Token", null); string field = section.GetValue <string>("Field", "image"); string method = section.GetValue <string>("Method", "POST"); bool sendImage = section.GetValue <bool>("SendImage", true); bool sendTypes = section.GetValue <bool>("SendTypes", false); Webhook webhook = new Webhook() { Url = url, Authentication = authentication, Username = username, Password = password, Token = token, SendImage = sendImage, SendTypes = sendTypes }; if (!string.IsNullOrWhiteSpace(field)) { webhook.Field = field.Trim(); } if (!string.IsNullOrWhiteSpace(method)) { webhook.Method = method.ToUpper().Trim(); } return(webhook); } }
/// <param name="merchant">Detalhes do estabelecimento comercial</param> /// <param name="holder">Detalhes do portador do cartão</param> /// <param name="order">Detalhes do pedido</param> /// <param name="paymentMethod">Forma de pagamento</param> /// <param name="returnURL">URL de retorno</param> /// <param name="authorize">Método de autorização</param> /// <param name="capture">Determina se a transação deverá ser capturada automaticamente</param> public Transaction ( Merchant merchant, Holder holder, Order order, PaymentMethod paymentMethod, String returnURL, AuthorizationMethod authorize, bool capture) { this.merchant = merchant; this.holder = holder; this.order = order; this.paymentMethod = paymentMethod; this.returnURL = returnURL; this.authorize = authorize; this.capture = capture; }
/// <summary> /// Registred user token constructor /// </summary> public Token(FoolUser user) { this.OwnerUser = user; this.authMethod = AuthorizationMethod.Email; }