using System;
using System.Xml.Serialization;
using System.Collections.Generic;
namespace Aop.Api.Domain
{
///
/// AntInvoiceResult Data Structure.
///
[Serializable]
public class AntInvoiceResult : AopObject
{
///
/// 防伪码
///
[XmlElement("anti_fake_code")]
public string AntiFakeCode { get; set; }
///
/// 错误编码 开票失败时返回
///
[XmlElement("biz_error_code")]
public string BizErrorCode { get; set; }
///
/// 错误信息 开票失败时返回
///
[XmlElement("biz_error_msg")]
public string BizErrorMsg { get; set; }
///
/// 发票密文,密码区的字符串
///
[XmlElement("ciphertext")]
public string Ciphertext { get; set; }
///
/// 税控设备编号(新版电子发票有)
///
[XmlElement("device_no")]
public string DeviceNo { get; set; }
///
/// 文件类型(pdf,ofd,jpg,png等等)
///
[XmlElement("file_data_type")]
public string FileDataType { get; set; }
///
/// 发票板式文件的下载地址。电票开票成功时必须。 下载链接是一次性的,有效期7天,如果需要再次下载的话需要重新调用接口获取。
///
[XmlElement("file_path")]
public string FilePath { get; set; }
///
/// 发票代码 开票成功时必须
///
[XmlElement("invoice_code")]
public string InvoiceCode { get; set; }
///
/// 开票日期 开票成功时必须
///
[XmlElement("invoice_date")]
public string InvoiceDate { get; set; }
///
/// 电子发票明细
///
[XmlArray("invoice_items")]
[XmlArrayItem("ant_invoice_item")]
public List InvoiceItems { get; set; }
///
/// 发票种类,0=电子发票,1=纸质发票,2=纸质专票
///
[XmlElement("invoice_kind")]
public long InvoiceKind { get; set; }
///
/// 发票号码 开票成功时必须
///
[XmlElement("invoice_no")]
public string InvoiceNo { get; set; }
///
/// 开票时间,时分秒格式(注意:2019-04-11之后开具的发票才返回)
///
[XmlElement("invoice_time")]
public string InvoiceTime { get; set; }
///
/// 发票类型,blue=蓝票,red=红票
///
[XmlElement("invoice_type")]
public string InvoiceType { get; set; }
///
/// 原蓝票发票代码,invoiceType=red时有值
///
[XmlElement("normal_invoice_code")]
public string NormalInvoiceCode { get; set; }
///
/// 原蓝票发票号码,invoiceType=red时有值
///
[XmlElement("normal_invoice_no")]
public string NormalInvoiceNo { get; set; }
///
/// 开票金额 开票成功时必须
///
[XmlElement("nvoice_amount")]
public string NvoiceAmount { get; set; }
///
/// 复核人
///
[XmlElement("payee_checker")]
public string PayeeChecker { get; set; }
///
/// 销方企业名称
///
[XmlElement("payee_name")]
public string PayeeName { get; set; }
///
/// 开票人
///
[XmlElement("payee_operator")]
public string PayeeOperator { get; set; }
///
/// 收款人
///
[XmlElement("payee_receive")]
public string PayeeReceive { get; set; }
///
/// 销售方税号
///
[XmlElement("payee_register_no")]
public string PayeeRegisterNo { get; set; }
///
/// 购买方企业地址
///
[XmlElement("payer_address")]
public string PayerAddress { get; set; }
///
/// 购买方企业银行及账号
///
[XmlElement("payer_bankaccount")]
public string PayerBankaccount { get; set; }
///
/// 购买方抬头
///
[XmlElement("payer_name")]
public string PayerName { get; set; }
///
/// 购买方企业电话
///
[XmlElement("payer_phone")]
public string PayerPhone { get; set; }
///
/// 购买方税号
///
[XmlElement("payer_register_no")]
public string PayerRegisterNo { get; set; }
///
/// 业务平台code
///
[XmlElement("platform_code")]
public string PlatformCode { get; set; }
///
/// 业务平台对应的订单号
///
[XmlElement("platform_tid")]
public string PlatformTid { get; set; }
///
/// 仅开票失败时返回此字段。 当retrying==true调用方不需要关心,阿里发票中台会自动重试。 当retrying==false调用方需要处理之后重试。这两类错误阿里发票中台是不会自动重试的: (1)业务错误,比如折扣率计算错误之类的,需要修改报文。 (2)税盘错误,比如盘没票了,月初未抄报税等。
///
[XmlElement("retrying")]
public bool Retrying { get; set; }
///
/// 开票流水号,唯一标志开票请求。如果两次请求流水号相同,则表示重复请求。
///
[XmlElement("serial_no")]
public string SerialNo { get; set; }
///
/// 开票状态: waiting = 等待开票中,processing = 开票中,create_success = 开票成功,create_failed = 开票失败
///
[XmlElement("status")]
public string Status { get; set; }
///
/// 合计不含税金额,当开红票时,该字段为负数
///
[XmlElement("sum_price")]
public string SumPrice { get; set; }
///
/// 合计税额,当开红票时,该字段为负数
///
[XmlElement("sum_tax")]
public string SumTax { get; set; }
}
}