Class: Braintree::Dispute
- Inherits:
-
Object
- Object
- Braintree::Dispute
- Includes:
- BaseModule, Util::IdEquality
- Defined in:
- lib/braintree/dispute.rb,
lib/braintree/dispute/evidence.rb,
lib/braintree/dispute/transaction.rb,
lib/braintree/dispute/paypal_message.rb,
lib/braintree/dispute/status_history.rb,
lib/braintree/dispute/transaction_details.rb
Overview
:nodoc:
Defined Under Namespace
Modules: ChargebackProtectionLevel, Kind, Reason, Status Classes: Evidence, PayPalMessage, StatusHistory, Transaction, TransactionDetails
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#amount_disputed ⇒ Object
readonly
Returns the value of attribute amount_disputed.
-
#amount_won ⇒ Object
readonly
Returns the value of attribute amount_won.
-
#case_number ⇒ Object
readonly
Returns the value of attribute case_number.
-
#chargeback_protection_level ⇒ Object
readonly
Returns the value of attribute chargeback_protection_level.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#currency_iso_code ⇒ Object
readonly
Returns the value of attribute currency_iso_code.
-
#date_opened ⇒ Object
readonly
Returns the value of attribute date_opened.
-
#date_won ⇒ Object
readonly
Returns the value of attribute date_won.
-
#evidence ⇒ Object
readonly
Returns the value of attribute evidence.
-
#graphql_id ⇒ Object
readonly
Returns the value of attribute graphql_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#merchant_account_id ⇒ Object
readonly
Returns the value of attribute merchant_account_id.
-
#original_dispute_id ⇒ Object
readonly
Returns the value of attribute original_dispute_id.
-
#paypal_messages ⇒ Object
readonly
Returns the value of attribute paypal_messages.
-
#processor_comments ⇒ Object
readonly
Returns the value of attribute processor_comments.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#reason_code ⇒ Object
readonly
Returns the value of attribute reason_code.
-
#reason_description ⇒ Object
readonly
Returns the value of attribute reason_description.
-
#received_date ⇒ Object
readonly
Returns the value of attribute received_date.
-
#reference_number ⇒ Object
readonly
Returns the value of attribute reference_number.
-
#reply_by_date ⇒ Object
readonly
Returns the value of attribute reply_by_date.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#status_history ⇒ Object
readonly
Returns the value of attribute status_history.
-
#transaction ⇒ Object
readonly
Returns the value of attribute transaction.
-
#transaction_details ⇒ Object
readonly
Returns the value of attribute transaction_details.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Class Method Summary collapse
-
._new(*args) ⇒ Object
:nodoc:.
- .accept(*args) ⇒ Object
- .add_file_evidence(*args) ⇒ Object
- .add_text_evidence(*args) ⇒ Object
- .finalize(*args) ⇒ Object
- .find(*args) ⇒ Object
- .remove_evidence(*args) ⇒ Object
- .search(&block) ⇒ Object
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Dispute
constructor
:nodoc:.
Methods included from Util::IdEquality
Methods included from BaseModule
Methods included from BaseModule::Methods
#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class
Constructor Details
#initialize(attributes) ⇒ Dispute
:nodoc:
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/braintree/dispute.rb', line 113 def initialize(attributes) # :nodoc: 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) @evidence = evidence.map do |record| Braintree::Dispute::Evidence.new(record) end unless evidence.nil? @paypal_messages = .map do |record| Braintree::Dispute::PayPalMessage.new(record) end unless .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 |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
6 7 8 |
# File 'lib/braintree/dispute.rb', line 6 def amount @amount end |
#amount_disputed ⇒ Object (readonly)
Returns the value of attribute amount_disputed.
7 8 9 |
# File 'lib/braintree/dispute.rb', line 7 def amount_disputed @amount_disputed end |
#amount_won ⇒ Object (readonly)
Returns the value of attribute amount_won.
8 9 10 |
# File 'lib/braintree/dispute.rb', line 8 def amount_won @amount_won end |
#case_number ⇒ Object (readonly)
Returns the value of attribute case_number.
9 10 11 |
# File 'lib/braintree/dispute.rb', line 9 def case_number @case_number end |
#chargeback_protection_level ⇒ Object (readonly)
Returns the value of attribute chargeback_protection_level.
10 11 12 |
# File 'lib/braintree/dispute.rb', line 10 def chargeback_protection_level @chargeback_protection_level end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
11 12 13 |
# File 'lib/braintree/dispute.rb', line 11 def created_at @created_at end |
#currency_iso_code ⇒ Object (readonly)
Returns the value of attribute currency_iso_code.
12 13 14 |
# File 'lib/braintree/dispute.rb', line 12 def currency_iso_code @currency_iso_code end |
#date_opened ⇒ Object (readonly)
Returns the value of attribute date_opened.
13 14 15 |
# File 'lib/braintree/dispute.rb', line 13 def date_opened @date_opened end |
#date_won ⇒ Object (readonly)
Returns the value of attribute date_won.
14 15 16 |
# File 'lib/braintree/dispute.rb', line 14 def date_won @date_won end |
#evidence ⇒ Object (readonly)
Returns the value of attribute evidence.
15 16 17 |
# File 'lib/braintree/dispute.rb', line 15 def evidence @evidence end |
#graphql_id ⇒ Object (readonly)
Returns the value of attribute graphql_id.
16 17 18 |
# File 'lib/braintree/dispute.rb', line 16 def graphql_id @graphql_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
17 18 19 |
# File 'lib/braintree/dispute.rb', line 17 def id @id end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
18 19 20 |
# File 'lib/braintree/dispute.rb', line 18 def kind @kind end |
#merchant_account_id ⇒ Object (readonly)
Returns the value of attribute merchant_account_id.
19 20 21 |
# File 'lib/braintree/dispute.rb', line 19 def merchant_account_id @merchant_account_id end |
#original_dispute_id ⇒ Object (readonly)
Returns the value of attribute original_dispute_id.
20 21 22 |
# File 'lib/braintree/dispute.rb', line 20 def original_dispute_id @original_dispute_id end |
#paypal_messages ⇒ Object (readonly)
Returns the value of attribute paypal_messages.
21 22 23 |
# File 'lib/braintree/dispute.rb', line 21 def @paypal_messages end |
#processor_comments ⇒ Object (readonly)
Returns the value of attribute processor_comments.
22 23 24 |
# File 'lib/braintree/dispute.rb', line 22 def processor_comments @processor_comments end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
23 24 25 |
# File 'lib/braintree/dispute.rb', line 23 def reason @reason end |
#reason_code ⇒ Object (readonly)
Returns the value of attribute reason_code.
24 25 26 |
# File 'lib/braintree/dispute.rb', line 24 def reason_code @reason_code end |
#reason_description ⇒ Object (readonly)
Returns the value of attribute reason_description.
25 26 27 |
# File 'lib/braintree/dispute.rb', line 25 def reason_description @reason_description end |
#received_date ⇒ Object (readonly)
Returns the value of attribute received_date.
26 27 28 |
# File 'lib/braintree/dispute.rb', line 26 def received_date @received_date end |
#reference_number ⇒ Object (readonly)
Returns the value of attribute reference_number.
27 28 29 |
# File 'lib/braintree/dispute.rb', line 27 def reference_number @reference_number end |
#reply_by_date ⇒ Object (readonly)
Returns the value of attribute reply_by_date.
28 29 30 |
# File 'lib/braintree/dispute.rb', line 28 def reply_by_date @reply_by_date end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
29 30 31 |
# File 'lib/braintree/dispute.rb', line 29 def status @status end |
#status_history ⇒ Object (readonly)
Returns the value of attribute status_history.
30 31 32 |
# File 'lib/braintree/dispute.rb', line 30 def status_history @status_history end |
#transaction ⇒ Object (readonly)
Returns the value of attribute transaction.
31 32 33 |
# File 'lib/braintree/dispute.rb', line 31 def transaction @transaction end |
#transaction_details ⇒ Object (readonly)
Returns the value of attribute transaction_details.
32 33 34 |
# File 'lib/braintree/dispute.rb', line 32 def transaction_details @transaction_details end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
33 34 35 |
# File 'lib/braintree/dispute.rb', line 33 def updated_at @updated_at end |
Class Method Details
._new(*args) ⇒ Object
:nodoc:
80 81 82 |
# File 'lib/braintree/dispute.rb', line 80 def _new(*args) # :nodoc: self.new(*args) end |
.accept(*args) ⇒ Object
85 86 87 |
# File 'lib/braintree/dispute.rb', line 85 def self.accept(*args) Configuration.gateway.dispute.accept(*args) end |
.add_file_evidence(*args) ⇒ Object
89 90 91 |
# File 'lib/braintree/dispute.rb', line 89 def self.add_file_evidence(*args) Configuration.gateway.dispute.add_file_evidence(*args) end |
.add_text_evidence(*args) ⇒ Object
93 94 95 |
# File 'lib/braintree/dispute.rb', line 93 def self.add_text_evidence(*args) Configuration.gateway.dispute.add_text_evidence(*args) end |
.finalize(*args) ⇒ Object
97 98 99 |
# File 'lib/braintree/dispute.rb', line 97 def self.finalize(*args) Configuration.gateway.dispute.finalize(*args) end |
.find(*args) ⇒ Object
101 102 103 |
# File 'lib/braintree/dispute.rb', line 101 def self.find(*args) Configuration.gateway.dispute.find(*args) end |
.remove_evidence(*args) ⇒ Object
105 106 107 |
# File 'lib/braintree/dispute.rb', line 105 def self.remove_evidence(*args) Configuration.gateway.dispute.remove_evidence(*args) end |
.search(&block) ⇒ Object
109 110 111 |
# File 'lib/braintree/dispute.rb', line 109 def self.search(&block) Configuration.gateway.dispute.search(&block) end |