RazorpayInvoiceCreateRequestBody constructor

  1. @JsonSerializable(includeIfNull: false)
const RazorpayInvoiceCreateRequestBody({
  1. required String type,
  2. required List<RazorpayLineItemsBaseRequestBody> line_items,
  3. String? description,
  4. String? draft,
  5. int? date,
  6. String? customer_id,
  7. String? currency,
  8. RazorpayCustomerDetailsBaseRequestBody? customer,
  9. String? order_id,
  10. int? expire_by,
  11. @JsonKey(toJson: _boolToInt, fromJson: _intToBool) bool? sms_notify,
  12. @JsonKey(toJson: _boolToInt, fromJson: _intToBool) bool? email_notify,
  13. @JsonKey(toJson: _boolToInt, fromJson: _intToBool) bool? partial_payment,
  14. IMap? notes,
  15. String? receipt,
  16. dynamic amount,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory RazorpayInvoiceCreateRequestBody({
  required String type,
  required List<RazorpayLineItemsBaseRequestBody>
      line_items, // 'invoice' | 'link'
  String? description,
  String? draft, // '1' or null/omitted
  int? date, // Nullable Unix timestamp
  String? customer_id, // Either customer_id or customer object
  String? currency, // Typically INR
  RazorpayCustomerDetailsBaseRequestBody? customer,
  String? order_id,
  int? expire_by, // Nullable Unix timestamp
  @JsonKey(toJson: _boolToInt, fromJson: _intToBool)
  bool? sms_notify, // Default 1
  @JsonKey(toJson: _boolToInt, fromJson: _intToBool)
  bool? email_notify, // Default 1
  @JsonKey(toJson: _boolToInt, fromJson: _intToBool)
  bool? partial_payment, // Default false
  IMap<dynamic>? notes, // IMap<string | number>
  String? receipt,
  dynamic amount, // number | string (Only for type=link?)
}) = _RazorpayInvoiceCreateRequestBody;