private static int GetShareInviteId()
        {
            var currentDate    = DateTime.UtcNow.Date;
            var addTime        = new TimeSpan(TIME_UNIT_AMOUNT_ZERO, TIME_UNIT_AMOUNT_ONE, TIME_UNIT_AMOUNT_ZERO);
            var expirationTime = currentDate.Add(addTime).ToString(FORMAT_DATE);

            var draftShareInviteEntry = new DraftShareInviteEntry(new ShareDetail
            {
                Payment = new ShareDetailPayment(true, true, true, true)
            });

            return(DraftShareInviteBank.Create(expirationTime, draftShareInviteEntry).Value);
        }
        private static int GetShareInviteId()
        {
            var currentDate    = DateTime.UtcNow.Date;
            var addTime        = new TimeSpan(TimeUnitAmountZero, TimeUnitAmountOne, TimeUnitAmountZero);
            var expirationTime = currentDate.Add(addTime).ToString(FormatDate);

            var draftShareInviteEntry = new DraftShareInviteEntry(
                new ShareDetail {
                Payment = new ShareDetailPayment(true, true, true, true)
            }
                );

            return(DraftShareInviteBank.Create(expirationTime, draftShareInviteEntry).Value);
        }
Exemple #3
0
        private static int GetShareInviteId()
        {
            var currentDate    = DateTime.UtcNow.Date;
            var addTime        = new TimeSpan(TIME_UNIT_AMOUNT_ZERO, TIME_UNIT_AMOUNT_ONE, TIME_UNIT_AMOUNT_ZERO);
            var expirationTime = currentDate.Add(addTime).ToString(FORMAT_DATE);

            var draftShareInviteBankEntry = new DraftShareInviteBankEntry(new ShareDetail
            {
                Payment = new ShareDetailPayment(true, true, true, true)
            });

            var requestMap = new Dictionary <string, object>
            {
                { DraftShareInviteBank.FIELD_DRAFT_SHARE_SETTINGS, draftShareInviteBankEntry },
                { DraftShareInviteBank.FIELD_EXPIRATION, expirationTime }
            };

            return(DraftShareInviteBank.Create(API_CONTEXT, requestMap, USER_ID).Value);
        }