transferto

package
v0.41.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2019 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL