Major changes. Separating responsibilities. Orders builder, serializer.

This commit is contained in:
Vladislav Hristov
2018-06-11 11:38:32 +03:00
parent 90f51544b7
commit ff9a3a16b4
29 changed files with 986 additions and 1025 deletions

View File

@@ -3,14 +3,8 @@
const Response = require('../Response');
module.exports = class ParseResponse {
constructor(client, data) {
this.client = client;
this.data = data;
}
static go(client, data) {
// const parseRensponse = new ParseResponse(client, data);
const response = new Response(client, data);
static go(keys, data) {
const response = new Response(keys, data);
// TODO:
// raise error if any

View File

@@ -3,14 +3,8 @@
const Signer = require('../Signer');
module.exports = class XMLSign {
constructor(client, data) {
this.client = client;
this.data = data;
}
static go(client, data) {
// const xmlSigner = new XMLSign(client, data);
const signer = new Signer(client, data);
static go(keys, xml) {
const signer = new Signer(keys, xml);
signer.digest();
signer.sign();