Documentation ¶
Index ¶
- Constants
- Variables
- type AirtimeTransferredEvent
- type TransferAirtimeAction
- func (a *TransferAirtimeAction) AllowedFlowTypes() []flows.FlowType
- func (a *TransferAirtimeAction) Execute(run flows.FlowRun, step flows.Step, logModifier flows.ModifierCallback, ...) error
- func (a *TransferAirtimeAction) Inspect(inspect func(flows.Inspectable))
- func (a *TransferAirtimeAction) Validate() error
Constants ¶
View Source
const TypeAirtimeTransfered string = "airtime_transferred"
TypeAirtimeTransfered is the type of our airtime transferred event
Variables ¶
View Source
var TypeTransferAirtime = "transfer_airtime"
TypeTransferAirtime is the type constant for our airtime action
Functions ¶
This section is empty.
Types ¶
type AirtimeTransferredEvent ¶
type AirtimeTransferredEvent struct { events.BaseEvent Currency string `json:"currency"` Amount decimal.Decimal `json:"amount"` Status string `json:"status"` }
AirtimeTransferredEvent events are created when airtime has been transferred to the contact
{ "type": "airtime_transferred", "created_on": "2006-01-02T15:04:05Z", "currency": "RWF", "amount": 100, "status": "success" }
@event airtime_transferred
func NewAirtimeTransferredEvent ¶
func NewAirtimeTransferredEvent(t *transfer) *AirtimeTransferredEvent
NewAirtimeTransferredEvent creates a new airtime transferred event
type TransferAirtimeAction ¶
type TransferAirtimeAction struct { actions.BaseAction Amounts map[string]decimal.Decimal `json:"amounts"` ResultName string `json:"result_name,omitempty"` }
TransferAirtimeAction attempts to make a TransferTo airtime transfer to the contact
func NewTransferAirtimeAction ¶ added in v0.22.0
func NewTransferAirtimeAction(uuid flows.ActionUUID, amounts map[string]decimal.Decimal, resultName string) *TransferAirtimeAction
NewTransferAirtimeAction creates a new airtime transfer action
func (*TransferAirtimeAction) AllowedFlowTypes ¶ added in v0.14.0
func (a *TransferAirtimeAction) AllowedFlowTypes() []flows.FlowType
AllowedFlowTypes returns the flow types which this action is allowed to occur in
func (*TransferAirtimeAction) Execute ¶
func (a *TransferAirtimeAction) Execute(run flows.FlowRun, step flows.Step, logModifier flows.ModifierCallback, logEvent flows.EventCallback) error
Execute runs this action
func (*TransferAirtimeAction) Inspect ¶ added in v0.29.0
func (a *TransferAirtimeAction) Inspect(inspect func(flows.Inspectable))
Inspect inspects this object and any children
func (*TransferAirtimeAction) Validate ¶
func (a *TransferAirtimeAction) Validate() error
Validate validates our action is valid
Click to show internal directories.
Click to hide internal directories.