lib/plaid/models/deductions.rb in plaid-14.5.0 vs lib/plaid/models/deductions.rb in plaid-14.6.0
- old
+ new
@@ -1,11 +1,11 @@
=begin
#The Plaid API
#The Plaid REST API. Please see https://plaid.com/docs/api for more details.
-The version of the OpenAPI document: 2020-09-14_1.37.4
+The version of the OpenAPI document: 2020-09-14_1.40.3
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 5.1.0
=end
@@ -16,17 +16,23 @@
module Plaid
# An object with the deduction information found on a paystub.
class Deductions
attr_accessor :subtotals
+ attr_accessor :breakdown
+
attr_accessor :totals
+ attr_accessor :total
+
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'subtotals' => :'subtotals',
- :'totals' => :'totals'
+ :'breakdown' => :'breakdown',
+ :'totals' => :'totals',
+ :'total' => :'total'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -35,11 +41,13 @@
# Attribute type mapping.
def self.openapi_types
{
:'subtotals' => :'Array<Total>',
- :'totals' => :'Array<Total>'
+ :'breakdown' => :'Array<DeductionsBreakdown>',
+ :'totals' => :'Array<Total>',
+ :'total' => :'DeductionsTotal'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
@@ -66,37 +74,59 @@
if (value = attributes[:'subtotals']).is_a?(Array)
self.subtotals = value
end
end
+ if attributes.key?(:'breakdown')
+ if (value = attributes[:'breakdown']).is_a?(Array)
+ self.breakdown = value
+ end
+ end
+
if attributes.key?(:'totals')
if (value = attributes[:'totals']).is_a?(Array)
self.totals = value
end
end
+
+ if attributes.key?(:'total')
+ self.total = attributes[:'total']
+ end
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
+ if @breakdown.nil?
+ invalid_properties.push('invalid value for "breakdown", breakdown cannot be nil.')
+ end
+
+ if @total.nil?
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
+ end
+
invalid_properties
end
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
+ return false if @breakdown.nil?
+ return false if @total.nil?
true
end
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
subtotals == o.subtotals &&
- totals == o.totals
+ breakdown == o.breakdown &&
+ totals == o.totals &&
+ total == o.total
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -104,10 +134,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [subtotals, totals].hash
+ [subtotals, breakdown, totals, total].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself