Class: ThePlaidApi::FdxLifecycleEventEntity

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb

Overview

Details of consent or payment network identifier or other entity’s revocation request or other lifecycle status change event

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(status: SKIP, reason: SKIP, other_reason: SKIP, initiator: SKIP, updated_time: SKIP, additional_properties: nil) ⇒ FdxLifecycleEventEntity

Returns a new instance of FdxLifecycleEventEntity.



65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 65

def initialize(status: SKIP, reason: SKIP, other_reason: SKIP,
               initiator: SKIP, updated_time: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @status = status unless status == SKIP
  @reason = reason unless reason == SKIP
  @other_reason = other_reason unless other_reason == SKIP
  @initiator = initiator unless initiator == SKIP
  @updated_time = updated_time unless updated_time == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#initiatorPartyType

Identifies the type of a party

Returns:



29
30
31
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 29

def initiator
  @initiator
end

#other_reasonString

Additional information or description of an ‘OTHER` reason

Returns:

  • (String)


25
26
27
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 25

def other_reason
  @other_reason
end

#reasonFdxUpdateReason

Reason for lifecycle event status change

Returns:



21
22
23
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 21

def reason
  @reason
end

#statusFdxEventStatus

Current status of indicated entity after reported event change. Not all statuses will be supported on all entity types by all data providers

Returns:



17
18
19
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 17

def status
  @status
end

#updated_timeDateTime

ISO 8601 date-time in format ‘YYYY-MM-DDThh:mm:ss.nnn[Z|hh:mm]’ according to [IETF RFC3339](xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#ancho r14)

Returns:

  • (DateTime)


36
37
38
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 36

def updated_time
  @updated_time
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 80

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  status = hash.key?('status') ? hash['status'] : SKIP
  reason = hash.key?('reason') ? hash['reason'] : SKIP
  other_reason = hash.key?('otherReason') ? hash['otherReason'] : SKIP
  initiator = hash.key?('initiator') ? hash['initiator'] : SKIP
  updated_time = if hash.key?('updatedTime')
                   (DateTimeHelper.from_rfc3339(hash['updatedTime']) if hash['updatedTime'])
                 else
                   SKIP
                 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.
  FdxLifecycleEventEntity.new(status: status,
                              reason: reason,
                              other_reason: other_reason,
                              initiator: initiator,
                              updated_time: updated_time,
                              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



39
40
41
42
43
44
45
46
47
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 39

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['status'] = 'status'
  @_hash['reason'] = 'reason'
  @_hash['other_reason'] = 'otherReason'
  @_hash['initiator'] = 'initiator'
  @_hash['updated_time'] = 'updatedTime'
  @_hash
end

.nullablesObject

An array for nullable fields



61
62
63
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 61

def self.nullables
  []
end

.optionalsObject

An array for optional fields



50
51
52
53
54
55
56
57
58
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 50

def self.optionals
  %w[
    status
    reason
    other_reason
    initiator
    updated_time
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



123
124
125
126
127
128
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 123

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} status: #{@status.inspect}, reason: #{@reason.inspect}, other_reason:"\
  " #{@other_reason.inspect}, initiator: #{@initiator.inspect}, updated_time:"\
  " #{@updated_time.inspect}, additional_properties: #{@additional_properties}>"
end

#to_custom_updated_timeObject



110
111
112
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 110

def to_custom_updated_time
  DateTimeHelper.to_rfc3339(updated_time)
end

#to_sObject

Provides a human-readable string representation of the object.



115
116
117
118
119
120
# File 'lib/the_plaid_api/models/fdx_lifecycle_event_entity.rb', line 115

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} status: #{@status}, reason: #{@reason}, other_reason: #{@other_reason},"\
  " initiator: #{@initiator}, updated_time: #{@updated_time}, additional_properties:"\
  " #{@additional_properties}>"
end