/// <summary> /// Initializes a new instance of the <see cref="BudgetDetails" /> class. /// </summary> /// <param name="currencyCode">currencyCode.</param> /// <param name="clientId">clientId.</param> /// <param name="frequency">frequency (default to 1).</param> /// <param name="endDate">endDate.</param> /// <param name="totalValue">totalValue.</param> /// <param name="budget">budget.</param> /// <param name="accountId">accountId.</param> /// <param name="startDate">startDate.</param> /// <param name="aggregationAccounts">aggregationAccounts.</param> /// <param name="frequencyUnit">frequencyUnit (required).</param> public BudgetDetails(string currencyCode = default(string), Guid?clientId = default(Guid?), int?frequency = 1, DateTime?endDate = default(DateTime?), float?totalValue = default(float?), List <BudgetComponent> budget = default(List <BudgetComponent>), Guid?accountId = default(Guid?), DateTime?startDate = default(DateTime?), List <BudgetAggregationAccount> aggregationAccounts = default(List <BudgetAggregationAccount>), FrequencyUnitEnum frequencyUnit = default(FrequencyUnitEnum)) { // to ensure "frequencyUnit" is required (not null) if (frequencyUnit == null) { throw new InvalidDataException("frequencyUnit is a required property for BudgetDetails and cannot be null"); } else { this.FrequencyUnit = frequencyUnit; } this.CurrencyCode = currencyCode; this.ClientId = clientId; // use default value if no "frequency" provided if (frequency == null) { this.Frequency = 1; } else { this.Frequency = frequency; } this.EndDate = endDate; this.TotalValue = totalValue; this.Budget = budget; this.AccountId = accountId; this.StartDate = startDate; this.AggregationAccounts = aggregationAccounts; }
/// <summary> /// Initializes a new instance of the <see cref="SpendingAnalysisRequest" /> class. /// </summary> /// <param name="merchantScope">merchantScope.</param> /// <param name="accountIds">accountIds.</param> /// <param name="businessIds">businessIds.</param> /// <param name="cardIds">cardIds.</param> /// <param name="showByMerchant">showByMerchant (default to false).</param> /// <param name="showByPeriod">showByPeriod (default to false).</param> /// <param name="onlyCleansed">onlyCleansed (default to false).</param> /// <param name="frequency">frequency (default to 1).</param> /// <param name="endDate">endDate.</param> /// <param name="asOfDate">asOfDate.</param> /// <param name="transactionCategoryScope">transactionCategoryScope.</param> /// <param name="startDate">startDate.</param> /// <param name="cardStatusScope">cardStatusScope.</param> /// <param name="onlyActiveClients">onlyActiveClients (default to false).</param> /// <param name="lookbackPeriods">lookbackPeriods (default to 0).</param> /// <param name="frequencyUnit">frequencyUnit (required).</param> /// <param name="householdIds">householdIds.</param> /// <param name="aggregationAccountIds">aggregationAccountIds.</param> /// <param name="currencyCode">currencyCode.</param> /// <param name="clientIds">clientIds.</param> /// <param name="scope">scope (default to ScopeEnum.All).</param> /// <param name="currencyConversion">currencyConversion.</param> /// <param name="transactionStatusScope">transactionStatusScope.</param> /// <param name="showByCategory">showByCategory (default to false).</param> public SpendingAnalysisRequest(List <Guid?> merchantScope = default(List <Guid?>), List <Guid?> accountIds = default(List <Guid?>), List <Guid?> businessIds = default(List <Guid?>), List <Guid?> cardIds = default(List <Guid?>), bool?showByMerchant = false, bool?showByPeriod = false, bool?onlyCleansed = false, int?frequency = 1, DateTime?endDate = default(DateTime?), DateTime?asOfDate = default(DateTime?), List <Guid?> transactionCategoryScope = default(List <Guid?>), DateTime?startDate = default(DateTime?), List <string> cardStatusScope = default(List <string>), bool?onlyActiveClients = false, int?lookbackPeriods = 0, FrequencyUnitEnum frequencyUnit = default(FrequencyUnitEnum), List <Guid?> householdIds = default(List <Guid?>), List <Guid?> aggregationAccountIds = default(List <Guid?>), string currencyCode = default(string), List <Guid?> clientIds = default(List <Guid?>), ScopeEnum?scope = ScopeEnum.All, string currencyConversion = default(string), List <string> transactionStatusScope = default(List <string>), bool?showByCategory = false) { // to ensure "frequencyUnit" is required (not null) if (frequencyUnit == null) { throw new InvalidDataException("frequencyUnit is a required property for SpendingAnalysisRequest and cannot be null"); } else { this.FrequencyUnit = frequencyUnit; } this.MerchantScope = merchantScope; this.AccountIds = accountIds; this.BusinessIds = businessIds; this.CardIds = cardIds; // use default value if no "showByMerchant" provided if (showByMerchant == null) { this.ShowByMerchant = false; } else { this.ShowByMerchant = showByMerchant; } // use default value if no "showByPeriod" provided if (showByPeriod == null) { this.ShowByPeriod = false; } else { this.ShowByPeriod = showByPeriod; } // use default value if no "onlyCleansed" provided if (onlyCleansed == null) { this.OnlyCleansed = false; } else { this.OnlyCleansed = onlyCleansed; } // use default value if no "frequency" provided if (frequency == null) { this.Frequency = 1; } else { this.Frequency = frequency; } this.EndDate = endDate; this.AsOfDate = asOfDate; this.TransactionCategoryScope = transactionCategoryScope; this.StartDate = startDate; this.CardStatusScope = cardStatusScope; // use default value if no "onlyActiveClients" provided if (onlyActiveClients == null) { this.OnlyActiveClients = false; } else { this.OnlyActiveClients = onlyActiveClients; } // use default value if no "lookbackPeriods" provided if (lookbackPeriods == null) { this.LookbackPeriods = 0; } else { this.LookbackPeriods = lookbackPeriods; } this.HouseholdIds = householdIds; this.AggregationAccountIds = aggregationAccountIds; this.CurrencyCode = currencyCode; this.ClientIds = clientIds; // use default value if no "scope" provided if (scope == null) { this.Scope = ScopeEnum.All; } else { this.Scope = scope; } this.CurrencyConversion = currencyConversion; this.TransactionStatusScope = transactionStatusScope; // use default value if no "showByCategory" provided if (showByCategory == null) { this.ShowByCategory = false; } else { this.ShowByCategory = showByCategory; } }