@riocrypto/common-server 1.0.1205 → 1.0.1206

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,9 +50,7 @@ class BitsoClient {
50
50
  "Content-Type": "application/json",
51
51
  },
52
52
  data: {
53
- alias: `CLABE for ${user.type === common_1.UserType.Business
54
- ? user.companyName
55
- : user.firstName + " " + user.lastName} - ${user.id}`,
53
+ alias: `CLABE for ${(0, common_1.getUserName)(user)} - ${user.id}`,
56
54
  user_id: this.env === "production" ? "8298933" : "53166",
57
55
  currency: "mxn",
58
56
  taxonomy: {
@@ -56,9 +56,7 @@ class InvopopClient {
56
56
  customer: {
57
57
  name: user.mexicoFiscalName
58
58
  ? user.mexicoFiscalName.toLocaleUpperCase()
59
- : user.type === common_1.UserType.Business
60
- ? user.companyName.toLocaleUpperCase()
61
- : `${user.firstName.toLocaleUpperCase()} ${user.lastName.toLocaleUpperCase()}`,
59
+ : (0, common_1.getUserName)(user),
62
60
  tax_id: {
63
61
  country: "MX",
64
62
  zone: user.rfc ? user.postalCode : "66260",
@@ -38,9 +38,7 @@ class KapstarClient {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
39
  const kapstarResponse = yield this.axiosInstance.post("/transaction-service/v1/external/invoice", {
40
40
  amount,
41
- name: user.type === common_1.UserType.Business
42
- ? user.companyName
43
- : user.firstName + " " + user.lastName,
41
+ name: (0, common_1.getUserName)(user),
44
42
  tags: [orderId],
45
43
  tax_id: user.cpf,
46
44
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1205",
3
+ "version": "1.0.1206",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "@aws-sdk/client-s3": "^3.297.0",
27
27
  "@everapi/currencyapi-js": "^1.0.6",
28
28
  "@google-cloud/storage": "^6.9.5",
29
- "@riocrypto/common": "^1.0.1093",
29
+ "@riocrypto/common": "^1.0.1094",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^0.27.2",
32
32
  "ccxt": "^3.0.30",