lib/fake_braintree/customer.rb in fake_braintree-0.4 vs lib/fake_braintree/customer.rb in fake_braintree-0.4.1
- old
+ new
@@ -102,11 +102,11 @@
credit_card_hash['number']
end
def set_default_credit_card(credit_card_hash)
if credit_card_hash
- CreditCard.new(credit_card_hash, :customer_id => @customer_hash['id'], :make_default => true).update
+ CreditCard.new(credit_card_hash, customer_id: @customer_hash['id'], make_default: true).update
end
end
def generate_credit_cards_from(new_credit_card_hash)
if new_credit_card_hash.present? && new_credit_card_hash.is_a?(Hash)
@@ -151,15 +151,15 @@
def deletion_response
gzipped_response(200, '')
end
def response_for_created_customer(hash)
- gzipped_response(201, hash.to_xml(:root => 'customer'))
+ gzipped_response(201, hash.to_xml(root: 'customer'))
end
def response_for_updated_customer(hash)
- gzipped_response(200, hash.to_xml(:root => 'customer'))
+ gzipped_response(200, hash.to_xml(root: 'customer'))
end
def response_for_invalid_card
failure_response(422)
end
@@ -167,10 +167,10 @@
def response_for_customer_not_found
failure_response(404)
end
def failure_response(code)
- gzipped_response(code, FakeBraintree.failure_response(credit_card_number).to_xml(:root => 'api_error_response'))
+ gzipped_response(code, FakeBraintree.failure_response(credit_card_number).to_xml(root: 'api_error_response'))
end
def customer_id
customer_hash['id']
end