class Braintree::Dispute
Attributes
NEXT_MAJOR_VERSION Remove this attribute DEPRECATED The chargeback_protection_level
attribute is deprecated in favor of protection_level
Public Class Methods
Source
# File lib/braintree/dispute.rb, line 106 def self.accept(*args) Configuration.gateway.dispute.accept(*args) end
Source
# File lib/braintree/dispute.rb, line 110 def self.add_file_evidence(*args) Configuration.gateway.dispute.add_file_evidence(*args) end
Source
# File lib/braintree/dispute.rb, line 114 def self.add_text_evidence(*args) Configuration.gateway.dispute.add_text_evidence(*args) end
Source
# File lib/braintree/dispute.rb, line 118 def self.finalize(*args) Configuration.gateway.dispute.finalize(*args) end
Source
# File lib/braintree/dispute.rb, line 122 def self.find(*args) Configuration.gateway.dispute.find(*args) end
Source
# File lib/braintree/dispute.rb, line 134 def initialize(attributes) set_instance_variables_from_hash(attributes) @date_opened = Date.parse(date_opened) unless date_opened.nil? @date_won = Date.parse(date_won) unless date_won.nil? @received_date = Date.parse(received_date) @reply_by_date = Date.parse(reply_by_date) unless reply_by_date.nil? @amount = Util.to_big_decimal(amount) @amount_disputed = Util.to_big_decimal(amount_disputed) @amount_won = Util.to_big_decimal(amount_won) if (ChargebackProtectionLevel::All - [ChargebackProtectionLevel::NotProtected]).include?(chargeback_protection_level) @protection_level = Dispute.const_get("ProtectionLevel::#{chargeback_protection_level.capitalize}CBP") else @protection_level = ProtectionLevel::NoProtection end @evidence = evidence.map do |record| Braintree::Dispute::Evidence.new(record) end unless evidence.nil? @paypal_messages = paypal_messages.map do |record| Braintree::Dispute::PayPalMessage.new(record) end unless paypal_messages.nil? @transaction_details = TransactionDetails.new(transaction) @transaction = Transaction.new(transaction) @status_history = status_history.map do |event| Braintree::Dispute::StatusHistory.new(event) end unless status_history.nil? end
Source
# File lib/braintree/dispute.rb, line 126 def self.remove_evidence(*args) Configuration.gateway.dispute.remove_evidence(*args) end
Source
# File lib/braintree/dispute.rb, line 130 def self.search(&block) Configuration.gateway.dispute.search(&block) end