Class: ThePlaidApi::PaystubOverrideNetPay
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::PaystubOverrideNetPay
- Defined in:
- lib/the_plaid_api/models/paystub_override_net_pay.rb
Overview
An object representing information about the net pay amount on the paystub.
Instance Attribute Summary collapse
-
#currency ⇒ String
The ISO-4217 currency code of the net pay.
-
#description ⇒ String
Description of the net pay.
-
#ytd_amount ⇒ Float
The year-to-date amount of the net pay.
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(description: SKIP, currency: SKIP, ytd_amount: SKIP, additional_properties: nil) ⇒ PaystubOverrideNetPay
constructor
A new instance of PaystubOverrideNetPay.
-
#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(description: SKIP, currency: SKIP, ytd_amount: SKIP, additional_properties: nil) ⇒ PaystubOverrideNetPay
Returns a new instance of PaystubOverrideNetPay.
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/the_plaid_api/models/paystub_override_net_pay.rb', line 51 def initialize(description: SKIP, currency: SKIP, ytd_amount: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @description = description unless description == SKIP @currency = currency unless currency == SKIP @ytd_amount = ytd_amount unless ytd_amount == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#currency ⇒ String
The ISO-4217 currency code of the net pay.
18 19 20 |
# File 'lib/the_plaid_api/models/paystub_override_net_pay.rb', line 18 def currency @currency end |
#description ⇒ String
Description of the net pay
14 15 16 |
# File 'lib/the_plaid_api/models/paystub_override_net_pay.rb', line 14 def description @description end |
#ytd_amount ⇒ Float
The year-to-date amount of the net pay
22 23 24 |
# File 'lib/the_plaid_api/models/paystub_override_net_pay.rb', line 22 def ytd_amount @ytd_amount end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/the_plaid_api/models/paystub_override_net_pay.rb', line 63 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. description = hash.key?('description') ? hash['description'] : SKIP currency = hash.key?('currency') ? hash['currency'] : SKIP ytd_amount = hash.key?('ytd_amount') ? hash['ytd_amount'] : SKIP # 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. PaystubOverrideNetPay.new(description: description, currency: currency, ytd_amount: ytd_amount, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/the_plaid_api/models/paystub_override_net_pay.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['description'] = 'description' @_hash['currency'] = 'currency' @_hash['ytd_amount'] = 'ytd_amount' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 46 47 48 49 |
# File 'lib/the_plaid_api/models/paystub_override_net_pay.rb', line 43 def self.nullables %w[ description currency ytd_amount ] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/the_plaid_api/models/paystub_override_net_pay.rb', line 34 def self.optionals %w[ description currency ytd_amount ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
93 94 95 96 97 |
# File 'lib/the_plaid_api/models/paystub_override_net_pay.rb', line 93 def inspect class_name = self.class.name.split('::').last "<#{class_name} description: #{@description.inspect}, currency: #{@currency.inspect},"\ " ytd_amount: #{@ytd_amount.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
86 87 88 89 90 |
# File 'lib/the_plaid_api/models/paystub_override_net_pay.rb', line 86 def to_s class_name = self.class.name.split('::').last "<#{class_name} description: #{@description}, currency: #{@currency}, ytd_amount:"\ " #{@ytd_amount}, additional_properties: #{@additional_properties}>" end |