Class: ThePlaidApi::PayFrequency

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

Overview

The frequency of the pay period.

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(value:, verification_status:, additional_properties: nil) ⇒ PayFrequency

Returns a new instance of PayFrequency.



45
46
47
48
49
50
51
52
# File 'lib/the_plaid_api/models/pay_frequency.rb', line 45

def initialize(value:, verification_status:, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @value = value
  @verification_status = verification_status
  @additional_properties = additional_properties
end

Instance Attribute Details

#valuePayFrequencyValue

The frequency of the pay period.

Returns:



14
15
16
# File 'lib/the_plaid_api/models/pay_frequency.rb', line 14

def value
  @value
end

#verification_statusVerificationStatus

The verification status. One of the following: ‘“VERIFIED”`: The information was successfully verified. `“UNVERIFIED”`: The verification has not yet been performed. `“NEEDS_INFO”`: The verification was attempted but could not be completed due to missing information. “`UNABLE_TO_VERIFY`”: The verification was performed and the information could not be verified. `“UNKNOWN”`: The verification status is unknown.

Returns:



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

def verification_status
  @verification_status
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/the_plaid_api/models/pay_frequency.rb', line 55

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  value = hash.key?('value') ? hash['value'] : nil
  verification_status =
    hash.key?('verification_status') ? hash['verification_status'] : nil

  # 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.
  PayFrequency.new(value: value,
                   verification_status: verification_status,
                   additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



28
29
30
31
32
33
# File 'lib/the_plaid_api/models/pay_frequency.rb', line 28

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['value'] = 'value'
  @_hash['verification_status'] = 'verification_status'
  @_hash
end

.nullablesObject

An array for nullable fields



41
42
43
# File 'lib/the_plaid_api/models/pay_frequency.rb', line 41

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



84
85
86
87
88
# File 'lib/the_plaid_api/models/pay_frequency.rb', line 84

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} value: #{@value.inspect}, verification_status:"\
  " #{@verification_status.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



77
78
79
80
81
# File 'lib/the_plaid_api/models/pay_frequency.rb', line 77

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} value: #{@value}, verification_status: #{@verification_status},"\
  " additional_properties: #{@additional_properties}>"
end