invoiceninja / flutter-package Goto Github PK
View Code? Open in Web Editor NEWCreate PDF invoices and accept payments in a Flutter app
Home Page: https://invoiceninja.com
License: MIT License
Create PDF invoices and accept payments in a Flutter app
Home Page: https://invoiceninja.com
License: MIT License
I would appreciate the ability to auto send an email with a newly created invoice (or link to payment portal).
When following documentation:
InvoiceNinja.configure(
'KEY', // Set your company key or use 'KEY' to test
url: 'https://demo.invoiceninja.com', // Set your selfhost app URL
debugEnabled: true,
);
Where can I find the 'KEY'? Nothing in the self-hosted installation is called a 'key'. Is this supposed to say API Token?
If I assumed the API Token is what you meant, and my self hosted install is at mydomain.com/payments/public, when using the following:
InvoiceNinja.configure(
'My API Token', // Set your company key or use 'KEY' to test
url: 'https://mydomain.com/payments/public', // Set your selfhost app URL
debugEnabled: true,
);
and I execute:
final products = await InvoiceNinja.products.load();
I end up with the following error:
{"message":"No query results for model [App\\Models\\Company]."}
However, if I run the following, the product list is returned in json as expected.
Future<List<InvoiceNinjaProduct>> _loadProductsByGet() async {
String url = 'https://carlinehound.com/payments/public/api/v1/products';
List data;
List<InvoiceNinjaProduct> productList = [];
var response = await http.get(Uri.encodeFull(url), headers: {
'Content-Type': 'application/json',
'X-Api-Secret': 'secret',
'X-Api-Token': 'My API Token',
'X-Requested-With': 'XMLHttpRequest'
});
var resBody = json.decode(response.body);
data = resBody['data'];
data.forEach((productJson) {
InvoiceNinjaProduct product = InvoiceNinjaProduct.fromJson(productJson);
productList.add(product);
});
print(productList[0].name);
return productList;
}
So the question is what is the "KEY"?
Hey, i wanna know when this functionality is coming. And, is there a workaround way to do so right know?
Trying to run the following code:
Future<void> createNewQuote(InvoiceNinjaClient invoiceClient) async {
Product product = = await InvoiceNinja.products.findByKey("myProductKey");
Client client = await InvoiceNinjaAdmin.clients.findByEmail(invoiceClient.email).timeout(Duration(seconds: 30));
print('Client retrieved');
Quote quote = Quote.forClient(client, products: [product]);
print('Ready to send quote');
await InvoiceNinjaAdmin.quotes.save(quote);
print('Quote sent to invoice Ninja');
}
results in the following error:
package:invoiceninja/models/quote.freezed.dart': Failed assertion: line 795 pos 16: 'vendorId != null': is not true.
I cannot figure out how to specify the vendorId for the Quote. Creating an invoice works fine, this only appears when creating a quote.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.