transbank-sdk
Version:
Transbank SDK for Node.js
19 lines (18 loc) • 588 B
JavaScript
import ApiConstants from '../../../common/api_constants';
import RequestBase from '../../../common/request_base';
class StartRequest extends RequestBase {
constructor(userName, email, responseUrl) {
super(`${ApiConstants.ONECLICK_ENDPOINT}/inscriptions`, 'POST');
this.userName = userName;
this.email = email;
this.responseUrl = responseUrl;
}
toJson() {
return JSON.stringify({
username: this.userName,
email: this.email,
response_url: this.responseUrl,
});
}
}
export { StartRequest };