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

Tipo

Descripción

id

string

Identificador único, asignado al azar.

amount

integer

El precio del envío en centavos.

tracking_number

string

Número de rastreo que el proveedor de envios proporciona. (opcional)

carrier

string

Nombre del proveedor de envío.

method

string

Método de envío. (opcional)

metadata

hash

Hash 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"
}