Class ShippingLocation


  • public class ShippingLocation
    extends Object
    ShippingLocation
    • Constructor Detail

      • ShippingLocation

        public ShippingLocation()
    • Method Detail

      • getAddress

        public Address getAddress()
        Get address
        Returns:
        address
      • setAddress

        public void setAddress​(Address address)
      • getContact

        public Contact getContact()
        Get contact
        Returns:
        contact
      • setContact

        public void setContact​(Contact contact)
      • getId

        public String getId()
        The unique identifier of the shipping location, for use as `shippingLocationId` when creating an order.
        Returns:
        id
      • setId

        public void setId​(String id)
      • getName

        public String getName()
        The unique name of the shipping location.
        Returns:
        name
      • setName

        public void setName​(String name)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • validateJsonObject

        public static void validateJsonObject​(com.google.gson.JsonObject jsonObj)
                                       throws IOException
        Validates the JSON Object and throws an exception if issues found
        Parameters:
        jsonObj - JSON Object
        Throws:
        IOException - if the JSON Object is invalid with respect to ShippingLocation
      • fromJson

        public static ShippingLocation fromJson​(String jsonString)
                                         throws IOException
        Create an instance of ShippingLocation given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of ShippingLocation
        Throws:
        IOException - if the JSON string is invalid with respect to ShippingLocation
      • toJson

        public String toJson()
        Convert an instance of ShippingLocation to an JSON string
        Returns:
        JSON string