Files
Epi2Exchange2/Epi2O365/Model/ContactList.cs
2025-02-12 12:10:56 +01:00

198 lines
5.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Globalization;
using Microsoft.Graph.Models;
using System.IO;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace Epi2Exchange2.Model
{
public partial class ContactList
{
[JsonProperty("success")]
public bool Success { get; set; }
[JsonProperty("namespace")]
public string Namespace { get; set; }
[JsonProperty("action")]
public string Action { get; set; }
[JsonProperty("templateSignature")]
public string TemplateSignature { get; set; }
[JsonProperty("payload_length")]
public long PayloadLength { get; set; }
[JsonProperty("is_send_payload")]
public bool IsSendPayload { get; set; }
[JsonProperty("payload")]
public List<Payload> Payload { get; set; }
//[JsonProperty("filter_options")]
//public FilterOptions FilterOptions { get; set; }
//[JsonProperty("request_duration")]
//public long RequestDuration { get; set; }
//[JsonProperty("req_datetime")]
//public ReqDatetime ReqDatetime { get; set; }
//[JsonProperty("_dbg_request_data")]
//public DbgRequestData DbgRequestData { get; set; }
//[JsonProperty("_dbg_user_info")]
//public UserInfo DbgUserInfo { get; set; }
}
public partial class Payload
{
[JsonProperty("primary_key")]
public long PrimaryKey { get; set; }
[JsonProperty("customer_no")]
public long CustomerNo { get; set; }
[JsonProperty("supplier_no")]
public long SupplierNo { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("name1")]
public string Name1 { get; set; }
[JsonProperty("name2")]
public string Name2 { get; set; }
[JsonProperty("name3")]
public string Name3 { get; set; }
[JsonProperty("matchcode")]
public string Matchcode { get; set; }
[JsonProperty("salutation")]
public string Salutation { get; set; }
[JsonProperty("grade")]
public string Grade { get; set; }
[JsonProperty("is_interested")]
public bool IsInterested { get; set; }
[JsonProperty("is_customer")]
public bool IsCustomer { get; set; }
[JsonProperty("is_supplier")]
public bool IsSupplier { get; set; }
[JsonProperty("is_location")]
public bool IsLocation { get; set; }
[JsonProperty("is_vip")]
public bool IsVip { get; set; }
[JsonProperty("is_colleague")]
public bool IsColleague { get; set; }
[JsonProperty("date_changed")]
public DateTime DateChanged { get; set; }
[JsonProperty("time_changed")]
public long TimeChanged { get; set; }
[JsonProperty("date_created")]
public DateTime DateCreated { get; set; }
[JsonProperty("time_created")]
public long TimeCreated { get; set; }
public DateTime getDateTimeCreated()
{
TimeSpan time = TimeSpan.FromSeconds(TimeCreated);
return DateCreated.Date + time; // Combine date and time
}
public DateTime getDateTimeChanged()
{
TimeSpan time = TimeSpan.FromSeconds(TimeChanged);
return DateChanged.Date + time; // Combine date and time
}
[JsonProperty("is_active")]
public bool IsActive { get; set; }
[JsonProperty("terms_of_payment_pk")]
public long TermsOfPaymentPk { get; set; }
[JsonProperty("is_sysstd_terms_of_payment")]
public bool IsSysstdTermsOfPayment { get; set; }
[JsonProperty("has_image")]
public bool HasImage { get; set; }
[JsonProperty("_ref_contact")]
public string RefContact { get; set; }
[JsonProperty("contact_data")]
public ContactData ContactData { get; set; }
[JsonProperty("_contact_data_length", NullValueHandling = NullValueHandling.Ignore)]
public long? ContactDataLength { get; set; }
}
public partial class ContactData
{
[JsonProperty("primary_key")]
public long PrimaryKey { get; set; }
[JsonProperty("contact_pk")]
public long ContactPk { get; set; }
[JsonProperty("supplier_no")]
public long SupplierNo { get; set; }
[JsonProperty("customer_no")]
public long CustomerNo { get; set; }
[JsonProperty("debitor_no")]
public string DebitorNo { get; set; }
[JsonProperty("creditor_no")]
public string CreditorNo { get; set; }
[JsonProperty("rentshop_contact_uri")]
public string RentshopContactUri { get; set; }
[JsonProperty("is_rentshop_active")]
public bool IsRentshopActive { get; set; }
[JsonProperty("discount_rent_customer")]
public long DiscountRentCustomer { get; set; }
[JsonProperty("discount_sale_customer")]
public long DiscountSaleCustomer { get; set; }
[JsonProperty("is_vat_active_customer")]
public bool IsVatActiveCustomer { get; set; }
[JsonProperty("country_type_customer")]
public long CountryTypeCustomer { get; set; }
[JsonProperty("discount_rent_supplier")]
public long DiscountRentSupplier { get; set; }
[JsonProperty("discount_sale_supplier")]
public double DiscountSaleSupplier { get; set; }
[JsonProperty("is_vat_active_supplier")]
public bool IsVatActiveSupplier { get; set; }
[JsonProperty("country_type_supplier")]
public long CountryTypeSupplier { get; set; }
}
}