@adempiere/grpc-api
Advanced tools
Comparing version 1.7.0 to 1.7.1
@@ -93,3 +93,7 @@ /************************************************************************************* | ||
last_name: customer.getLastName(), | ||
description: customer.getDescription() | ||
description: customer.getDescription(), | ||
addresses: customer.getAddressesList() | ||
.map(address => { | ||
return pointOfSales.convertCustomerAddressFromGRPC(address) | ||
}) | ||
}; | ||
@@ -100,2 +104,39 @@ } | ||
convertCustomerAddressFromGRPC(address) { | ||
if (address) { | ||
let region | ||
let city | ||
if(address.getRegion()) { | ||
region = { | ||
id: address.getRegion().getId(), | ||
uuid: address.getRegion().getUuid(), | ||
name: address.getRegion().getName() | ||
} | ||
} | ||
if(address.getCity()) { | ||
city = { | ||
id: address.getCity().getId(), | ||
uuid: address.getCity().getUuid(), | ||
name: address.getCity().getName() | ||
} | ||
} | ||
return { | ||
id: address.getId(), | ||
uuid: address.getUuid(), | ||
region, | ||
country_code: address.getCountryCode(), | ||
address_1: address.getAddress1(), | ||
address_2: address.getAddress2(), | ||
address_3: address.getAddress3(), | ||
address_4: address.getAddress4(), | ||
phone: address.getPhone(), | ||
postal_code: address.getPostalCode(), | ||
city, | ||
is_default_shipping: address.getIsDefaultShipping(), | ||
is_default_billing: address.getIsDefaultBilling() | ||
} | ||
} | ||
return undefined; | ||
}, | ||
// Convert available warehouse from gRPC to JSON | ||
@@ -102,0 +143,0 @@ convertAvailableWarehouse(availableWarehouse) { |
{ | ||
"name": "@adempiere/grpc-api", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"description": "ADempiere Web Store write in Javascript for a node service", | ||
@@ -5,0 +5,0 @@ "author": "Yamel Senih", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2695010
78873