increase 1.365.0 → 1.367.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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/increase/models/ach_transfer.rb +6 -6
  4. data/lib/increase/models/ach_transfer_create_params.rb +12 -10
  5. data/lib/increase/models/card_dispute.rb +131 -2
  6. data/lib/increase/models/card_dispute_create_params.rb +20 -16
  7. data/lib/increase/models/card_dispute_provide_provisional_credit_params.rb +22 -0
  8. data/lib/increase/models/card_dispute_reverse_provisional_credit_params.rb +22 -0
  9. data/lib/increase/models/card_payment.rb +352 -12
  10. data/lib/increase/models/declined_transaction.rb +10 -1
  11. data/lib/increase/models/pending_transaction.rb +10 -1
  12. data/lib/increase/models/simulations/card_refund_create_params.rb +6 -6
  13. data/lib/increase/models/simulations/inbound_ach_transfer_create_params.rb +3 -0
  14. data/lib/increase/models/transaction.rb +411 -6
  15. data/lib/increase/models/transaction_list_params.rb +3 -0
  16. data/lib/increase/models.rb +4 -0
  17. data/lib/increase/resources/ach_transfers.rb +6 -5
  18. data/lib/increase/resources/card_disputes.rb +50 -6
  19. data/lib/increase/resources/simulations/card_refunds.rb +3 -3
  20. data/lib/increase/version.rb +1 -1
  21. data/lib/increase.rb +2 -0
  22. data/rbi/increase/models/ach_transfer.rbi +6 -6
  23. data/rbi/increase/models/ach_transfer_create_params.rbi +12 -10
  24. data/rbi/increase/models/card_dispute.rbi +188 -0
  25. data/rbi/increase/models/card_dispute_create_params.rbi +20 -16
  26. data/rbi/increase/models/card_dispute_provide_provisional_credit_params.rbi +43 -0
  27. data/rbi/increase/models/card_dispute_reverse_provisional_credit_params.rbi +43 -0
  28. data/rbi/increase/models/card_payment.rbi +726 -10
  29. data/rbi/increase/models/declined_transaction.rbi +22 -1
  30. data/rbi/increase/models/pending_transaction.rbi +22 -1
  31. data/rbi/increase/models/simulations/card_refund_create_params.rbi +6 -6
  32. data/rbi/increase/models/simulations/inbound_ach_transfer_create_params.rbi +3 -0
  33. data/rbi/increase/models/transaction.rbi +792 -3
  34. data/rbi/increase/models/transaction_list_params.rbi +7 -0
  35. data/rbi/increase/models.rbi +6 -0
  36. data/rbi/increase/resources/ach_transfers.rbi +6 -5
  37. data/rbi/increase/resources/card_disputes.rbi +38 -6
  38. data/rbi/increase/resources/simulations/card_refunds.rbi +3 -3
  39. data/sig/increase/models/ach_transfer.rbs +8 -8
  40. data/sig/increase/models/card_dispute.rbs +79 -0
  41. data/sig/increase/models/card_dispute_provide_provisional_credit_params.rbs +23 -0
  42. data/sig/increase/models/card_dispute_reverse_provisional_credit_params.rbs +23 -0
  43. data/sig/increase/models/card_payment.rbs +378 -10
  44. data/sig/increase/models/declined_transaction.rbs +13 -1
  45. data/sig/increase/models/pending_transaction.rbs +13 -1
  46. data/sig/increase/models/transaction.rbs +363 -3
  47. data/sig/increase/models/transaction_list_params.rbs +4 -0
  48. data/sig/increase/models.rbs +4 -0
  49. data/sig/increase/resources/card_disputes.rbs +10 -0
  50. metadata +8 -2
@@ -219,6 +219,13 @@ module Increase
219
219
  Increase::TransactionListParams::Category::In::TaggedSymbol
220
220
  )
221
221
 
222
+ # Card Dispute Provisional Credit: details will be under the `card_dispute_provisional_credit` object.
223
+ CARD_DISPUTE_PROVISIONAL_CREDIT =
224
+ T.let(
225
+ :card_dispute_provisional_credit,
226
+ Increase::TransactionListParams::Category::In::TaggedSymbol
227
+ )
228
+
222
229
  # Legacy Card Dispute Loss: details will be under the `card_dispute_loss` object.
223
230
  CARD_DISPUTE_LOSS =
224
231
  T.let(
@@ -101,8 +101,14 @@ module Increase
101
101
 
102
102
  CardDisputeListParams = Increase::Models::CardDisputeListParams
103
103
 
104
+ CardDisputeProvideProvisionalCreditParams =
105
+ Increase::Models::CardDisputeProvideProvisionalCreditParams
106
+
104
107
  CardDisputeRetrieveParams = Increase::Models::CardDisputeRetrieveParams
105
108
 
109
+ CardDisputeReverseProvisionalCreditParams =
110
+ Increase::Models::CardDisputeReverseProvisionalCreditParams
111
+
106
112
  CardDisputeSubmitUserSubmissionParams =
107
113
  Increase::Models::CardDisputeSubmitUserSubmissionParams
108
114
 
@@ -50,13 +50,14 @@ module Increase
50
50
  # you're processing payments on behalf of another party, use their name, not your
51
51
  # own, so that it's more likely the recipient understands the context of the
52
52
  # payment. This value is usually displayed to the recipient on their bank
53
- # statement. We recommend setting this on every transfer; if you do not, we fall
54
- # back to the `statement_descriptor`.
53
+ # statement.
55
54
  company_name:,
56
55
  # The name of the transfer recipient. This value is informational and generally
57
- # not verified by the recipient's bank. This value is usually displayed to the
58
- # recipient on their bank statement. We recommend setting this on every transfer;
59
- # if you do not, we fall back to the `statement_descriptor`.
56
+ # not verified by the recipient's bank. The business-to-business
57
+ # [Standard Entry Class (SEC) codes](/documentation/ach-standard-entry-class-codes)
58
+ # call this "individual name or receiving company name;" it's reasonable to
59
+ # include a business name in this field. This value is usually displayed to the
60
+ # recipient on their bank statement.
60
61
  individual_name:,
61
62
  # The receiver's account number. For credit transfers (transfers with a positive
62
63
  # `amount`), this is the account that funds will be sent to. For debit transfers
@@ -20,21 +20,23 @@ module Increase
20
20
  # The Transaction you wish to dispute. This Transaction must have a `source_type`
21
21
  # of `card_settlement`.
22
22
  disputed_transaction_id:,
23
- # The network of the disputed transaction. Details specific to the network are
24
- # required under the sub-object with the same identifier as the network.
23
+ # The network of the disputed transaction. Details specific to the network can be
24
+ # provided under the sub-object with the same identifier as the network.
25
25
  network:,
26
26
  # The monetary amount of the part of the transaction that is being disputed. This
27
27
  # is optional and will default to the full amount of the transaction if not
28
28
  # provided. If provided, the amount must be less than or equal to the amount of
29
29
  # the transaction.
30
30
  amount: nil,
31
- # The files to be attached to the initial dispute submission.
31
+ # The files to be attached to the initial dispute submission. Can only be provided
32
+ # along with the network-specific details.
32
33
  attachment_files: nil,
33
34
  # The free-form explanation provided to Increase to provide more context for the
34
- # user submission. This field is not sent directly to the card networks.
35
+ # user submission. This field is not sent directly to the card networks. Can only
36
+ # be provided along with the network-specific details.
35
37
  explanation: nil,
36
- # The Visa-specific parameters for the dispute. Required if and only if `network`
37
- # is `visa`.
38
+ # The Visa-specific parameters for the initial User Submission. If omitted, a
39
+ # later User Submission will be required.
38
40
  visa: nil,
39
41
  request_options: {}
40
42
  )
@@ -84,6 +86,36 @@ module Increase
84
86
  )
85
87
  end
86
88
 
89
+ # Credits the cardholder's Account for the Card Dispute amount, funded by your
90
+ # program's provisional credit Account.
91
+ sig do
92
+ params(
93
+ card_dispute_id: String,
94
+ request_options: Increase::RequestOptions::OrHash
95
+ ).returns(Increase::CardDispute)
96
+ end
97
+ def provide_provisional_credit(
98
+ # The identifier of the Card Dispute to provide a provisional credit for.
99
+ card_dispute_id,
100
+ request_options: {}
101
+ )
102
+ end
103
+
104
+ # Debits the cardholder's Account for the provisional credit and returns it to
105
+ # your program's provisional credit Account.
106
+ sig do
107
+ params(
108
+ card_dispute_id: String,
109
+ request_options: Increase::RequestOptions::OrHash
110
+ ).returns(Increase::CardDispute)
111
+ end
112
+ def reverse_provisional_credit(
113
+ # The identifier of the Card Dispute to reverse the provisional credit for.
114
+ card_dispute_id,
115
+ request_options: {}
116
+ )
117
+ end
118
+
87
119
  # Submit a User Submission for a Card Dispute
88
120
  sig do
89
121
  params(
@@ -18,9 +18,9 @@ module Increase
18
18
  # The refund amount in cents. Pulled off the `pending_transaction` or the
19
19
  # `transaction` if not provided.
20
20
  amount: nil,
21
- # The identifier of the Pending Transaction for the refund authorization. If this
22
- # is provided, `transaction` must not be provided as a refund with a refund
23
- # authorized can not be linked to a regular transaction.
21
+ # The identifier of the Pending Transaction for the refund or original credit
22
+ # authorization. If this is provided, `transaction` must not be provided as a
23
+ # refund with a refund authorized can not be linked to a regular transaction.
24
24
  pending_transaction_id: nil,
25
25
  # The identifier for the Transaction to refund. The Transaction's source must have
26
26
  # a category of card_settlement.
@@ -14,7 +14,7 @@ module Increase
14
14
  company_discretionary_data: String?,
15
15
  company_entry_description: String?,
16
16
  company_id: String,
17
- company_name: String?,
17
+ company_name: String,
18
18
  created_at: Time,
19
19
  created_by: Increase::ACHTransfer::CreatedBy?,
20
20
  currency: Increase::Models::ACHTransfer::currency,
@@ -24,7 +24,7 @@ module Increase
24
24
  idempotency_key: String?,
25
25
  inbound_funds_hold: Increase::ACHTransfer::InboundFundsHold?,
26
26
  individual_id: String?,
27
- individual_name: String?,
27
+ individual_name: String,
28
28
  network: Increase::Models::ACHTransfer::network,
29
29
  notifications_of_change: ::Array[Increase::ACHTransfer::NotificationsOfChange],
30
30
  pending_transaction_id: String?,
@@ -65,7 +65,7 @@ module Increase
65
65
 
66
66
  attr_accessor company_id: String
67
67
 
68
- attr_accessor company_name: String?
68
+ attr_accessor company_name: String
69
69
 
70
70
  attr_accessor created_at: Time
71
71
 
@@ -85,7 +85,7 @@ module Increase
85
85
 
86
86
  attr_accessor individual_id: String?
87
87
 
88
- attr_accessor individual_name: String?
88
+ attr_accessor individual_name: String
89
89
 
90
90
  attr_accessor network: Increase::Models::ACHTransfer::network
91
91
 
@@ -126,7 +126,7 @@ module Increase
126
126
  company_discretionary_data: String?,
127
127
  company_entry_description: String?,
128
128
  company_id: String,
129
- company_name: String?,
129
+ company_name: String,
130
130
  created_at: Time,
131
131
  created_by: Increase::ACHTransfer::CreatedBy?,
132
132
  currency: Increase::Models::ACHTransfer::currency,
@@ -136,7 +136,7 @@ module Increase
136
136
  idempotency_key: String?,
137
137
  inbound_funds_hold: Increase::ACHTransfer::InboundFundsHold?,
138
138
  individual_id: String?,
139
- individual_name: String?,
139
+ individual_name: String,
140
140
  network: Increase::Models::ACHTransfer::network,
141
141
  notifications_of_change: ::Array[Increase::ACHTransfer::NotificationsOfChange],
142
142
  pending_transaction_id: String?,
@@ -165,7 +165,7 @@ module Increase
165
165
  company_discretionary_data: String?,
166
166
  company_entry_description: String?,
167
167
  company_id: String,
168
- company_name: String?,
168
+ company_name: String,
169
169
  created_at: Time,
170
170
  created_by: Increase::ACHTransfer::CreatedBy?,
171
171
  currency: Increase::Models::ACHTransfer::currency,
@@ -175,7 +175,7 @@ module Increase
175
175
  idempotency_key: String?,
176
176
  inbound_funds_hold: Increase::ACHTransfer::InboundFundsHold?,
177
177
  individual_id: String?,
178
- individual_name: String?,
178
+ individual_name: String,
179
179
  network: Increase::Models::ACHTransfer::network,
180
180
  notifications_of_change: ::Array[Increase::ACHTransfer::NotificationsOfChange],
181
181
  pending_transaction_id: String?,
@@ -11,6 +11,7 @@ module Increase
11
11
  idempotency_key: String?,
12
12
  loss: Increase::CardDispute::Loss?,
13
13
  network: Increase::Models::CardDispute::network,
14
+ provisional_credit: Increase::CardDispute::ProvisionalCredit?,
14
15
  rejection: Increase::CardDispute::Rejection?,
15
16
  status: Increase::Models::CardDispute::status,
16
17
  type: Increase::Models::CardDispute::type_,
@@ -39,6 +40,8 @@ module Increase
39
40
 
40
41
  attr_accessor network: Increase::Models::CardDispute::network
41
42
 
43
+ attr_accessor provisional_credit: Increase::CardDispute::ProvisionalCredit?
44
+
42
45
  attr_accessor rejection: Increase::CardDispute::Rejection?
43
46
 
44
47
  attr_accessor status: Increase::Models::CardDispute::status
@@ -63,6 +66,7 @@ module Increase
63
66
  idempotency_key: String?,
64
67
  loss: Increase::CardDispute::Loss?,
65
68
  network: Increase::Models::CardDispute::network,
69
+ provisional_credit: Increase::CardDispute::ProvisionalCredit?,
66
70
  rejection: Increase::CardDispute::Rejection?,
67
71
  status: Increase::Models::CardDispute::status,
68
72
  type: Increase::Models::CardDispute::type_,
@@ -82,6 +86,7 @@ module Increase
82
86
  idempotency_key: String?,
83
87
  loss: Increase::CardDispute::Loss?,
84
88
  network: Increase::Models::CardDispute::network,
89
+ provisional_credit: Increase::CardDispute::ProvisionalCredit?,
85
90
  rejection: Increase::CardDispute::Rejection?,
86
91
  status: Increase::Models::CardDispute::status,
87
92
  type: Increase::Models::CardDispute::type_,
@@ -138,6 +143,75 @@ module Increase
138
143
  def self?.values: -> ::Array[Increase::Models::CardDispute::network]
139
144
  end
140
145
 
146
+ type provisional_credit =
147
+ {
148
+ amount: Integer,
149
+ cardholder_account_transaction_id: String,
150
+ provided_at: Time,
151
+ provisional_credit_funding_account_transaction_id: String,
152
+ reversal: Increase::CardDispute::ProvisionalCredit::Reversal?
153
+ }
154
+
155
+ class ProvisionalCredit < Increase::Internal::Type::BaseModel
156
+ attr_accessor amount: Integer
157
+
158
+ attr_accessor cardholder_account_transaction_id: String
159
+
160
+ attr_accessor provided_at: Time
161
+
162
+ attr_accessor provisional_credit_funding_account_transaction_id: String
163
+
164
+ attr_accessor reversal: Increase::CardDispute::ProvisionalCredit::Reversal?
165
+
166
+ def initialize: (
167
+ amount: Integer,
168
+ cardholder_account_transaction_id: String,
169
+ provided_at: Time,
170
+ provisional_credit_funding_account_transaction_id: String,
171
+ reversal: Increase::CardDispute::ProvisionalCredit::Reversal?
172
+ ) -> void
173
+
174
+ def to_hash: -> {
175
+ amount: Integer,
176
+ cardholder_account_transaction_id: String,
177
+ provided_at: Time,
178
+ provisional_credit_funding_account_transaction_id: String,
179
+ reversal: Increase::CardDispute::ProvisionalCredit::Reversal?
180
+ }
181
+
182
+ type reversal =
183
+ {
184
+ amount: Integer,
185
+ cardholder_account_transaction_id: String,
186
+ provisional_credit_funding_account_transaction_id: String,
187
+ reversed_at: Time
188
+ }
189
+
190
+ class Reversal < Increase::Internal::Type::BaseModel
191
+ attr_accessor amount: Integer
192
+
193
+ attr_accessor cardholder_account_transaction_id: String
194
+
195
+ attr_accessor provisional_credit_funding_account_transaction_id: String
196
+
197
+ attr_accessor reversed_at: Time
198
+
199
+ def initialize: (
200
+ amount: Integer,
201
+ cardholder_account_transaction_id: String,
202
+ provisional_credit_funding_account_transaction_id: String,
203
+ reversed_at: Time
204
+ ) -> void
205
+
206
+ def to_hash: -> {
207
+ amount: Integer,
208
+ cardholder_account_transaction_id: String,
209
+ provisional_credit_funding_account_transaction_id: String,
210
+ reversed_at: Time
211
+ }
212
+ end
213
+ end
214
+
141
215
  type rejection = { explanation: String, rejected_at: Time }
142
216
 
143
217
  class Rejection < Increase::Internal::Type::BaseModel
@@ -231,6 +305,7 @@ module Increase
231
305
  attachment_files: ::Array[Increase::CardDispute::Visa::NetworkEvent::AttachmentFile],
232
306
  category: Increase::Models::CardDispute::Visa::NetworkEvent::category,
233
307
  created_at: Time,
308
+ dispute_financial_account_id: String?,
234
309
  dispute_financial_transaction_id: String?,
235
310
  chargeback_accepted: Increase::CardDispute::Visa::NetworkEvent::ChargebackAccepted?,
236
311
  chargeback_submitted: Increase::CardDispute::Visa::NetworkEvent::ChargebackSubmitted?,
@@ -254,6 +329,8 @@ module Increase
254
329
 
255
330
  attr_accessor created_at: Time
256
331
 
332
+ attr_accessor dispute_financial_account_id: String?
333
+
257
334
  attr_accessor dispute_financial_transaction_id: String?
258
335
 
259
336
  attr_accessor chargeback_accepted: Increase::CardDispute::Visa::NetworkEvent::ChargebackAccepted?
@@ -286,6 +363,7 @@ module Increase
286
363
  attachment_files: ::Array[Increase::CardDispute::Visa::NetworkEvent::AttachmentFile],
287
364
  category: Increase::Models::CardDispute::Visa::NetworkEvent::category,
288
365
  created_at: Time,
366
+ dispute_financial_account_id: String?,
289
367
  dispute_financial_transaction_id: String?,
290
368
  ?chargeback_accepted: Increase::CardDispute::Visa::NetworkEvent::ChargebackAccepted?,
291
369
  ?chargeback_submitted: Increase::CardDispute::Visa::NetworkEvent::ChargebackSubmitted?,
@@ -306,6 +384,7 @@ module Increase
306
384
  attachment_files: ::Array[Increase::CardDispute::Visa::NetworkEvent::AttachmentFile],
307
385
  category: Increase::Models::CardDispute::Visa::NetworkEvent::category,
308
386
  created_at: Time,
387
+ dispute_financial_account_id: String?,
309
388
  dispute_financial_transaction_id: String?,
310
389
  chargeback_accepted: Increase::CardDispute::Visa::NetworkEvent::ChargebackAccepted?,
311
390
  chargeback_submitted: Increase::CardDispute::Visa::NetworkEvent::ChargebackSubmitted?,
@@ -0,0 +1,23 @@
1
+ module Increase
2
+ module Models
3
+ type card_dispute_provide_provisional_credit_params =
4
+ { card_dispute_id: String } & Increase::Internal::Type::request_parameters
5
+
6
+ class CardDisputeProvideProvisionalCreditParams < Increase::Internal::Type::BaseModel
7
+ extend Increase::Internal::Type::RequestParameters::Converter
8
+ include Increase::Internal::Type::RequestParameters
9
+
10
+ attr_accessor card_dispute_id: String
11
+
12
+ def initialize: (
13
+ card_dispute_id: String,
14
+ ?request_options: Increase::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ card_dispute_id: String,
19
+ request_options: Increase::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ module Increase
2
+ module Models
3
+ type card_dispute_reverse_provisional_credit_params =
4
+ { card_dispute_id: String } & Increase::Internal::Type::request_parameters
5
+
6
+ class CardDisputeReverseProvisionalCreditParams < Increase::Internal::Type::BaseModel
7
+ extend Increase::Internal::Type::RequestParameters::Converter
8
+ include Increase::Internal::Type::RequestParameters
9
+
10
+ attr_accessor card_dispute_id: String
11
+
12
+ def initialize: (
13
+ card_dispute_id: String,
14
+ ?request_options: Increase::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ card_dispute_id: String,
19
+ request_options: Increase::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end