increase 1.97.1 → 1.99.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/increase/client.rb +4 -0
- data/lib/increase/models/card_dispute.rb +5021 -0
- data/lib/increase/models/card_dispute_create_params.rb +3265 -0
- data/lib/increase/models/card_dispute_list_params.rb +147 -0
- data/lib/increase/models/card_dispute_retrieve_params.rb +14 -0
- data/lib/increase/models/card_dispute_submit_user_submission_params.rb +3469 -0
- data/lib/increase/models/card_dispute_withdraw_params.rb +14 -0
- data/lib/increase/models/simulations/card_dispute_action_params.rb +214 -0
- data/lib/increase/models/transaction.rb +12 -12
- data/lib/increase/models/transaction_list_params.rb +2 -2
- data/lib/increase/models.rb +12 -0
- data/lib/increase/resources/card_disputes.rb +154 -0
- data/lib/increase/resources/simulations/card_disputes.rb +48 -0
- data/lib/increase/resources/simulations.rb +4 -0
- data/lib/increase/version.rb +1 -1
- data/lib/increase.rb +9 -0
- data/rbi/increase/client.rbi +3 -0
- data/rbi/increase/models/card_dispute.rbi +10100 -0
- data/rbi/increase/models/card_dispute_create_params.rbi +6745 -0
- data/rbi/increase/models/card_dispute_list_params.rbi +296 -0
- data/rbi/increase/models/card_dispute_retrieve_params.rbi +30 -0
- data/rbi/increase/models/card_dispute_submit_user_submission_params.rbi +7253 -0
- data/rbi/increase/models/card_dispute_withdraw_params.rbi +30 -0
- data/rbi/increase/models/simulations/card_dispute_action_params.rbi +419 -0
- data/rbi/increase/models/transaction.rbi +14 -14
- data/rbi/increase/models/transaction_list_params.rbi +2 -2
- data/rbi/increase/models.rbi +13 -0
- data/rbi/increase/resources/card_disputes.rbi +136 -0
- data/rbi/increase/resources/simulations/card_disputes.rbi +40 -0
- data/rbi/increase/resources/simulations.rbi +3 -0
- data/sig/increase/client.rbs +2 -0
- data/sig/increase/models/card_dispute.rbs +3913 -0
- data/sig/increase/models/card_dispute_create_params.rbs +2889 -0
- data/sig/increase/models/card_dispute_list_params.rbs +150 -0
- data/sig/increase/models/card_dispute_retrieve_params.rbs +15 -0
- data/sig/increase/models/card_dispute_submit_user_submission_params.rbs +3089 -0
- data/sig/increase/models/card_dispute_withdraw_params.rbs +15 -0
- data/sig/increase/models/simulations/card_dispute_action_params.rbs +195 -0
- data/sig/increase/models/transaction.rbs +2 -2
- data/sig/increase/models/transaction_list_params.rbs +2 -2
- data/sig/increase/models.rbs +12 -0
- data/sig/increase/resources/card_disputes.rbs +44 -0
- data/sig/increase/resources/simulations/card_disputes.rbs +16 -0
- data/sig/increase/resources/simulations.rbs +2 -0
- metadata +29 -2
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Increase
|
4
|
+
module Models
|
5
|
+
# @see Increase::Resources::CardDisputes#withdraw
|
6
|
+
class CardDisputeWithdrawParams < 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
|
@@ -0,0 +1,214 @@
|
|
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 network
|
12
|
+
# The network of the Card Dispute. Details specific to the network are required
|
13
|
+
# under the sub-object with the same identifier as the network.
|
14
|
+
#
|
15
|
+
# @return [Symbol, Increase::Models::Simulations::CardDisputeActionParams::Network]
|
16
|
+
required :network, enum: -> { Increase::Simulations::CardDisputeActionParams::Network }
|
17
|
+
|
18
|
+
# @!attribute visa
|
19
|
+
# The Visa-specific parameters for the taking action on the dispute. Required if
|
20
|
+
# and only if `network` is `visa`.
|
21
|
+
#
|
22
|
+
# @return [Increase::Models::Simulations::CardDisputeActionParams::Visa, nil]
|
23
|
+
optional :visa, -> { Increase::Simulations::CardDisputeActionParams::Visa }
|
24
|
+
|
25
|
+
# @!method initialize(network:, visa: nil, request_options: {})
|
26
|
+
# Some parameter documentations has been truncated, see
|
27
|
+
# {Increase::Models::Simulations::CardDisputeActionParams} for more details.
|
28
|
+
#
|
29
|
+
# @param network [Symbol, Increase::Models::Simulations::CardDisputeActionParams::Network] The network of the Card Dispute. Details specific to the network are required un
|
30
|
+
#
|
31
|
+
# @param visa [Increase::Models::Simulations::CardDisputeActionParams::Visa] The Visa-specific parameters for the taking action on the dispute. Required if a
|
32
|
+
#
|
33
|
+
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
|
34
|
+
|
35
|
+
# The network of the Card Dispute. Details specific to the network are required
|
36
|
+
# under the sub-object with the same identifier as the network.
|
37
|
+
module Network
|
38
|
+
extend Increase::Internal::Type::Enum
|
39
|
+
|
40
|
+
# Visa
|
41
|
+
VISA = :visa
|
42
|
+
|
43
|
+
# @!method self.values
|
44
|
+
# @return [Array<Symbol>]
|
45
|
+
end
|
46
|
+
|
47
|
+
class Visa < Increase::Internal::Type::BaseModel
|
48
|
+
# @!attribute action
|
49
|
+
# The action to take. Details specific to the action are required under the
|
50
|
+
# sub-object with the same identifier as the action.
|
51
|
+
#
|
52
|
+
# @return [Symbol, Increase::Models::Simulations::CardDisputeActionParams::Visa::Action]
|
53
|
+
required :action, enum: -> { Increase::Simulations::CardDisputeActionParams::Visa::Action }
|
54
|
+
|
55
|
+
# @!attribute accept_chargeback
|
56
|
+
# The parameters for accepting the chargeback. Required if and only if `action` is
|
57
|
+
# `accept_chargeback`.
|
58
|
+
#
|
59
|
+
# @return [Object, nil]
|
60
|
+
optional :accept_chargeback, Increase::Internal::Type::Unknown
|
61
|
+
|
62
|
+
# @!attribute accept_user_submission
|
63
|
+
# The parameters for accepting the user submission. Required if and only if
|
64
|
+
# `action` is `accept_user_submission`.
|
65
|
+
#
|
66
|
+
# @return [Object, nil]
|
67
|
+
optional :accept_user_submission, Increase::Internal::Type::Unknown
|
68
|
+
|
69
|
+
# @!attribute decline_user_prearbitration
|
70
|
+
# The parameters for declining the prearbitration. Required if and only if
|
71
|
+
# `action` is `decline_user_prearbitration`.
|
72
|
+
#
|
73
|
+
# @return [Object, nil]
|
74
|
+
optional :decline_user_prearbitration, Increase::Internal::Type::Unknown
|
75
|
+
|
76
|
+
# @!attribute receive_merchant_prearbitration
|
77
|
+
# The parameters for receiving the prearbitration. Required if and only if
|
78
|
+
# `action` is `receive_merchant_prearbitration`.
|
79
|
+
#
|
80
|
+
# @return [Object, nil]
|
81
|
+
optional :receive_merchant_prearbitration, Increase::Internal::Type::Unknown
|
82
|
+
|
83
|
+
# @!attribute represent
|
84
|
+
# The parameters for re-presenting the dispute. Required if and only if `action`
|
85
|
+
# is `represent`.
|
86
|
+
#
|
87
|
+
# @return [Object, nil]
|
88
|
+
optional :represent, Increase::Internal::Type::Unknown
|
89
|
+
|
90
|
+
# @!attribute request_further_information
|
91
|
+
# The parameters for requesting further information from the user. Required if and
|
92
|
+
# only if `action` is `request_further_information`.
|
93
|
+
#
|
94
|
+
# @return [Increase::Models::Simulations::CardDisputeActionParams::Visa::RequestFurtherInformation, nil]
|
95
|
+
optional :request_further_information,
|
96
|
+
-> { Increase::Simulations::CardDisputeActionParams::Visa::RequestFurtherInformation }
|
97
|
+
|
98
|
+
# @!attribute time_out_chargeback
|
99
|
+
# The parameters for timing out the chargeback. Required if and only if `action`
|
100
|
+
# is `time_out_chargeback`.
|
101
|
+
#
|
102
|
+
# @return [Object, nil]
|
103
|
+
optional :time_out_chargeback, Increase::Internal::Type::Unknown
|
104
|
+
|
105
|
+
# @!attribute time_out_merchant_prearbitration
|
106
|
+
# The parameters for timing out the merchant prearbitration. Required if and only
|
107
|
+
# if `action` is `time_out_merchant_prearbitration`.
|
108
|
+
#
|
109
|
+
# @return [Object, nil]
|
110
|
+
optional :time_out_merchant_prearbitration, Increase::Internal::Type::Unknown
|
111
|
+
|
112
|
+
# @!attribute time_out_representment
|
113
|
+
# The parameters for timing out the re-presentment. Required if and only if
|
114
|
+
# `action` is `time_out_representment`.
|
115
|
+
#
|
116
|
+
# @return [Object, nil]
|
117
|
+
optional :time_out_representment, Increase::Internal::Type::Unknown
|
118
|
+
|
119
|
+
# @!attribute time_out_user_prearbitration
|
120
|
+
# The parameters for timing out the user prearbitration. Required if and only if
|
121
|
+
# `action` is `time_out_user_prearbitration`.
|
122
|
+
#
|
123
|
+
# @return [Object, nil]
|
124
|
+
optional :time_out_user_prearbitration, Increase::Internal::Type::Unknown
|
125
|
+
|
126
|
+
# @!method initialize(action:, accept_chargeback: nil, accept_user_submission: nil, decline_user_prearbitration: nil, receive_merchant_prearbitration: nil, represent: nil, request_further_information: nil, time_out_chargeback: nil, time_out_merchant_prearbitration: nil, time_out_representment: nil, time_out_user_prearbitration: nil)
|
127
|
+
# Some parameter documentations has been truncated, see
|
128
|
+
# {Increase::Models::Simulations::CardDisputeActionParams::Visa} for more details.
|
129
|
+
#
|
130
|
+
# The Visa-specific parameters for the taking action on the dispute. Required if
|
131
|
+
# and only if `network` is `visa`.
|
132
|
+
#
|
133
|
+
# @param action [Symbol, Increase::Models::Simulations::CardDisputeActionParams::Visa::Action] The action to take. Details specific to the action are required under the sub-ob
|
134
|
+
#
|
135
|
+
# @param accept_chargeback [Object] The parameters for accepting the chargeback. Required if and only if `action` is
|
136
|
+
#
|
137
|
+
# @param accept_user_submission [Object] The parameters for accepting the user submission. Required if and only if `actio
|
138
|
+
#
|
139
|
+
# @param decline_user_prearbitration [Object] The parameters for declining the prearbitration. Required if and only if `action
|
140
|
+
#
|
141
|
+
# @param receive_merchant_prearbitration [Object] The parameters for receiving the prearbitration. Required if and only if `action
|
142
|
+
#
|
143
|
+
# @param represent [Object] The parameters for re-presenting the dispute. Required if and only if `action` i
|
144
|
+
#
|
145
|
+
# @param request_further_information [Increase::Models::Simulations::CardDisputeActionParams::Visa::RequestFurtherInformation] The parameters for requesting further information from the user. Required if and
|
146
|
+
#
|
147
|
+
# @param time_out_chargeback [Object] The parameters for timing out the chargeback. Required if and only if `action` i
|
148
|
+
#
|
149
|
+
# @param time_out_merchant_prearbitration [Object] The parameters for timing out the merchant prearbitration. Required if and only
|
150
|
+
#
|
151
|
+
# @param time_out_representment [Object] The parameters for timing out the re-presentment. Required if and only if `actio
|
152
|
+
#
|
153
|
+
# @param time_out_user_prearbitration [Object] The parameters for timing out the user prearbitration. Required if and only if `
|
154
|
+
|
155
|
+
# The action to take. Details specific to the action are required under the
|
156
|
+
# sub-object with the same identifier as the action.
|
157
|
+
#
|
158
|
+
# @see Increase::Models::Simulations::CardDisputeActionParams::Visa#action
|
159
|
+
module Action
|
160
|
+
extend Increase::Internal::Type::Enum
|
161
|
+
|
162
|
+
# Simulate the merchant accepting the chargeback. This will move the dispute to a `won` state.
|
163
|
+
ACCEPT_CHARGEBACK = :accept_chargeback
|
164
|
+
|
165
|
+
# Accept the user's submission and transmit it to the network. This will move the dispute to a `pending_response` state.
|
166
|
+
ACCEPT_USER_SUBMISSION = :accept_user_submission
|
167
|
+
|
168
|
+
# Simulate the merchant declining the user's pre-arbitration. This will move the dispute to a `lost` state.
|
169
|
+
DECLINE_USER_PREARBITRATION = :decline_user_prearbitration
|
170
|
+
|
171
|
+
# Simulate the merchant issuing pre-arbitration. This will move the dispute to a `user_submission_required` state.
|
172
|
+
RECEIVE_MERCHANT_PREARBITRATION = :receive_merchant_prearbitration
|
173
|
+
|
174
|
+
# Simulate the merchant re-presenting the dispute. This will move the dispute to a `user_submission_required` state.
|
175
|
+
REPRESENT = :represent
|
176
|
+
|
177
|
+
# Simulate further information being requested from the user. This will move the dispute to a `user_submission_required` state.
|
178
|
+
REQUEST_FURTHER_INFORMATION = :request_further_information
|
179
|
+
|
180
|
+
# Simulate the merchant timing out responding to the chargeback. This will move the dispute to a `won` state.
|
181
|
+
TIME_OUT_CHARGEBACK = :time_out_chargeback
|
182
|
+
|
183
|
+
# Simulate the user timing out responding to a merchant pre-arbitration. This will move the dispute to a `lost` state.
|
184
|
+
TIME_OUT_MERCHANT_PREARBITRATION = :time_out_merchant_prearbitration
|
185
|
+
|
186
|
+
# Simulate the user timing out responding to a merchant re-presentment. This will move the dispute to a `lost` state.
|
187
|
+
TIME_OUT_REPRESENTMENT = :time_out_representment
|
188
|
+
|
189
|
+
# Simulate the merchant timing out responding to a user pre-arbitration. This will move the dispute to a `win` state.
|
190
|
+
TIME_OUT_USER_PREARBITRATION = :time_out_user_prearbitration
|
191
|
+
|
192
|
+
# @!method self.values
|
193
|
+
# @return [Array<Symbol>]
|
194
|
+
end
|
195
|
+
|
196
|
+
# @see Increase::Models::Simulations::CardDisputeActionParams::Visa#request_further_information
|
197
|
+
class RequestFurtherInformation < Increase::Internal::Type::BaseModel
|
198
|
+
# @!attribute reason
|
199
|
+
# The reason for requesting further information from the user.
|
200
|
+
#
|
201
|
+
# @return [String]
|
202
|
+
required :reason, String
|
203
|
+
|
204
|
+
# @!method initialize(reason:)
|
205
|
+
# The parameters for requesting further information from the user. Required if and
|
206
|
+
# only if `action` is `request_further_information`.
|
207
|
+
#
|
208
|
+
# @param reason [String] The reason for requesting further information from the user.
|
209
|
+
end
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
@@ -216,7 +216,7 @@ module Increase
|
|
216
216
|
required :ach_transfer_return, -> { Increase::Transaction::Source::ACHTransferReturn }, nil?: true
|
217
217
|
|
218
218
|
# @!attribute card_dispute_acceptance
|
219
|
-
# A Card Dispute Acceptance object. This field will be present in the JSON
|
219
|
+
# A Legacy Card Dispute Acceptance object. This field will be present in the JSON
|
220
220
|
# response if and only if `category` is equal to `card_dispute_acceptance`.
|
221
221
|
# Contains the details of a successful Card Dispute.
|
222
222
|
#
|
@@ -240,9 +240,9 @@ module Increase
|
|
240
240
|
nil?: true
|
241
241
|
|
242
242
|
# @!attribute card_dispute_loss
|
243
|
-
# A Card Dispute Loss object. This field will be present in the JSON
|
244
|
-
# and only if `category` is equal to `card_dispute_loss`. Contains the
|
245
|
-
# a lost Card Dispute.
|
243
|
+
# A Legacy Card Dispute Loss object. This field will be present in the JSON
|
244
|
+
# response if and only if `category` is equal to `card_dispute_loss`. Contains the
|
245
|
+
# details of a lost Card Dispute.
|
246
246
|
#
|
247
247
|
# @return [Increase::Models::Transaction::Source::CardDisputeLoss, nil]
|
248
248
|
required :card_dispute_loss, -> { Increase::Transaction::Source::CardDisputeLoss }, nil?: true
|
@@ -557,11 +557,11 @@ module Increase
|
|
557
557
|
#
|
558
558
|
# @param ach_transfer_return [Increase::Models::Transaction::Source::ACHTransferReturn, nil] An ACH Transfer Return object. This field will be present in the JSON response i
|
559
559
|
#
|
560
|
-
# @param card_dispute_acceptance [Increase::Models::Transaction::Source::CardDisputeAcceptance, nil] A Card Dispute Acceptance object. This field will be present in the JSON
|
560
|
+
# @param card_dispute_acceptance [Increase::Models::Transaction::Source::CardDisputeAcceptance, nil] A Legacy Card Dispute Acceptance object. This field will be present in the JSON
|
561
561
|
#
|
562
562
|
# @param card_dispute_financial [Increase::Models::Transaction::Source::CardDisputeFinancial, nil] A Card Dispute Financial object. This field will be present in the JSON response
|
563
563
|
#
|
564
|
-
# @param card_dispute_loss [Increase::Models::Transaction::Source::CardDisputeLoss, nil] A Card Dispute Loss object. This field will be present in the JSON
|
564
|
+
# @param card_dispute_loss [Increase::Models::Transaction::Source::CardDisputeLoss, nil] A Legacy Card Dispute Loss object. This field will be present in the JSON respon
|
565
565
|
#
|
566
566
|
# @param card_financial [Increase::Models::Transaction::Source::CardFinancial, nil] A Card Financial object. This field will be present in the JSON response if and
|
567
567
|
#
|
@@ -1129,7 +1129,7 @@ module Increase
|
|
1129
1129
|
# Some parameter documentations has been truncated, see
|
1130
1130
|
# {Increase::Models::Transaction::Source::CardDisputeAcceptance} for more details.
|
1131
1131
|
#
|
1132
|
-
# A Card Dispute Acceptance object. This field will be present in the JSON
|
1132
|
+
# A Legacy Card Dispute Acceptance object. This field will be present in the JSON
|
1133
1133
|
# response if and only if `category` is equal to `card_dispute_acceptance`.
|
1134
1134
|
# Contains the details of a successful Card Dispute.
|
1135
1135
|
#
|
@@ -1270,9 +1270,9 @@ module Increase
|
|
1270
1270
|
# Some parameter documentations has been truncated, see
|
1271
1271
|
# {Increase::Models::Transaction::Source::CardDisputeLoss} for more details.
|
1272
1272
|
#
|
1273
|
-
# A Card Dispute Loss object. This field will be present in the JSON
|
1274
|
-
# and only if `category` is equal to `card_dispute_loss`. Contains the
|
1275
|
-
# a lost Card Dispute.
|
1273
|
+
# A Legacy Card Dispute Loss object. This field will be present in the JSON
|
1274
|
+
# response if and only if `category` is equal to `card_dispute_loss`. Contains the
|
1275
|
+
# details of a lost Card Dispute.
|
1276
1276
|
#
|
1277
1277
|
# @param explanation [String] Why the Card Dispute was lost.
|
1278
1278
|
#
|
@@ -5385,13 +5385,13 @@ module Increase
|
|
5385
5385
|
# Cashback Payment: details will be under the `cashback_payment` object.
|
5386
5386
|
CASHBACK_PAYMENT = :cashback_payment
|
5387
5387
|
|
5388
|
-
# Card Dispute Acceptance: details will be under the `card_dispute_acceptance` object.
|
5388
|
+
# Legacy Card Dispute Acceptance: details will be under the `card_dispute_acceptance` object.
|
5389
5389
|
CARD_DISPUTE_ACCEPTANCE = :card_dispute_acceptance
|
5390
5390
|
|
5391
5391
|
# Card Dispute Financial: details will be under the `card_dispute_financial` object.
|
5392
5392
|
CARD_DISPUTE_FINANCIAL = :card_dispute_financial
|
5393
5393
|
|
5394
|
-
# Card Dispute Loss: details will be under the `card_dispute_loss` object.
|
5394
|
+
# Legacy Card Dispute Loss: details will be under the `card_dispute_loss` object.
|
5395
5395
|
CARD_DISPUTE_LOSS = :card_dispute_loss
|
5396
5396
|
|
5397
5397
|
# Card Refund: details will be under the `card_refund` object.
|
@@ -97,13 +97,13 @@ module Increase
|
|
97
97
|
# Cashback Payment: details will be under the `cashback_payment` object.
|
98
98
|
CASHBACK_PAYMENT = :cashback_payment
|
99
99
|
|
100
|
-
# Card Dispute Acceptance: details will be under the `card_dispute_acceptance` object.
|
100
|
+
# Legacy Card Dispute Acceptance: details will be under the `card_dispute_acceptance` object.
|
101
101
|
CARD_DISPUTE_ACCEPTANCE = :card_dispute_acceptance
|
102
102
|
|
103
103
|
# Card Dispute Financial: details will be under the `card_dispute_financial` object.
|
104
104
|
CARD_DISPUTE_FINANCIAL = :card_dispute_financial
|
105
105
|
|
106
|
-
# Card Dispute Loss: details will be under the `card_dispute_loss` object.
|
106
|
+
# Legacy Card Dispute Loss: details will be under the `card_dispute_loss` object.
|
107
107
|
CARD_DISPUTE_LOSS = :card_dispute_loss
|
108
108
|
|
109
109
|
# Card Refund: details will be under the `card_refund` object.
|
data/lib/increase/models.rb
CHANGED
@@ -139,6 +139,18 @@ module Increase
|
|
139
139
|
|
140
140
|
CardDetailsParams = Increase::Models::CardDetailsParams
|
141
141
|
|
142
|
+
CardDispute = Increase::Models::CardDispute
|
143
|
+
|
144
|
+
CardDisputeCreateParams = Increase::Models::CardDisputeCreateParams
|
145
|
+
|
146
|
+
CardDisputeListParams = Increase::Models::CardDisputeListParams
|
147
|
+
|
148
|
+
CardDisputeRetrieveParams = Increase::Models::CardDisputeRetrieveParams
|
149
|
+
|
150
|
+
CardDisputeSubmitUserSubmissionParams = Increase::Models::CardDisputeSubmitUserSubmissionParams
|
151
|
+
|
152
|
+
CardDisputeWithdrawParams = Increase::Models::CardDisputeWithdrawParams
|
153
|
+
|
142
154
|
CardIframeURL = Increase::Models::CardIframeURL
|
143
155
|
|
144
156
|
CardListParams = Increase::Models::CardListParams
|
@@ -0,0 +1,154 @@
|
|
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:, network:, amount: nil, attachment_files: nil, visa: 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 network [Symbol, Increase::Models::CardDisputeCreateParams::Network] The network of the disputed transaction. Details specific to the network are req
|
16
|
+
#
|
17
|
+
# @param amount [Integer] The monetary amount of the part of the transaction that is being disputed. This
|
18
|
+
#
|
19
|
+
# @param attachment_files [Array<Increase::Models::CardDisputeCreateParams::AttachmentFile>] The files to be attached to the initial dispute submission.
|
20
|
+
#
|
21
|
+
# @param visa [Increase::Models::CardDisputeCreateParams::Visa] The Visa-specific parameters for the dispute. Required if and only if `network`
|
22
|
+
#
|
23
|
+
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
|
24
|
+
#
|
25
|
+
# @return [Increase::Models::CardDispute]
|
26
|
+
#
|
27
|
+
# @see Increase::Models::CardDisputeCreateParams
|
28
|
+
def create(params)
|
29
|
+
parsed, options = Increase::CardDisputeCreateParams.dump_request(params)
|
30
|
+
@client.request(
|
31
|
+
method: :post,
|
32
|
+
path: "card_disputes",
|
33
|
+
body: parsed,
|
34
|
+
model: Increase::CardDispute,
|
35
|
+
options: options
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Retrieve a Card Dispute
|
40
|
+
#
|
41
|
+
# @overload retrieve(card_dispute_id, request_options: {})
|
42
|
+
#
|
43
|
+
# @param card_dispute_id [String] The identifier of the Card Dispute.
|
44
|
+
#
|
45
|
+
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
|
46
|
+
#
|
47
|
+
# @return [Increase::Models::CardDispute]
|
48
|
+
#
|
49
|
+
# @see Increase::Models::CardDisputeRetrieveParams
|
50
|
+
def retrieve(card_dispute_id, params = {})
|
51
|
+
@client.request(
|
52
|
+
method: :get,
|
53
|
+
path: ["card_disputes/%1$s", card_dispute_id],
|
54
|
+
model: Increase::CardDispute,
|
55
|
+
options: params[:request_options]
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Some parameter documentations has been truncated, see
|
60
|
+
# {Increase::Models::CardDisputeListParams} for more details.
|
61
|
+
#
|
62
|
+
# List Card Disputes
|
63
|
+
#
|
64
|
+
# @overload list(created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {})
|
65
|
+
#
|
66
|
+
# @param created_at [Increase::Models::CardDisputeListParams::CreatedAt]
|
67
|
+
#
|
68
|
+
# @param cursor [String] Return the page of entries after this one.
|
69
|
+
#
|
70
|
+
# @param idempotency_key [String] Filter records to the one with the specified `idempotency_key` you chose for tha
|
71
|
+
#
|
72
|
+
# @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob
|
73
|
+
#
|
74
|
+
# @param status [Increase::Models::CardDisputeListParams::Status]
|
75
|
+
#
|
76
|
+
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
|
77
|
+
#
|
78
|
+
# @return [Increase::Internal::Page<Increase::Models::CardDispute>]
|
79
|
+
#
|
80
|
+
# @see Increase::Models::CardDisputeListParams
|
81
|
+
def list(params = {})
|
82
|
+
parsed, options = Increase::CardDisputeListParams.dump_request(params)
|
83
|
+
@client.request(
|
84
|
+
method: :get,
|
85
|
+
path: "card_disputes",
|
86
|
+
query: parsed,
|
87
|
+
page: Increase::Internal::Page,
|
88
|
+
model: Increase::CardDispute,
|
89
|
+
options: options
|
90
|
+
)
|
91
|
+
end
|
92
|
+
|
93
|
+
# Some parameter documentations has been truncated, see
|
94
|
+
# {Increase::Models::CardDisputeSubmitUserSubmissionParams} for more details.
|
95
|
+
#
|
96
|
+
# Submit a User Submission for a Card Dispute
|
97
|
+
#
|
98
|
+
# @overload submit_user_submission(card_dispute_id, network:, amount: nil, attachment_files: nil, visa: nil, request_options: {})
|
99
|
+
#
|
100
|
+
# @param card_dispute_id [String] The identifier of the Card Dispute to submit a user submission for.
|
101
|
+
#
|
102
|
+
# @param network [Symbol, Increase::Models::CardDisputeSubmitUserSubmissionParams::Network] The network of the Card Dispute. Details specific to the network are required un
|
103
|
+
#
|
104
|
+
# @param amount [Integer] The adjusted monetary amount of the part of the transaction that is being disput
|
105
|
+
#
|
106
|
+
# @param attachment_files [Array<Increase::Models::CardDisputeSubmitUserSubmissionParams::AttachmentFile>] The files to be attached to the user submission.
|
107
|
+
#
|
108
|
+
# @param visa [Increase::Models::CardDisputeSubmitUserSubmissionParams::Visa] The Visa-specific parameters for the dispute. Required if and only if `network`
|
109
|
+
#
|
110
|
+
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
|
111
|
+
#
|
112
|
+
# @return [Increase::Models::CardDispute]
|
113
|
+
#
|
114
|
+
# @see Increase::Models::CardDisputeSubmitUserSubmissionParams
|
115
|
+
def submit_user_submission(card_dispute_id, params)
|
116
|
+
parsed, options = Increase::CardDisputeSubmitUserSubmissionParams.dump_request(params)
|
117
|
+
@client.request(
|
118
|
+
method: :post,
|
119
|
+
path: ["card_disputes/%1$s/submit_user_submission", card_dispute_id],
|
120
|
+
body: parsed,
|
121
|
+
model: Increase::CardDispute,
|
122
|
+
options: options
|
123
|
+
)
|
124
|
+
end
|
125
|
+
|
126
|
+
# Withdraw a Card Dispute
|
127
|
+
#
|
128
|
+
# @overload withdraw(card_dispute_id, request_options: {})
|
129
|
+
#
|
130
|
+
# @param card_dispute_id [String] The identifier of the Card Dispute to withdraw.
|
131
|
+
#
|
132
|
+
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
|
133
|
+
#
|
134
|
+
# @return [Increase::Models::CardDispute]
|
135
|
+
#
|
136
|
+
# @see Increase::Models::CardDisputeWithdrawParams
|
137
|
+
def withdraw(card_dispute_id, params = {})
|
138
|
+
@client.request(
|
139
|
+
method: :post,
|
140
|
+
path: ["card_disputes/%1$s/withdraw", card_dispute_id],
|
141
|
+
model: Increase::CardDispute,
|
142
|
+
options: params[:request_options]
|
143
|
+
)
|
144
|
+
end
|
145
|
+
|
146
|
+
# @api private
|
147
|
+
#
|
148
|
+
# @param client [Increase::Client]
|
149
|
+
def initialize(client:)
|
150
|
+
@client = client
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Increase
|
4
|
+
module Resources
|
5
|
+
class Simulations
|
6
|
+
class CardDisputes
|
7
|
+
# Some parameter documentations has been truncated, see
|
8
|
+
# {Increase::Models::Simulations::CardDisputeActionParams} for more details.
|
9
|
+
#
|
10
|
+
# After a [Card Dispute](#card-disputes) is created in production, the dispute
|
11
|
+
# will initially be in a `pending_user_submission_reviewing` state. Since no
|
12
|
+
# review or further action happens in sandbox, this endpoint simulates moving a
|
13
|
+
# Card Dispute through its various states.
|
14
|
+
#
|
15
|
+
# @overload action(card_dispute_id, network:, visa: nil, request_options: {})
|
16
|
+
#
|
17
|
+
# @param card_dispute_id [String] The dispute you would like to action.
|
18
|
+
#
|
19
|
+
# @param network [Symbol, Increase::Models::Simulations::CardDisputeActionParams::Network] The network of the Card Dispute. Details specific to the network are required un
|
20
|
+
#
|
21
|
+
# @param visa [Increase::Models::Simulations::CardDisputeActionParams::Visa] The Visa-specific parameters for the taking action on the dispute. Required if a
|
22
|
+
#
|
23
|
+
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
|
24
|
+
#
|
25
|
+
# @return [Increase::Models::CardDispute]
|
26
|
+
#
|
27
|
+
# @see Increase::Models::Simulations::CardDisputeActionParams
|
28
|
+
def action(card_dispute_id, params)
|
29
|
+
parsed, options = Increase::Simulations::CardDisputeActionParams.dump_request(params)
|
30
|
+
@client.request(
|
31
|
+
method: :post,
|
32
|
+
path: ["simulations/card_disputes/%1$s/action", card_dispute_id],
|
33
|
+
body: parsed,
|
34
|
+
model: Increase::CardDispute,
|
35
|
+
options: options
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
# @api private
|
40
|
+
#
|
41
|
+
# @param client [Increase::Client]
|
42
|
+
def initialize(client:)
|
43
|
+
@client = client
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -30,6 +30,9 @@ module Increase
|
|
30
30
|
# @return [Increase::Resources::Simulations::CardRefunds]
|
31
31
|
attr_reader :card_refunds
|
32
32
|
|
33
|
+
# @return [Increase::Resources::Simulations::CardDisputes]
|
34
|
+
attr_reader :card_disputes
|
35
|
+
|
33
36
|
# @return [Increase::Resources::Simulations::PhysicalCards]
|
34
37
|
attr_reader :physical_cards
|
35
38
|
|
@@ -102,6 +105,7 @@ module Increase
|
|
102
105
|
@card_increments = Increase::Resources::Simulations::CardIncrements.new(client: client)
|
103
106
|
@card_fuel_confirmations = Increase::Resources::Simulations::CardFuelConfirmations.new(client: client)
|
104
107
|
@card_refunds = Increase::Resources::Simulations::CardRefunds.new(client: client)
|
108
|
+
@card_disputes = Increase::Resources::Simulations::CardDisputes.new(client: client)
|
105
109
|
@physical_cards = Increase::Resources::Simulations::PhysicalCards.new(client: client)
|
106
110
|
@digital_wallet_token_requests =
|
107
111
|
Increase::Resources::Simulations::DigitalWalletTokenRequests.new(client: client)
|
data/lib/increase/version.rb
CHANGED
data/lib/increase.rb
CHANGED
@@ -101,6 +101,12 @@ require_relative "increase/models/card_create_details_iframe_params"
|
|
101
101
|
require_relative "increase/models/card_create_params"
|
102
102
|
require_relative "increase/models/card_details"
|
103
103
|
require_relative "increase/models/card_details_params"
|
104
|
+
require_relative "increase/models/card_dispute"
|
105
|
+
require_relative "increase/models/card_dispute_create_params"
|
106
|
+
require_relative "increase/models/card_dispute_list_params"
|
107
|
+
require_relative "increase/models/card_dispute_retrieve_params"
|
108
|
+
require_relative "increase/models/card_dispute_submit_user_submission_params"
|
109
|
+
require_relative "increase/models/card_dispute_withdraw_params"
|
104
110
|
require_relative "increase/models/card_iframe_url"
|
105
111
|
require_relative "increase/models/card_list_params"
|
106
112
|
require_relative "increase/models/card_payment"
|
@@ -281,6 +287,7 @@ require_relative "increase/models/simulations/ach_transfer_submit_params"
|
|
281
287
|
require_relative "increase/models/simulations/card_authorization_create_params"
|
282
288
|
require_relative "increase/models/simulations/card_authorization_create_response"
|
283
289
|
require_relative "increase/models/simulations/card_authorization_expiration_create_params"
|
290
|
+
require_relative "increase/models/simulations/card_dispute_action_params"
|
284
291
|
require_relative "increase/models/simulations/card_fuel_confirmation_create_params"
|
285
292
|
require_relative "increase/models/simulations/card_increment_create_params"
|
286
293
|
require_relative "increase/models/simulations/card_refund_create_params"
|
@@ -335,6 +342,7 @@ require_relative "increase/resources/ach_transfers"
|
|
335
342
|
require_relative "increase/resources/bookkeeping_accounts"
|
336
343
|
require_relative "increase/resources/bookkeeping_entries"
|
337
344
|
require_relative "increase/resources/bookkeeping_entry_sets"
|
345
|
+
require_relative "increase/resources/card_disputes"
|
338
346
|
require_relative "increase/resources/card_payments"
|
339
347
|
require_relative "increase/resources/card_purchase_supplements"
|
340
348
|
require_relative "increase/resources/card_push_transfers"
|
@@ -381,6 +389,7 @@ require_relative "increase/resources/simulations/account_transfers"
|
|
381
389
|
require_relative "increase/resources/simulations/ach_transfers"
|
382
390
|
require_relative "increase/resources/simulations/card_authorization_expirations"
|
383
391
|
require_relative "increase/resources/simulations/card_authorizations"
|
392
|
+
require_relative "increase/resources/simulations/card_disputes"
|
384
393
|
require_relative "increase/resources/simulations/card_fuel_confirmations"
|
385
394
|
require_relative "increase/resources/simulations/card_increments"
|
386
395
|
require_relative "increase/resources/simulations/card_refunds"
|
data/rbi/increase/client.rbi
CHANGED
@@ -40,6 +40,9 @@ module Increase
|
|
40
40
|
sig { returns(Increase::Resources::CardPurchaseSupplements) }
|
41
41
|
attr_reader :card_purchase_supplements
|
42
42
|
|
43
|
+
sig { returns(Increase::Resources::CardDisputes) }
|
44
|
+
attr_reader :card_disputes
|
45
|
+
|
43
46
|
sig { returns(Increase::Resources::PhysicalCards) }
|
44
47
|
attr_reader :physical_cards
|
45
48
|
|