jackson - Post Tracking number in bigcommerce -


i using jackson api converting java json , vice-versa. in bigcommerce there api creating shipment https://developer.bigcommerce.com/api/stores/v2/orders/shipments#create-a-shipment have order_id user. how create shipment using pojo?

here code started.

public class shipment {      @jsonproperty("id")     public long id;      @jsonproperty("order_id")     public long orderid;      @jsonproperty("date_created")     public string datecreated;      @jsonproperty("customer_id")     public long customerid;      @jsonproperty("billing_address")     public address billingaddress;      @jsonproperty("shipping_address")     public address shippingaddress; }  public class address {      @jsonproperty("zip")     public string zip;      @jsonproperty("city")     public string city;      @jsonproperty("email")     public string email;      @jsonproperty("phone")     public string phone;      @jsonproperty("state")     public string state;      @jsonproperty("company")     public string company;      @jsonproperty("country")     public string country;      @jsonproperty("street_1")     public string street1;      @jsonproperty("street_2")     public string street2;      @jsonproperty("last_name")     public string lastname;      @jsonproperty("first_name")     public string firstname;      @jsonproperty("country_iso2")     public string countryiso2; }  public class application {     private static final objectmapper objectmapper = new objectmapper();      public void dosomething() {         ...         // deserialize json string         shipment shipment = objectmapper.readvalue(somejsonstring, shipment);         ...         // serialize json string         string somejsonstring = objectmapper.writevalueasstring(shipment);         ...     } } 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -