increase 1.187.0 → 1.189.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +9 -9
  4. data/lib/increase/models/account.rb +99 -1
  5. data/lib/increase/models/account_create_params.rb +96 -1
  6. data/lib/increase/models/account_statement.rb +43 -1
  7. data/lib/increase/models/account_update_params.rb +22 -1
  8. data/lib/increase/models/balance_lookup.rb +43 -1
  9. data/lib/increase/models/intrafi_exclusion.rb +3 -3
  10. data/lib/increase/models/intrafi_exclusion_create_params.rb +14 -8
  11. data/lib/increase/models/program.rb +23 -1
  12. data/lib/increase/models/simulations/program_create_params.rb +9 -1
  13. data/lib/increase/resources/accounts.rb +8 -2
  14. data/lib/increase/resources/intrafi_exclusions.rb +6 -3
  15. data/lib/increase/resources/simulations/programs.rb +3 -1
  16. data/lib/increase/version.rb +1 -1
  17. data/rbi/increase/models/account.rbi +146 -0
  18. data/rbi/increase/models/account_create_params.rbi +168 -0
  19. data/rbi/increase/models/account_statement.rbi +64 -0
  20. data/rbi/increase/models/account_update_params.rbi +41 -1
  21. data/rbi/increase/models/balance_lookup.rbi +64 -0
  22. data/rbi/increase/models/intrafi_exclusion.rbi +3 -3
  23. data/rbi/increase/models/intrafi_exclusion_create_params.rbi +14 -8
  24. data/rbi/increase/models/program.rbi +38 -0
  25. data/rbi/increase/models/simulations/program_create_params.rbi +11 -0
  26. data/rbi/increase/resources/accounts.rbi +9 -0
  27. data/rbi/increase/resources/intrafi_exclusions.rbi +6 -3
  28. data/rbi/increase/resources/simulations/programs.rbi +3 -0
  29. data/sig/increase/models/account.rbs +75 -0
  30. data/sig/increase/models/account_create_params.rbs +85 -0
  31. data/sig/increase/models/account_statement.rbs +28 -0
  32. data/sig/increase/models/account_update_params.rbs +20 -1
  33. data/sig/increase/models/balance_lookup.rbs +28 -0
  34. data/sig/increase/models/intrafi_exclusion.rbs +4 -4
  35. data/sig/increase/models/intrafi_exclusion_create_params.rbs +5 -5
  36. data/sig/increase/models/program.rbs +15 -0
  37. data/sig/increase/models/simulations/program_create_params.rbs +7 -0
  38. data/sig/increase/resources/accounts.rbs +3 -0
  39. data/sig/increase/resources/intrafi_exclusions.rbs +1 -1
  40. data/sig/increase/resources/simulations/programs.rbs +1 -0
  41. metadata +1 -1
@@ -22,6 +22,15 @@ module Increase
22
22
  sig { returns(Integer) }
23
23
  attr_accessor :current_balance
24
24
 
25
+ # The loan balances for the Account.
26
+ sig { returns(T.nilable(Increase::BalanceLookup::Loan)) }
27
+ attr_reader :loan
28
+
29
+ sig do
30
+ params(loan: T.nilable(Increase::BalanceLookup::Loan::OrHash)).void
31
+ end
32
+ attr_writer :loan
33
+
25
34
  # A constant representing the object's type. For this resource it will always be
26
35
  # `balance_lookup`.
27
36
  sig { returns(Increase::BalanceLookup::Type::TaggedSymbol) }
@@ -34,6 +43,7 @@ module Increase
34
43
  account_id: String,
35
44
  available_balance: Integer,
36
45
  current_balance: Integer,
46
+ loan: T.nilable(Increase::BalanceLookup::Loan::OrHash),
37
47
  type: Increase::BalanceLookup::Type::OrSymbol
38
48
  ).returns(T.attached_class)
39
49
  end
@@ -46,6 +56,8 @@ module Increase
46
56
  # The Account's current balance, representing the sum of all posted Transactions
47
57
  # on the Account.
48
58
  current_balance:,
59
+ # The loan balances for the Account.
60
+ loan:,
49
61
  # A constant representing the object's type. For this resource it will always be
50
62
  # `balance_lookup`.
51
63
  type:
@@ -58,6 +70,7 @@ module Increase
58
70
  account_id: String,
59
71
  available_balance: Integer,
60
72
  current_balance: Integer,
73
+ loan: T.nilable(Increase::BalanceLookup::Loan),
61
74
  type: Increase::BalanceLookup::Type::TaggedSymbol
62
75
  }
63
76
  )
@@ -65,6 +78,57 @@ module Increase
65
78
  def to_hash
66
79
  end
67
80
 
81
+ class Loan < Increase::Internal::Type::BaseModel
82
+ OrHash =
83
+ T.type_alias do
84
+ T.any(Increase::BalanceLookup::Loan, Increase::Internal::AnyHash)
85
+ end
86
+
87
+ # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the loan
88
+ # payment is due.
89
+ sig { returns(T.nilable(Time)) }
90
+ attr_accessor :due_at
91
+
92
+ # The total amount due on the loan.
93
+ sig { returns(Integer) }
94
+ attr_accessor :due_balance
95
+
96
+ # The amount past due on the loan.
97
+ sig { returns(Integer) }
98
+ attr_accessor :past_due_balance
99
+
100
+ # The loan balances for the Account.
101
+ sig do
102
+ params(
103
+ due_at: T.nilable(Time),
104
+ due_balance: Integer,
105
+ past_due_balance: Integer
106
+ ).returns(T.attached_class)
107
+ end
108
+ def self.new(
109
+ # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the loan
110
+ # payment is due.
111
+ due_at:,
112
+ # The total amount due on the loan.
113
+ due_balance:,
114
+ # The amount past due on the loan.
115
+ past_due_balance:
116
+ )
117
+ end
118
+
119
+ sig do
120
+ override.returns(
121
+ {
122
+ due_at: T.nilable(Time),
123
+ due_balance: Integer,
124
+ past_due_balance: Integer
125
+ }
126
+ )
127
+ end
128
+ def to_hash
129
+ end
130
+ end
131
+
68
132
  # A constant representing the object's type. For this resource it will always be
69
133
  # `balance_lookup`.
70
134
  module Type
@@ -13,7 +13,7 @@ module Increase
13
13
  attr_accessor :id
14
14
 
15
15
  # The name of the excluded institution.
16
- sig { returns(String) }
16
+ sig { returns(T.nilable(String)) }
17
17
  attr_accessor :bank_name
18
18
 
19
19
  # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
@@ -60,7 +60,7 @@ module Increase
60
60
  sig do
61
61
  params(
62
62
  id: String,
63
- bank_name: String,
63
+ bank_name: T.nilable(String),
64
64
  created_at: Time,
65
65
  entity_id: String,
66
66
  excluded_at: T.nilable(Time),
@@ -104,7 +104,7 @@ module Increase
104
104
  override.returns(
105
105
  {
106
106
  id: String,
107
- bank_name: String,
107
+ bank_name: T.nilable(String),
108
108
  created_at: Time,
109
109
  entity_id: String,
110
110
  excluded_at: T.nilable(Time),
@@ -14,26 +14,32 @@ module Increase
14
14
  )
15
15
  end
16
16
 
17
- # The name of the financial institution to be excluded.
18
- sig { returns(String) }
19
- attr_accessor :bank_name
20
-
21
17
  # The identifier of the Entity whose deposits will be excluded.
22
18
  sig { returns(String) }
23
19
  attr_accessor :entity_id
24
20
 
21
+ # The FDIC certificate number of the financial institution to be excluded. An FDIC
22
+ # certificate number uniquely identifies a financial institution, and is different
23
+ # than a routing number. To find one, we recommend searching by Bank Name using
24
+ # the [FDIC's bankfind tool](https://banks.data.fdic.gov/bankfind-suite/bankfind).
25
+ sig { returns(String) }
26
+ attr_accessor :fdic_certificate_number
27
+
25
28
  sig do
26
29
  params(
27
- bank_name: String,
28
30
  entity_id: String,
31
+ fdic_certificate_number: String,
29
32
  request_options: Increase::RequestOptions::OrHash
30
33
  ).returns(T.attached_class)
31
34
  end
32
35
  def self.new(
33
- # The name of the financial institution to be excluded.
34
- bank_name:,
35
36
  # The identifier of the Entity whose deposits will be excluded.
36
37
  entity_id:,
38
+ # The FDIC certificate number of the financial institution to be excluded. An FDIC
39
+ # certificate number uniquely identifies a financial institution, and is different
40
+ # than a routing number. To find one, we recommend searching by Bank Name using
41
+ # the [FDIC's bankfind tool](https://banks.data.fdic.gov/bankfind-suite/bankfind).
42
+ fdic_certificate_number:,
37
43
  request_options: {}
38
44
  )
39
45
  end
@@ -41,8 +47,8 @@ module Increase
41
47
  sig do
42
48
  override.returns(
43
49
  {
44
- bank_name: String,
45
50
  entity_id: String,
51
+ fdic_certificate_number: String,
46
52
  request_options: Increase::RequestOptions
47
53
  }
48
54
  )
@@ -33,6 +33,15 @@ module Increase
33
33
  sig { returns(String) }
34
34
  attr_accessor :interest_rate
35
35
 
36
+ # The lending details for the program.
37
+ sig { returns(T.nilable(Increase::Program::Lending)) }
38
+ attr_reader :lending
39
+
40
+ sig do
41
+ params(lending: T.nilable(Increase::Program::Lending::OrHash)).void
42
+ end
43
+ attr_writer :lending
44
+
36
45
  # The name of the Program.
37
46
  sig { returns(String) }
38
47
  attr_accessor :name
@@ -59,6 +68,7 @@ module Increase
59
68
  created_at: Time,
60
69
  default_digital_card_profile_id: T.nilable(String),
61
70
  interest_rate: String,
71
+ lending: T.nilable(Increase::Program::Lending::OrHash),
62
72
  name: String,
63
73
  type: Increase::Program::Type::OrSymbol,
64
74
  updated_at: Time
@@ -80,6 +90,8 @@ module Increase
80
90
  # string containing a decimal number. For example, a 1% interest rate would be
81
91
  # represented as "0.01".
82
92
  interest_rate:,
93
+ # The lending details for the program.
94
+ lending:,
83
95
  # The name of the Program.
84
96
  name:,
85
97
  # A constant representing the object's type. For this resource it will always be
@@ -100,6 +112,7 @@ module Increase
100
112
  created_at: Time,
101
113
  default_digital_card_profile_id: T.nilable(String),
102
114
  interest_rate: String,
115
+ lending: T.nilable(Increase::Program::Lending),
103
116
  name: String,
104
117
  type: Increase::Program::Type::TaggedSymbol,
105
118
  updated_at: Time
@@ -134,6 +147,31 @@ module Increase
134
147
  end
135
148
  end
136
149
 
150
+ class Lending < Increase::Internal::Type::BaseModel
151
+ OrHash =
152
+ T.type_alias do
153
+ T.any(Increase::Program::Lending, Increase::Internal::AnyHash)
154
+ end
155
+
156
+ # The maximum extendable credit of the program.
157
+ sig { returns(Integer) }
158
+ attr_accessor :maximum_extendable_credit
159
+
160
+ # The lending details for the program.
161
+ sig do
162
+ params(maximum_extendable_credit: Integer).returns(T.attached_class)
163
+ end
164
+ def self.new(
165
+ # The maximum extendable credit of the program.
166
+ maximum_extendable_credit:
167
+ )
168
+ end
169
+
170
+ sig { override.returns({ maximum_extendable_credit: Integer }) }
171
+ def to_hash
172
+ end
173
+ end
174
+
137
175
  # A constant representing the object's type. For this resource it will always be
138
176
  # `program`.
139
177
  module Type
@@ -36,6 +36,13 @@ module Increase
36
36
  end
37
37
  attr_writer :bank
38
38
 
39
+ # The maximum extendable credit of the program being added.
40
+ sig { returns(T.nilable(Integer)) }
41
+ attr_reader :lending_maximum_extendable_credit
42
+
43
+ sig { params(lending_maximum_extendable_credit: Integer).void }
44
+ attr_writer :lending_maximum_extendable_credit
45
+
39
46
  # The identifier of the Account the Program should be added to is for.
40
47
  sig { returns(T.nilable(String)) }
41
48
  attr_reader :reserve_account_id
@@ -47,6 +54,7 @@ module Increase
47
54
  params(
48
55
  name: String,
49
56
  bank: Increase::Simulations::ProgramCreateParams::Bank::OrSymbol,
57
+ lending_maximum_extendable_credit: Integer,
50
58
  reserve_account_id: String,
51
59
  request_options: Increase::RequestOptions::OrHash
52
60
  ).returns(T.attached_class)
@@ -56,6 +64,8 @@ module Increase
56
64
  name:,
57
65
  # The bank for the program's accounts, defaults to First Internet Bank.
58
66
  bank: nil,
67
+ # The maximum extendable credit of the program being added.
68
+ lending_maximum_extendable_credit: nil,
59
69
  # The identifier of the Account the Program should be added to is for.
60
70
  reserve_account_id: nil,
61
71
  request_options: {}
@@ -67,6 +77,7 @@ module Increase
67
77
  {
68
78
  name: String,
69
79
  bank: Increase::Simulations::ProgramCreateParams::Bank::OrSymbol,
80
+ lending_maximum_extendable_credit: Integer,
70
81
  reserve_account_id: String,
71
82
  request_options: Increase::RequestOptions
72
83
  }
@@ -8,7 +8,9 @@ module Increase
8
8
  params(
9
9
  name: String,
10
10
  entity_id: String,
11
+ funding: Increase::AccountCreateParams::Funding::OrSymbol,
11
12
  informational_entity_id: String,
13
+ loan: Increase::AccountCreateParams::Loan::OrHash,
12
14
  program_id: String,
13
15
  request_options: Increase::RequestOptions::OrHash
14
16
  ).returns(Increase::Account)
@@ -18,9 +20,13 @@ module Increase
18
20
  name:,
19
21
  # The identifier for the Entity that will own the Account.
20
22
  entity_id: nil,
23
+ # Whether the Account is funded by a loan or by deposits.
24
+ funding: nil,
21
25
  # The identifier of an Entity that, while not owning the Account, is associated
22
26
  # with its activity. This is generally the beneficiary of the funds.
23
27
  informational_entity_id: nil,
28
+ # The loan details for the account.
29
+ loan: nil,
24
30
  # The identifier for the Program that this Account falls under. Required if you
25
31
  # operate more than one Program.
26
32
  program_id: nil,
@@ -46,6 +52,7 @@ module Increase
46
52
  sig do
47
53
  params(
48
54
  account_id: String,
55
+ loan: Increase::AccountUpdateParams::Loan::OrHash,
49
56
  name: String,
50
57
  request_options: Increase::RequestOptions::OrHash
51
58
  ).returns(Increase::Account)
@@ -53,6 +60,8 @@ module Increase
53
60
  def update(
54
61
  # The identifier of the Account to update.
55
62
  account_id,
63
+ # The loan details for the account.
64
+ loan: nil,
56
65
  # The new name of the Account.
57
66
  name: nil,
58
67
  request_options: {}
@@ -6,16 +6,19 @@ module Increase
6
6
  # Create an IntraFi Exclusion
7
7
  sig do
8
8
  params(
9
- bank_name: String,
10
9
  entity_id: String,
10
+ fdic_certificate_number: String,
11
11
  request_options: Increase::RequestOptions::OrHash
12
12
  ).returns(Increase::IntrafiExclusion)
13
13
  end
14
14
  def create(
15
- # The name of the financial institution to be excluded.
16
- bank_name:,
17
15
  # The identifier of the Entity whose deposits will be excluded.
18
16
  entity_id:,
17
+ # The FDIC certificate number of the financial institution to be excluded. An FDIC
18
+ # certificate number uniquely identifies a financial institution, and is different
19
+ # than a routing number. To find one, we recommend searching by Bank Name using
20
+ # the [FDIC's bankfind tool](https://banks.data.fdic.gov/bankfind-suite/bankfind).
21
+ fdic_certificate_number:,
19
22
  request_options: {}
20
23
  )
21
24
  end
@@ -12,6 +12,7 @@ module Increase
12
12
  params(
13
13
  name: String,
14
14
  bank: Increase::Simulations::ProgramCreateParams::Bank::OrSymbol,
15
+ lending_maximum_extendable_credit: Integer,
15
16
  reserve_account_id: String,
16
17
  request_options: Increase::RequestOptions::OrHash
17
18
  ).returns(Increase::Program)
@@ -21,6 +22,8 @@ module Increase
21
22
  name:,
22
23
  # The bank for the program's accounts, defaults to First Internet Bank.
23
24
  bank: nil,
25
+ # The maximum extendable credit of the program being added.
26
+ lending_maximum_extendable_credit: nil,
24
27
  # The identifier of the Account the Program should be added to is for.
25
28
  reserve_account_id: nil,
26
29
  request_options: {}
@@ -9,11 +9,13 @@ module Increase
9
9
  created_at: Time,
10
10
  currency: Increase::Models::Account::currency,
11
11
  entity_id: String,
12
+ funding: Increase::Models::Account::funding?,
12
13
  idempotency_key: String?,
13
14
  informational_entity_id: String?,
14
15
  interest_accrued: String,
15
16
  interest_accrued_at: Date?,
16
17
  interest_rate: String,
18
+ loan: Increase::Account::Loan?,
17
19
  name: String,
18
20
  program_id: String,
19
21
  status: Increase::Models::Account::status,
@@ -35,6 +37,8 @@ module Increase
35
37
 
36
38
  attr_accessor entity_id: String
37
39
 
40
+ attr_accessor funding: Increase::Models::Account::funding?
41
+
38
42
  attr_accessor idempotency_key: String?
39
43
 
40
44
  attr_accessor informational_entity_id: String?
@@ -45,6 +49,8 @@ module Increase
45
49
 
46
50
  attr_accessor interest_rate: String
47
51
 
52
+ attr_accessor loan: Increase::Account::Loan?
53
+
48
54
  attr_accessor name: String
49
55
 
50
56
  attr_accessor program_id: String
@@ -61,11 +67,13 @@ module Increase
61
67
  created_at: Time,
62
68
  currency: Increase::Models::Account::currency,
63
69
  entity_id: String,
70
+ funding: Increase::Models::Account::funding?,
64
71
  idempotency_key: String?,
65
72
  informational_entity_id: String?,
66
73
  interest_accrued: String,
67
74
  interest_accrued_at: Date?,
68
75
  interest_rate: String,
76
+ loan: Increase::Account::Loan?,
69
77
  name: String,
70
78
  program_id: String,
71
79
  status: Increase::Models::Account::status,
@@ -80,11 +88,13 @@ module Increase
80
88
  created_at: Time,
81
89
  currency: Increase::Models::Account::currency,
82
90
  entity_id: String,
91
+ funding: Increase::Models::Account::funding?,
83
92
  idempotency_key: String?,
84
93
  informational_entity_id: String?,
85
94
  interest_accrued: String,
86
95
  interest_accrued_at: Date?,
87
96
  interest_rate: String,
97
+ loan: Increase::Account::Loan?,
88
98
  name: String,
89
99
  program_id: String,
90
100
  status: Increase::Models::Account::status,
@@ -119,6 +129,71 @@ module Increase
119
129
  def self?.values: -> ::Array[Increase::Models::Account::currency]
120
130
  end
121
131
 
132
+ type funding = :loan | :deposits
133
+
134
+ module Funding
135
+ extend Increase::Internal::Type::Enum
136
+
137
+ # An account funded by a loan. Before opening a loan account, contact support@increase.com to set up a loan program.
138
+ LOAN: :loan
139
+
140
+ # An account funded by deposits.
141
+ DEPOSITS: :deposits
142
+
143
+ def self?.values: -> ::Array[Increase::Models::Account::funding]
144
+ end
145
+
146
+ type loan =
147
+ {
148
+ credit_limit: Integer,
149
+ grace_period_days: Integer,
150
+ maturity_date: Date?,
151
+ statement_day_of_month: Integer,
152
+ statement_payment_type: Increase::Models::Account::Loan::statement_payment_type
153
+ }
154
+
155
+ class Loan < Increase::Internal::Type::BaseModel
156
+ attr_accessor credit_limit: Integer
157
+
158
+ attr_accessor grace_period_days: Integer
159
+
160
+ attr_accessor maturity_date: Date?
161
+
162
+ attr_accessor statement_day_of_month: Integer
163
+
164
+ attr_accessor statement_payment_type: Increase::Models::Account::Loan::statement_payment_type
165
+
166
+ def initialize: (
167
+ credit_limit: Integer,
168
+ grace_period_days: Integer,
169
+ maturity_date: Date?,
170
+ statement_day_of_month: Integer,
171
+ statement_payment_type: Increase::Models::Account::Loan::statement_payment_type
172
+ ) -> void
173
+
174
+ def to_hash: -> {
175
+ credit_limit: Integer,
176
+ grace_period_days: Integer,
177
+ maturity_date: Date?,
178
+ statement_day_of_month: Integer,
179
+ statement_payment_type: Increase::Models::Account::Loan::statement_payment_type
180
+ }
181
+
182
+ type statement_payment_type = :balance | :interest_until_maturity
183
+
184
+ module StatementPaymentType
185
+ extend Increase::Internal::Type::Enum
186
+
187
+ # The borrower must pay the full balance of the loan at the end of the statement period.
188
+ BALANCE: :balance
189
+
190
+ # The borrower must pay the accrued interest at the end of the statement period.
191
+ INTEREST_UNTIL_MATURITY: :interest_until_maturity
192
+
193
+ def self?.values: -> ::Array[Increase::Models::Account::Loan::statement_payment_type]
194
+ end
195
+ end
196
+
122
197
  type status = :closed | :open
123
198
 
124
199
  module Status
@@ -4,7 +4,9 @@ module Increase
4
4
  {
5
5
  name: String,
6
6
  entity_id: String,
7
+ funding: Increase::Models::AccountCreateParams::funding,
7
8
  informational_entity_id: String,
9
+ loan: Increase::AccountCreateParams::Loan,
8
10
  program_id: String
9
11
  }
10
12
  & Increase::Internal::Type::request_parameters
@@ -19,10 +21,22 @@ module Increase
19
21
 
20
22
  def entity_id=: (String) -> String
21
23
 
24
+ attr_reader funding: Increase::Models::AccountCreateParams::funding?
25
+
26
+ def funding=: (
27
+ Increase::Models::AccountCreateParams::funding
28
+ ) -> Increase::Models::AccountCreateParams::funding
29
+
22
30
  attr_reader informational_entity_id: String?
23
31
 
24
32
  def informational_entity_id=: (String) -> String
25
33
 
34
+ attr_reader loan: Increase::AccountCreateParams::Loan?
35
+
36
+ def loan=: (
37
+ Increase::AccountCreateParams::Loan
38
+ ) -> Increase::AccountCreateParams::Loan
39
+
26
40
  attr_reader program_id: String?
27
41
 
28
42
  def program_id=: (String) -> String
@@ -30,7 +44,9 @@ module Increase
30
44
  def initialize: (
31
45
  name: String,
32
46
  ?entity_id: String,
47
+ ?funding: Increase::Models::AccountCreateParams::funding,
33
48
  ?informational_entity_id: String,
49
+ ?loan: Increase::AccountCreateParams::Loan,
34
50
  ?program_id: String,
35
51
  ?request_options: Increase::request_opts
36
52
  ) -> void
@@ -38,10 +54,79 @@ module Increase
38
54
  def to_hash: -> {
39
55
  name: String,
40
56
  entity_id: String,
57
+ funding: Increase::Models::AccountCreateParams::funding,
41
58
  informational_entity_id: String,
59
+ loan: Increase::AccountCreateParams::Loan,
42
60
  program_id: String,
43
61
  request_options: Increase::RequestOptions
44
62
  }
63
+
64
+ type funding = :loan | :deposits
65
+
66
+ module Funding
67
+ extend Increase::Internal::Type::Enum
68
+
69
+ # An account funded by a loan. Before opening a loan account, contact support@increase.com to set up a loan program.
70
+ LOAN: :loan
71
+
72
+ # An account funded by deposits.
73
+ DEPOSITS: :deposits
74
+
75
+ def self?.values: -> ::Array[Increase::Models::AccountCreateParams::funding]
76
+ end
77
+
78
+ type loan =
79
+ {
80
+ credit_limit: Integer,
81
+ grace_period_days: Integer,
82
+ statement_day_of_month: Integer,
83
+ statement_payment_type: Increase::Models::AccountCreateParams::Loan::statement_payment_type,
84
+ maturity_date: Date
85
+ }
86
+
87
+ class Loan < Increase::Internal::Type::BaseModel
88
+ attr_accessor credit_limit: Integer
89
+
90
+ attr_accessor grace_period_days: Integer
91
+
92
+ attr_accessor statement_day_of_month: Integer
93
+
94
+ attr_accessor statement_payment_type: Increase::Models::AccountCreateParams::Loan::statement_payment_type
95
+
96
+ attr_reader maturity_date: Date?
97
+
98
+ def maturity_date=: (Date) -> Date
99
+
100
+ def initialize: (
101
+ credit_limit: Integer,
102
+ grace_period_days: Integer,
103
+ statement_day_of_month: Integer,
104
+ statement_payment_type: Increase::Models::AccountCreateParams::Loan::statement_payment_type,
105
+ ?maturity_date: Date
106
+ ) -> void
107
+
108
+ def to_hash: -> {
109
+ credit_limit: Integer,
110
+ grace_period_days: Integer,
111
+ statement_day_of_month: Integer,
112
+ statement_payment_type: Increase::Models::AccountCreateParams::Loan::statement_payment_type,
113
+ maturity_date: Date
114
+ }
115
+
116
+ type statement_payment_type = :balance | :interest_until_maturity
117
+
118
+ module StatementPaymentType
119
+ extend Increase::Internal::Type::Enum
120
+
121
+ # The borrower must pay the full balance of the loan at the end of the statement period.
122
+ BALANCE: :balance
123
+
124
+ # The borrower must pay the accrued interest at the end of the statement period.
125
+ INTEREST_UNTIL_MATURITY: :interest_until_maturity
126
+
127
+ def self?.values: -> ::Array[Increase::Models::AccountCreateParams::Loan::statement_payment_type]
128
+ end
129
+ end
45
130
  end
46
131
  end
47
132
  end
@@ -7,6 +7,7 @@ module Increase
7
7
  created_at: Time,
8
8
  ending_balance: Integer,
9
9
  file_id: String,
10
+ loan: Increase::AccountStatement::Loan?,
10
11
  starting_balance: Integer,
11
12
  statement_period_end: Time,
12
13
  statement_period_start: Time,
@@ -24,6 +25,8 @@ module Increase
24
25
 
25
26
  attr_accessor file_id: String
26
27
 
28
+ attr_accessor loan: Increase::AccountStatement::Loan?
29
+
27
30
  attr_accessor starting_balance: Integer
28
31
 
29
32
  attr_accessor statement_period_end: Time
@@ -38,6 +41,7 @@ module Increase
38
41
  created_at: Time,
39
42
  ending_balance: Integer,
40
43
  file_id: String,
44
+ loan: Increase::AccountStatement::Loan?,
41
45
  starting_balance: Integer,
42
46
  statement_period_end: Time,
43
47
  statement_period_start: Time,
@@ -50,12 +54,36 @@ module Increase
50
54
  created_at: Time,
51
55
  ending_balance: Integer,
52
56
  file_id: String,
57
+ loan: Increase::AccountStatement::Loan?,
53
58
  starting_balance: Integer,
54
59
  statement_period_end: Time,
55
60
  statement_period_start: Time,
56
61
  type: Increase::Models::AccountStatement::type_
57
62
  }
58
63
 
64
+ type loan =
65
+ { due_at: Time?, due_balance: Integer, past_due_balance: Integer }
66
+
67
+ class Loan < Increase::Internal::Type::BaseModel
68
+ attr_accessor due_at: Time?
69
+
70
+ attr_accessor due_balance: Integer
71
+
72
+ attr_accessor past_due_balance: Integer
73
+
74
+ def initialize: (
75
+ due_at: Time?,
76
+ due_balance: Integer,
77
+ past_due_balance: Integer
78
+ ) -> void
79
+
80
+ def to_hash: -> {
81
+ due_at: Time?,
82
+ due_balance: Integer,
83
+ past_due_balance: Integer
84
+ }
85
+ end
86
+
59
87
  type type_ = :account_statement
60
88
 
61
89
  module Type