Use in an app

import LBFraudSDKiOS
...
let ironchipLBFraud = LBFraudSDKiOS.init(apikey: "XXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
// In case you desire to target a diferent enviroment:
// let ironchipLBFraud = LBFraudSDKiOS.init(apikey: "XXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", url: "https://testing.transaction.lbfraud.ironchip.com/transaction")

//Call Ironchip Location Based Antifraud to Analyze transaction

// Host URL(can be nil): you can send the transaction to the different environments if you don't send anything nil, the request will be made to production if you don't enter one that Ironchip has provided

//TransactionID (required,unique): transaction identifier request for fraud results

//UserID (required): User identifier

//ExtraData (optional): extra information for analysis
// {
// "extra_value_1": "Example extra value 1",
// "extra_value_2": 50,
// "extra_value_3": [1,2,3]
// }

let data: [String: Any] = [
    "concept": "Book august",
    "amount": 60,
    "operation": "booking"
]

do {
    ironchipLBFraud.sendTransaction(transactionId: "random_identifier_generated", userId: "john.doe@gmail.com", extraData: data)
} catch let error as TransactionError {
    print("ERROR: message: \(error.message), code: \(error.code)")
} catch let error {
    ...
}