lib/braintree/transaction_gateway.rb in braintree-2.60.0 vs lib/braintree/transaction_gateway.rb in braintree-2.61.0
- old
+ new
@@ -104,10 +104,17 @@
transaction_params = {:amount => amount}.merge(options)
response = @config.http.put("#{@config.base_merchant_path}/transactions/#{transaction_id}/submit_for_settlement", :transaction => transaction_params)
_handle_transaction_response(response)
end
+ def update_details(transaction_id, options = {})
+ raise ArgumentError, "transaction_id is invalid" unless transaction_id =~ /\A[0-9a-z]+\z/
+ Util.verify_keys(TransactionGateway._update_details_signature, options)
+ response = @config.http.put("#{@config.base_merchant_path}/transactions/#{transaction_id}/update_details", :transaction => options)
+ _handle_transaction_response(response)
+ end
+
def submit_for_partial_settlement(authorized_transaction_id, amount = nil, options = {})
raise ArgumentError, "authorized_transaction_id is invalid" unless authorized_transaction_id =~ /\A[0-9a-z]+\z/
Util.verify_keys(TransactionGateway._submit_for_settlement_signature, options)
transaction_params = {:amount => amount}.merge(options)
response = @config.http.post("#{@config.base_merchant_path}/transactions/#{authorized_transaction_id}/submit_for_partial_settlement", :transaction => transaction_params)
@@ -163,9 +170,17 @@
]
end
def self._submit_for_settlement_signature # :nodoc:
[
+ :order_id,
+ {:descriptor => [:name, :phone, :url]},
+ ]
+ end
+
+ def self._update_details_signature # :nodoc:
+ [
+ :amount,
:order_id,
{:descriptor => [:name, :phone, :url]},
]
end