lib/braintree/credit_card_gateway.rb in braintree-2.31.0 vs lib/braintree/credit_card_gateway.rb in braintree-2.32.1
- old
+ new
@@ -23,11 +23,11 @@
params = @gateway.transparent_redirect.parse_and_validate_query_string query_string
_do_create("/payment_methods/all/confirm_transparent_redirect_request", :id => params[:id])
end
def delete(token)
- @config.http.delete("/payment_methods/#{token}")
+ @config.http.delete("/payment_methods/credit_card/#{token}")
end
def expired(options = {})
response = @config.http.post("/payment_methods/all/expired_ids")
ResourceCollection.new(response) { |ids| _fetch_expired(ids) }
@@ -40,11 +40,11 @@
ResourceCollection.new(response) { |ids| _fetch_expiring_between(formatted_start_date, formatted_end_date, ids) }
end
def find(token)
raise ArgumentError if token.nil? || token.to_s.strip == ""
- response = @config.http.get "/payment_methods/#{token}"
+ response = @config.http.get "/payment_methods/credit_card/#{token}"
CreditCard._new(@gateway, response[:credit_card])
rescue NotFoundError
raise NotFoundError, "payment method with token #{token.inspect} not found"
end
@@ -56,10 +56,10 @@
raise NotFoundError, "nonce #{nonce.inspect} locked, consumed, or not found"
end
def update(token, attributes)
Util.verify_keys(CreditCardGateway._update_signature, attributes)
- _do_update(:put, "/payment_methods/#{token}", :credit_card => attributes)
+ _do_update(:put, "/payment_methods/credit_card/#{token}", :credit_card => attributes)
end
# Deprecated
def update_from_transparent_redirect(query_string)
warn "[DEPRECATED] CreditCard.update_via_transparent_redirect_request is deprecated. Please use TransparentRedirect.confirm"