Ejemplo n.º 1
0
        public CreateInvoiceOperation(IIntacctSession session, IntacctInvoice invoice) : base(session, "create_invoice", "key")
        {
            if (invoice == null)
            {
                throw new ArgumentNullException(nameof(invoice));
            }

            _invoice = invoice;
        }
        public GetEntityOperation(IIntacctSession session, string entityId, bool isExtenalKey = false) : base(session, "get", "data", mayHaveEmptyResult: true)
        {
            if (entityId == null)
            {
                throw new ArgumentNullException(nameof(entityId));
            }
            if (string.IsNullOrWhiteSpace(entityId))
            {
                throw new ArgumentException($"Argument {nameof(entityId)} may not be empty.", nameof(entityId));
            }

            _entityName   = GetObjectName <TEntity>();
            _entityId     = entityId;
            _isExtenalKey = isExtenalKey;
        }
 protected IntacctOperationBase(IIntacctSession session, string functionName, string resultElementName, bool mayHaveEmptyResult) : this(functionName, resultElementName, mayHaveEmptyResult)
 {
     _session = session;
 }
 private static XElement CreateAuthSessionElement(IIntacctSession session)
 {
     return(new XElement("sessionid", session.SessionId));
 }
 public CreateCustomerOperation(IIntacctSession session, IntacctCustomer customer) : base(session, "create_customer", "key")
 {
     _customer = customer;
 }
Ejemplo n.º 6
0
 protected IntacctAuthenticatedOperationBase(IIntacctSession session, string functionName, string responseElementName, bool mayHaveEmptyResult = false) : base(session, functionName, responseElementName, mayHaveEmptyResult)
 {
 }