C# Class Samurai.PaymentMethod

Represents payment method.
Inheritance: SamuraiBase
Show file Open project: FeeFighters/samurai-client-dotnet Class Usage Examples

Public Methods

Method Description
Create ( PaymentMethodPayload payload ) : PaymentMethod

Creates a brand new payment method with given parameters.

Find ( string paymentMethodToken ) : PaymentMethod

Fetches payment method by its token.

Redact ( ) : PaymentMethod

Redacts sensitive information from the payment method, rendering it unusable.

Retain ( ) : PaymentMethod

Retains the payment method on api.samurai.feefighters.com. Retain a payment method if it will not be used immediately.

SetAttributes ( PaymentMethodPayload payload ) : void

Update the payment method with the provided payload attributes

This method will set the attributes of this payment method. It does not persist those changes to the server.

TokenizePaymentMethod ( PaymentMethodPayload payload ) : string

Creates a brand new payment method with given parameters and returns its token.

Update ( ) : void

Uploads payment method changes onto server. Only properties that have been changed will be uploaded.

This method will be fetch original payment method by token and compare original payment method with the current payment method.

UpdateAttributes ( PaymentMethodPayload payload ) : void

Update the payment method with the provided payload attributes

This method will set the attributes of this payment method. It will also persist the new changes to the server.

Protected Methods

Method Description
Execute ( RestRequest request ) : PaymentMethod
ProcessResponseErrors ( ) : void

Method Details

Create() public static method

Creates a brand new payment method with given parameters.
public static Create ( PaymentMethodPayload payload ) : PaymentMethod
payload PaymentMethodPayload Payment Method payload, containing parameters for the new PM
return PaymentMethod

Execute() protected static method

protected static Execute ( RestRequest request ) : PaymentMethod
request RestSharp.RestRequest
return PaymentMethod

Find() public static method

Fetches payment method by its token.
public static Find ( string paymentMethodToken ) : PaymentMethod
paymentMethodToken string Payment method token.
return PaymentMethod

ProcessResponseErrors() protected method

protected ProcessResponseErrors ( ) : void
return void

Redact() public method

Redacts sensitive information from the payment method, rendering it unusable.
public Redact ( ) : PaymentMethod
return PaymentMethod

Retain() public method

Retains the payment method on api.samurai.feefighters.com. Retain a payment method if it will not be used immediately.
public Retain ( ) : PaymentMethod
return PaymentMethod

SetAttributes() public method

Update the payment method with the provided payload attributes
This method will set the attributes of this payment method. It does not persist those changes to the server.
public SetAttributes ( PaymentMethodPayload payload ) : void
payload PaymentMethodPayload
return void

TokenizePaymentMethod() public static method

Creates a brand new payment method with given parameters and returns its token.
public static TokenizePaymentMethod ( PaymentMethodPayload payload ) : string
payload PaymentMethodPayload Payment Method payload, containing parameters for the new PM
return string

Update() public method

Uploads payment method changes onto server. Only properties that have been changed will be uploaded.
This method will be fetch original payment method by token and compare original payment method with the current payment method.
public Update ( ) : void
return void

UpdateAttributes() public method

Update the payment method with the provided payload attributes
This method will set the attributes of this payment method. It will also persist the new changes to the server.
public UpdateAttributes ( PaymentMethodPayload payload ) : void
payload PaymentMethodPayload
return void