create static method
Invoice
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "invoice",
- String special_return_type = "invoice",
- String? currency,
- List<
LabeledPricePart> ? price_parts, - num? subscription_period,
- num? max_tip_amount,
- List<
num> ? suggested_tip_amounts, - String? recurring_payment_terms_of_service_url,
- String? terms_of_service_url,
- bool? is_test,
- bool? need_name,
- bool? need_phone_number,
- bool? need_email_address,
- bool? need_shipping_address,
- bool? send_phone_number_to_provider,
- bool? send_email_address_to_provider,
- bool? is_flexible,
override
Generate By General Universe Script Dont edit by hand or anything manual
Implementation
static Invoice create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "invoice",
String special_return_type = "invoice",
String? currency,
List<LabeledPricePart>? price_parts,
num? subscription_period,
num? max_tip_amount,
List<num>? suggested_tip_amounts,
String? recurring_payment_terms_of_service_url,
String? terms_of_service_url,
bool? is_test,
bool? need_name,
bool? need_phone_number,
bool? need_email_address,
bool? need_shipping_address,
bool? send_phone_number_to_provider,
bool? send_email_address_to_provider,
bool? is_flexible,
}) {
// Invoice invoice = Invoice({
final Map invoice_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"currency": currency,
"price_parts": (price_parts != null) ? price_parts.toJson() : null,
"subscription_period": subscription_period,
"max_tip_amount": max_tip_amount,
"suggested_tip_amounts": suggested_tip_amounts,
"recurring_payment_terms_of_service_url": recurring_payment_terms_of_service_url,
"terms_of_service_url": terms_of_service_url,
"is_test": is_test,
"need_name": need_name,
"need_phone_number": need_phone_number,
"need_email_address": need_email_address,
"need_shipping_address": need_shipping_address,
"send_phone_number_to_provider": send_phone_number_to_provider,
"send_email_address_to_provider": send_email_address_to_provider,
"is_flexible": is_flexible,
};
invoice_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (invoice_data_create_json.containsKey(key) == false) {
invoice_data_create_json[key] = value;
}
});
}
return Invoice(invoice_data_create_json);
}