Пример #1
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     this.AccidentTowService  = new AccidentTowService(this);
     this.AccomodationService = new AccomodationService(this);
     this.CalAmp                         = new CalAmp(this);
     this.CaseModel                      = new CaseModel(this);
     this.ClientCsi                      = new ClientCsi(this);
     this.DriverAssistService            = new DriverAssistService(this);
     this.EmergencyAssistService         = new EmergencyAssistService(this);
     this.Financial                      = new Financial(this);
     this.HomeAssistService              = new HomeAssistService(this);
     this.LegalAssistService             = new LegalAssistService(this);
     this.RecoveryService                = new RecoveryService(this);
     this.ReleaseRequestService          = new ReleaseRequestService(this);
     this.RoadsideAssistService          = new RoadsideAssistService(this);
     this.SauIntegration                 = new SauIntegration(this);
     this.Service                        = new Service(this);
     this.SignIn                         = new SignIn(this);
     this.TaxiService                    = new TaxiService(this);
     this.TrackerIntegration             = new TrackerIntegration(this);
     this.TradeTowService                = new TradeTowService(this);
     this.Update                         = new Update(this);
     this.VehicleLocksmithingCaseService = new VehicleLocksmithingCaseService(this);
     this.ZirconiumWebHooks              = new ZirconiumWebHooks(this);
     this.BaseUri                        = new Uri("https://yttriumstaging.dreamtec.co.za");
     SerializationSettings               = new JsonSerializerSettings
     {
         Formatting            = Formatting.Indented,
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
 }
 /// <summary>
 /// Will be called when a new service has been created on a case.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// Information about the service.
 /// </param>
 public static ResQYttriumWebApiModelsResultModel CaseServiceCreated(this IZirconiumWebHooks operations, ResQNickelZirconiumCommonWebHookDtosCaseServiceCreatedWebHookModel model)
 {
     return(Task.Factory.StartNew(s => ((IZirconiumWebHooks)s).CaseServiceCreatedAsync(model), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Will be called when a new case has been Updated.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// Information about the case.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ResQYttriumWebApiModelsResultModel> CaseUpdatedAsync(this IZirconiumWebHooks operations, ResQNickelZirconiumCommonWebHookDtosCaseUpdatedWebHookModel model, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CaseUpdatedWithHttpMessagesAsync(model, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }