Class: ThePlaidApi::PayStubDistributionBreakdown
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::PayStubDistributionBreakdown
- Defined in:
- lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb
Overview
Information about the accounts that the payment was distributed to.
Instance Attribute Summary collapse
-
#account_name ⇒ String
Name of the account for the given distribution.
-
#bank_name ⇒ String
The name of the bank that the payment is being deposited to.
-
#current_amount ⇒ Float
The amount distributed to this account.
-
#iso_currency_code ⇒ String
The ISO-4217 currency code of the net pay.
-
#mask ⇒ String
The last 2-4 alphanumeric characters of an account’s official account number.
-
#type ⇒ String
Type of the account that the paystub was sent to (e.g. ‘checking’).
-
#unofficial_currency_code ⇒ String
The unofficial currency code associated with 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(account_name:, bank_name:, current_amount:, iso_currency_code:, mask:, type:, unofficial_currency_code:, additional_properties: nil) ⇒ PayStubDistributionBreakdown
constructor
A new instance of PayStubDistributionBreakdown.
-
#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(account_name:, bank_name:, current_amount:, iso_currency_code:, mask:, type:, unofficial_currency_code:, additional_properties: nil) ⇒ PayStubDistributionBreakdown
Returns a new instance of PayStubDistributionBreakdown.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 79 def initialize(account_name:, bank_name:, current_amount:, iso_currency_code:, mask:, type:, unofficial_currency_code:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_name = account_name @bank_name = bank_name @current_amount = current_amount @iso_currency_code = iso_currency_code @mask = mask @type = type @unofficial_currency_code = unofficial_currency_code @additional_properties = additional_properties end |
Instance Attribute Details
#account_name ⇒ String
Name of the account for the given distribution.
14 15 16 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 14 def account_name @account_name end |
#bank_name ⇒ String
The name of the bank that the payment is being deposited to.
18 19 20 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 18 def bank_name @bank_name end |
#current_amount ⇒ Float
The amount distributed to this account.
22 23 24 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 22 def current_amount @current_amount end |
#iso_currency_code ⇒ String
The ISO-4217 currency code of the net pay. Always ‘null` if `unofficial_currency_code` is non-null.
27 28 29 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 27 def iso_currency_code @iso_currency_code end |
#mask ⇒ String
The last 2-4 alphanumeric characters of an account’s official account number.
32 33 34 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 32 def mask @mask end |
#type ⇒ String
Type of the account that the paystub was sent to (e.g. ‘checking’).
36 37 38 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 36 def type @type end |
#unofficial_currency_code ⇒ String
The unofficial currency code associated with the net pay. Always ‘null` if `iso_currency_code` is non-`null`. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries. See the [currency code schema](plaid.com/docs/api/accounts#currency-code-schema) for a full listing of supported `iso_currency_code`s.
46 47 48 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 46 def unofficial_currency_code @unofficial_currency_code end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 96 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('account_name') ? hash['account_name'] : nil bank_name = hash.key?('bank_name') ? hash['bank_name'] : nil current_amount = hash.key?('current_amount') ? hash['current_amount'] : nil iso_currency_code = hash.key?('iso_currency_code') ? hash['iso_currency_code'] : nil mask = hash.key?('mask') ? hash['mask'] : nil type = hash.key?('type') ? hash['type'] : nil unofficial_currency_code = hash.key?('unofficial_currency_code') ? hash['unofficial_currency_code'] : 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. PayStubDistributionBreakdown.new(account_name: account_name, bank_name: bank_name, current_amount: current_amount, iso_currency_code: iso_currency_code, mask: mask, type: type, unofficial_currency_code: unofficial_currency_code, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 49 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'account_name' @_hash['bank_name'] = 'bank_name' @_hash['current_amount'] = 'current_amount' @_hash['iso_currency_code'] = 'iso_currency_code' @_hash['mask'] = 'mask' @_hash['type'] = 'type' @_hash['unofficial_currency_code'] = 'unofficial_currency_code' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 67 def self.nullables %w[ account_name bank_name current_amount iso_currency_code mask type unofficial_currency_code ] end |
.optionals ⇒ Object
An array for optional fields
62 63 64 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 62 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
139 140 141 142 143 144 145 146 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 139 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name.inspect}, bank_name: #{@bank_name.inspect},"\ " current_amount: #{@current_amount.inspect}, iso_currency_code:"\ " #{@iso_currency_code.inspect}, mask: #{@mask.inspect}, type: #{@type.inspect},"\ " unofficial_currency_code: #{@unofficial_currency_code.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
130 131 132 133 134 135 136 |
# File 'lib/the_plaid_api/models/pay_stub_distribution_breakdown.rb', line 130 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name}, bank_name: #{@bank_name}, current_amount:"\ " #{@current_amount}, iso_currency_code: #{@iso_currency_code}, mask: #{@mask}, type:"\ " #{@type}, unofficial_currency_code: #{@unofficial_currency_code}, additional_properties:"\ " #{@additional_properties}>" end |