Exemplo n.º 1
0
        public MessageBirdAdapter(MessageBirdAdapterOptions options = null, ILogger logger = null)
        {
            _options = options ?? new MessageBirdAdapterOptions();

            _logger = logger ?? NullLogger.Instance;

            _messageBirdClient = Client.CreateDefault(_options.AccessKey);

            _requestAuthorization = new MessageBirdRequestAuthorization();
        }
Exemplo n.º 2
0
        public MessageBirdAdapter(MessageBirdAdapterOptions options = null, ILogger logger = null)
        {
            _options = options ?? throw new ArgumentNullException(nameof(options));
            _logger  = logger ?? NullLogger.Instance;

            if (_options.UseWhatsAppSandbox)
            {
                _messageBirdClient = Client.CreateDefault(_options.AccessKey, features: new Client.Features[] { Client.Features.EnableWhatsAppSandboxConversations });
            }
            else
            {
                _messageBirdClient = Client.CreateDefault(_options.AccessKey);
            }
            _requestAuthorization = new MessageBirdRequestAuthorization();
        }
Exemplo n.º 3
0
 public ToActivityConverter(MessageBirdAdapterOptions adapterOptions, ILogger logger)
 {
     _logger         = logger ?? throw new ArgumentNullException(nameof(logger));
     _adapterOptions = adapterOptions ?? throw new ArgumentNullException(nameof(adapterOptions));
 }