{"id":43,"date":"2024-05-29T23:21:21","date_gmt":"2024-05-29T23:21:21","guid":{"rendered":"https:\/\/mystifying-liskov.77-68-127-141.plesk.page\/?p=43"},"modified":"2024-05-29T23:22:17","modified_gmt":"2024-05-29T23:22:17","slug":"woocommerce-orders","status":"publish","type":"post","link":"https:\/\/mystifying-liskov.77-68-127-141.plesk.page\/?p=43","title":{"rendered":"WooCommerce Orders"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>namespace WooCommerceWeb.Models\n{\n    public class ProcessingModel\n    {\n        public ulong? id { get; set; }\n        public string status { get; set; }\n        public string total { get; set; }\n        public string first_name { get; set; }\n        public string last_name { get; set; }\n        public string email { get; set; }\n        public string postcode { get; set; }\n        public int TotalItem { get; set; }\n        public DateTime orderdate { get; set; }\n    }\n\n\n    \/\/ Root myDeserializedClass = JsonConvert.DeserializeObject&lt;List&lt;Root>>(myJsonResponse);\n    public class Billing\n    {\n        public string first_name { get; set; }\n        public string last_name { get; set; }\n        public string company { get; set; }\n        public string address_1 { get; set; }\n        public string address_2 { get; set; }\n        public string city { get; set; }\n        public string state { get; set; }\n        public string postcode { get; set; }\n        public string country { get; set; }\n        public string email { get; set; }\n        public string phone { get; set; }\n    }<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>public class Collection\n{\n    public string href { get; set; }\n}\n\npublic class CouponLine\n{\n    public int id { get; set; }\n    public string code { get; set; }\n    public string discount { get; set; }\n    public string discount_tax { get; set; }\n    public List&lt;MetaData> meta_data { get; set; }\n}\n\npublic class Customer\n{\n    public string href { get; set; }\n}\n\npublic class DateCreated\n{\n    public string date { get; set; }\n    public int timezone_type { get; set; }\n    public string timezone { get; set; }\n}\n\npublic class DateExpires\n{\n    public string date { get; set; }\n    public int timezone_type { get; set; }\n    public string timezone { get; set; }\n}\n\npublic class DateModified\n{\n    public string date { get; set; }\n    public int timezone_type { get; set; }\n    public string timezone { get; set; }\n}\n\npublic class LineItem\n{\n    public List&lt;string> imageslist { get; set; }\n    public int id { get; set; }\n    public string name { get; set; }\n    public int product_id { get; set; }\n    public int variation_id { get; set; }\n    public int quantity { get; set; }\n    public string tax_class { get; set; }\n    public string subtotal { get; set; }\n    public string subtotal_tax { get; set; }\n    public string total { get; set; }\n    public string total_tax { get; set; }\n    public List&lt;object> taxes { get; set; }\n    public List&lt;MetaData> meta_data { get; set; }\n    public string sku { get; set; }\n    public double price { get; set; }\n}\n\npublic class Links\n{\n    public List&lt;Self> self { get; set; }\n    public List&lt;Collection> collection { get; set; }\n    public List&lt;Customer> customer { get; set; }\n}\n\npublic class MetaData\n{\n    public int id { get; set; }\n    public string key { get; set; }\n    public object value { get; set; }\n}\n\npublic class Root\n{\n    public ulong id { get; set; }\n    public int parent_id { get; set; }\n    \n    public string number { get; set; }\n    public string order_key { get; set; }\n    public string created_via { get; set; }\n    public string version { get; set; }\n    public string status { get; set; }\n    public string currency { get; set; }\n    public DateTime date_created { get; set; }\n    public DateTime date_created_gmt { get; set; }\n    public DateTime date_modified { get; set; }\n    public DateTime date_modified_gmt { get; set; }\n    public string discount_total { get; set; }\n    public string discount_tax { get; set; }\n    public string shipping_total { get; set; }\n    public string shipping_tax { get; set; }\n    public string cart_tax { get; set; }\n    public string total { get; set; }\n    public string total_tax { get; set; }\n    public bool prices_include_tax { get; set; }\n    public int customer_id { get; set; }\n    public string customer_ip_address { get; set; }\n    public string customer_user_agent { get; set; }\n    public string customer_note { get; set; }\n    public Billing billing { get; set; }\n    public Shipping shipping { get; set; }\n    public string payment_method { get; set; }\n    public string payment_method_title { get; set; }\n    public string transaction_id { get; set; }\n    public DateTime? date_paid { get; set; }\n    public DateTime? date_paid_gmt { get; set; }\n    public DateTime? date_completed { get; set; }\n    public DateTime? date_completed_gmt { get; set; }\n    public string cart_hash { get; set; }\n    public List&lt;MetaData> meta_data { get; set; }\n    public List&lt;LineItem> line_items { get; set; }\n    public List&lt;object> tax_lines { get; set; }\n    public List&lt;ShippingLine> shipping_lines { get; set; }\n    public List&lt;object> fee_lines { get; set; }\n    public List&lt;CouponLine> coupon_lines { get; set; }\n    public List&lt;object> refunds { get; set; }\n    public Links _links { get; set; }\n}\n\npublic class Self\n{\n    public string href { get; set; }\n}\n\npublic class Shipping\n{\n    public string first_name { get; set; }\n    public string last_name { get; set; }\n    public string company { get; set; }\n    public string address_1 { get; set; }\n    public string address_2 { get; set; }\n    public string city { get; set; }\n    public string state { get; set; }\n    public string postcode { get; set; }\n    public string country { get; set; }\n}\n\npublic class ShippingLine\n{\n    public int id { get; set; }\n    public string method_title { get; set; }\n    public string method_id { get; set; }\n    public string instance_id { get; set; }\n    public string total { get; set; }\n    public string total_tax { get; set; }\n    public List&lt;object> taxes { get; set; }\n    public List&lt;MetaData> meta_data { get; set; }\n}\n\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>    public class Value\n    {\n        public int id { get; set; }\n        public string code { get; set; }\n        public string amount { get; set; }\n        public DateCreated date_created { get; set; }\n        public DateModified date_modified { get; set; }\n        public DateExpires date_expires { get; set; }\n        public string discount_type { get; set; }\n        public string description { get; set; }\n        public int usage_count { get; set; }\n        public bool individual_use { get; set; }\n        public List&lt;object> product_ids { get; set; }\n        public List&lt;object> excluded_product_ids { get; set; }\n        public int usage_limit { get; set; }\n        public int usage_limit_per_user { get; set; }\n        public object limit_usage_to_x_items { get; set; }\n        public bool free_shipping { get; set; }\n        public List&lt;object> product_categories { get; set; }\n        public List&lt;int> excluded_product_categories { get; set; }\n        public bool exclude_sale_items { get; set; }\n        public string minimum_amount { get; set; }\n        public string maximum_amount { get; set; }\n        public List&lt;object> email_restrictions { get; set; }\n        public bool @virtual { get; set; }\n        public List&lt;MetaData> meta_data { get; set; }\n    }\n\n\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/mystifying-liskov.77-68-127-141.plesk.page\/index.php?rest_route=\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mystifying-liskov.77-68-127-141.plesk.page\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mystifying-liskov.77-68-127-141.plesk.page\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mystifying-liskov.77-68-127-141.plesk.page\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mystifying-liskov.77-68-127-141.plesk.page\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=43"}],"version-history":[{"count":3,"href":"https:\/\/mystifying-liskov.77-68-127-141.plesk.page\/index.php?rest_route=\/wp\/v2\/posts\/43\/revisions"}],"predecessor-version":[{"id":46,"href":"https:\/\/mystifying-liskov.77-68-127-141.plesk.page\/index.php?rest_route=\/wp\/v2\/posts\/43\/revisions\/46"}],"wp:attachment":[{"href":"https:\/\/mystifying-liskov.77-68-127-141.plesk.page\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mystifying-liskov.77-68-127-141.plesk.page\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mystifying-liskov.77-68-127-141.plesk.page\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}