for (GoogleBaseAttribute attr : attribute.getSubAttributes()) { String name = attr.getName(); if (ShippingField.Country.getAttrName().equals(name)) { country = attr.getValueAsString(); } else if (ShippingField.Region.getAttrName().equals(name)) { regions.add(attr.getValueAsString()); } else if (ShippingField.Price.getAttrName().equals(name)) { String price = attr.getValueAsString(); try { priceUnit = new NumberUnit<Float>(Float.parseFloat(price), null); } else if (ShippingField.Service.getAttrName().equals(name)) { service = attr.getValueAsString(); } else {
for (GoogleBaseAttribute attr : attribute.getSubAttributes()) { String name = attr.getName(); if (ShippingField.Country.getAttrName().equals(name)) { country = attr.getValueAsString(); } else if (ShippingField.Region.getAttrName().equals(name)) { regions.add(attr.getValueAsString()); } else if (ShippingField.Price.getAttrName().equals(name)) { String price = attr.getValueAsString(); try { priceUnit = new NumberUnit<Float>(Float.parseFloat(price), null); } else if (ShippingField.Service.getAttrName().equals(name)) { service = attr.getValueAsString(); } else {
ShippingField.Country.getAttrName(), null, shipping.getCountry()); attribute.addSubAttribute(countryAttr); ShippingField.Region.getAttrName(), null, region); attribute.addSubAttribute(regionAttr); ShippingField.Service.getAttrName(), null, shipping.getService()); attribute.addSubAttribute(serviceAttr); priceWithUnit += " " + shipping.getCurrency(); GoogleBaseAttribute priceAttr = new GoogleBaseAttribute(ShippingField.Price.getAttrName(), null, priceWithUnit); attribute.addSubAttribute(priceAttr);
ShippingField.Country.getAttrName(), null, shipping.getCountry()); attribute.addSubAttribute(countryAttr); ShippingField.Region.getAttrName(), null, region); attribute.addSubAttribute(regionAttr); ShippingField.Service.getAttrName(), null, shipping.getService()); attribute.addSubAttribute(serviceAttr); priceWithUnit += " " + shipping.getCurrency(); GoogleBaseAttribute priceAttr = new GoogleBaseAttribute(ShippingField.Price.getAttrName(), null, priceWithUnit); attribute.addSubAttribute(priceAttr);