Class: ThePlaidApi::ItemStatusNullable
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::ItemStatusNullable
- Defined in:
- lib/the_plaid_api/models/item_status_nullable.rb
Overview
Information about the last successful and failed transactions update for the Item.
Instance Attribute Summary collapse
-
#investments ⇒ ItemStatusInvestments
Information about the last successful and failed investments update for the Item.
-
#last_webhook ⇒ ItemStatusLastWebhook
Information about the last webhook fired for the Item.
-
#transactions ⇒ ItemStatusTransactions
Information about the last successful and failed transactions update for the Item.
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(investments: SKIP, transactions: SKIP, last_webhook: SKIP, additional_properties: nil) ⇒ ItemStatusNullable
constructor
A new instance of ItemStatusNullable.
-
#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(investments: SKIP, transactions: SKIP, last_webhook: SKIP, additional_properties: nil) ⇒ ItemStatusNullable
Returns a new instance of ItemStatusNullable.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/the_plaid_api/models/item_status_nullable.rb', line 54 def initialize(investments: SKIP, transactions: SKIP, last_webhook: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @investments = investments unless investments == SKIP @transactions = transactions unless transactions == SKIP @last_webhook = last_webhook unless last_webhook == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#investments ⇒ ItemStatusInvestments
Information about the last successful and failed investments update for the Item.
16 17 18 |
# File 'lib/the_plaid_api/models/item_status_nullable.rb', line 16 def investments @investments end |
#last_webhook ⇒ ItemStatusLastWebhook
Information about the last webhook fired for the Item.
25 26 27 |
# File 'lib/the_plaid_api/models/item_status_nullable.rb', line 25 def last_webhook @last_webhook end |
#transactions ⇒ ItemStatusTransactions
Information about the last successful and failed transactions update for the Item.
21 22 23 |
# File 'lib/the_plaid_api/models/item_status_nullable.rb', line 21 def transactions @transactions end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/the_plaid_api/models/item_status_nullable.rb', line 66 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. investments = ItemStatusInvestments.from_hash(hash['investments']) if hash['investments'] transactions = ItemStatusTransactions.from_hash(hash['transactions']) if hash['transactions'] last_webhook = ItemStatusLastWebhook.from_hash(hash['last_webhook']) if hash['last_webhook'] # 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. ItemStatusNullable.new(investments: investments, transactions: transactions, last_webhook: last_webhook, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 34 |
# File 'lib/the_plaid_api/models/item_status_nullable.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['investments'] = 'investments' @_hash['transactions'] = 'transactions' @_hash['last_webhook'] = 'last_webhook' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 49 50 51 52 |
# File 'lib/the_plaid_api/models/item_status_nullable.rb', line 46 def self.nullables %w[ investments transactions last_webhook ] end |
.optionals ⇒ Object
An array for optional fields
37 38 39 40 41 42 43 |
# File 'lib/the_plaid_api/models/item_status_nullable.rb', line 37 def self.optionals %w[ investments transactions last_webhook ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
97 98 99 100 101 102 |
# File 'lib/the_plaid_api/models/item_status_nullable.rb', line 97 def inspect class_name = self.class.name.split('::').last "<#{class_name} investments: #{@investments.inspect}, transactions:"\ " #{@transactions.inspect}, last_webhook: #{@last_webhook.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
90 91 92 93 94 |
# File 'lib/the_plaid_api/models/item_status_nullable.rb', line 90 def to_s class_name = self.class.name.split('::').last "<#{class_name} investments: #{@investments}, transactions: #{@transactions}, last_webhook:"\ " #{@last_webhook}, additional_properties: #{@additional_properties}>" end |