Envíos

Un Envío describe los detalles del método de envío de una orden, tales como el medio, el costo, el proveedor y el número de guía.

Objeto Envío

Atributos

TipoDescripción
idstringIdentificador único, asignado al azar.
amountintegerEl precio del envío en centavos.
tracking_numberstringNúmero de rastreo que el proveedor de envios proporciona. (opcional)
carrierstringNombre del proveedor de envío.
methodstringMétodo de envío. (opcional)
metadatahashHash en donde el usuario puede enviar información adicional por cada 'shipping_line'. (opcional)
puts shipping_line

{
  "amount" => 0,
  "carrier" => "Fedex",
  "method" => "Airplane",
  "tracking_number" => "TRACK123",
  "object" => "shipping_line",
  "id" => "ship_lin_2fw8gEEVAKtJVq7ZV",
  "parent_id" => "ord_2fw8gDVfe8KdxBtsd"
}
{
  "amount": 0,
  "carrier": "Fedex",
  "method": "Airplane",
  "tracking_number": "TRACK123",
  "object": "shipping_line",
  "id": "ship_lin_2fw8gEEVAKtJVq7ZV",
  "parent_id": "ord_2fw8gDVfe8KdxBtsd"
}
echo $shipping_line;

{
  "amount": 0,
  "carrier": "Fedex",
  "method": "Airplane",
  "tracking_number": "TRACK123",
  "object": "shipping_line",
  "id": "ship_lin_2fw8gEEVAKtJVq7ZV",
  "parent_id": "ord_2fw8gDVfe8KdxBtsd"
}
print shipping_line

{
  "amount": 0,
  "carrier": "Fedex",
  "method": "Airplane",
  "tracking_number": "TRACK123",
  "object": "shipping_line",
  "id": "ship_lin_2fw8gEEVAKtJVq7ZV",
  "parent_id": "ord_2fw8gDVfe8KdxBtsd"
}
print shipping_line

{
  "amount": 0,
  "carrier": "Fedex",
  "method": "Airplane",
  "tracking_number": "TRACK123",
  "object": "shipping_line",
  "id": "ship_lin_2fw8gEEVAKtJVq7ZV",
  "parent_id": "ord_2fw8gDVfe8KdxBtsd"
}
System.out.println(shippingLine.toString())
{
  amount=0,
  carrier=USPS,
  metadata={
    some_random=Stuff
  },
  tracking_number=TRACK124,
  id=ship_lin_2fx13Ko8eXP79gQgg
}
System.Console.WriteLine(shipping_line);

// Output
{
  "amount": 0,
  "carrier": "Fedex",
  "method": "Airplane",
  "tracking_number": "TRACK123",
  "object": "shipping_line",
  "id": "ship_lin_2fw8gEEVAKtJVq7ZV",
  "parent_id": "ord_2fw8gDVfe8KdxBtsd"
}
{
  "amount": 0,
  "carrier": "Fedex",
  "method": "Airplane",
  "tracking_number": "TRACK123",
  "object": "shipping_line",
  "id": "ship_lin_2fw8gEEVAKtJVq7ZV",
  "parent_id": "ord_2fw8gDVfe8KdxBtsd"
}