Siftsciex v0.3.1 API Reference

Modules

Documentation for Siftsciex

The Currency module handles the translation of price values from the client unit to the “base in micros” units Sift Science expects. Most of the logic here is governed by configuration values. Siftsciex performs all calculations relative to the base unit for the currency given. This means that the library needs to know if a value is a quantity of that base unit or some other multiple of that unit. The :currency_factors configuration value allows you to tell Siftsciex how to convert a value to the base unit for the currency being used

The Decision module defines an internal structure for the data Sift Science sends in their Webhook payload

The Event module is used for registering events with SiftScience

Functions for managing Account related events in Sift Science

Sift Science supports three types of events around the creation of a Listing, creation, updating, status changes. Updates and Status Changes are conceptually similar but Updates are specifically for changes to the data relating to a Listing while status changes can be more ephemerial and can indicate various lifecycle/visibility states

Internal representation and “constructor” for a Sift Science address

A Sift Science App type for the Event API

Represents a browser object in a Sift Event payload

Represents a Credit Point in Sift Science

A discount for a Sift Event

An image for Sift Science

An item for a Sift Event

This represents a $listing object for Sift Science

A location for a Sift Science Event

This module will construct and return a payment method struct of the specified type

A Promotion represents just that in Sift Science. Things like referrals, coupons, free trials etc are considered promotions

Module for handling a Sift Science Event response

Functions for interacting with the Sift Science Score API

Represents a Score API response

Represents a label in a Score response (Siftsciex.Score.Response.t/0) from Sift

Represents a reason for a Sift Score

Represents the scores items in a Score response (Siftsciex.Score.Response.t/0) from Sift

Payments are typically processed by Gateways, this module manages the list of “known” gateways and provides simple logic for checking if a value is a supported Gateway