lib/plaid/models/transfer_sweep.rb in plaid-20.0.0 vs lib/plaid/models/transfer_sweep.rb in plaid-21.0.0
- old
+ new
@@ -1,14 +1,14 @@
=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.385.1
+The version of the OpenAPI document: 2020-09-14_1.391.1
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 6.1.0
=end
require 'date'
require 'time'
@@ -32,19 +32,22 @@
attr_accessor :iso_currency_code
# The date when the sweep settled, in the YYYY-MM-DD format.
attr_accessor :settled
+ attr_accessor :status
+
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'id' => :'id',
:'funding_account_id' => :'funding_account_id',
:'created' => :'created',
:'amount' => :'amount',
:'iso_currency_code' => :'iso_currency_code',
- :'settled' => :'settled'
+ :'settled' => :'settled',
+ :'status' => :'status'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -57,18 +60,20 @@
:'id' => :'String',
:'funding_account_id' => :'String',
:'created' => :'Time',
:'amount' => :'String',
:'iso_currency_code' => :'String',
- :'settled' => :'Date'
+ :'settled' => :'Date',
+ :'status' => :'SweepStatus'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
- :'settled'
+ :'settled',
+ :'status'
])
end
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
@@ -106,10 +111,14 @@
end
if attributes.key?(:'settled')
self.settled = attributes[:'settled']
end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ 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
@@ -156,11 +165,12 @@
id == o.id &&
funding_account_id == o.funding_account_id &&
created == o.created &&
amount == o.amount &&
iso_currency_code == o.iso_currency_code &&
- settled == o.settled
+ settled == o.settled &&
+ status == o.status
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -168,11 +178,11 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [id, funding_account_id, created, amount, iso_currency_code, settled].hash
+ [id, funding_account_id, created, amount, iso_currency_code, settled, status].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself
@@ -183,9 +193,10 @@
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
self.class.openapi_types.each_pair do |key, type|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
self.send("#{key}=", nil)
elsif type =~ /\AArray<(.*)>/i
# check to ensure the input is an array given that the attribute