public static async Task <InstalmentLink> Create( Int64 supplierId, String customerEmail, String invoiceIdentifier, Decimal invoiceValue, CommunicationOption communication, Session session ) { String emailCustomer; if (communication == CommunicationOption.NotifyCustomer) { emailCustomer = "true"; } else { emailCustomer = "false"; } String stringSupplierId = supplierId.ToString(); String stringInvoiceValue = Math.Round(invoiceValue, 2).ToString(); CreatePayload payload = new CreatePayload( stringSupplierId, stringInvoiceValue, customerEmail, invoiceIdentifier, emailCustomer ); String resultBody = await ApiRequest.Make <CreatePayload>( path : InstalmentLink.path, body : payload, method : HttpMethod.Post, session : session ); var decodePayload = ApiRequest.DecodeResponse <DecodePayload>( resultBody ); var link = new InstalmentLink( decodePayload.public_id, decodePayload.supplier, decodePayload.invitee_email, Convert.ToDecimal(decodePayload.invoice_amount), decodePayload.invoice_identifier ); return(link); }
? (ProfileTree) new ProfileTreeLeaf( CreatePayload(name, s),