/// <param name='operations'>
 /// Reference to the Pltkw3msUI1.ICustomerOperations.
 /// </param>
 public static IList <Customer> Get(this ICustomerOperations operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICustomerOperations)s).GetAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// Reference to the Pltkw3msUI1.ICustomerOperations.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 public static object DeleteById(this ICustomerOperations operations, int id)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICustomerOperations)s).DeleteByIdAsync(id);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// Reference to the Pltkw3msUI1.ICustomerOperations.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 /// <param name='value'>
 /// Required.
 /// </param>
 public static object PutByIdAndValue(this ICustomerOperations operations, int id, string value)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICustomerOperations)s).PutByIdAndValueAsync(id, value);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the Pltkw3msCustomer class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public Pltkw3msCustomer(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._customer = new CustomerOperations(this);
     this._baseUri  = new Uri("http://localhost:48049");
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the Pltkw3msCustomer class.
 /// </summary>
 public Pltkw3msCustomer()
     : base()
 {
     this._customer = new CustomerOperations(this);
     this._baseUri  = new Uri("http://localhost:48049");
 }
        /// <param name='operations'>
        /// Reference to the Pltkw3msUI1.ICustomerOperations.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <IList <Customer> > GetAsync(this ICustomerOperations operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <System.Collections.Generic.IList <Pltkw3msUI1.Models.Customer> > result = await operations.GetWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
        /// <param name='operations'>
        /// Reference to the Pltkw3msUI1.ICustomerOperations.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <object> DeleteByIdAsync(this ICustomerOperations operations, int id, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <object> result = await operations.DeleteByIdWithOperationResponseAsync(id, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
        /// <param name='operations'>
        /// Reference to the Pltkw3msUI1.ICustomerOperations.
        /// </param>
        /// <param name='value'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <object> AddManyCustomersByValueAsync(this ICustomerOperations operations, IList <Customer> value, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <object> result = await operations.AddManyCustomersByValueWithOperationResponseAsync(value, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
        /// <param name='operations'>
        /// Reference to the Pltkw3msUI1.ICustomerOperations.
        /// </param>
        /// <param name='id'>
        /// Required. ID Customer
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <Customer> GetByIdAsync(this ICustomerOperations operations, int id, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <Pltkw3msUI1.Models.Customer> result = await operations.GetByIdWithOperationResponseAsync(id, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Ejemplo n.º 10
0
 public CustomerController(ICustomerOperations _customer)
 {
     customer = _customer;
 }
Ejemplo n.º 11
0
 public CustomerController(ICustomerOperations customer)
 {
     customerOperations = customer;
 }
 private void InitSubApis()
 {
     if (!isIntialized())
     {
         companyMetaDataOperations = new CompanyMetaDataTemplate(this.RestTemplate);
         this.companyId = this.companyMetaDataOperations.CompanyMetaData().ExternalRealmId;
         accountOperations = new AccountTemplate(this.RestTemplate, IsAuthorized, this.companyId);
         customerOperations = new CustomerTemplate(this.RestTemplate, IsAuthorized, this.companyId);
         invoiceOperations = new InvoiceTemplate(this.RestTemplate, IsAuthorized, this.companyId);
         itemOperations = new ItemTemplate(this.RestTemplate, IsAuthorized, this.companyId);
         paymentMethodOperations = new PaymentMethodTemplate(this.RestTemplate, IsAuthorized, this.companyId);
         paymentOperations = new PaymentTemplate(this.RestTemplate, IsAuthorized, this.companyId);
         userOperations = new UserTemplate(this.RestTemplate, IsAuthorized);
     }
 }
Ejemplo n.º 13
0
 public CustomersController(ICustomerOperations customerOperations)
 {
     _customerOperations = customerOperations;
 }