Skip to content

Instantly share code, notes, and snippets.

@Mozu-CS
Created March 23, 2016 19:29
Show Gist options
  • Save Mozu-CS/a8c6c0aeff291573fe0c to your computer and use it in GitHub Desktop.
Save Mozu-CS/a8c6c0aeff291573fe0c to your computer and use it in GitHub Desktop.
StoreCredit Debit Example
[TestMethod]
public void StoreCredit_Transaction()
{
var transactionResource = new Mozu.Api.Resources.Commerce.Customer.Credits.CreditTransactionResource(_apiContext);
var newTransaction = new Mozu.Api.Contracts.Customer.Credit.CreditTransaction()
{
Comments = "Add any comments you might have...",
//For a Debit, this must be set as a negative number.
ImpactAmount = -5.00m,
TransactionType = "Debit"
};
var result = transactionResource.AddTransactionAsync(newTransaction, "e8f9b3addbc045b3").Result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment