Example #1
0
        /// <summary>
        ///     Возвращает расширенную информацию о друзьях пользователя
        /// </summary>
        /// <param name="fields">Cписок дополнительных полей, которые необходимо вернуть</param>
        /// <param name="userId">
        ///     Идентификатор пользователя, для которого необходимо получить список друзей. Если параметр не
        ///     задан, то считается, что он равен идентификатору текущего пользователя
        /// </param>
        /// <param name="order">Порядок, в котором нужно вернуть список друзей</param>
        /// <param name="listId">Идентификатор списка друзей, друзей из которого необходимо получить</param>
        /// <param name="count">Количество друзей, которое нужно вернуть</param>
        /// <param name="offset">Смещение, необходимое для выборки определенного подмножества друзей</param>
        /// <param name="nameCase">Падеж для склонения имени и фамилии пользователя</param>
        /// <param name="token">Токен для отмены выполнения запроса</param>
        /// <returns>Список друзей</returns>
        public static async Task <VKList <VKFriend> > GetExtendedAsync(
            IEnumerable <FieldsEnum> fields,
            Int64?userId            = null,
            OrderEnum?order         = null,
            Int64?listId            = null,
            Int32?count             = null,
            Int32?offset            = null,
            NameCaseEnum?nameCase   = null,
            CancellationToken?token = null
            )
        {
            VKParams param    = parseParamsForGet(fields, userId, order, listId, count, offset, nameCase);
            string   response = await VKSession.Instance.DoRequestAsync("friends.get", param);

            JObject obj = JObject.Parse(response);

            if (obj["response"] == null)
            {
                return(null);
            }
            var objArr = await JsonConvert.DeserializeObjectAsync <VKList <VKFriend> >(obj["response"].ToString());

            if (token.HasValue)
            {
                token.Value.ThrowIfCancellationRequested();
            }

            return(objArr);
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UserDetailsQuery" /> class.
        /// </summary>


        /// <param name="Interval">Specifies the date and time range of data being queried. Conversations MUST have started within this time range to potentially be included within the result set. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss.</param>



        /// <param name="UserFilters">Filters that target the users to retrieve data for.</param>



        /// <param name="PresenceFilters">Filters that target system and organization presence-level data.</param>



        /// <param name="RoutingStatusFilters">Filters that target agent routing status-level data.</param>



        /// <param name="PresenceAggregations">Include faceted search and aggregate roll-ups of presence data in your search results. This does not function as a filter, but rather, summary data about the presence results matching your filters.</param>



        /// <param name="RoutingStatusAggregations">Include faceted search and aggregate roll-ups of agent routing status data in your search results. This does not function as a filter, but rather, summary data about the agent routing status results matching your filters.</param>



        /// <param name="Paging">Page size and number to control iterating through large result sets. Default page size is 25.</param>



        /// <param name="Order">Sort the result set in ascending/descending order. Default is ascending.</param>


        public UserDetailsQuery(string Interval = null, List <AnalyticsQueryFilter> UserFilters = null, List <AnalyticsQueryFilter> PresenceFilters = null, List <AnalyticsQueryFilter> RoutingStatusFilters = null, List <AnalyticsQueryAggregation> PresenceAggregations = null, List <AnalyticsQueryAggregation> RoutingStatusAggregations = null, PagingSpec Paging = null, OrderEnum?Order = null)
        {
            this.Interval = Interval;



            this.UserFilters = UserFilters;



            this.PresenceFilters = PresenceFilters;



            this.RoutingStatusFilters = RoutingStatusFilters;



            this.PresenceAggregations = PresenceAggregations;



            this.RoutingStatusAggregations = RoutingStatusAggregations;



            this.Paging = Paging;



            this.Order = Order;
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1ListRefundsRequest" /> class.
 /// </summary>
 /// <param name="Order">TThe order in which payments are listed in the response. See [SortOrder](#type-sortorder) for possible values.</param>
 /// <param name="BeginTime">The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year..</param>
 /// <param name="EndTime">The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time..</param>
 /// <param name="Limit">The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods..</param>
 /// <param name="BatchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint..</param>
 public V1ListRefundsRequest(OrderEnum?Order = default(OrderEnum?), string BeginTime = default(string), string EndTime = default(string), int?Limit = default(int?), string BatchToken = default(string))
 {
     this.Order      = Order;
     this.BeginTime  = BeginTime;
     this.EndTime    = EndTime;
     this.Limit      = Limit;
     this.BatchToken = BatchToken;
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceSpecUpdateConfig" /> class.
 /// </summary>
 /// <param name="parallelism">Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism)..</param>
 /// <param name="delay">Amount of time between updates, in nanoseconds..</param>
 /// <param name="failureAction">Action to take if an updated task fails to run, or stops running during the update..</param>
 /// <param name="monitor">Amount of time to monitor each updated task for failures, in nanoseconds..</param>
 /// <param name="maxFailureRatio">The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1..</param>
 /// <param name="order">The order of operations when rolling out an updated task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down..</param>
 public ServiceSpecUpdateConfig(long?parallelism = default(long?), long?delay = default(long?), FailureActionEnum?failureAction = default(FailureActionEnum?), long?monitor = default(long?), decimal?maxFailureRatio = default(decimal?), OrderEnum?order = default(OrderEnum?))
 {
     this.Parallelism     = parallelism;
     this.Delay           = delay;
     this.FailureAction   = failureAction;
     this.Monitor         = monitor;
     this.MaxFailureRatio = maxFailureRatio;
     this.Order           = order;
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1ListPaymentsRequest" /> class.
 /// </summary>
 /// <param name="Order">The order in which payments are listed in the response. See [SortOrder](#type-sortorder) for possible values.</param>
 /// <param name="BeginTime">The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year..</param>
 /// <param name="EndTime">The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time..</param>
 /// <param name="Limit">The maximum number of payments to return in a single response. This value cannot exceed 200..</param>
 /// <param name="BatchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint..</param>
 /// <param name="IncludePartial">Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed..</param>
 public V1ListPaymentsRequest(OrderEnum?Order = default(OrderEnum?), string BeginTime = default(string), string EndTime = default(string), int?Limit = default(int?), string BatchToken = default(string), bool?IncludePartial = default(bool?))
 {
     this.Order          = Order;
     this.BeginTime      = BeginTime;
     this.EndTime        = EndTime;
     this.Limit          = Limit;
     this.BatchToken     = BatchToken;
     this.IncludePartial = IncludePartial;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="V1ListSettlementsRequest" /> class.
 /// </summary>
 /// <param name="Order">TThe order in which payments are listed in the response. See [SortOrder](#type-sortorder) for possible values.</param>
 /// <param name="BeginTime">The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year..</param>
 /// <param name="EndTime">The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time..</param>
 /// <param name="Limit">The maximum number of payments to return in a single response. This value cannot exceed 200..</param>
 /// <param name="Status">Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED). See [V1ListSettlementsRequestStatus](#type-v1listsettlementsrequeststatus) for possible values.</param>
 /// <param name="BatchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint..</param>
 public V1ListSettlementsRequest(OrderEnum?Order = default(OrderEnum?), string BeginTime = default(string), string EndTime = default(string), int?Limit = default(int?), StatusEnum?Status = default(StatusEnum?), string BatchToken = default(string))
 {
     this.Order      = Order;
     this.BeginTime  = BeginTime;
     this.EndTime    = EndTime;
     this.Limit      = Limit;
     this.Status     = Status;
     this.BatchToken = BatchToken;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CertificateIssuerInfoListResponse" /> class.
 /// </summary>
 /// <param name="After">The entity ID to fetch after current result set..</param>
 /// <param name="Data">List of certificate issuers..</param>
 /// <param name="Limit">The number of results returned..</param>
 /// <param name="_Object">Describes the type of objects in the list..</param>
 /// <param name="Order">The order of results..</param>
 /// <param name="TotalCount">The total number or records..</param>
 public CertificateIssuerInfoListResponse(string After = default(string), List <CertificateIssuerInfo> Data = default(List <CertificateIssuerInfo>), int?Limit = default(int?), ObjectEnum?_Object = default(ObjectEnum?), OrderEnum?Order = default(OrderEnum?), int?TotalCount = default(int?))
 {
     this.After      = After;
     this.Data       = Data;
     this.Limit      = Limit;
     this._Object    = _Object;
     this.Order      = Order;
     this.TotalCount = TotalCount;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncUserDetailsQuery" /> class.
 /// </summary>
 /// <param name="Interval">Specifies the date and time range of data being queried. Conversations MUST have started within this time range to potentially be included within the result set. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss (required).</param>
 /// <param name="UserFilters">Filters that target the users to retrieve data for.</param>
 /// <param name="PresenceFilters">Filters that target system and organization presence-level data.</param>
 /// <param name="RoutingStatusFilters">Filters that target agent routing status-level data.</param>
 /// <param name="Order">Sort the result set in ascending/descending order. Default is ascending.</param>
 /// <param name="Limit">Specify number of results to be returned.</param>
 public AsyncUserDetailsQuery(string Interval = null, List <UserDetailQueryFilter> UserFilters = null, List <PresenceDetailQueryFilter> PresenceFilters = null, List <RoutingStatusDetailQueryFilter> RoutingStatusFilters = null, OrderEnum?Order = null, int?Limit = null)
 {
     this.Interval             = Interval;
     this.UserFilters          = UserFilters;
     this.PresenceFilters      = PresenceFilters;
     this.RoutingStatusFilters = RoutingStatusFilters;
     this.Order = Order;
     this.Limit = Limit;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UpdateCampaignPage" /> class.
 /// </summary>
 /// <param name="After">After.</param>
 /// <param name="Data">Data.</param>
 /// <param name="HasMore">HasMore.</param>
 /// <param name="Limit">Limit.</param>
 /// <param name="_Object">_Object.</param>
 /// <param name="Order">The order of the records to return. Acceptable values: ASC, DESC. Default: ASC.</param>
 /// <param name="TotalCount">TotalCount.</param>
 public UpdateCampaignPage(string After = default(string), List <UpdateCampaign> Data = default(List <UpdateCampaign>), bool?HasMore = default(bool?), int?Limit = default(int?), string _Object = default(string), OrderEnum?Order = default(OrderEnum?), int?TotalCount = default(int?))
 {
     this.After      = After;
     this.Data       = Data;
     this.HasMore    = HasMore;
     this.Limit      = Limit;
     this._Object    = _Object;
     this.Order      = Order;
     this.TotalCount = TotalCount;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SavedList" /> class.
 /// </summary>
 /// <param name="Id">Id.</param>
 /// <param name="Count">Count.</param>
 /// <param name="_Default">_Default.</param>
 /// <param name="Sort">Sort.</param>
 /// <param name="Order">Order.</param>
 /// <param name="Columns">Columns.</param>
 /// <param name="Label">Label.</param>
 public SavedList(string Id = default(string), int?Count = default(int?), bool?_Default = default(bool?), string Sort = default(string), OrderEnum?Order = default(OrderEnum?), string Columns = default(string), string Label = default(string))
 {
     this.Id       = Id;
     this.Count    = Count;
     this._Default = _Default;
     this.Sort     = Sort;
     this.Order    = Order;
     this.Columns  = Columns;
     this.Label    = Label;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FirmwareImagePage" /> class.
 /// </summary>
 /// <param name="After">After.</param>
 /// <param name="Data">Data.</param>
 /// <param name="HasMore">HasMore.</param>
 /// <param name="Limit">Limit.</param>
 /// <param name="_Object">_Object.</param>
 /// <param name="Order">The order of the records based on creation time, &#x60;ASC&#x60; or &#x60;DESC&#x60;; by default &#x60;ASC&#x60;..</param>
 /// <param name="TotalCount">TotalCount.</param>
 public FirmwareImagePage(string After = default(string), List <FirmwareImage> Data = default(List <FirmwareImage>), bool?HasMore = default(bool?), int?Limit = default(int?), string _Object = default(string), OrderEnum?Order = default(OrderEnum?), int?TotalCount = default(int?))
 {
     this.After      = After;
     this.Data       = Data;
     this.HasMore    = HasMore;
     this.Limit      = Limit;
     this._Object    = _Object;
     this.Order      = Order;
     this.TotalCount = TotalCount;
 }
Example #12
0
        public void TestWhere6()
        {
            var       repository = new Repository <DictInfo>(Conn);
            OrderEnum?orderEnum  = OrderEnum.optionA;
            var       rst        = repository.Where(x => x.OrderNum == orderEnum);

            Assert.AreNotEqual(0, rst.Count);
            foreach (var item in rst)
            {
                Assert.AreEqual(OrderEnum.optionA, item.OrderNum);
            }
        }
Example #13
0
        public void TestWhere8()
        {
            var       repository = new Repository <DictInfo2>(Conn);
            OrderEnum?orderEnum  = OrderEnum.optionA;
            var       rst        = repository.Where(x => x.OrderNum == orderEnum);

            Assert.NotEmpty(rst);
            foreach (var item in rst)
            {
                Assert.Equal(OrderEnum.optionA, item.OrderNum);
            }
        }
Example #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1ListEmployeesRequest" /> class.
 /// </summary>
 /// <param name="Order">The order in which employees are listed in the response, based on their created_at field.      Default value: ASC See [SortOrder](#type-sortorder) for possible values.</param>
 /// <param name="BeginUpdatedAt">If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format.</param>
 /// <param name="EndUpdatedAt">If filtering results by there updated_at field, the end of the requested reporting period, in ISO 8601 format..</param>
 /// <param name="BeginCreatedAt">If filtering results by their created_at field, the beginning of the requested reporting period, in ISO 8601 format..</param>
 /// <param name="EndCreatedAt">If filtering results by their created_at field, the end of the requested reporting period, in ISO 8601 format..</param>
 /// <param name="Status">If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE). See [V1ListEmployeesRequestStatus](#type-v1listemployeesrequeststatus) for possible values.</param>
 /// <param name="ExternalId">If provided, the endpoint returns only employee entities with the specified external_id..</param>
 /// <param name="Limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200..</param>
 /// <param name="BatchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint..</param>
 public V1ListEmployeesRequest(OrderEnum?Order = default(OrderEnum?), string BeginUpdatedAt = default(string), string EndUpdatedAt = default(string), string BeginCreatedAt = default(string), string EndCreatedAt = default(string), StatusEnum?Status = default(StatusEnum?), string ExternalId = default(string), int?Limit = default(int?), string BatchToken = default(string))
 {
     this.Order          = Order;
     this.BeginUpdatedAt = BeginUpdatedAt;
     this.EndUpdatedAt   = EndUpdatedAt;
     this.BeginCreatedAt = BeginCreatedAt;
     this.EndCreatedAt   = EndCreatedAt;
     this.Status         = Status;
     this.ExternalId     = ExternalId;
     this.Limit          = Limit;
     this.BatchToken     = BatchToken;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="V1ListTimecardsRequest" /> class.
 /// </summary>
 /// <param name="Order">The order in which timecards are listed in the response, based on their created_at field. See [SortOrder](#type-sortorder) for possible values.</param>
 /// <param name="EmployeeId">If provided, the endpoint returns only timecards for the employee with the specified ID..</param>
 /// <param name="BeginClockinTime">If filtering results by their clockin_time field, the beginning of the requested reporting period, in ISO 8601 format..</param>
 /// <param name="EndClockinTime">If filtering results by their clockin_time field, the end of the requested reporting period, in ISO 8601 format..</param>
 /// <param name="BeginClockoutTime">If filtering results by their clockout_time field, the beginning of the requested reporting period, in ISO 8601 format..</param>
 /// <param name="EndClockoutTime">If filtering results by their clockout_time field, the end of the requested reporting period, in ISO 8601 format..</param>
 /// <param name="BeginUpdatedAt">If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format..</param>
 /// <param name="EndUpdatedAt">If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format..</param>
 /// <param name="Deleted">If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don&#39;t provide this parameter, both valid and deleted timecards are returned..</param>
 /// <param name="Limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200..</param>
 /// <param name="BatchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint..</param>
 public V1ListTimecardsRequest(OrderEnum?Order = default(OrderEnum?), string EmployeeId = default(string), string BeginClockinTime = default(string), string EndClockinTime = default(string), string BeginClockoutTime = default(string), string EndClockoutTime = default(string), string BeginUpdatedAt = default(string), string EndUpdatedAt = default(string), bool?Deleted = default(bool?), int?Limit = default(int?), string BatchToken = default(string))
 {
     this.Order             = Order;
     this.EmployeeId        = EmployeeId;
     this.BeginClockinTime  = BeginClockinTime;
     this.EndClockinTime    = EndClockinTime;
     this.BeginClockoutTime = BeginClockoutTime;
     this.EndClockoutTime   = EndClockoutTime;
     this.BeginUpdatedAt    = BeginUpdatedAt;
     this.EndUpdatedAt      = EndUpdatedAt;
     this.Deleted           = Deleted;
     this.Limit             = Limit;
     this.BatchToken        = BatchToken;
 }
Example #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TrustedCertificateInternalRespList" /> class.
 /// </summary>
 /// <param name="After">The entity ID to fetch after the given one..</param>
 /// <param name="Data">A list of entities. (required).</param>
 /// <param name="HasMore">Flag indicating whether there is more results. (required).</param>
 /// <param name="Limit">The number of results to return, (range: 2-1000), or equals to &#x60;total_count&#x60; (required).</param>
 /// <param name="_Object">Entity name: always &#39;list&#39; (required).</param>
 /// <param name="Order">The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC..</param>
 /// <param name="TotalCount">The total number or records, if requested. It might be returned also for small lists. (required).</param>
 public TrustedCertificateInternalRespList(string After = default(string), List <TrustedCertificateInternalResp> Data = default(List <TrustedCertificateInternalResp>), bool?HasMore = default(bool?), int?Limit = default(int?), ObjectEnum?_Object = default(ObjectEnum?), OrderEnum?Order = default(OrderEnum?), int?TotalCount = default(int?))
 {
     // to ensure "Data" is required (not null)
     if (Data == null)
     {
         throw new InvalidDataException("Data is a required property for TrustedCertificateInternalRespList and cannot be null");
     }
     else
     {
         this.Data = Data;
     }
     // to ensure "HasMore" is required (not null)
     if (HasMore == null)
     {
         throw new InvalidDataException("HasMore is a required property for TrustedCertificateInternalRespList and cannot be null");
     }
     else
     {
         this.HasMore = HasMore;
     }
     // to ensure "Limit" is required (not null)
     if (Limit == null)
     {
         throw new InvalidDataException("Limit is a required property for TrustedCertificateInternalRespList and cannot be null");
     }
     else
     {
         this.Limit = Limit;
     }
     // to ensure "_Object" is required (not null)
     if (_Object == null)
     {
         throw new InvalidDataException("_Object is a required property for TrustedCertificateInternalRespList and cannot be null");
     }
     else
     {
         this._Object = _Object;
     }
     // to ensure "TotalCount" is required (not null)
     if (TotalCount == null)
     {
         throw new InvalidDataException("TotalCount is a required property for TrustedCertificateInternalRespList and cannot be null");
     }
     else
     {
         this.TotalCount = TotalCount;
     }
     this.After = After;
     this.Order = Order;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ListEnvelope" /> class.
 /// </summary>
 /// <param name="Total">Total.</param>
 /// <param name="Page">Page.</param>
 /// <param name="Pages">Pages.</param>
 /// <param name="PerPage">PerPage.</param>
 /// <param name="Columns">Columns.</param>
 /// <param name="AvailableColumns">AvailableColumns.</param>
 /// <param name="List">List.</param>
 /// <param name="View">View.</param>
 /// <param name="Sort">Sort.</param>
 /// <param name="Order">Order.</param>
 /// <param name="Timings">Timings.</param>
 public ListEnvelope(int?Total = default(int?), int?Page = default(int?), int?Pages = default(int?), int?PerPage = default(int?), string Columns = default(string), List <AvailableColumn> AvailableColumns = default(List <AvailableColumn>), string List = default(string), ViewEnum?View = default(ViewEnum?), string Sort = default(string), OrderEnum?Order = default(OrderEnum?), List <ListEnvelopeTimings> Timings = default(List <ListEnvelopeTimings>))
 {
     this.Total            = Total;
     this.Page             = Page;
     this.Pages            = Pages;
     this.PerPage          = PerPage;
     this.Columns          = Columns;
     this.AvailableColumns = AvailableColumns;
     this.List             = List;
     this.View             = View;
     this.Sort             = Sort;
     this.Order            = Order;
     this.Timings          = Timings;
 }
Example #18
0
        private static VKParams parseParamsForGet(
            IEnumerable <FieldsEnum> fields,
            Int64?userId,
            OrderEnum?order,
            Int64?listId,
            Int32?count,
            Int32?offset,
            NameCaseEnum?nameCase
            )
        {
            VKParams param = new VKParams();

            if (fields != null)
            {
                param.Add("fields", String.Join(",", fields));
            }
            if (userId.HasValue)
            {
                param.Add("user_id", userId.Value);
            }
            if (order.HasValue)
            {
                param.Add("order", order.Value);
            }
            if (listId.HasValue)
            {
                param.Add("list_id", listId.Value);
            }
            if (count.HasValue)
            {
                param.Add("count", count.Value);
            }
            if (offset.HasValue)
            {
                param.Add("offset", offset.Value);
            }
            if (nameCase.HasValue)
            {
                param.Add("name_case", nameCase.Value);
            }

            return(param);
        }
Example #19
0
        /// <summary>
        ///     Возвращает расширенную информацию о друзьях пользователя
        /// </summary>
        /// <param name="fields">Cписок дополнительных полей, которые необходимо вернуть</param>
        /// <param name="userId">
        ///     Идентификатор пользователя, для которого необходимо получить список друзей. Если параметр не
        ///     задан, то считается, что он равен идентификатору текущего пользователя
        /// </param>
        /// <param name="order">Порядок, в котором нужно вернуть список друзей</param>
        /// <param name="listId">Идентификатор списка друзей, друзей из которого необходимо получить</param>
        /// <param name="count">Количество друзей, которое нужно вернуть</param>
        /// <param name="offset">Смещение, необходимое для выборки определенного подмножества друзей</param>
        /// <param name="nameCase">Падеж для склонения имени и фамилии пользователя</param>
        /// <returns>Список друзей</returns>
        public static VKList <VKFriend> GetExtended(
            IEnumerable <FieldsEnum> fields,
            Int64?userId          = null,
            OrderEnum?order       = null,
            Int64?listId          = null,
            Int32?count           = null,
            Int32?offset          = null,
            NameCaseEnum?nameCase = null
            )
        {
            VKParams param    = parseParamsForGet(fields, userId, order, listId, count, offset, nameCase);
            string   response = VKSession.Instance.DoRequest("friends.get", param);

            JObject obj = JObject.Parse(response);

            if (obj["response"] == null)
            {
                return(null);
            }

            var objArr = JsonConvert.DeserializeObject <VKList <VKFriend> >(obj["response"].ToString());

            return(objArr);
        }
Example #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1ListCashDrawerShiftsRequest" /> class.
 /// </summary>
 /// <param name="Order">The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC See [SortOrder](#type-sortorder) for possible values.</param>
 /// <param name="BeginTime">The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days..</param>
 /// <param name="EndTime">The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time..</param>
 public V1ListCashDrawerShiftsRequest(OrderEnum?Order = default(OrderEnum?), string BeginTime = default(string), string EndTime = default(string))
 {
     this.Order     = Order;
     this.BeginTime = BeginTime;
     this.EndTime   = EndTime;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="V1ListEmployeeRolesRequest" /> class.
 /// </summary>
 /// <param name="Order">The order in which employees are listed in the response, based on their created_at field.Default value: ASC See [SortOrder](#type-sortorder) for possible values.</param>
 /// <param name="Limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200..</param>
 /// <param name="BatchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint..</param>
 public V1ListEmployeeRolesRequest(OrderEnum?Order = default(OrderEnum?), int?Limit = default(int?), string BatchToken = default(string))
 {
     this.Order      = Order;
     this.Limit      = Limit;
     this.BatchToken = BatchToken;
 }
Example #22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomerSort" /> class.
 /// </summary>
 /// <param name="Field">The field to sort the results on. It could be the total money spent at the merchant, the date of the first visit (etc). See [CustomerSortField](#type-customersortfield) for possible values. Default value: &#x60;DEFAULT&#x60;..</param>
 /// <param name="Order">Indicates the order in which results should be displayed based on the value of the sort field. String comparisons use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. See [SortOrder](#type-sortorder) for possible values. Default value: &#x60;ASC&#x60;..</param>
 public CustomerSort(FieldEnum?Field = default(FieldEnum?), OrderEnum?Order = default(OrderEnum?))
 {
     this.Field = Field;
     this.Order = Order;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConversationQuery" /> class.
 /// </summary>
 /// <param name="Interval">Specifies the date and time range of data being queried. Conversations MUST have started within this time range to potentially be included within the result set. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss.</param>
 /// <param name="ConversationFilters">Filters that target conversation-level data.</param>
 /// <param name="EvaluationFilters">Filters that target quality management evaluation-level data.</param>
 /// <param name="SegmentFilters">Filters that target individual segments within a conversation.</param>
 /// <param name="Aggregations">Include faceted search and aggregate roll-ups describing your search results. This does not function as a filter, but rather, summary data about the data matching your filters.</param>
 /// <param name="Paging">Page size and number to control iterating through large result sets. Default page size is 25.</param>
 /// <param name="Order">Sort the result set in ascending/descending order. Default is ascending.</param>
 /// <param name="OrderBy">Specify which data element within the result set to use for sorting. The options  to use as a basis for sorting the results: conversationStart, segmentStart, and segmentEnd. If not specified, the default is conversationStart.</param>
 public ConversationQuery(string Interval = null, List <AnalyticsQueryFilter> ConversationFilters = null, List <AnalyticsQueryFilter> EvaluationFilters = null, List <AnalyticsQueryFilter> SegmentFilters = null, List <AnalyticsQueryAggregation> Aggregations = null, PagingSpec Paging = null, OrderEnum?Order = null, OrderByEnum?OrderBy = null)
 {
     this.Interval            = Interval;
     this.ConversationFilters = ConversationFilters;
     this.EvaluationFilters   = EvaluationFilters;
     this.SegmentFilters      = SegmentFilters;
     this.Aggregations        = Aggregations;
     this.Paging  = Paging;
     this.Order   = Order;
     this.OrderBy = OrderBy;
 }
Example #24
0
        private static OrderEnum?GetOrderneedToBeproccessed()
        {
            Console.WriteLine("Select order to be proccessed");

            Console.WriteLine($"Press 1 for {OrderEnum.Book} order");
            Console.WriteLine($"Press 2 for {OrderEnum.LearningToSki} order");
            Console.WriteLine($"Press 3 for {OrderEnum.MemberShip} order");
            Console.WriteLine($"Press 4 for {OrderEnum.PhysicalProduct} order");
            Console.WriteLine($"Press 5 for {OrderEnum.UpgradeMemberShip} order");

            string    temp      = Console.ReadLine();
            int       input     = 0;
            OrderEnum?orderEnum = null;

            if (!int.TryParse(temp, out input))
            {
                Console.WriteLine("Invalid user input, press R to try again");
                temp = Console.ReadLine();
                if (temp.ToLower().Equals("r"))
                {
                    return(GetOrderneedToBeproccessed());
                }
                else
                {
                    return(null);
                }
            }

            if (input <= 0 && input > 5)
            {
                Console.WriteLine("Invalid user input, press R to try again");
                temp = Console.ReadLine();
                if (temp.ToLower().Equals("r"))
                {
                    return(GetOrderneedToBeproccessed());
                }
                else
                {
                    return(null);
                }
            }

            if (input == 1)
            {
                orderEnum = OrderEnum.Book;
            }
            else if (input == 2)
            {
                orderEnum = OrderEnum.LearningToSki;
            }
            else if (input == 3)
            {
                orderEnum = OrderEnum.MemberShip;
            }
            else if (input == 4)
            {
                orderEnum = OrderEnum.PhysicalProduct;
            }
            else if (input == 5)
            {
                orderEnum = OrderEnum.UpgradeMemberShip;
            }

            return(orderEnum);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncConversationQuery" /> class.
 /// </summary>
 /// <param name="ConversationFilters">Filters that target conversation-level data.</param>
 /// <param name="SegmentFilters">Filters that target individual segments within a conversation.</param>
 /// <param name="EvaluationFilters">Filters that target evaluations.</param>
 /// <param name="SurveyFilters">Filters that target surveys.</param>
 /// <param name="ResolutionFilters">Filters that target resolutions.</param>
 /// <param name="Order">Sort the result set in ascending/descending order. Default is ascending.</param>
 /// <param name="OrderBy">Specify which data element within the result set to use for sorting. The options  to use as a basis for sorting the results: conversationStart, segmentStart, and segmentEnd. If not specified, the default is conversationStart.</param>
 /// <param name="Interval">Specifies the date and time range of data being queried. Results will include all conversations that had activity during the interval. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss (required).</param>
 /// <param name="Limit">Specify number of results to be returned.</param>
 /// <param name="StartOfDayIntervalMatching">Add a filter to only include conversations that started after the beginning of the interval start date (UTC).</param>
 public AsyncConversationQuery(List <ConversationDetailQueryFilter> ConversationFilters = null, List <SegmentDetailQueryFilter> SegmentFilters = null, List <EvaluationDetailQueryFilter> EvaluationFilters = null, List <SurveyDetailQueryFilter> SurveyFilters = null, List <ResolutionDetailQueryFilter> ResolutionFilters = null, OrderEnum?Order = null, OrderByEnum?OrderBy = null, string Interval = null, int?Limit = null, bool?StartOfDayIntervalMatching = null)
 {
     this.ConversationFilters = ConversationFilters;
     this.SegmentFilters      = SegmentFilters;
     this.EvaluationFilters   = EvaluationFilters;
     this.SurveyFilters       = SurveyFilters;
     this.ResolutionFilters   = ResolutionFilters;
     this.Order    = Order;
     this.OrderBy  = OrderBy;
     this.Interval = Interval;
     this.Limit    = Limit;
     this.StartOfDayIntervalMatching = StartOfDayIntervalMatching;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EnrollmentIdentities" /> class.
 /// </summary>
 /// <param name="After">ID (required).</param>
 /// <param name="Data">Data (required).</param>
 /// <param name="HasMore">HasMore (required).</param>
 /// <param name="Limit">Range 2-1000, or default. (required).</param>
 /// <param name="_Object">_Object (required).</param>
 /// <param name="Order">Order (required) (default to OrderEnum.ASC).</param>
 /// <param name="TotalCount">TotalCount (required).</param>
 public EnrollmentIdentities(string After = default(string), List <EnrollmentIdentity> Data = default(List <EnrollmentIdentity>), bool?HasMore = default(bool?), int?Limit = default(int?), ObjectEnum?_Object = default(ObjectEnum?), OrderEnum?Order = OrderEnum.ASC, int?TotalCount = default(int?))
 {
     // to ensure "After" is required (not null)
     if (After == null)
     {
         throw new InvalidDataException("After is a required property for EnrollmentIdentities and cannot be null");
     }
     else
     {
         this.After = After;
     }
     // to ensure "Data" is required (not null)
     if (Data == null)
     {
         throw new InvalidDataException("Data is a required property for EnrollmentIdentities and cannot be null");
     }
     else
     {
         this.Data = Data;
     }
     // to ensure "HasMore" is required (not null)
     if (HasMore == null)
     {
         throw new InvalidDataException("HasMore is a required property for EnrollmentIdentities and cannot be null");
     }
     else
     {
         this.HasMore = HasMore;
     }
     // to ensure "Limit" is required (not null)
     if (Limit == null)
     {
         throw new InvalidDataException("Limit is a required property for EnrollmentIdentities and cannot be null");
     }
     else
     {
         this.Limit = Limit;
     }
     // to ensure "_Object" is required (not null)
     if (_Object == null)
     {
         throw new InvalidDataException("_Object is a required property for EnrollmentIdentities and cannot be null");
     }
     else
     {
         this._Object = _Object;
     }
     // to ensure "Order" is required (not null)
     if (Order == null)
     {
         throw new InvalidDataException("Order is a required property for EnrollmentIdentities and cannot be null");
     }
     else
     {
         this.Order = Order;
     }
     // to ensure "TotalCount" is required (not null)
     if (TotalCount == null)
     {
         throw new InvalidDataException("TotalCount is a required property for EnrollmentIdentities and cannot be null");
     }
     else
     {
         this.TotalCount = TotalCount;
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ShiftSort" /> class.
 /// </summary>
 /// <param name="Field">The field to sort on. See [ShiftSortField](#type-shiftsortfield) for possible values.</param>
 /// <param name="Order">The order in which results are returned. Defaults to DESC. See [SortOrder](#type-sortorder) for possible values.</param>
 public ShiftSort(FieldEnum?Field = default(FieldEnum?), OrderEnum?Order = default(OrderEnum?))
 {
     this.Field = Field;
     this.Order = Order;
 }
Example #28
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Sorting" /> class.
 /// </summary>
 /// <param name="Column">Column.</param>
 /// <param name="Order">Order.</param>
 public Sorting(string Column = null, OrderEnum?Order = null)
 {
     this.Column = Column;
     this.Order  = Order;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConversationQuery" /> class.
 /// </summary>
 /// <param name="Interval">Specifies the date and time range of data being queried. Results will include conversations that both started on a day touched by the interval AND either started, ended, or any activity during the interval. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss.</param>
 /// <param name="ConversationFilters">Filters that target conversation-level data.</param>
 /// <param name="SegmentFilters">Filters that target individual segments within a conversation.</param>
 /// <param name="EvaluationFilters">Filters that target evaluations.</param>
 /// <param name="MediaEndpointStatFilters">Filters that target mediaEndpointStats.</param>
 /// <param name="SurveyFilters">Filters that target surveys.</param>
 /// <param name="Order">Sort the result set in ascending/descending order. Default is ascending.</param>
 /// <param name="OrderBy">Specify which data element within the result set to use for sorting. The options  to use as a basis for sorting the results: conversationStart, segmentStart, and segmentEnd. If not specified, the default is conversationStart.</param>
 /// <param name="Aggregations">Include faceted search and aggregate roll-ups describing your search results. This does not function as a filter, but rather, summary data about the data matching your filters.</param>
 /// <param name="Paging">Page size and number to control iterating through large result sets. Default page size is 25.</param>
 public ConversationQuery(string Interval = null, List <ConversationDetailQueryFilter> ConversationFilters = null, List <SegmentDetailQueryFilter> SegmentFilters = null, List <EvaluationDetailQueryFilter> EvaluationFilters = null, List <MediaEndpointStatDetailQueryFilter> MediaEndpointStatFilters = null, List <SurveyDetailQueryFilter> SurveyFilters = null, OrderEnum?Order = null, OrderByEnum?OrderBy = null, List <AnalyticsQueryAggregation> Aggregations = null, PagingSpec Paging = null)
 {
     this.Interval                 = Interval;
     this.ConversationFilters      = ConversationFilters;
     this.SegmentFilters           = SegmentFilters;
     this.EvaluationFilters        = EvaluationFilters;
     this.MediaEndpointStatFilters = MediaEndpointStatFilters;
     this.SurveyFilters            = SurveyFilters;
     this.Order        = Order;
     this.OrderBy      = OrderBy;
     this.Aggregations = Aggregations;
     this.Paging       = Paging;
 }