Class: ThePlaidApi::BeaconReportSyndication
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::BeaconReportSyndication
- Defined in:
- lib/the_plaid_api/models/beacon_report_syndication.rb
Overview
A Beacon Report Syndication represents a Beacon Report created either by your organization or another Beacon customer that matches a specific Beacon User you’ve created. The ‘analysis` field in the response indicates which fields matched between the originally reported Beacon User and the Beacon User that the report was syndicated to. The `report` field in the response contains a subset of information from the original report.
Instance Attribute Summary collapse
-
#analysis ⇒ BeaconReportSyndicationAnalysis
Analysis of which fields matched between the originally reported Beacon User and the Beacon User that the report was syndicated to.
-
#beacon_user_id ⇒ String
ID of the associated Beacon User.
-
#id ⇒ String
ID of the associated Beacon Report Syndication.
-
#report ⇒ BeaconReportSyndicationOriginalReport
A subset of information from a Beacon Report that has been syndicated to a matching Beacon User in your program.
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(id:, beacon_user_id:, report:, analysis:, additional_properties: nil) ⇒ BeaconReportSyndication
constructor
A new instance of BeaconReportSyndication.
-
#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(id:, beacon_user_id:, report:, analysis:, additional_properties: nil) ⇒ BeaconReportSyndication
Returns a new instance of BeaconReportSyndication.
60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/the_plaid_api/models/beacon_report_syndication.rb', line 60 def initialize(id:, beacon_user_id:, report:, analysis:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id @beacon_user_id = beacon_user_id @report = report @analysis = analysis @additional_properties = additional_properties end |
Instance Attribute Details
#analysis ⇒ BeaconReportSyndicationAnalysis
Analysis of which fields matched between the originally reported Beacon User and the Beacon User that the report was syndicated to.
38 39 40 |
# File 'lib/the_plaid_api/models/beacon_report_syndication.rb', line 38 def analysis @analysis end |
#beacon_user_id ⇒ String
ID of the associated Beacon User.
23 24 25 |
# File 'lib/the_plaid_api/models/beacon_report_syndication.rb', line 23 def beacon_user_id @beacon_user_id end |
#id ⇒ String
ID of the associated Beacon Report Syndication.
19 20 21 |
# File 'lib/the_plaid_api/models/beacon_report_syndication.rb', line 19 def id @id end |
#report ⇒ BeaconReportSyndicationOriginalReport
A subset of information from a Beacon Report that has been syndicated to a matching Beacon User in your program. The ‘id` field in the response is the ID of the original report that was syndicated. If the original report was created by your organization, the field will be filled with the ID of the report. Otherwise, the field will be `null` indicating that the original report was created by another Beacon customer.
33 34 35 |
# File 'lib/the_plaid_api/models/beacon_report_syndication.rb', line 33 def report @report end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/the_plaid_api/models/beacon_report_syndication.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : nil beacon_user_id = hash.key?('beacon_user_id') ? hash['beacon_user_id'] : nil report = BeaconReportSyndicationOriginalReport.from_hash(hash['report']) if hash['report'] analysis = BeaconReportSyndicationAnalysis.from_hash(hash['analysis']) if hash['analysis'] # 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. BeaconReportSyndication.new(id: id, beacon_user_id: beacon_user_id, report: report, analysis: analysis, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 |
# File 'lib/the_plaid_api/models/beacon_report_syndication.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['beacon_user_id'] = 'beacon_user_id' @_hash['report'] = 'report' @_hash['analysis'] = 'analysis' @_hash end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 |
# File 'lib/the_plaid_api/models/beacon_report_syndication.rb', line 56 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
51 52 53 |
# File 'lib/the_plaid_api/models/beacon_report_syndication.rb', line 51 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
106 107 108 109 110 111 |
# File 'lib/the_plaid_api/models/beacon_report_syndication.rb', line 106 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, beacon_user_id: #{@beacon_user_id.inspect}, report:"\ " #{@report.inspect}, analysis: #{@analysis.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
99 100 101 102 103 |
# File 'lib/the_plaid_api/models/beacon_report_syndication.rb', line 99 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, beacon_user_id: #{@beacon_user_id}, report: #{@report},"\ " analysis: #{@analysis}, additional_properties: #{@additional_properties}>" end |