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q_RLE-rZGxnH91ylEYzXSJCwZ3YY6YGdiFlOeJT33tEnP4K7cnJlXH9_Idde6Cg64T9iATWr_ol99cMSJn84k0gFOc5OBc6kWu5vUFu4"
api := a.ApiAssistent{
C: a.NewClient(teamId, token, "http://app.local/api/v1"),
}
formBankAccount := a.BankAccount{
TeamId: teamId,
BankId: 3,
CurrencyId: 1,
Number: "BY97ALFA3012215177006237",
OpeningBalance: 10,
OpeningBalanceDate: "2018-09-01 00:00:00",
}
formOperation := a.Operation{
TeamId: teamId,
Date: "2018-09-01 00:00:00",
AmountIn: 100,
PaymentDocument: "777",
Description: "Описание платежа",
OperationTypeId: a.OperationIncomeID,
OperationFlowId: a.OperationFlowBankID,
CurrencyId: 8,
TransactionId: "123",
}
responseBankAccounts := api.StoreBankAccount(formBankAccount)
fmt.Printf("%+v\n", responseBankAccounts)
respOperations := api.StoreOperation(formOperation)
fmt.Printf("%+v\n", respOperations)
}