increase 1.79.0 → 1.80.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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/README.md +1 -1
  4. data/lib/increase/client.rb +0 -4
  5. data/lib/increase/errors.rb +25 -11
  6. data/lib/increase/internal/page.rb +1 -1
  7. data/lib/increase/internal/transport/base_client.rb +11 -7
  8. data/lib/increase/internal/type/base_page.rb +1 -1
  9. data/lib/increase/internal/util.rb +1 -1
  10. data/lib/increase/models/transaction.rb +3 -27
  11. data/lib/increase/models.rb +0 -8
  12. data/lib/increase/resources/simulations.rb +0 -4
  13. data/lib/increase/version.rb +1 -1
  14. data/lib/increase.rb +0 -7
  15. data/rbi/increase/client.rbi +0 -3
  16. data/rbi/increase/errors.rbi +29 -2
  17. data/rbi/increase/internal/transport/base_client.rbi +4 -5
  18. data/rbi/increase/internal/type/base_page.rbi +1 -1
  19. data/rbi/increase/internal/util.rbi +1 -1
  20. data/rbi/increase/models/transaction.rbi +5 -39
  21. data/rbi/increase/models.rbi +0 -8
  22. data/rbi/increase/resources/simulations.rbi +0 -3
  23. data/sig/increase/client.rbs +0 -2
  24. data/sig/increase/errors.rbs +7 -0
  25. data/sig/increase/models/transaction.rbs +4 -28
  26. data/sig/increase/models.rbs +0 -8
  27. data/sig/increase/resources/simulations.rbs +0 -2
  28. metadata +1 -22
  29. data/lib/increase/models/card_dispute.rb +0 -302
  30. data/lib/increase/models/card_dispute_create_params.rb +0 -45
  31. data/lib/increase/models/card_dispute_list_params.rb +0 -144
  32. data/lib/increase/models/card_dispute_retrieve_params.rb +0 -14
  33. data/lib/increase/models/simulations/card_dispute_action_params.rb +0 -55
  34. data/lib/increase/resources/card_disputes.rb +0 -97
  35. data/lib/increase/resources/simulations/card_disputes.rb +0 -45
  36. data/rbi/increase/models/card_dispute.rbi +0 -425
  37. data/rbi/increase/models/card_dispute_create_params.rbi +0 -70
  38. data/rbi/increase/models/card_dispute_list_params.rbi +0 -289
  39. data/rbi/increase/models/card_dispute_retrieve_params.rbi +0 -30
  40. data/rbi/increase/models/simulations/card_dispute_action_params.rbi +0 -124
  41. data/rbi/increase/resources/card_disputes.rbi +0 -78
  42. data/rbi/increase/resources/simulations/card_disputes.rbi +0 -38
  43. data/sig/increase/models/card_dispute.rbs +0 -207
  44. data/sig/increase/models/card_dispute_create_params.rbs +0 -34
  45. data/sig/increase/models/card_dispute_list_params.rbs +0 -146
  46. data/sig/increase/models/card_dispute_retrieve_params.rbs +0 -15
  47. data/sig/increase/models/simulations/card_dispute_action_params.rbs +0 -59
  48. data/sig/increase/resources/card_disputes.rbs +0 -28
  49. data/sig/increase/resources/simulations/card_disputes.rbs +0 -16
@@ -1,302 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Increase
4
- module Models
5
- # @see Increase::Resources::CardDisputes#create
6
- class CardDispute < Increase::Internal::Type::BaseModel
7
- # @!attribute id
8
- # The Card Dispute identifier.
9
- #
10
- # @return [String]
11
- required :id, String
12
-
13
- # @!attribute acceptance
14
- # If the Card Dispute's status is `accepted`, this will contain details of the
15
- # successful dispute.
16
- #
17
- # @return [Increase::Models::CardDispute::Acceptance, nil]
18
- required :acceptance, -> { Increase::CardDispute::Acceptance }, nil?: true
19
-
20
- # @!attribute amount
21
- # The amount of the dispute, if provided, or the transaction amount otherwise.
22
- #
23
- # @return [Integer, nil]
24
- required :amount, Integer, nil?: true
25
-
26
- # @!attribute created_at
27
- # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
28
- # the Card Dispute was created.
29
- #
30
- # @return [Time]
31
- required :created_at, Time
32
-
33
- # @!attribute disputed_transaction_id
34
- # The identifier of the Transaction that was disputed.
35
- #
36
- # @return [String]
37
- required :disputed_transaction_id, String
38
-
39
- # @!attribute explanation
40
- # Why you disputed the Transaction in question.
41
- #
42
- # @return [String]
43
- required :explanation, String
44
-
45
- # @!attribute idempotency_key
46
- # The idempotency key you chose for this object. This value is unique across
47
- # Increase and is used to ensure that a request is only processed once. Learn more
48
- # about [idempotency](https://increase.com/documentation/idempotency-keys).
49
- #
50
- # @return [String, nil]
51
- required :idempotency_key, String, nil?: true
52
-
53
- # @!attribute loss
54
- # If the Card Dispute's status is `lost`, this will contain details of the lost
55
- # dispute.
56
- #
57
- # @return [Increase::Models::CardDispute::Loss, nil]
58
- required :loss, -> { Increase::CardDispute::Loss }, nil?: true
59
-
60
- # @!attribute rejection
61
- # If the Card Dispute's status is `rejected`, this will contain details of the
62
- # unsuccessful dispute.
63
- #
64
- # @return [Increase::Models::CardDispute::Rejection, nil]
65
- required :rejection, -> { Increase::CardDispute::Rejection }, nil?: true
66
-
67
- # @!attribute status
68
- # The results of the Dispute investigation.
69
- #
70
- # @return [Symbol, Increase::Models::CardDispute::Status]
71
- required :status, enum: -> { Increase::CardDispute::Status }
72
-
73
- # @!attribute type
74
- # A constant representing the object's type. For this resource it will always be
75
- # `card_dispute`.
76
- #
77
- # @return [Symbol, Increase::Models::CardDispute::Type]
78
- required :type, enum: -> { Increase::CardDispute::Type }
79
-
80
- # @!attribute win
81
- # If the Card Dispute's status is `won`, this will contain details of the won
82
- # dispute.
83
- #
84
- # @return [Increase::Models::CardDispute::Win, nil]
85
- required :win, -> { Increase::CardDispute::Win }, nil?: true
86
-
87
- # @!method initialize(id:, acceptance:, amount:, created_at:, disputed_transaction_id:, explanation:, idempotency_key:, loss:, rejection:, status:, type:, win:)
88
- # Some parameter documentations has been truncated, see
89
- # {Increase::Models::CardDispute} for more details.
90
- #
91
- # If unauthorized activity occurs on a card, you can create a Card Dispute and
92
- # we'll return the funds if appropriate.
93
- #
94
- # @param id [String] The Card Dispute identifier.
95
- #
96
- # @param acceptance [Increase::Models::CardDispute::Acceptance, nil] If the Card Dispute's status is `accepted`, this will contain details of the suc
97
- #
98
- # @param amount [Integer, nil] The amount of the dispute, if provided, or the transaction amount otherwise.
99
- #
100
- # @param created_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th
101
- #
102
- # @param disputed_transaction_id [String] The identifier of the Transaction that was disputed.
103
- #
104
- # @param explanation [String] Why you disputed the Transaction in question.
105
- #
106
- # @param idempotency_key [String, nil] The idempotency key you chose for this object. This value is unique across Incre
107
- #
108
- # @param loss [Increase::Models::CardDispute::Loss, nil] If the Card Dispute's status is `lost`, this will contain details of the lost di
109
- #
110
- # @param rejection [Increase::Models::CardDispute::Rejection, nil] If the Card Dispute's status is `rejected`, this will contain details of the uns
111
- #
112
- # @param status [Symbol, Increase::Models::CardDispute::Status] The results of the Dispute investigation.
113
- #
114
- # @param type [Symbol, Increase::Models::CardDispute::Type] A constant representing the object's type. For this resource it will always be `
115
- #
116
- # @param win [Increase::Models::CardDispute::Win, nil] If the Card Dispute's status is `won`, this will contain details of the won disp
117
-
118
- # @see Increase::Models::CardDispute#acceptance
119
- class Acceptance < Increase::Internal::Type::BaseModel
120
- # @!attribute accepted_at
121
- # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
122
- # the Card Dispute was accepted.
123
- #
124
- # @return [Time]
125
- required :accepted_at, Time
126
-
127
- # @!attribute card_dispute_id
128
- # The identifier of the Card Dispute that was accepted.
129
- #
130
- # @return [String]
131
- required :card_dispute_id, String
132
-
133
- # @!attribute transaction_id
134
- # The identifier of the Transaction that was created to return the disputed funds
135
- # to your account.
136
- #
137
- # @return [String]
138
- required :transaction_id, String
139
-
140
- # @!method initialize(accepted_at:, card_dispute_id:, transaction_id:)
141
- # Some parameter documentations has been truncated, see
142
- # {Increase::Models::CardDispute::Acceptance} for more details.
143
- #
144
- # If the Card Dispute's status is `accepted`, this will contain details of the
145
- # successful dispute.
146
- #
147
- # @param accepted_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th
148
- #
149
- # @param card_dispute_id [String] The identifier of the Card Dispute that was accepted.
150
- #
151
- # @param transaction_id [String] The identifier of the Transaction that was created to return the disputed funds
152
- end
153
-
154
- # @see Increase::Models::CardDispute#loss
155
- class Loss < Increase::Internal::Type::BaseModel
156
- # @!attribute card_dispute_id
157
- # The identifier of the Card Dispute that was lost.
158
- #
159
- # @return [String]
160
- required :card_dispute_id, String
161
-
162
- # @!attribute explanation
163
- # Why the Card Dispute was lost.
164
- #
165
- # @return [String]
166
- required :explanation, String
167
-
168
- # @!attribute lost_at
169
- # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
170
- # the Card Dispute was lost.
171
- #
172
- # @return [Time]
173
- required :lost_at, Time
174
-
175
- # @!attribute transaction_id
176
- # The identifier of the Transaction that was created to debit the disputed funds
177
- # from your account.
178
- #
179
- # @return [String]
180
- required :transaction_id, String
181
-
182
- # @!method initialize(card_dispute_id:, explanation:, lost_at:, transaction_id:)
183
- # Some parameter documentations has been truncated, see
184
- # {Increase::Models::CardDispute::Loss} for more details.
185
- #
186
- # If the Card Dispute's status is `lost`, this will contain details of the lost
187
- # dispute.
188
- #
189
- # @param card_dispute_id [String] The identifier of the Card Dispute that was lost.
190
- #
191
- # @param explanation [String] Why the Card Dispute was lost.
192
- #
193
- # @param lost_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th
194
- #
195
- # @param transaction_id [String] The identifier of the Transaction that was created to debit the disputed funds f
196
- end
197
-
198
- # @see Increase::Models::CardDispute#rejection
199
- class Rejection < Increase::Internal::Type::BaseModel
200
- # @!attribute card_dispute_id
201
- # The identifier of the Card Dispute that was rejected.
202
- #
203
- # @return [String]
204
- required :card_dispute_id, String
205
-
206
- # @!attribute explanation
207
- # Why the Card Dispute was rejected.
208
- #
209
- # @return [String]
210
- required :explanation, String
211
-
212
- # @!attribute rejected_at
213
- # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
214
- # the Card Dispute was rejected.
215
- #
216
- # @return [Time]
217
- required :rejected_at, Time
218
-
219
- # @!method initialize(card_dispute_id:, explanation:, rejected_at:)
220
- # Some parameter documentations has been truncated, see
221
- # {Increase::Models::CardDispute::Rejection} for more details.
222
- #
223
- # If the Card Dispute's status is `rejected`, this will contain details of the
224
- # unsuccessful dispute.
225
- #
226
- # @param card_dispute_id [String] The identifier of the Card Dispute that was rejected.
227
- #
228
- # @param explanation [String] Why the Card Dispute was rejected.
229
- #
230
- # @param rejected_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th
231
- end
232
-
233
- # The results of the Dispute investigation.
234
- #
235
- # @see Increase::Models::CardDispute#status
236
- module Status
237
- extend Increase::Internal::Type::Enum
238
-
239
- # The Card Dispute is pending review.
240
- PENDING_REVIEWING = :pending_reviewing
241
-
242
- # Increase has requested more information related to the Card Dispute from you.
243
- PENDING_USER_INFORMATION = :pending_user_information
244
-
245
- # The Card Dispute has been accepted and your funds have been returned. The card dispute will eventually transition into `won` or `lost` depending on the outcome.
246
- ACCEPTED = :accepted
247
-
248
- # The Card Dispute has been rejected.
249
- REJECTED = :rejected
250
-
251
- # The Card Dispute has been lost and funds previously credited from the acceptance have been debited.
252
- LOST = :lost
253
-
254
- # The Card Dispute has been won and no further action can be taken.
255
- WON = :won
256
-
257
- # @!method self.values
258
- # @return [Array<Symbol>]
259
- end
260
-
261
- # A constant representing the object's type. For this resource it will always be
262
- # `card_dispute`.
263
- #
264
- # @see Increase::Models::CardDispute#type
265
- module Type
266
- extend Increase::Internal::Type::Enum
267
-
268
- CARD_DISPUTE = :card_dispute
269
-
270
- # @!method self.values
271
- # @return [Array<Symbol>]
272
- end
273
-
274
- # @see Increase::Models::CardDispute#win
275
- class Win < Increase::Internal::Type::BaseModel
276
- # @!attribute card_dispute_id
277
- # The identifier of the Card Dispute that was won.
278
- #
279
- # @return [String]
280
- required :card_dispute_id, String
281
-
282
- # @!attribute won_at
283
- # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
284
- # the Card Dispute was won.
285
- #
286
- # @return [Time]
287
- required :won_at, Time
288
-
289
- # @!method initialize(card_dispute_id:, won_at:)
290
- # Some parameter documentations has been truncated, see
291
- # {Increase::Models::CardDispute::Win} for more details.
292
- #
293
- # If the Card Dispute's status is `won`, this will contain details of the won
294
- # dispute.
295
- #
296
- # @param card_dispute_id [String] The identifier of the Card Dispute that was won.
297
- #
298
- # @param won_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th
299
- end
300
- end
301
- end
302
- end
@@ -1,45 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Increase
4
- module Models
5
- # @see Increase::Resources::CardDisputes#create
6
- class CardDisputeCreateParams < Increase::Internal::Type::BaseModel
7
- extend Increase::Internal::Type::RequestParameters::Converter
8
- include Increase::Internal::Type::RequestParameters
9
-
10
- # @!attribute disputed_transaction_id
11
- # The Transaction you wish to dispute. This Transaction must have a `source_type`
12
- # of `card_settlement`.
13
- #
14
- # @return [String]
15
- required :disputed_transaction_id, String
16
-
17
- # @!attribute explanation
18
- # Why you are disputing this Transaction.
19
- #
20
- # @return [String]
21
- required :explanation, String
22
-
23
- # @!attribute amount
24
- # The monetary amount of the part of the transaction that is being disputed. This
25
- # is optional and will default to the full amount of the transaction if not
26
- # provided. If provided, the amount must be less than or equal to the amount of
27
- # the transaction.
28
- #
29
- # @return [Integer, nil]
30
- optional :amount, Integer
31
-
32
- # @!method initialize(disputed_transaction_id:, explanation:, amount: nil, request_options: {})
33
- # Some parameter documentations has been truncated, see
34
- # {Increase::Models::CardDisputeCreateParams} for more details.
35
- #
36
- # @param disputed_transaction_id [String] The Transaction you wish to dispute. This Transaction must have a `source_type`
37
- #
38
- # @param explanation [String] Why you are disputing this Transaction.
39
- #
40
- # @param amount [Integer] The monetary amount of the part of the transaction that is being disputed. This
41
- #
42
- # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
43
- end
44
- end
45
- end
@@ -1,144 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Increase
4
- module Models
5
- # @see Increase::Resources::CardDisputes#list
6
- class CardDisputeListParams < Increase::Internal::Type::BaseModel
7
- extend Increase::Internal::Type::RequestParameters::Converter
8
- include Increase::Internal::Type::RequestParameters
9
-
10
- # @!attribute created_at
11
- #
12
- # @return [Increase::Models::CardDisputeListParams::CreatedAt, nil]
13
- optional :created_at, -> { Increase::CardDisputeListParams::CreatedAt }
14
-
15
- # @!attribute cursor
16
- # Return the page of entries after this one.
17
- #
18
- # @return [String, nil]
19
- optional :cursor, String
20
-
21
- # @!attribute idempotency_key
22
- # Filter records to the one with the specified `idempotency_key` you chose for
23
- # that object. This value is unique across Increase and is used to ensure that a
24
- # request is only processed once. Learn more about
25
- # [idempotency](https://increase.com/documentation/idempotency-keys).
26
- #
27
- # @return [String, nil]
28
- optional :idempotency_key, String
29
-
30
- # @!attribute limit
31
- # Limit the size of the list that is returned. The default (and maximum) is 100
32
- # objects.
33
- #
34
- # @return [Integer, nil]
35
- optional :limit, Integer
36
-
37
- # @!attribute status
38
- #
39
- # @return [Increase::Models::CardDisputeListParams::Status, nil]
40
- optional :status, -> { Increase::CardDisputeListParams::Status }
41
-
42
- # @!method initialize(created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {})
43
- # Some parameter documentations has been truncated, see
44
- # {Increase::Models::CardDisputeListParams} for more details.
45
- #
46
- # @param created_at [Increase::Models::CardDisputeListParams::CreatedAt]
47
- #
48
- # @param cursor [String] Return the page of entries after this one.
49
- #
50
- # @param idempotency_key [String] Filter records to the one with the specified `idempotency_key` you chose for tha
51
- #
52
- # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob
53
- #
54
- # @param status [Increase::Models::CardDisputeListParams::Status]
55
- #
56
- # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
57
-
58
- class CreatedAt < Increase::Internal::Type::BaseModel
59
- # @!attribute after
60
- # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
61
- # timestamp.
62
- #
63
- # @return [Time, nil]
64
- optional :after, Time
65
-
66
- # @!attribute before
67
- # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
68
- # timestamp.
69
- #
70
- # @return [Time, nil]
71
- optional :before, Time
72
-
73
- # @!attribute on_or_after
74
- # Return results on or after this
75
- # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
76
- #
77
- # @return [Time, nil]
78
- optional :on_or_after, Time
79
-
80
- # @!attribute on_or_before
81
- # Return results on or before this
82
- # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
83
- #
84
- # @return [Time, nil]
85
- optional :on_or_before, Time
86
-
87
- # @!method initialize(after: nil, before: nil, on_or_after: nil, on_or_before: nil)
88
- # Some parameter documentations has been truncated, see
89
- # {Increase::Models::CardDisputeListParams::CreatedAt} for more details.
90
- #
91
- # @param after [Time] Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) tim
92
- #
93
- # @param before [Time] Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) ti
94
- #
95
- # @param on_or_after [Time] Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_860
96
- #
97
- # @param on_or_before [Time] Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_86
98
- end
99
-
100
- class Status < Increase::Internal::Type::BaseModel
101
- # @!attribute in_
102
- # Filter Card Disputes for those with the specified status or statuses. For GET
103
- # requests, this should be encoded as a comma-delimited string, such as
104
- # `?in=one,two,three`.
105
- #
106
- # @return [Array<Symbol, Increase::Models::CardDisputeListParams::Status::In>, nil]
107
- optional :in_,
108
- -> { Increase::Internal::Type::ArrayOf[enum: Increase::CardDisputeListParams::Status::In] },
109
- api_name: :in
110
-
111
- # @!method initialize(in_: nil)
112
- # Some parameter documentations has been truncated, see
113
- # {Increase::Models::CardDisputeListParams::Status} for more details.
114
- #
115
- # @param in_ [Array<Symbol, Increase::Models::CardDisputeListParams::Status::In>] Filter Card Disputes for those with the specified status or statuses. For GET re
116
-
117
- module In
118
- extend Increase::Internal::Type::Enum
119
-
120
- # The Card Dispute is pending review.
121
- PENDING_REVIEWING = :pending_reviewing
122
-
123
- # Increase has requested more information related to the Card Dispute from you.
124
- PENDING_USER_INFORMATION = :pending_user_information
125
-
126
- # The Card Dispute has been accepted and your funds have been returned. The card dispute will eventually transition into `won` or `lost` depending on the outcome.
127
- ACCEPTED = :accepted
128
-
129
- # The Card Dispute has been rejected.
130
- REJECTED = :rejected
131
-
132
- # The Card Dispute has been lost and funds previously credited from the acceptance have been debited.
133
- LOST = :lost
134
-
135
- # The Card Dispute has been won and no further action can be taken.
136
- WON = :won
137
-
138
- # @!method self.values
139
- # @return [Array<Symbol>]
140
- end
141
- end
142
- end
143
- end
144
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Increase
4
- module Models
5
- # @see Increase::Resources::CardDisputes#retrieve
6
- class CardDisputeRetrieveParams < Increase::Internal::Type::BaseModel
7
- extend Increase::Internal::Type::RequestParameters::Converter
8
- include Increase::Internal::Type::RequestParameters
9
-
10
- # @!method initialize(request_options: {})
11
- # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
12
- end
13
- end
14
- end
@@ -1,55 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Increase
4
- module Models
5
- module Simulations
6
- # @see Increase::Resources::Simulations::CardDisputes#action
7
- class CardDisputeActionParams < Increase::Internal::Type::BaseModel
8
- extend Increase::Internal::Type::RequestParameters::Converter
9
- include Increase::Internal::Type::RequestParameters
10
-
11
- # @!attribute status
12
- # The status to move the dispute to.
13
- #
14
- # @return [Symbol, Increase::Models::Simulations::CardDisputeActionParams::Status]
15
- required :status, enum: -> { Increase::Simulations::CardDisputeActionParams::Status }
16
-
17
- # @!attribute explanation
18
- # Why the dispute was rejected. Not required for accepting disputes.
19
- #
20
- # @return [String, nil]
21
- optional :explanation, String
22
-
23
- # @!method initialize(status:, explanation: nil, request_options: {})
24
- # @param status [Symbol, Increase::Models::Simulations::CardDisputeActionParams::Status] The status to move the dispute to.
25
- #
26
- # @param explanation [String] Why the dispute was rejected. Not required for accepting disputes.
27
- #
28
- # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
29
-
30
- # The status to move the dispute to.
31
- module Status
32
- extend Increase::Internal::Type::Enum
33
-
34
- # Increase has requested more information related to the Card Dispute from you.
35
- PENDING_USER_INFORMATION = :pending_user_information
36
-
37
- # The Card Dispute has been accepted and your funds have been returned. The card dispute will eventually transition into `won` or `lost` depending on the outcome.
38
- ACCEPTED = :accepted
39
-
40
- # The Card Dispute has been rejected.
41
- REJECTED = :rejected
42
-
43
- # The Card Dispute has been lost and funds previously credited from the acceptance have been debited.
44
- LOST = :lost
45
-
46
- # The Card Dispute has been won and no further action can be taken.
47
- WON = :won
48
-
49
- # @!method self.values
50
- # @return [Array<Symbol>]
51
- end
52
- end
53
- end
54
- end
55
- end
@@ -1,97 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Increase
4
- module Resources
5
- class CardDisputes
6
- # Some parameter documentations has been truncated, see
7
- # {Increase::Models::CardDisputeCreateParams} for more details.
8
- #
9
- # Create a Card Dispute
10
- #
11
- # @overload create(disputed_transaction_id:, explanation:, amount: nil, request_options: {})
12
- #
13
- # @param disputed_transaction_id [String] The Transaction you wish to dispute. This Transaction must have a `source_type`
14
- #
15
- # @param explanation [String] Why you are disputing this Transaction.
16
- #
17
- # @param amount [Integer] The monetary amount of the part of the transaction that is being disputed. This
18
- #
19
- # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
20
- #
21
- # @return [Increase::Models::CardDispute]
22
- #
23
- # @see Increase::Models::CardDisputeCreateParams
24
- def create(params)
25
- parsed, options = Increase::CardDisputeCreateParams.dump_request(params)
26
- @client.request(
27
- method: :post,
28
- path: "card_disputes",
29
- body: parsed,
30
- model: Increase::CardDispute,
31
- options: options
32
- )
33
- end
34
-
35
- # Retrieve a Card Dispute
36
- #
37
- # @overload retrieve(card_dispute_id, request_options: {})
38
- #
39
- # @param card_dispute_id [String] The identifier of the Card Dispute.
40
- #
41
- # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
42
- #
43
- # @return [Increase::Models::CardDispute]
44
- #
45
- # @see Increase::Models::CardDisputeRetrieveParams
46
- def retrieve(card_dispute_id, params = {})
47
- @client.request(
48
- method: :get,
49
- path: ["card_disputes/%1$s", card_dispute_id],
50
- model: Increase::CardDispute,
51
- options: params[:request_options]
52
- )
53
- end
54
-
55
- # Some parameter documentations has been truncated, see
56
- # {Increase::Models::CardDisputeListParams} for more details.
57
- #
58
- # List Card Disputes
59
- #
60
- # @overload list(created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {})
61
- #
62
- # @param created_at [Increase::Models::CardDisputeListParams::CreatedAt]
63
- #
64
- # @param cursor [String] Return the page of entries after this one.
65
- #
66
- # @param idempotency_key [String] Filter records to the one with the specified `idempotency_key` you chose for tha
67
- #
68
- # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob
69
- #
70
- # @param status [Increase::Models::CardDisputeListParams::Status]
71
- #
72
- # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
73
- #
74
- # @return [Increase::Internal::Page<Increase::Models::CardDispute>]
75
- #
76
- # @see Increase::Models::CardDisputeListParams
77
- def list(params = {})
78
- parsed, options = Increase::CardDisputeListParams.dump_request(params)
79
- @client.request(
80
- method: :get,
81
- path: "card_disputes",
82
- query: parsed,
83
- page: Increase::Internal::Page,
84
- model: Increase::CardDispute,
85
- options: options
86
- )
87
- end
88
-
89
- # @api private
90
- #
91
- # @param client [Increase::Client]
92
- def initialize(client:)
93
- @client = client
94
- end
95
- end
96
- end
97
- end