Ejemplo n.º 1
0
        public void CanGetTranslationWithInterestingItems()
        {

            var rpcClient = BuildRpcClient();
            ApiClientApplicationMessageTranslationRequestDTO request = new ApiClientApplicationMessageTranslationRequestDTO
            {
                AccountOperatorId = 2347,
                ClientApplicationId = 0,
                CultureId = 69,
                InterestedTranslationKeys = new[] { "contactus_customerservicesemail", "contactus_customerservicesphone" }
            };
            var translation = rpcClient.Messaging.GetClientApplicationMessageTranslationWithInterestingItems(request);

            Assert.IsTrue(translation.TranslationKeyValuePairs.Length > 0, "no lookup translation values returned for " + request.InterestedTranslationKeys);

            rpcClient.LogOut();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Use the message translation service to get client specific translated textual strings for specific keys.
 /// </summary>
 /// <param name="apiClientApplicationMessageTranslationRequestDto">DTO of the required data for translation lookup.</param>
 /// <param name="callback"></param>
 /// <param name="state"></param>
 public virtual void BeginGetClientApplicationMessageTranslationWithInterestingItems(ApiClientApplicationMessageTranslationRequestDTO apiClientApplicationMessageTranslationRequestDto, ReliableAsyncCallback callback, object state)
 {
     string uriTemplate = "/translationWithInterestingItems";
     _client.BeginRequest(RequestMethod.POST, "message", uriTemplate , 
     new Dictionary<string, object>
     {
         { "apiClientApplicationMessageTranslationRequestDto", apiClientApplicationMessageTranslationRequestDto}
     },ContentType.JSON,ContentType.JSON, TimeSpan.FromMilliseconds(0), 30000,0 ,callback, state);
 }
Ejemplo n.º 3
0
        // ***********************************
        // GetClientApplicationMessageTranslationWithInterestingItems
        // ***********************************


        /// <summary>
        /// Use the message translation service to get client specific translated textual strings for specific keys.
        /// </summary>
        /// <param name="apiClientApplicationMessageTranslationRequestDto">DTO of the required data for translation lookup.</param>
        public virtual ApiClientApplicationMessageTranslationResponseDTO GetClientApplicationMessageTranslationWithInterestingItems(ApiClientApplicationMessageTranslationRequestDTO apiClientApplicationMessageTranslationRequestDto)
        {
            string uriTemplate = "/translationWithInterestingItems";
            return _client.Request<ApiClientApplicationMessageTranslationResponseDTO>(RequestMethod.POST,"message", uriTemplate ,
            new Dictionary<string, object>
            {
                { "apiClientApplicationMessageTranslationRequestDto", apiClientApplicationMessageTranslationRequestDto}
            },ContentType.JSON,ContentType.JSON, TimeSpan.FromMilliseconds(0),30000,0 );
        }