LM-Charles / LMShipService

1 stars 0 forks source link

Address object missing sender/receiver name and phone number #58

Closed rufuszhu closed 8 years ago

rufuszhu commented 9 years ago

"fromAddress" : { "address" : "8000 Delsom Way", "address2" : "unit 10", "city" : "Delta", "province" : "BC", "postal" : "V4C0A9", "country" : "Canada" },

should be

"fromAddress" : { "receiverName": "Rufus", "receiverPhone": "7788594684", "address" : "8000 Delsom Way", "address2" : "unit 10", "city" : "Delta", "province" : "BC", "postal" : "V4C0A9", "country" : "Canada" },

desmond-zhou commented 9 years ago

All API with the address data model now have additional attribute "name" and "phone", which are persisted to DB where needed, these are optional and default to null.

{
    "client" : "{{current_user}}",
    "orderDate" : "2012-04-23T18:25:43.511Z",
    "fromAddress" : {
        "name" : "sender",
        "phone" : "7654321",
        "address" : "8000 Delsom Way",
        "address2" : "unit 10",
        "city" : "Delta",
        "province" : "BC",
        "postal" : "V4C0A9",
        "country" : "CA"
    },
    "toAddress" : {
        "name" : "recip",
        "phone" : "1234567",
        "address" : "812 Wharf Street",
        "city" : "Victoria",
        "province" : "BC",
        "postal" : "V8W1T3",
        "country" : "CA"
    },
    "courierServiceType" : "UPS_STANDARD",
    "shipments" : [
        {
            "height" : 1,
            "width" : 1,
            "length" : 1,
            "weight" : 1,
            "shipmentPackageType" : "CUSTOM",
            "goodCategoryType" : "COSMETICS",
            "displayLengthPreference" : "CM",
            "displayWeightPreference" : "KG"

        },
        {
            "height" : 20,
            "width" : 20,
            "length" : 20,
            "weight" : 20,
            "shipmentPackageType" : "SMALL",
            "goodCategoryType" : "REGULAR",
            "displayLengthPreference" : "INCH",
            "displayWeightPreference" : "LB"

        }
    ],
    "handler" : "optional_handler",
    "declareValue" : 100,
    "insuranceValue" : 150,
    "appointmentDate" : 1263110400000,
    "appointmentSlotType" : "SLOT_1"
}