createInvoiceLink method

Future<String> createInvoiceLink(
  1. String title,
  2. String description,
  3. String payload,
  4. String providerToken,
  5. String currency,
  6. List<LabeledPrice> prices, {
  7. int? maxTipAmount,
  8. List<int>? suggestedTipAmounts,
  9. String? providerData,
  10. String? photoUrl,
  11. int? photoSize,
  12. int? photoWidth,
  13. int? photoHeight,
  14. bool? needName,
  15. bool? needPhoneNumber,
  16. bool? needEmail,
  17. bool? needShippingAddress,
  18. bool? sendPhoneNumberToProvider,
  19. bool? sendEmailToProvider,
  20. bool? isFlexible,
})

Use this method to create a link for an invoice.

Returns the created invoice link as String on success

Implementation

Future<String> createInvoiceLink(
    String title,
    String description,
    String payload,
    String providerToken,
    String currency,
    List<LabeledPrice> prices,
    {int? maxTipAmount,
    List<int>? suggestedTipAmounts,
    String? providerData,
    String? photoUrl,
    int? photoSize,
    int? photoWidth,
    int? photoHeight,
    bool? needName,
    bool? needPhoneNumber,
    bool? needEmail,
    bool? needShippingAddress,
    bool? sendPhoneNumberToProvider,
    bool? sendEmailToProvider,
    bool? isFlexible}) async {
  var requestUrl = _apiUri('createInvoiceLink');
  var body = <String, dynamic>{};
  return await HttpClient.httpPost(requestUrl, body: body);
}