lib/centaman/service/update_member.rb in centaman-4.0.1 vs lib/centaman/service/update_member.rb in centaman-4.0.2
- old
+ new
@@ -32,15 +32,15 @@
@build_object ||= object_class.new(resp.merge(additional_hash_to_serialize_after_response))
end
def options_hash_no_json
{
- 'FirstName' => first_name,
- 'LastName' => last_name,
- 'homeAddress' => home_address,
- 'Gender' => gender,
- 'Email' => email,
+ 'FirstName' => first_name.try(:upcase),
+ 'LastName' => last_name.try(:upcase),
+ 'homeAddress' => home_address.try(:upcase),
+ 'Gender' => gender.try(:upcase),
+ 'Email' => email.try(:upcase),
'Password' => password,
'IsPrimary' => is_primary
}
end
@@ -51,15 +51,15 @@
private
def home_address
return if !address
{
- 'street1': address[:street_address],
+ 'street1': address[:street_address].try(:upcase),
'street2': '',
- 'suburb': address[:suburb],
- 'state': address[:state],
- 'postcode': address[:zip],
- 'country': address[:country],
+ 'suburb': address[:suburb].try(:upcase),
+ 'state': address[:state].try(:upcase),
+ 'postcode': address[:zip].try(:upcase),
+ 'country': address[:country].try(:upcase),
'homePhone': phone,
'workPhone': address[:work_phone],
'mobilePhone': address[:mobile_phone]
}
end