Class: Gusto::CompanyBankAccounts::CompanyBankAccount
- Inherits:
-
Object
- Object
- Gusto::CompanyBankAccounts::CompanyBankAccount
- Defined in:
- lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb
Overview
The company bank account
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#account_type ⇒ Gusto::CompanyBankAccounts::CompanyBankAccountAccountType
readonly
Bank account type.
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#balance_fetched_date ⇒ Object
readonly
when verification type is Plaid.
-
#company_uuid ⇒ String
readonly
UUID of the company.
-
#hidden_account_number ⇒ String
readonly
Masked bank account number.
-
#last_cached_balance ⇒ Object
readonly
verification type is Plaid.
-
#name ⇒ String
readonly
Name of bank account.
-
#plaid_status ⇒ Object
readonly
type is Plaid.
-
#routing_number ⇒ String
readonly
The bank account’s routing number.
-
#uuid ⇒ String
readonly
UUID of the bank account.
-
#verification_status ⇒ Object
readonly
‘verified’ means the bank account is verified.
-
#verification_type ⇒ Object
readonly
‘plaid’ means the bank account is connected through Plaid.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::CompanyBankAccounts::CompanyBankAccount
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(uuid:, company_uuid: OMIT, account_type: OMIT, routing_number: OMIT, hidden_account_number: OMIT, verification_status: OMIT, verification_type: OMIT, plaid_status: OMIT, last_cached_balance: OMIT, balance_fetched_date: OMIT, name: OMIT, additional_properties: nil) ⇒ Gusto::CompanyBankAccounts::CompanyBankAccount constructor
- #to_json ⇒ String
Constructor Details
#initialize(uuid:, company_uuid: OMIT, account_type: OMIT, routing_number: OMIT, hidden_account_number: OMIT, verification_status: OMIT, verification_type: OMIT, plaid_status: OMIT, last_cached_balance: OMIT, balance_fetched_date: OMIT, name: OMIT, additional_properties: nil) ⇒ Gusto::CompanyBankAccounts::CompanyBankAccount
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 80 def initialize(uuid:, company_uuid: OMIT, account_type: OMIT, routing_number: OMIT, hidden_account_number: OMIT, verification_status: OMIT, verification_type: OMIT, plaid_status: OMIT, last_cached_balance: OMIT, balance_fetched_date: OMIT, name: OMIT, additional_properties: nil) @uuid = uuid @company_uuid = company_uuid if company_uuid != OMIT @account_type = account_type if account_type != OMIT @routing_number = routing_number if routing_number != OMIT @hidden_account_number = hidden_account_number if hidden_account_number != OMIT @verification_status = verification_status if verification_status != OMIT @verification_type = verification_type if verification_type != OMIT @plaid_status = plaid_status if plaid_status != OMIT @last_cached_balance = last_cached_balance if last_cached_balance != OMIT @balance_fetched_date = balance_fetched_date if balance_fetched_date != OMIT @name = name if name != OMIT @additional_properties = additional_properties @_field_set = { "uuid": uuid, "company_uuid": company_uuid, "account_type": account_type, "routing_number": routing_number, "hidden_account_number": hidden_account_number, "verification_status": verification_status, "verification_type": verification_type, "plaid_status": plaid_status, "last_cached_balance": last_cached_balance, "balance_fetched_date": balance_fetched_date, "name": name }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#account_type ⇒ Gusto::CompanyBankAccounts::CompanyBankAccountAccountType (readonly)
Returns Bank account type.
18 19 20 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 18 def account_type @account_type end |
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
48 49 50 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 48 def additional_properties @additional_properties end |
#balance_fetched_date ⇒ Object (readonly)
when verification type is Plaid.
44 45 46 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 44 def balance_fetched_date @balance_fetched_date end |
#company_uuid ⇒ String (readonly)
Returns UUID of the company.
16 17 18 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 16 def company_uuid @company_uuid end |
#hidden_account_number ⇒ String (readonly)
Returns Masked bank account number.
22 23 24 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 22 def hidden_account_number @hidden_account_number end |
#last_cached_balance ⇒ Object (readonly)
verification type is Plaid.
41 42 43 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 41 def last_cached_balance @last_cached_balance end |
#name ⇒ String (readonly)
Returns Name of bank account.
46 47 48 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 46 def name @name end |
#plaid_status ⇒ Object (readonly)
type is Plaid.
37 38 39 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 37 def plaid_status @plaid_status end |
#routing_number ⇒ String (readonly)
Returns The bank account’s routing number.
20 21 22 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 20 def routing_number @routing_number end |
#uuid ⇒ String (readonly)
Returns UUID of the bank account.
14 15 16 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 14 def uuid @uuid end |
#verification_status ⇒ Object (readonly)
‘verified’ means the bank account is verified.
29 30 31 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 29 def verification_status @verification_status end |
#verification_type ⇒ Object (readonly)
‘plaid’ means the bank account is connected through Plaid.
34 35 36 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 34 def verification_type @verification_type end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::CompanyBankAccounts::CompanyBankAccount
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 128 129 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 101 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) uuid = parsed_json["uuid"] company_uuid = parsed_json["company_uuid"] account_type = parsed_json["account_type"] routing_number = parsed_json["routing_number"] hidden_account_number = parsed_json["hidden_account_number"] verification_status = parsed_json["verification_status"] verification_type = parsed_json["verification_type"] plaid_status = parsed_json["plaid_status"] last_cached_balance = parsed_json["last_cached_balance"] balance_fetched_date = parsed_json["balance_fetched_date"] name = parsed_json["name"] new( uuid: uuid, company_uuid: company_uuid, account_type: account_type, routing_number: routing_number, hidden_account_number: hidden_account_number, verification_status: verification_status, verification_type: verification_type, plaid_status: plaid_status, last_cached_balance: last_cached_balance, balance_fetched_date: balance_fetched_date, name: name, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 142 def self.validate_raw(obj:) obj.uuid.is_a?(String) != false || raise("Passed value for field obj.uuid is not the expected type, validation failed.") obj.company_uuid&.is_a?(String) != false || raise("Passed value for field obj.company_uuid is not the expected type, validation failed.") obj.account_type&.is_a?(Gusto::CompanyBankAccounts::CompanyBankAccountAccountType) != false || raise("Passed value for field obj.account_type is not the expected type, validation failed.") obj.routing_number&.is_a?(String) != false || raise("Passed value for field obj.routing_number is not the expected type, validation failed.") obj.hidden_account_number&.is_a?(String) != false || raise("Passed value for field obj.hidden_account_number is not the expected type, validation failed.") obj.verification_status&.is_a?(Gusto::CompanyBankAccounts::CompanyBankAccountVerificationStatus) != false || raise("Passed value for field obj.verification_status is not the expected type, validation failed.") obj.verification_type&.is_a?(Gusto::CompanyBankAccounts::CompanyBankAccountVerificationType) != false || raise("Passed value for field obj.verification_type is not the expected type, validation failed.") obj.plaid_status&.is_a?(Gusto::CompanyBankAccounts::CompanyBankAccountPlaidStatus) != false || raise("Passed value for field obj.plaid_status is not the expected type, validation failed.") obj.last_cached_balance&.is_a?(String) != false || raise("Passed value for field obj.last_cached_balance is not the expected type, validation failed.") obj.balance_fetched_date&.is_a?(String) != false || raise("Passed value for field obj.balance_fetched_date is not the expected type, validation failed.") obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
133 134 135 |
# File 'lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb', line 133 def to_json @_field_set&.to_json end |