Esempio 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();
        }
Esempio 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();
        }