This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
/
Parcel.cs
65 lines (49 loc) · 1.9 KB
/
Parcel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System;
using Newtonsoft.Json;
namespace Shippo
{
[JsonObject(MemberSerialization.OptIn)]
public class Parcel : ShippoId
{
[JsonProperty(PropertyName = "object_state")]
public object ObjectState { get; set; }
[JsonProperty(PropertyName = "object_created")]
public object ObjectCreated { get; set; }
[JsonProperty(PropertyName = "object_updated")]
public object ObjectUpdaed { get; set; }
[JsonProperty(PropertyName = "object_owner")]
public object ObjectOwner { get; set; }
[JsonProperty(PropertyName = "length")]
public object Length { get; set; }
[JsonProperty(PropertyName = "width")]
public object Width { get; set; }
[JsonProperty(PropertyName = "height")]
public object Height { get; set; }
[JsonProperty(PropertyName = "distance_unit")]
public object DistanceUnit { get; set; }
[JsonProperty(PropertyName = "weight")]
public object Weight { get; set; }
[JsonProperty(PropertyName = "mass_unit")]
public object MassUnit { get; set; }
[JsonProperty(PropertyName = "template")]
public string Template;
[JsonProperty(PropertyName = "metadata")]
public object Metadata { get; set; }
[JsonProperty(PropertyName = "extra")]
public object Extra;
[JsonProperty(PropertyName = "test")]
public bool? Test;
public static Parcel createForShipment(double length, double width, double height, String distance_unit,
double weight, string massUnit)
{
Parcel p = new Parcel();
p.Length = length;
p.Width = width;
p.Height = height;
p.DistanceUnit = distance_unit;
p.Weight = weight;
p.MassUnit = massUnit;
return p;
}
}
}