wallee
Version:
TypeScript/JavaScript client for wallee
43 lines (42 loc) • 2.1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfPaymentAppChargeAttemptUpdate = instanceOfPaymentAppChargeAttemptUpdate;
exports.PaymentAppChargeAttemptUpdateFromJSON = PaymentAppChargeAttemptUpdateFromJSON;
exports.PaymentAppChargeAttemptUpdateFromJSONTyped = PaymentAppChargeAttemptUpdateFromJSONTyped;
exports.PaymentAppChargeAttemptUpdateToJSON = PaymentAppChargeAttemptUpdateToJSON;
exports.PaymentAppChargeAttemptUpdateToJSONTyped = PaymentAppChargeAttemptUpdateToJSONTyped;
const PaymentAppChargeAttemptTargetState_1 = require("./PaymentAppChargeAttemptTargetState");
/**
* Check if a given object implements the PaymentAppChargeAttemptUpdate interface.
*/
function instanceOfPaymentAppChargeAttemptUpdate(value) {
return true;
}
function PaymentAppChargeAttemptUpdateFromJSON(json) {
return PaymentAppChargeAttemptUpdateFromJSONTyped(json, false);
}
function PaymentAppChargeAttemptUpdateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'reference': json['reference'] == null ? undefined : json['reference'],
'targetState': json['targetState'] == null ? undefined : (0, PaymentAppChargeAttemptTargetState_1.PaymentAppChargeAttemptTargetStateFromJSON)(json['targetState']),
'failureReason': json['failureReason'] == null ? undefined : json['failureReason'],
'endUserFailureMessage': json['endUserFailureMessage'] == null ? undefined : json['endUserFailureMessage'],
};
}
function PaymentAppChargeAttemptUpdateToJSON(json) {
return PaymentAppChargeAttemptUpdateToJSONTyped(json, false);
}
function PaymentAppChargeAttemptUpdateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'reference': value['reference'],
'targetState': (0, PaymentAppChargeAttemptTargetState_1.PaymentAppChargeAttemptTargetStateToJSON)(value['targetState']),
'failureReason': value['failureReason'],
'endUserFailureMessage': value['endUserFailureMessage'],
};
}