Corrected codeclimate issues

This commit is contained in:
Sergei Tsõganov 2022-01-04 14:17:32 +02:00 committed by Sergei Tsõganov
parent 6eaca805dc
commit 7b7a25069c

View file

@ -146,8 +146,8 @@ module Depp
end end
def save def save
return false if !valid? return false unless valid?
hash = { hash = {
id: { value: code }, id: { value: code },
postalInfo: { postalInfo: {
@ -175,8 +175,9 @@ module Depp
handle_errors(data) handle_errors(data)
end end
def update_attributes(params) # rubocop:disable Metrics/MethodLength
return false if !valid? def update_attributes(params)
return false unless valid?
self.ident_country_code = params[:ident_country_code] self.ident_country_code = params[:ident_country_code]
self.ident_type = params[:ident_type] self.ident_type = params[:ident_type]
@ -225,6 +226,7 @@ module Depp
data = Depp::Contact.user.request(update_xml) data = Depp::Contact.user.request(update_xml)
handle_errors(data) handle_errors(data)
end end
# rubocop:enable Metrics/MethodLength
def delete def delete
delete_xml = Contact.epp_xml.delete( delete_xml = Contact.epp_xml.delete(