Class: ThePlaidApi::BeaconAuditTrail
- Defined in:
- lib/the_plaid_api/models/beacon_audit_trail.rb
Overview
Information about the last change made to the parent object specifying what caused the change as well as when it occurred.
Instance Attribute Summary collapse
-
#dashboard_user_id ⇒ String
ID of the associated user.
-
#source ⇒ BeaconAuditTrailSource
A type indicating what caused a resource to be changed or updated.
-
#timestamp ⇒ DateTime
An ISO8601 formatted timestamp.
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(source:, dashboard_user_id:, timestamp:, additional_properties: nil) ⇒ BeaconAuditTrail
constructor
A new instance of BeaconAuditTrail.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_timestamp ⇒ Object
-
#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(source:, dashboard_user_id:, timestamp:, additional_properties: nil) ⇒ BeaconAuditTrail
Returns a new instance of BeaconAuditTrail.
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/the_plaid_api/models/beacon_audit_trail.rb', line 60 def initialize(source:, dashboard_user_id:, timestamp:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @source = source @dashboard_user_id = dashboard_user_id @timestamp = @additional_properties = additional_properties end |
Instance Attribute Details
#dashboard_user_id ⇒ String
ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use ‘/dashboard_user/get`.
33 34 35 |
# File 'lib/the_plaid_api/models/beacon_audit_trail.rb', line 33 def dashboard_user_id @dashboard_user_id end |
#source ⇒ BeaconAuditTrailSource
A type indicating what caused a resource to be changed or updated. ‘dashboard` - The resource was created or updated by a member of your team via the Plaid dashboard. `api` - The resource was created or updated via the Plaid API. `system` - The resource was created or updated automatically by a part of the Plaid Beacon system. For example, if another business using Plaid Beacon created a fraud report that matched one of your users, your matching user’s status would automatically be updated and the audit trail source would be ‘system`. `bulk_import` - The resource was created or updated as part of a bulk import process. For example, if your company provided a CSV of user data as part of your initial onboarding, the audit trail source would be `bulk_import`.
28 29 30 |
# File 'lib/the_plaid_api/models/beacon_audit_trail.rb', line 28 def source @source end |
#timestamp ⇒ DateTime
An ISO8601 formatted timestamp.
37 38 39 |
# File 'lib/the_plaid_api/models/beacon_audit_trail.rb', line 37 def @timestamp end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/the_plaid_api/models/beacon_audit_trail.rb', line 72 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. source = hash.key?('source') ? hash['source'] : nil dashboard_user_id = hash.key?('dashboard_user_id') ? hash['dashboard_user_id'] : nil = if hash.key?('timestamp') (DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp']) end # 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. BeaconAuditTrail.new(source: source, dashboard_user_id: dashboard_user_id, timestamp: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
40 41 42 43 44 45 46 |
# File 'lib/the_plaid_api/models/beacon_audit_trail.rb', line 40 def self.names @_hash = {} if @_hash.nil? @_hash['source'] = 'source' @_hash['dashboard_user_id'] = 'dashboard_user_id' @_hash['timestamp'] = 'timestamp' @_hash end |
.nullables ⇒ Object
An array for nullable fields
54 55 56 57 58 |
# File 'lib/the_plaid_api/models/beacon_audit_trail.rb', line 54 def self.nullables %w[ dashboard_user_id ] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 |
# File 'lib/the_plaid_api/models/beacon_audit_trail.rb', line 49 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
109 110 111 112 113 114 |
# File 'lib/the_plaid_api/models/beacon_audit_trail.rb', line 109 def inspect class_name = self.class.name.split('::').last "<#{class_name} source: #{@source.inspect}, dashboard_user_id:"\ " #{@dashboard_user_id.inspect}, timestamp: #{@timestamp.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_custom_timestamp ⇒ Object
97 98 99 |
# File 'lib/the_plaid_api/models/beacon_audit_trail.rb', line 97 def DateTimeHelper.to_rfc3339() end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
102 103 104 105 106 |
# File 'lib/the_plaid_api/models/beacon_audit_trail.rb', line 102 def to_s class_name = self.class.name.split('::').last "<#{class_name} source: #{@source}, dashboard_user_id: #{@dashboard_user_id}, timestamp:"\ " #{@timestamp}, additional_properties: #{@additional_properties}>" end |