C# Class Samurai.Transaction

Represents a transaction.
Inheritance: SamuraiBase
Exibir arquivo Open project: FeeFighters/samurai-client-dotnet

Public Methods

Method Description
Capture ( decimal amount ) : Transaction

Captures an authorization. Optionally specify an amount to do a partial capture of the initial authorization. The default is to capture the full amount of the authorization.

If amount is not specefied Capture(string=null) method will be used.

Capture ( string amount = null ) : Transaction

Captures an authorization. Optionally specify an amount to do a partial capture of the initial authorization. The default is to capture the full amount of the authorization.

Credit ( string amount = null ) : Transaction

Create a credit or refund against the original transaction. Optionally accepts an amount to credit, the default is to credit the full value of the original amount.

Execute ( RestRequest request ) : Transaction
Find ( string purchaseReferenceId ) : Transaction

Fetches a transaction.

Reverse ( string amount = null ) : Transaction

Create a credit or refund against the original transaction. Optionally accepts an amount to credit, the default is to credit the full value of the original amount.

Success ( ) : bool
Void ( ) : Transaction

Voids this transaction. If the transaction has not yet been captured and settled it can be voided to prevent any funds from transferring.

Protected Methods

Method Description
ProcessResponseErrors ( ) : void

Method Details

Capture() public method

Captures an authorization. Optionally specify an amount to do a partial capture of the initial authorization. The default is to capture the full amount of the authorization.
If amount is not specefied Capture(string=null) method will be used.
public Capture ( decimal amount ) : Transaction
amount decimal Amount of partial capture, specify only if needed.
return Transaction

Capture() public method

Captures an authorization. Optionally specify an amount to do a partial capture of the initial authorization. The default is to capture the full amount of the authorization.
public Capture ( string amount = null ) : Transaction
amount string Amount of partial capture, specify only if needed.
return Transaction

Credit() public method

Create a credit or refund against the original transaction. Optionally accepts an amount to credit, the default is to credit the full value of the original amount.
public Credit ( string amount = null ) : Transaction
amount string Amount of partial credit, specify only if needed.
return Transaction

Execute() public static method

public static Execute ( RestRequest request ) : Transaction
request RestSharp.RestRequest
return Transaction

Find() public static method

Fetches a transaction.
public static Find ( string purchaseReferenceId ) : Transaction
purchaseReferenceId string Transaction reference id.
return Transaction

ProcessResponseErrors() protected method

protected ProcessResponseErrors ( ) : void
return void

Reverse() public method

Create a credit or refund against the original transaction. Optionally accepts an amount to credit, the default is to credit the full value of the original amount.
public Reverse ( string amount = null ) : Transaction
amount string Amount of partial reverse, specify only if needed.
return Transaction

Success() public method

public Success ( ) : bool
return bool

Void() public method

Voids this transaction. If the transaction has not yet been captured and settled it can be voided to prevent any funds from transferring.
public Void ( ) : Transaction
return Transaction