public static RecurlyLineItem[] GetCredits(string accountCode) { RecurlyLineItemList creditList = new RecurlyLineItemList(); HttpStatusCode statusCode = RecurlyClient.PerformRequest(RecurlyClient.HttpRequestMethod.Get, RecurlyCredit.CreditsUrl(accountCode), new RecurlyClient.ReadXmlDelegate(creditList.ReadXml)); if (statusCode == HttpStatusCode.NotFound) { return(null); } return(creditList.ToArray()); }
public static RecurlyCredit CreditAccount(string accountCode, int amountInCents, string description) { RecurlyCredit credit = new RecurlyCredit(); credit.AmountInCents = amountInCents; credit.StartDate = DateTime.UtcNow; credit.Description = description; /* HttpStatusCode statusCode = */ RecurlyClient.PerformRequest(RecurlyClient.HttpRequestMethod.Post, CreditsUrl(accountCode), new RecurlyClient.WriteXmlDelegate(credit.WriteXml), null); return credit; }
public static RecurlyCredit CreditAccount(string accountCode, int amountInCents, int quantity, string description) { RecurlyCredit credit = new RecurlyCredit(); credit.AmountInCents = amountInCents; credit.Quantity = quantity; credit.StartDate = DateTime.UtcNow; credit.Description = description; /* HttpStatusCode statusCode = */ RecurlyClient.PerformRequest(RecurlyClient.HttpRequestMethod.Post, CreditsUrl(accountCode), new RecurlyClient.WriteXmlDelegate(credit.WriteXml), null); return(credit); }
public bool Equals(RecurlyCredit credit) { return this.Id == credit.Id; }
public bool Equals(RecurlyCredit credit) { return(this.Id == credit.Id); }