lib/braintree/transaction.rb in braintree-2.49.0 vs lib/braintree/transaction.rb in braintree-2.50.0

- old
+ new

@@ -102,10 +102,12 @@ attr_reader :voice_referral_number attr_reader :purchase_order_number attr_reader :recurring attr_reader :refund_ids, :refunded_transaction_id attr_reader :settlement_batch_id + attr_reader :authorized_transaction_id + attr_reader :partial_settlement_transaction_ids # See Transaction::Status attr_reader :status attr_reader :status_history attr_reader :subscription_id attr_reader :tax_amount @@ -114,10 +116,11 @@ attr_reader :type attr_reader :updated_at attr_reader :add_ons, :discounts attr_reader :payment_instrument_type attr_reader :risk_data + attr_reader :facilitator_details attr_reader :three_d_secure_info def self.create(attributes) Configuration.gateway.transaction.create(attributes) end @@ -208,10 +211,14 @@ def self.submit_for_settlement!(transaction_id, amount = nil) return_object_or_raise(:transaction) { submit_for_settlement(transaction_id, amount) } end + def self.submit_for_partial_settlement(authorized_transaction_id, amount = nil) + Configuration.gateway.transaction.submit_for_partial_settlement(authorized_transaction_id, amount) + end + def self.void(transaction_id) Configuration.gateway.transaction.void(transaction_id) end def self.void!(transaction_id) @@ -240,9 +247,10 @@ @custom_fields = attributes[:custom_fields].is_a?(Hash) ? attributes[:custom_fields] : {} add_ons.map! { |attrs| AddOn._new(attrs) } if add_ons discounts.map! { |attrs| Discount._new(attrs) } if discounts @payment_instrument_type = attributes[:payment_instrument_type] @risk_data = RiskData.new(attributes[:risk_data]) if attributes[:risk_data] + @facilitator_details = FacilitatorDetails.new(attributes[:facilitator_details]) if attributes[:facilitator_details] @three_d_secure_info = ThreeDSecureInfo.new(attributes[:three_d_secure_info]) if attributes[:three_d_secure_info] end # True if <tt>other</tt> is a Braintree::Transaction with the same id. def ==(other)