private RecurlyAdjustment Adjust(int unitAmountInCents, string description, string accountingCode = null, string currency = null, int quantity = 1) { var adjustment = new RecurlyAdjustment(AccountCode, unitAmountInCents) { Description = description, Currency = string.IsNullOrWhiteSpace(currency) ? RecurlyClient.Currency : currency, Quantity = quantity, AccountingCode = accountingCode }; return adjustment.Create() ? adjustment : null; }
/// <summary> /// Lists all charges and credits issued for a given account. /// </summary> /// <param name="type">The type of adjustment to return</param> /// <param name="state">The state of the adjustments to return</param> /// <param name="pageSize">Number of records to return per page</param> /// <returns>Paged list of adjustments</returns> public RecurlyAdjustmentList ListAdjustments( RecurlyAdjustment.AdjustmentType type = RecurlyAdjustment.AdjustmentType.All, RecurlyAdjustment.AdjustmentState state = RecurlyAdjustment.AdjustmentState.Active, int pageSize = RecurlyPager.DefaultPageSize) { return RecurlyAdjustmentList.ListAccountAdjustments(AccountCode, type, state, pageSize); }