public AmazonGeneralReportWorkItem(AccountEnum account, string reportTypeToGet, string reportName, string amzPassedInReportId = null)
 {
     Account = account;
     _reportTypeToGet = reportTypeToGet;
     _reportName = reportName;
     _amzPassedInReportId = amzPassedInReportId;
 }
Example #2
0
 public static bool IsIncome(this HtmlHelper helper, AccountEnum kind)
 {
     if (kind == AccountEnum.支出)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
Example #3
0
        public static string ToAttribute(this AccountEnum value)
        {
            switch (value)
            {
            case AccountEnum.USER_LOGON_NAME:
                return("userPrincipalName");

            case AccountEnum.PRE_WINDOWS_2000_LOGON_NAME:
                return("sAMAccountName");

            case AccountEnum.ACCOUNT_DISABLED:
                return("AccountDisabled");

            case AccountEnum.LOGON_HOURS:
                return("logonHours");

            case AccountEnum.LOGON_ON_TO:
                return("userWorkstations");

            case AccountEnum.USER_MUST_CHANGE_PASSWORD_AT_NEXT_LOGON:
                return("pwdLastSet");

            case AccountEnum.USER_CANNOT_CHANGE_PASSWORD:
                return("userAccountControl");

            case AccountEnum.PASSWORD_NEVER_EXPIRES:
                return("userAccountControl");

            case AccountEnum.STORE_PASSWORD_USING_REVERSIBLE_ENCRYPTION:
                return("userAccountControl");

            case AccountEnum.ACCOUNT_EXPIRES_END_OF_DATE:
                return("AccountExpirationdate");

            default:
                throw new ArgumentException($"Invalid Enum:{value.ToString()}");
            }
        }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="User" /> class.
 /// </summary>
 /// <param name="account">The user&#39;s account type:  Option descriptions:  * &#x60;basic&#x60; - The user has a Vimeo Basic subscription.  * &#x60;business&#x60; - The user has a Vimeo Business subscription.  * &#x60;live_business&#x60; - The user has a Vimeo Business Live subscription.  * &#x60;live_premium&#x60; - The user has a Vimeo Premium subscription.  * &#x60;live_pro&#x60; - The user has a Vimeo PRO Live subscription.  * &#x60;plus&#x60; - The user has a Vimeo Plus subscription.  * &#x60;pro&#x60; - The user has a Vimeo Pro subscription.  * &#x60;pro_unlimited&#x60; - The user has a Vimeo PRO Unlimited subscription.  * &#x60;producer&#x60; - The user has a Vimeo Producer subscription.  (required).</param>
 /// <param name="availableForHire">Whether the user is available for hire. (required).</param>
 /// <param name="bio">The user&#39;s long bio text. (required).</param>
 /// <param name="canWorkRemotely">Whether the user can work remotely. (required).</param>
 /// <param name="contentFilter">The authenticated user&#39;s content filters.  Option descriptions:  * &#x60;drugs&#x60; - Drugs or alcohol use.  * &#x60;language&#x60; - Profanity or sexually suggestive content.  * &#x60;nudity&#x60; - Nudity.  * &#x60;safe&#x60; - Suitable for all audiences.  * &#x60;unrated&#x60; - No rating.  * &#x60;violence&#x60; - Violent or graphic content. .</param>
 /// <param name="createdTime">The time in ISO 8601 format when the user account was created. (required).</param>
 /// <param name="gender">The authenticated user&#39;s gender (required).</param>
 /// <param name="link">The absolute URL of the authenticated users&#39;s profile page. (required).</param>
 /// <param name="location">The authenticated user&#39;s location. (required).</param>
 /// <param name="metadata">metadata (required).</param>
 /// <param name="name">The authenticated user&#39;s display name. (required).</param>
 /// <param name="pictures">The active portrait of the authenticated user. (required).</param>
 /// <param name="preferences">preferences.</param>
 /// <param name="resourceKey">The authenticated user&#39;s resource key string. (required).</param>
 /// <param name="shortBio">The user&#39;s short bio text. (required).</param>
 /// <param name="skills">A list of the user&#39;s skills. (required).</param>
 /// <param name="uploadQuota">uploadQuota (required).</param>
 /// <param name="uri">The authenticated user&#39;s canonical relative URI. (required).</param>
 /// <param name="websites">The authenticated user&#39;s websites. (required).</param>
 public User(AccountEnum account = default(AccountEnum), bool availableForHire = default(bool), string bio = default(string), bool canWorkRemotely = default(bool), List <ContentFilterEnum> contentFilter = default(List <ContentFilterEnum>), string createdTime = default(string), string gender = default(string), string link = default(string), string location = default(string), UserMetadata metadata = default(UserMetadata), string name = default(string), Picture pictures = default(Picture), UserPreferences preferences = default(UserPreferences), string resourceKey = default(string), string shortBio = default(string), List <Skill> skills = default(List <Skill>), UserUploadQuota uploadQuota = default(UserUploadQuota), string uri = default(string), List <UserWebsites> websites = default(List <UserWebsites>))
 {
     this.Account          = account;
     this.AvailableForHire = availableForHire;
     // to ensure "bio" is required (not null)
     this.Bio             = bio ?? throw new ArgumentNullException("bio is a required property for User and cannot be null");
     this.CanWorkRemotely = canWorkRemotely;
     // to ensure "createdTime" is required (not null)
     this.CreatedTime = createdTime ?? throw new ArgumentNullException("createdTime is a required property for User and cannot be null");
     // to ensure "gender" is required (not null)
     this.Gender = gender ?? throw new ArgumentNullException("gender is a required property for User and cannot be null");
     // to ensure "link" is required (not null)
     this.Link = link ?? throw new ArgumentNullException("link is a required property for User and cannot be null");
     // to ensure "location" is required (not null)
     this.Location = location ?? throw new ArgumentNullException("location is a required property for User and cannot be null");
     // to ensure "metadata" is required (not null)
     this.Metadata = metadata ?? throw new ArgumentNullException("metadata is a required property for User and cannot be null");
     // to ensure "name" is required (not null)
     this.Name = name ?? throw new ArgumentNullException("name is a required property for User and cannot be null");
     // to ensure "pictures" is required (not null)
     this.Pictures = pictures ?? throw new ArgumentNullException("pictures is a required property for User and cannot be null");
     // to ensure "resourceKey" is required (not null)
     this.ResourceKey = resourceKey ?? throw new ArgumentNullException("resourceKey is a required property for User and cannot be null");
     // to ensure "shortBio" is required (not null)
     this.ShortBio = shortBio ?? throw new ArgumentNullException("shortBio is a required property for User and cannot be null");
     // to ensure "skills" is required (not null)
     this.Skills = skills ?? throw new ArgumentNullException("skills is a required property for User and cannot be null");
     // to ensure "uploadQuota" is required (not null)
     this.UploadQuota = uploadQuota ?? throw new ArgumentNullException("uploadQuota is a required property for User and cannot be null");
     // to ensure "uri" is required (not null)
     this.Uri = uri ?? throw new ArgumentNullException("uri is a required property for User and cannot be null");
     // to ensure "websites" is required (not null)
     this.Websites      = websites ?? throw new ArgumentNullException("websites is a required property for User and cannot be null");
     this.ContentFilter = contentFilter;
     this.Preferences   = preferences;
 }
Example #5
0
 public AccountModel(double balance, AccountEnum accountType)
 {
     ID          = Guid.NewGuid();
     Balance     = balance;
     AccountType = accountType;
 }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SpotPricePutOrder" /> class.
 /// </summary>
 /// <param name="type">Order type, default to &#x60;limit&#x60; (default to &quot;limit&quot;).</param>
 /// <param name="side">Order side  - buy: buy side - sell: sell side (required).</param>
 /// <param name="price">Order price (required).</param>
 /// <param name="amount">Order amount (required).</param>
 /// <param name="account">Trading type  - normal: spot trading - margin: margin trading (required).</param>
 /// <param name="timeInForce">time_in_force  - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only .</param>
 public SpotPricePutOrder(string type = "limit", SideEnum side = default(SideEnum), string price = default(string), string amount = default(string), AccountEnum account = default(AccountEnum), TimeInForceEnum?timeInForce = default(TimeInForceEnum?))
 {
     this.Side = side;
     // to ensure "price" is required (not null)
     this.Price = price ?? throw new ArgumentNullException("price", "price is a required property for SpotPricePutOrder and cannot be null");
     // to ensure "amount" is required (not null)
     this.Amount  = amount ?? throw new ArgumentNullException("amount", "amount is a required property for SpotPricePutOrder and cannot be null");
     this.Account = account;
     // use default value if no "type" provided
     this.Type        = type ?? "limit";
     this.TimeInForce = timeInForce;
 }
        internal static string getAttribute(this LdapEntry entry, AccountEnum value)
        {
            var attr = value.ToAttribute();

            return(entry.getAttribute(attr)?.ToString());
        }
 /// <summary>
 /// Reload all configuration according to specified environment and private-label
 /// </summary>
 /// <param name="environment"></param>
 /// <param name="accountType"></param>
 public void ReloadAllConfiguration(Environment environment, AccountEnum accountType)
 {
     this.ReloadAllConfiguration(environment.ToString(), accountType.ToString());
 }
 /// <summary>
 /// Switch to another private label under the current environment
 /// </summary>
 /// <param name="accountType"></param>
 public void ReloadAccount(AccountEnum accountType)
 {
     this.LoadAccountConfiguration(accountType.ToString());
 }