304 lines
8.1 KiB
C#
304 lines
8.1 KiB
C#
using Microsoft.Graph.Models;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Epi2Exchange2.Model
|
|
{
|
|
public partial class ContactDetail
|
|
{
|
|
[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<ContactDetailPayload> Payload { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public partial class ContactDetailPayload
|
|
{
|
|
[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("is_single_person")]
|
|
public bool IsSinglePerson { 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("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("salutation")]
|
|
public string Salutation { get; set; }
|
|
|
|
[JsonProperty("grade")]
|
|
public string Grade { get; set; }
|
|
|
|
[JsonProperty("notes_positive")]
|
|
public string NotesPositive { get; set; }
|
|
|
|
[JsonProperty("notes_negative")]
|
|
public string NotesNegative { get; set; }
|
|
|
|
[JsonProperty("date_of_birth")]
|
|
public string DateOfBirth { 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("is_blocked_order")]
|
|
public bool IsBlockedOrder { get; set; }
|
|
|
|
[JsonProperty("is_separate_invoice_address")]
|
|
public bool IsSeparateInvoiceAddress { get; set; }
|
|
|
|
[JsonProperty("has_image")]
|
|
public bool HasImage { get; set; }
|
|
|
|
[JsonProperty("address")]
|
|
public Address Address { get; set; }
|
|
|
|
[JsonProperty("address_list")]
|
|
public List<Address> AddressList { get; set; }
|
|
|
|
[JsonProperty("address_delivery")]
|
|
public object AddressDelivery { get; set; }
|
|
|
|
[JsonProperty("communication")]
|
|
public List<Communication> Communication { get; set; }
|
|
|
|
[JsonProperty("_communication_length")]
|
|
public long CommunicationLength { get; set; }
|
|
|
|
[JsonProperty("contact_person")]
|
|
public List<ContactPerson> ContactPerson { get; set; }
|
|
|
|
[JsonProperty("_contact_person_length")]
|
|
public long ContactPersonLength { get; set; }
|
|
|
|
|
|
|
|
[JsonProperty("_contact_chrono_length")]
|
|
public long ContactChronoLength { get; set; }
|
|
|
|
|
|
|
|
[JsonProperty("_order_length")]
|
|
public long OrderLength { get; set; }
|
|
|
|
|
|
|
|
[JsonProperty("searchindex")]
|
|
public List<object> Searchindex { get; set; }
|
|
|
|
[JsonProperty("_searchindex_length")]
|
|
public long SearchindexLength { get; set; }
|
|
|
|
|
|
|
|
[JsonProperty("contact_data")]
|
|
public ContactData ContactData { get; set; }
|
|
|
|
[JsonProperty("_address_list_length")]
|
|
public long AddressListLength { get; set; }
|
|
|
|
[JsonProperty("_contact_data_length")]
|
|
public long ContactDataLength { get; set; }
|
|
}
|
|
|
|
public partial class Address
|
|
{
|
|
[JsonProperty("primary_key")]
|
|
public long PrimaryKey { get; set; }
|
|
|
|
[JsonProperty("postal_code")]
|
|
public string PostalCode { get; set; }
|
|
|
|
[JsonProperty("street")]
|
|
public string Street { get; set; }
|
|
|
|
[JsonProperty("city")]
|
|
public string City { get; set; }
|
|
|
|
[JsonProperty("country")]
|
|
public string Country { get; set; }
|
|
|
|
[JsonProperty("country_iso3")]
|
|
public string CountryIso3 { get; set; }
|
|
|
|
[JsonProperty("federal_state")]
|
|
public string FederalState { get; set; }
|
|
}
|
|
|
|
public partial class Communication
|
|
{
|
|
[JsonProperty("primary_key")]
|
|
public long PrimaryKey { get; set; }
|
|
|
|
[JsonProperty("contact_pk")]
|
|
public long ContactPk { get; set; }
|
|
|
|
[JsonProperty("contact_person_pk")]
|
|
public long ContactPersonPk { get; set; }
|
|
|
|
[JsonProperty("uplink")]
|
|
public string Uplink { get; set; }
|
|
|
|
[JsonProperty("type")]
|
|
public long Type { get; set; }
|
|
|
|
[JsonProperty("description")]
|
|
public string Description { get; set; }
|
|
|
|
[JsonProperty("phone_match_number")]
|
|
public string PhoneMatchNumber { get; set; }
|
|
|
|
[JsonProperty("position")]
|
|
public long Position { get; set; }
|
|
|
|
[JsonProperty("is_newsletter")]
|
|
public bool IsNewsletter { get; set; }
|
|
|
|
[JsonProperty("is_invoice")]
|
|
public bool IsInvoice { get; set; }
|
|
}
|
|
public partial class ContactPerson
|
|
{
|
|
[JsonProperty("primary_key")]
|
|
public long PrimaryKey { get; set; }
|
|
|
|
[JsonProperty("contact_pk")]
|
|
public long ContactPk { get; set; }
|
|
|
|
[JsonProperty("name")]
|
|
public string Name { get; set; }
|
|
|
|
[JsonProperty("first_name")]
|
|
public string FirstName { get; set; }
|
|
|
|
[JsonProperty("last_name")]
|
|
public string LastName { get; set; }
|
|
|
|
[JsonProperty("nickname")]
|
|
public string Nickname { get; set; }
|
|
|
|
[JsonProperty("position")]
|
|
public string Position { get; set; }
|
|
|
|
[JsonProperty("has_image")]
|
|
public bool HasImage { get; set; }
|
|
|
|
[JsonProperty("_ref_contact")]
|
|
public string RefContact { get; set; }
|
|
|
|
[JsonProperty("_ref_contact_person")]
|
|
public string RefContactPerson { get; set; }
|
|
|
|
[JsonProperty("date_changed")]
|
|
public DateTimeOffset DateChanged { get; set; }
|
|
|
|
[JsonProperty("time_changed")]
|
|
public long TimeChanged { get; set; }
|
|
|
|
[JsonProperty("user_changed")]
|
|
public string UserChanged { get; set; }
|
|
|
|
[JsonProperty("date_created")]
|
|
public DateTimeOffset DateCreated { get; set; }
|
|
|
|
[JsonProperty("time_created")]
|
|
public long TimeCreated { get; set; }
|
|
|
|
[JsonProperty("user_created")]
|
|
public string UserCreated { get; set; }
|
|
}
|
|
|
|
|
|
}
|