fromJson static method
Returns InitResponse
Implementation
static fromJson(Map<String, dynamic> data) {
return InitResponse(
success: data['status'] != "error",
error: data['error'].toString().toLowerCase(),
hash: data['hash'],
hasRedirect: data['browserurl'] != null,
redirectUrl: data['browserurl'] == null
? null
: Paynow.notQuotePlus(data['browserurl'].toString()),
instructions: data['instructions'],
pollUrl:
data['pollurl'] == null ? "" : Paynow.notQuotePlus(data['pollurl']),
authorizationCode: data['authorizationcode'],
authorizationExpires: data['authorizationexpires'] == null
? null
: Paynow.parseExpiration(
Paynow.notQuotePlus(data['authorizationexpires'])),
authorizationQr: data['authorizationqr'] == null
? null
: Paynow.notQuotePlus(data['authorizationqr']),
);
}