increase 1.98.0 → 1.100.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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/increase/client.rb +4 -0
  5. data/lib/increase/models/card_dispute.rb +5021 -0
  6. data/lib/increase/models/card_dispute_create_params.rb +3265 -0
  7. data/lib/increase/models/card_dispute_list_params.rb +147 -0
  8. data/lib/increase/models/card_dispute_retrieve_params.rb +14 -0
  9. data/lib/increase/models/card_dispute_submit_user_submission_params.rb +3469 -0
  10. data/lib/increase/models/card_dispute_withdraw_params.rb +14 -0
  11. data/lib/increase/models/card_payment.rb +13 -4
  12. data/lib/increase/models/simulations/card_dispute_action_params.rb +214 -0
  13. data/lib/increase/models.rb +12 -0
  14. data/lib/increase/resources/card_disputes.rb +154 -0
  15. data/lib/increase/resources/simulations/card_disputes.rb +48 -0
  16. data/lib/increase/resources/simulations.rb +4 -0
  17. data/lib/increase/version.rb +1 -1
  18. data/lib/increase.rb +9 -0
  19. data/rbi/increase/client.rbi +3 -0
  20. data/rbi/increase/models/card_dispute.rbi +10100 -0
  21. data/rbi/increase/models/card_dispute_create_params.rbi +6745 -0
  22. data/rbi/increase/models/card_dispute_list_params.rbi +296 -0
  23. data/rbi/increase/models/card_dispute_retrieve_params.rbi +30 -0
  24. data/rbi/increase/models/card_dispute_submit_user_submission_params.rbi +7253 -0
  25. data/rbi/increase/models/card_dispute_withdraw_params.rbi +30 -0
  26. data/rbi/increase/models/card_payment.rbi +14 -4
  27. data/rbi/increase/models/simulations/card_dispute_action_params.rbi +419 -0
  28. data/rbi/increase/models.rbi +13 -0
  29. data/rbi/increase/resources/card_disputes.rbi +136 -0
  30. data/rbi/increase/resources/simulations/card_disputes.rbi +40 -0
  31. data/rbi/increase/resources/simulations.rbi +3 -0
  32. data/sig/increase/client.rbs +2 -0
  33. data/sig/increase/models/card_dispute.rbs +3913 -0
  34. data/sig/increase/models/card_dispute_create_params.rbs +2889 -0
  35. data/sig/increase/models/card_dispute_list_params.rbs +150 -0
  36. data/sig/increase/models/card_dispute_retrieve_params.rbs +15 -0
  37. data/sig/increase/models/card_dispute_submit_user_submission_params.rbs +3089 -0
  38. data/sig/increase/models/card_dispute_withdraw_params.rbs +15 -0
  39. data/sig/increase/models/card_payment.rbs +5 -0
  40. data/sig/increase/models/simulations/card_dispute_action_params.rbs +195 -0
  41. data/sig/increase/models.rbs +12 -0
  42. data/sig/increase/resources/card_disputes.rbs +44 -0
  43. data/sig/increase/resources/simulations/card_disputes.rbs +16 -0
  44. data/sig/increase/resources/simulations.rbs +2 -0
  45. 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
@@ -8043,6 +8043,13 @@ module Increase
8043
8043
  # @return [Integer]
8044
8044
  required :incremented_amount, Integer
8045
8045
 
8046
+ # @!attribute refunded_amount
8047
+ # The total refunded amount in the minor unit of the transaction's currency. For
8048
+ # dollars, for example, this is cents.
8049
+ #
8050
+ # @return [Integer]
8051
+ required :refunded_amount, Integer
8052
+
8046
8053
  # @!attribute reversed_amount
8047
8054
  # The total reversed amount in the minor unit of the transaction's currency. For
8048
8055
  # dollars, for example, this is cents.
@@ -8051,13 +8058,13 @@ module Increase
8051
8058
  required :reversed_amount, Integer
8052
8059
 
8053
8060
  # @!attribute settled_amount
8054
- # The total settled or refunded amount in the minor unit of the transaction's
8055
- # currency. For dollars, for example, this is cents.
8061
+ # The total settled amount in the minor unit of the transaction's currency. For
8062
+ # dollars, for example, this is cents.
8056
8063
  #
8057
8064
  # @return [Integer]
8058
8065
  required :settled_amount, Integer
8059
8066
 
8060
- # @!method initialize(authorized_amount:, fuel_confirmed_amount:, incremented_amount:, reversed_amount:, settled_amount:)
8067
+ # @!method initialize(authorized_amount:, fuel_confirmed_amount:, incremented_amount:, refunded_amount:, reversed_amount:, settled_amount:)
8061
8068
  # Some parameter documentations has been truncated, see
8062
8069
  # {Increase::Models::CardPayment::State} for more details.
8063
8070
  #
@@ -8069,9 +8076,11 @@ module Increase
8069
8076
  #
8070
8077
  # @param incremented_amount [Integer] The total incrementally updated authorized amount in the minor unit of the trans
8071
8078
  #
8079
+ # @param refunded_amount [Integer] The total refunded amount in the minor unit of the transaction's currency. For d
8080
+ #
8072
8081
  # @param reversed_amount [Integer] The total reversed amount in the minor unit of the transaction's currency. For d
8073
8082
  #
8074
- # @param settled_amount [Integer] The total settled or refunded amount in the minor unit of the transaction's curr
8083
+ # @param settled_amount [Integer] The total settled amount in the minor unit of the transaction's currency. For do
8075
8084
  end
8076
8085
 
8077
8086
  # A constant representing the object's type. For this resource it will always be
@@ -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
@@ -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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Increase
4
- VERSION = "1.98.0"
4
+ VERSION = "1.100.0"
5
5
  end
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"
@@ -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