C# Class Riskified.SDK.Orders.OrdersGateway

Main class to handle order creation and submittion to Riskified Servers
Mostrar archivo Open project: Riskified/sdk_net Class Usage Examples

Public Methods

Method Description
Cancel ( OrderCancellation orderCancellation ) : OrderNotification

Validates the cancellation data Sends a cancellation message for a specific order (id should already exist) to Riskified server for status and charge fees update

Chargeback ( OrderChargeback orderChargeback ) : OrderNotification
Checkout ( Riskified.SDK.Model.OrderCheckout orderCheckout ) : OrderNotification

Validates the Order checkout object fields (All fields except merchendOrderId are optional) Sends a new order checkout to Riskified Servers (without Submit for analysis)

CheckoutDenied ( OrderCheckoutDenied orderCheckout ) : OrderNotification

Validates the Order checkout object fields (All fields except merchendOrderId are optional) Sends a new order checkout to Riskified Servers (without Submit for analysis)

Create ( Order order ) : OrderNotification

Validates the Order object fields Sends a new order to Riskified Servers (without Submit for analysis)

Decision ( OrderDecision orderDecision ) : OrderNotification

Validates the decision data Sends a decision message for a specific order (id should already exist) to Riskified server. Update existing order external status. Lets Riskified know what was your decision on your order.

Fulfill ( Riskified.SDK.Model.OrderFulfillment orderFulfillment ) : OrderNotification

Validates the cancellation data Sends a cancellation message for a specific order (id should already exist) to Riskified server for status and charge fees update

OrdersGateway ( RiskifiedEnvironment env, string authToken, string shopDomain ) : System

Creates the mediator class used to send order data to Riskified

OrdersGateway ( RiskifiedEnvironment env, string authToken, string shopDomain, Validations validationMode ) : System

Creates the mediator class used to send order data to Riskified

OrdersGateway ( RiskifiedEnvironment env, string authToken, string shopDomain, bool shouldUseWeakValidation ) : System

Old version - Deprecated Creates the mediator class used to send order data to Riskified

PartlyRefund ( Riskified.SDK.Model.OrderPartialRefund orderPartialRefund ) : OrderNotification

Validates the partial refunds data for an order Sends the partial refund data for an order to Riskified server for status and charge fees update

SendHistoricalOrders ( IEnumerable orders, string>.Dictionary &failedOrders ) : bool

Validates the list of historical orders and sends them in batches to Riskified Servers. The FinancialStatus field of each order should contain the latest order status as described at "http://apiref.riskified.com/net/#actions-historical"

Submit ( Order order ) : OrderNotification

Validates the Order object fields Sends an order to Riskified Servers and submits it for analysis

Update ( Order order ) : OrderNotification

Validates the Order object fields Sends an updated order (already created) to Riskified Servers

Private Methods

Method Description
SendOrder ( Riskified.SDK.Model.AbstractOrder order, Uri riskifiedEndpointUrl ) : OrderNotification

Validates the Order object fields Sends the order to riskified server endpoint as configured in the ctor

SendOrderCheckout ( Riskified.SDK.Model.AbstractOrder orderCheckout, Uri riskifiedEndpointUrl ) : OrderNotification

Validates the Order object fields Sends the order to riskified server endpoint as configured in the ctor

Method Details

Cancel() public method

Validates the cancellation data Sends a cancellation message for a specific order (id should already exist) to Riskified server for status and charge fees update
On bad format of the order (missing fields data or invalid data) On errors with the transaction itself (network errors, bad response data)
public Cancel ( OrderCancellation orderCancellation ) : OrderNotification
orderCancellation Riskified.SDK.Model.OrderCancellation
return Riskified.SDK.Model.OrderNotification

Chargeback() public method

public Chargeback ( OrderChargeback orderChargeback ) : OrderNotification
orderChargeback Riskified.SDK.Model.OrderChargeback
return Riskified.SDK.Model.OrderNotification

Checkout() public method

Validates the Order checkout object fields (All fields except merchendOrderId are optional) Sends a new order checkout to Riskified Servers (without Submit for analysis)
On bad format of the order (missing fields data or invalid data) On errors with the transaction itself (network errors, bad response data)
public Checkout ( Riskified.SDK.Model.OrderCheckout orderCheckout ) : OrderNotification
orderCheckout Riskified.SDK.Model.OrderCheckout
return Riskified.SDK.Model.OrderNotification

CheckoutDenied() public method

Validates the Order checkout object fields (All fields except merchendOrderId are optional) Sends a new order checkout to Riskified Servers (without Submit for analysis)
On bad format of the order (missing fields data or invalid data) On errors with the transaction itself (network errors, bad response data)
public CheckoutDenied ( OrderCheckoutDenied orderCheckout ) : OrderNotification
orderCheckout Riskified.SDK.Model.OrderCheckoutDenied
return Riskified.SDK.Model.OrderNotification

Create() public method

Validates the Order object fields Sends a new order to Riskified Servers (without Submit for analysis)
On bad format of the order (missing fields data or invalid data) On errors with the transaction itself (network errors, bad response data)
public Create ( Order order ) : OrderNotification
order Riskified.SDK.Model.Order The Order to create
return Riskified.SDK.Model.OrderNotification

Decision() public method

Validates the decision data Sends a decision message for a specific order (id should already exist) to Riskified server. Update existing order external status. Lets Riskified know what was your decision on your order.
On bad format of the order (missing fields data or invalid data) On errors with the transaction itself (network errors, bad response data)
public Decision ( OrderDecision orderDecision ) : OrderNotification
orderDecision Riskified.SDK.Model.OrderDecision
return Riskified.SDK.Model.OrderNotification

Fulfill() public method

Validates the cancellation data Sends a cancellation message for a specific order (id should already exist) to Riskified server for status and charge fees update
On bad format of the order (missing fields data or invalid data) On errors with the transaction itself (network errors, bad response data)
public Fulfill ( Riskified.SDK.Model.OrderFulfillment orderFulfillment ) : OrderNotification
orderFulfillment Riskified.SDK.Model.OrderFulfillment
return Riskified.SDK.Model.OrderNotification

OrdersGateway() public method

Creates the mediator class used to send order data to Riskified
public OrdersGateway ( RiskifiedEnvironment env, string authToken, string shopDomain ) : System
env RiskifiedEnvironment The Riskified environment to send to
authToken string The merchant's auth token
shopDomain string The merchant's shop domain
return System

OrdersGateway() public method

Creates the mediator class used to send order data to Riskified
public OrdersGateway ( RiskifiedEnvironment env, string authToken, string shopDomain, Validations validationMode ) : System
env RiskifiedEnvironment The Riskified environment to send to
authToken string The merchant's auth token
shopDomain string The merchant's shop domain
validationMode Validations Validation mode to use
return System

OrdersGateway() public method

Old version - Deprecated Creates the mediator class used to send order data to Riskified
public OrdersGateway ( RiskifiedEnvironment env, string authToken, string shopDomain, bool shouldUseWeakValidation ) : System
env RiskifiedEnvironment The Riskified environment to send to
authToken string The merchant's auth token
shopDomain string The merchant's shop domain
shouldUseWeakValidation bool Should weakly validate before sending
return System

PartlyRefund() public method

Validates the partial refunds data for an order Sends the partial refund data for an order to Riskified server for status and charge fees update
On bad format of the order (missing fields data or invalid data) On errors with the transaction itself (network errors, bad response data)
public PartlyRefund ( Riskified.SDK.Model.OrderPartialRefund orderPartialRefund ) : OrderNotification
orderPartialRefund Riskified.SDK.Model.OrderPartialRefund
return Riskified.SDK.Model.OrderNotification

SendHistoricalOrders() public method

Validates the list of historical orders and sends them in batches to Riskified Servers. The FinancialStatus field of each order should contain the latest order status as described at "http://apiref.riskified.com/net/#actions-historical"
On bad format of an order (missing fields data or invalid data) On errors with the transaction itself (network errors, bad response data)
public SendHistoricalOrders ( IEnumerable orders, string>.Dictionary &failedOrders ) : bool
orders IEnumerable
failedOrders string>.Dictionary When the method returns false, contains a mapping from order_id (key) to error message (value), otherwise will be null
return bool

Submit() public method

Validates the Order object fields Sends an order to Riskified Servers and submits it for analysis
On bad format of the order (missing fields data or invalid data) On errors with the transaction itself (network errors, bad response data)
public Submit ( Order order ) : OrderNotification
order Riskified.SDK.Model.Order The Order to submit
return Riskified.SDK.Model.OrderNotification

Update() public method

Validates the Order object fields Sends an updated order (already created) to Riskified Servers
On bad format of the order (missing fields data or invalid data) On errors with the transaction itself (network errors, bad response data)
public Update ( Order order ) : OrderNotification
order Riskified.SDK.Model.Order The Order to update
return Riskified.SDK.Model.OrderNotification