Class: ThePlaidApi::ConsumerDispute
- Defined in:
- lib/the_plaid_api/models/consumer_dispute.rb
Overview
The information about a previously submitted valid dispute statement by the consumer
Instance Attribute Summary collapse
-
#category ⇒ ConsumerReportCategory
Type of data being disputed by the consumer.
-
#consumer_dispute_id ⇒ String
(Deprecated) A unique identifier (UUID) of the consumer dispute that can be used for troubleshooting.
-
#dispute_field_create_date ⇒ Date
Date of the disputed field (e.g. transaction date), in an ISO 8601 format (YYYY-MM-DD).
-
#statement ⇒ String
Text content of dispute.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(consumer_dispute_id:, dispute_field_create_date:, category:, statement:, additional_properties: nil) ⇒ ConsumerDispute
constructor
A new instance of ConsumerDispute.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(consumer_dispute_id:, dispute_field_create_date:, category:, statement:, additional_properties: nil) ⇒ ConsumerDispute
Returns a new instance of ConsumerDispute.
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/the_plaid_api/models/consumer_dispute.rb', line 51 def initialize(consumer_dispute_id:, dispute_field_create_date:, category:, statement:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @consumer_dispute_id = consumer_dispute_id @dispute_field_create_date = dispute_field_create_date @category = category @statement = statement @additional_properties = additional_properties end |
Instance Attribute Details
#category ⇒ ConsumerReportCategory
Type of data being disputed by the consumer
25 26 27 |
# File 'lib/the_plaid_api/models/consumer_dispute.rb', line 25 def category @category end |
#consumer_dispute_id ⇒ String
(Deprecated) A unique identifier (UUID) of the consumer dispute that can be used for troubleshooting
16 17 18 |
# File 'lib/the_plaid_api/models/consumer_dispute.rb', line 16 def consumer_dispute_id @consumer_dispute_id end |
#dispute_field_create_date ⇒ Date
Date of the disputed field (e.g. transaction date), in an ISO 8601 format (YYYY-MM-DD)
21 22 23 |
# File 'lib/the_plaid_api/models/consumer_dispute.rb', line 21 def dispute_field_create_date @dispute_field_create_date end |
#statement ⇒ String
Text content of dispute
29 30 31 |
# File 'lib/the_plaid_api/models/consumer_dispute.rb', line 29 def statement @statement end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/the_plaid_api/models/consumer_dispute.rb', line 64 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. consumer_dispute_id = hash.key?('consumer_dispute_id') ? hash['consumer_dispute_id'] : nil dispute_field_create_date = hash.key?('dispute_field_create_date') ? hash['dispute_field_create_date'] : nil category = hash.key?('category') ? hash['category'] : nil statement = hash.key?('statement') ? hash['statement'] : nil # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. ConsumerDispute.new(consumer_dispute_id: consumer_dispute_id, dispute_field_create_date: dispute_field_create_date, category: category, statement: statement, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
32 33 34 35 36 37 38 39 |
# File 'lib/the_plaid_api/models/consumer_dispute.rb', line 32 def self.names @_hash = {} if @_hash.nil? @_hash['consumer_dispute_id'] = 'consumer_dispute_id' @_hash['dispute_field_create_date'] = 'dispute_field_create_date' @_hash['category'] = 'category' @_hash['statement'] = 'statement' @_hash end |
.nullables ⇒ Object
An array for nullable fields
47 48 49 |
# File 'lib/the_plaid_api/models/consumer_dispute.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
42 43 44 |
# File 'lib/the_plaid_api/models/consumer_dispute.rb', line 42 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
99 100 101 102 103 104 105 |
# File 'lib/the_plaid_api/models/consumer_dispute.rb', line 99 def inspect class_name = self.class.name.split('::').last "<#{class_name} consumer_dispute_id: #{@consumer_dispute_id.inspect},"\ " dispute_field_create_date: #{@dispute_field_create_date.inspect}, category:"\ " #{@category.inspect}, statement: #{@statement.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
91 92 93 94 95 96 |
# File 'lib/the_plaid_api/models/consumer_dispute.rb', line 91 def to_s class_name = self.class.name.split('::').last "<#{class_name} consumer_dispute_id: #{@consumer_dispute_id}, dispute_field_create_date:"\ " #{@dispute_field_create_date}, category: #{@category}, statement: #{@statement},"\ " additional_properties: #{@additional_properties}>" end |