Siftsciex v0.3.1 Siftsciex.Event.Payload.CreditPoint View Source
Represents a Credit Point in Sift Science.
Link to this section Summary
Functions
Creates a new Siftsciex.Event.Payload.CreditPoint.t/0
struct for us in an Event payload
Link to this section Types
Link to this type
t()
View Source
t() :: %Siftsciex.Event.Payload.CreditPoint{ "$amount": Siftsciex.Event.Payload.payload_int(), "$credit_point_type": Siftsciex.Event.Payload.payload_string() }
Link to this section Functions
Link to this function
new(credit_data)
View Source
new(data()) :: Siftsciex.Event.Payload.CreditPoint.t()
Creates a new Siftsciex.Event.Payload.CreditPoint.t/0
struct for us in an Event payload.
Parameters
credit_data
: The particulars of the credit in question, there are two required attributes:amount
- The amount or value of the credit:credit_point_type
- What the credit represents, this typically isn’t real money but maybe something like points…
Examples
iex> CreditPoint.new(%{amount: 30, credit_point_type: "Points"})
%CreditPoint{"$amount": 30, "$credit_point_type": "Points"}