lib/centaman/service/update_member.rb in centaman-6.0.2 vs lib/centaman/service/update_member.rb in centaman-6.0.3

- old
+ new

@@ -35,11 +35,11 @@ def options_hash_no_json { 'FirstName' => first_name.try(:upcase), 'LastName' => last_name.try(:upcase), 'HomeAddress' => home_address, - 'Gender' => gender.try(:upcase), + 'Gender' => gender, 'Email' => email.try(:upcase), 'Password' => password, 'IsPrimary' => is_primary } end @@ -52,11 +52,11 @@ def home_address return if !address { 'street1': address[:street_address].try(:squish).try(:upcase), - 'street2': '', + 'street2': address[:street_address_two].try(:squish).try(:upcase), 'suburb': address[:suburb].try(:squish).try(:upcase), 'city': address[:city].try(:squish).try(:upcase), 'state': address[:state].try(:squish).try(:upcase), 'postcode': address[:zip].try(:squish).try(:upcase), 'country': address[:country].try(:squish).try(:upcase), @@ -65,10 +65,10 @@ 'mobilePhone': address[:mobile_phone].try(:delete, "^0-9") } end def update_error(resp) - message = { error: resp.parsed_response || 'Unable to update member record.' } - raise message[:error] + message = resp.parsed_response || 'Unable to update member record.' + raise Centaman::Exceptions::CentamanError.new(message) end end end