Exemplo n.º 1
0
        private static IList <UpdateExportedModel> CreateBatch(int invoiceId, int contactId, ExportedState state)
        {
            var models = new List <UpdateExportedModel>
            {
                new UpdateExportedModel
                {
                    Id         = invoiceId,
                    EntityType = ExportableEntityType.IssuedInvoice,
                    Exported   = state
                },
                new UpdateExportedModel
                {
                    Id         = contactId,
                    EntityType = ExportableEntityType.Contact,
                    Exported   = state
                }
            };

            return(models);
        }
Exemplo n.º 2
0
        public async Task SetExportedStateAsync(int invoiceId, int contactId, ExportedState state)
        {
            var batch = CreateBatch(invoiceId, contactId, state);

            var response = await _api.BatchClient.UpdateAsync(batch);
        }