test australia payid over api

This commit is contained in:
woodser 2024-06-04 11:55:38 -04:00
parent 02e21c4e91
commit 3da57580fe
4 changed files with 48 additions and 7 deletions

View File

@ -4169,6 +4169,9 @@ export class AustraliaPayidPayload extends jspb.Message {
getPayid(): string;
setPayid(value: string): AustraliaPayidPayload;
getExtraInfo(): string;
setExtraInfo(value: string): AustraliaPayidPayload;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AustraliaPayidPayload.AsObject;
static toObject(includeInstance: boolean, msg: AustraliaPayidPayload): AustraliaPayidPayload.AsObject;
@ -4181,6 +4184,7 @@ export namespace AustraliaPayidPayload {
export type AsObject = {
bankAccountName: string,
payid: string,
extraInfo: string,
}
}
@ -7664,6 +7668,7 @@ export namespace PaymentAccountForm {
PAXUM = 12,
PAY_BY_MAIL = 13,
CASH_AT_ATM = 14,
AUSTRALIA_PAYID = 15,
}
}

View File

@ -35808,7 +35808,8 @@ proto.io.haveno.protobuffer.AustraliaPayidPayload.prototype.toObject = function(
proto.io.haveno.protobuffer.AustraliaPayidPayload.toObject = function(includeInstance, msg) {
var f, obj = {
bankAccountName: jspb.Message.getFieldWithDefault(msg, 1, ""),
payid: jspb.Message.getFieldWithDefault(msg, 2, "")
payid: jspb.Message.getFieldWithDefault(msg, 2, ""),
extraInfo: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
@ -35853,6 +35854,10 @@ proto.io.haveno.protobuffer.AustraliaPayidPayload.deserializeBinaryFromReader =
var value = /** @type {string} */ (reader.readString());
msg.setPayid(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setExtraInfo(value);
break;
default:
reader.skipField();
break;
@ -35896,6 +35901,13 @@ proto.io.haveno.protobuffer.AustraliaPayidPayload.serializeBinaryToWriter = func
f
);
}
f = message.getExtraInfo();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
@ -35935,6 +35947,24 @@ proto.io.haveno.protobuffer.AustraliaPayidPayload.prototype.setPayid = function(
};
/**
* optional string extra_info = 3;
* @return {string}
*/
proto.io.haveno.protobuffer.AustraliaPayidPayload.prototype.getExtraInfo = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.io.haveno.protobuffer.AustraliaPayidPayload} returns this
*/
proto.io.haveno.protobuffer.AustraliaPayidPayload.prototype.setExtraInfo = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* List of repeated fields within this message type.
@ -61478,7 +61508,8 @@ proto.io.haveno.protobuffer.PaymentAccountForm.FormId = {
UPHOLD: 11,
PAXUM: 12,
PAY_BY_MAIL: 13,
CASH_AT_ATM: 14
CASH_AT_ATM: 14,
AUSTRALIA_PAYID: 15
};
/**

File diff suppressed because one or more lines are too long

View File

@ -3923,7 +3923,7 @@ function getValidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountForm
case PaymentAccountFormField.FieldId.ANSWER:
throw new Error("Not implemented");
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_NAME:
throw new Error("Not implemented");
return "John Doe";
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_NUMBER:
throw new Error("Not implemented");
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_TYPE:
@ -3995,7 +3995,7 @@ function getValidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountForm
case PaymentAccountFormField.FieldId.NATIONAL_ACCOUNT_ID:
throw new Error("Not implemented");
case PaymentAccountFormField.FieldId.PAYID:
throw new Error("Not implemented");
return "john.doe@example.com";
case PaymentAccountFormField.FieldId.PIX_KEY:
throw new Error("Not implemented");
case PaymentAccountFormField.FieldId.POSTAL_ADDRESS:
@ -4054,7 +4054,7 @@ function getInvalidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountFo
case PaymentAccountFormField.FieldId.ANSWER:
throw new Error("Not implemented");
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_NAME:
throw new Error("Not implemented");
return "F";
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_NUMBER:
throw new Error("Not implemented");
case PaymentAccountFormField.FieldId.BANK_ACCOUNT_TYPE:
@ -4130,7 +4130,7 @@ function getInvalidFormInput(form: PaymentAccountForm, fieldId: PaymentAccountFo
case PaymentAccountFormField.FieldId.NATIONAL_ACCOUNT_ID:
throw new Error("Not implemented");
case PaymentAccountFormField.FieldId.PAYID:
throw new Error("Not implemented");
return "A";
case PaymentAccountFormField.FieldId.PIX_KEY:
throw new Error("Not implemented");
case PaymentAccountFormField.FieldId.POSTAL_ADDRESS:
@ -4254,6 +4254,11 @@ function testPaymentAccount(account: PaymentAccount, form: PaymentAccountForm) {
expect(account.getTradeCurrenciesList().length).toEqual(1);
expect(account.getTradeCurrenciesList()[0].getCode()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue());
break;
case PaymentAccountForm.FormId.AUSTRALIA_PAYID:
expect(account.getPaymentAccountPayload()!.getAustraliaPayidPayload()!.getBankAccountName()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.BANK_ACCOUNT_NAME).getValue());
expect(account.getPaymentAccountPayload()!.getAustraliaPayidPayload()!.getPayid()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.PAYID).getValue());
expect(account.getPaymentAccountPayload()!.getAustraliaPayidPayload()!.getExtraInfo()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.EXTRA_INFO).getValue());
break;
default:
throw new Error("Unhandled payment method type: " + form.getId());
}