1010 SignHere ,
1111 Tabs ,
1212 Recipients ,
13- RecipientPhoneNumber ,
14- RecipientAdditionalNotification ,
13+ RecipientPhoneNumber
1514)
1615
1716from flask import session , request
@@ -28,19 +27,15 @@ def get_args():
2827
2928 # More data validation would be a good idea here
3029 # Strip anything other than characters listed
31- signer_email = pattern .sub ("" , request .form .get ("signer_email" ))
3230 signer_name = pattern .sub ("" , request .form .get ("signer_name" ))
33- cc_email = pattern .sub ("" , request .form .get ("cc_email" ))
3431 cc_name = pattern .sub ("" , request .form .get ("cc_name" ))
3532 cc_phone_number = request .form .get ("cc_phone_number" )
3633 cc_country_code = request .form .get ("country_code" )
3734 phone_number = request .form .get ("phone_number" )
3835 country_code = request .form .get ("country_code" )
3936 envelope_args = {
40- "signer_email" : signer_email ,
4137 "signer_name" : signer_name ,
4238 "status" : "sent" ,
43- "cc_email" : cc_email ,
4439 "cc_name" : cc_name ,
4540 "country_code" : country_code ,
4641 "phone_number" : phone_number ,
@@ -127,23 +122,17 @@ def make_envelope(cls, args):
127122 # The order in the docs array determines the order in the envelope
128123 env .documents = [document1 , document2 , document3 ]
129124
130- phoneNumber = RecipientPhoneNumber (
125+ signerPhoneNumber = RecipientPhoneNumber (
131126 country_code = args ["country_code" ],
132127 number = args ["phone_number" ]
133128 )
134129
135- sms_notification = RecipientAdditionalNotification (
136- phone_number = phoneNumber
137- )
138- sms_notification .secondary_delivery_method = "SMS"
139-
140130 # Create the signer recipient model
141131 signer1 = Signer (
142- email = args ["signer_email" ],
143132 name = args ["signer_name" ],
144133 recipient_id = "1" ,
145134 routing_order = "1" ,
146- additional_notifications = [ sms_notification ]
135+ phone_number = signerPhoneNumber
147136 )
148137
149138 # Create a RecipientPhoneNumber and add it to the additional SMS notification
@@ -152,18 +141,12 @@ def make_envelope(cls, args):
152141 number = args ["cc_phone_number" ]
153142 )
154143
155- cc_sms_notification = RecipientAdditionalNotification (
156- phone_number = ccPhoneNumber
157- )
158- cc_sms_notification .secondary_delivery_method = "SMS"
159-
160144 # Create a cc recipient to receive a copy of the documents
161145 cc1 = CarbonCopy (
162- email = args ["cc_email" ],
163146 name = args ["cc_name" ],
164147 recipient_id = "2" ,
165148 routing_order = "2" ,
166- additional_notifications = [ cc_sms_notification ]
149+ phone_number = ccPhoneNumber
167150 )
168151
169152 # routingOrder (lower means earlier) determines the order of deliveries
@@ -222,8 +205,8 @@ def create_document1(cls, args):
222205 margin-top: 0px;margin-bottom: 3.5em;font-size: 1em;
223206 color: darkblue;">Order Processing Division</h2>
224207 <h4>Ordered by { args ["signer_name" ]} </h4>
225- <p style="margin-top:0em; margin-bottom:0em;">Email : { args ["signer_email " ]} </p>
226- <p style="margin-top:0em; margin-bottom:0em;">Copy to: { args ["cc_name" ]} , { args [ "cc_email" ] } </p>
208+ <p style="margin-top:0em; margin-bottom:0em;">Phone Number : { args ["phone_number " ]} </p>
209+ <p style="margin-top:0em; margin-bottom:0em;">Copy to: { args ["cc_name" ]} </p>
227210 <p style="margin-top:3em;">
228211 Candy bonbon pastry jujubes lollipop wafer biscuit biscuit. Topping brownie sesame snaps sweet roll pie.
229212 Croissant danish biscuit soufflé caramels jujubes jelly. Dragée danish caramels lemon drops dragée.
0 commit comments