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,136 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Increase
|
4
|
+
module Resources
|
5
|
+
class CardDisputes
|
6
|
+
# Create a Card Dispute
|
7
|
+
sig do
|
8
|
+
params(
|
9
|
+
disputed_transaction_id: String,
|
10
|
+
network: Increase::CardDisputeCreateParams::Network::OrSymbol,
|
11
|
+
amount: Integer,
|
12
|
+
attachment_files:
|
13
|
+
T::Array[Increase::CardDisputeCreateParams::AttachmentFile::OrHash],
|
14
|
+
visa: Increase::CardDisputeCreateParams::Visa::OrHash,
|
15
|
+
request_options: Increase::RequestOptions::OrHash
|
16
|
+
).returns(Increase::CardDispute)
|
17
|
+
end
|
18
|
+
def create(
|
19
|
+
# The Transaction you wish to dispute. This Transaction must have a `source_type`
|
20
|
+
# of `card_settlement`.
|
21
|
+
disputed_transaction_id:,
|
22
|
+
# The network of the disputed transaction. Details specific to the network are
|
23
|
+
# required under the sub-object with the same identifier as the network.
|
24
|
+
network:,
|
25
|
+
# The monetary amount of the part of the transaction that is being disputed. This
|
26
|
+
# is optional and will default to the full amount of the transaction if not
|
27
|
+
# provided. If provided, the amount must be less than or equal to the amount of
|
28
|
+
# the transaction.
|
29
|
+
amount: nil,
|
30
|
+
# The files to be attached to the initial dispute submission.
|
31
|
+
attachment_files: nil,
|
32
|
+
# The Visa-specific parameters for the dispute. Required if and only if `network`
|
33
|
+
# is `visa`.
|
34
|
+
visa: nil,
|
35
|
+
request_options: {}
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Retrieve a Card Dispute
|
40
|
+
sig do
|
41
|
+
params(
|
42
|
+
card_dispute_id: String,
|
43
|
+
request_options: Increase::RequestOptions::OrHash
|
44
|
+
).returns(Increase::CardDispute)
|
45
|
+
end
|
46
|
+
def retrieve(
|
47
|
+
# The identifier of the Card Dispute.
|
48
|
+
card_dispute_id,
|
49
|
+
request_options: {}
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
# List Card Disputes
|
54
|
+
sig do
|
55
|
+
params(
|
56
|
+
created_at: Increase::CardDisputeListParams::CreatedAt::OrHash,
|
57
|
+
cursor: String,
|
58
|
+
idempotency_key: String,
|
59
|
+
limit: Integer,
|
60
|
+
status: Increase::CardDisputeListParams::Status::OrHash,
|
61
|
+
request_options: Increase::RequestOptions::OrHash
|
62
|
+
).returns(Increase::Internal::Page[Increase::CardDispute])
|
63
|
+
end
|
64
|
+
def list(
|
65
|
+
created_at: nil,
|
66
|
+
# Return the page of entries after this one.
|
67
|
+
cursor: nil,
|
68
|
+
# Filter records to the one with the specified `idempotency_key` you chose for
|
69
|
+
# that object. This value is unique across Increase and is used to ensure that a
|
70
|
+
# request is only processed once. Learn more about
|
71
|
+
# [idempotency](https://increase.com/documentation/idempotency-keys).
|
72
|
+
idempotency_key: nil,
|
73
|
+
# Limit the size of the list that is returned. The default (and maximum) is 100
|
74
|
+
# objects.
|
75
|
+
limit: nil,
|
76
|
+
status: nil,
|
77
|
+
request_options: {}
|
78
|
+
)
|
79
|
+
end
|
80
|
+
|
81
|
+
# Submit a User Submission for a Card Dispute
|
82
|
+
sig do
|
83
|
+
params(
|
84
|
+
card_dispute_id: String,
|
85
|
+
network:
|
86
|
+
Increase::CardDisputeSubmitUserSubmissionParams::Network::OrSymbol,
|
87
|
+
amount: Integer,
|
88
|
+
attachment_files:
|
89
|
+
T::Array[
|
90
|
+
Increase::CardDisputeSubmitUserSubmissionParams::AttachmentFile::OrHash
|
91
|
+
],
|
92
|
+
visa: Increase::CardDisputeSubmitUserSubmissionParams::Visa::OrHash,
|
93
|
+
request_options: Increase::RequestOptions::OrHash
|
94
|
+
).returns(Increase::CardDispute)
|
95
|
+
end
|
96
|
+
def submit_user_submission(
|
97
|
+
# The identifier of the Card Dispute to submit a user submission for.
|
98
|
+
card_dispute_id,
|
99
|
+
# The network of the Card Dispute. Details specific to the network are required
|
100
|
+
# under the sub-object with the same identifier as the network.
|
101
|
+
network:,
|
102
|
+
# The adjusted monetary amount of the part of the transaction that is being
|
103
|
+
# disputed. This is optional and will default to the most recent amount provided.
|
104
|
+
# If provided, the amount must be less than or equal to the amount of the
|
105
|
+
# transaction.
|
106
|
+
amount: nil,
|
107
|
+
# The files to be attached to the user submission.
|
108
|
+
attachment_files: nil,
|
109
|
+
# The Visa-specific parameters for the dispute. Required if and only if `network`
|
110
|
+
# is `visa`.
|
111
|
+
visa: nil,
|
112
|
+
request_options: {}
|
113
|
+
)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Withdraw a Card Dispute
|
117
|
+
sig do
|
118
|
+
params(
|
119
|
+
card_dispute_id: String,
|
120
|
+
request_options: Increase::RequestOptions::OrHash
|
121
|
+
).returns(Increase::CardDispute)
|
122
|
+
end
|
123
|
+
def withdraw(
|
124
|
+
# The identifier of the Card Dispute to withdraw.
|
125
|
+
card_dispute_id,
|
126
|
+
request_options: {}
|
127
|
+
)
|
128
|
+
end
|
129
|
+
|
130
|
+
# @api private
|
131
|
+
sig { params(client: Increase::Client).returns(T.attached_class) }
|
132
|
+
def self.new(client:)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Increase
|
4
|
+
module Resources
|
5
|
+
class Simulations
|
6
|
+
class CardDisputes
|
7
|
+
# After a [Card Dispute](#card-disputes) is created in production, the dispute
|
8
|
+
# will initially be in a `pending_user_submission_reviewing` state. Since no
|
9
|
+
# review or further action happens in sandbox, this endpoint simulates moving a
|
10
|
+
# Card Dispute through its various states.
|
11
|
+
sig do
|
12
|
+
params(
|
13
|
+
card_dispute_id: String,
|
14
|
+
network:
|
15
|
+
Increase::Simulations::CardDisputeActionParams::Network::OrSymbol,
|
16
|
+
visa: Increase::Simulations::CardDisputeActionParams::Visa::OrHash,
|
17
|
+
request_options: Increase::RequestOptions::OrHash
|
18
|
+
).returns(Increase::CardDispute)
|
19
|
+
end
|
20
|
+
def action(
|
21
|
+
# The dispute you would like to action.
|
22
|
+
card_dispute_id,
|
23
|
+
# The network of the Card Dispute. Details specific to the network are required
|
24
|
+
# under the sub-object with the same identifier as the network.
|
25
|
+
network:,
|
26
|
+
# The Visa-specific parameters for the taking action on the dispute. Required if
|
27
|
+
# and only if `network` is `visa`.
|
28
|
+
visa: nil,
|
29
|
+
request_options: {}
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
# @api private
|
34
|
+
sig { params(client: Increase::Client).returns(T.attached_class) }
|
35
|
+
def self.new(client:)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -32,6 +32,9 @@ module Increase
|
|
32
32
|
sig { returns(Increase::Resources::Simulations::CardRefunds) }
|
33
33
|
attr_reader :card_refunds
|
34
34
|
|
35
|
+
sig { returns(Increase::Resources::Simulations::CardDisputes) }
|
36
|
+
attr_reader :card_disputes
|
37
|
+
|
35
38
|
sig { returns(Increase::Resources::Simulations::PhysicalCards) }
|
36
39
|
attr_reader :physical_cards
|
37
40
|
|
data/sig/increase/client.rbs
CHANGED
@@ -27,6 +27,8 @@ module Increase
|
|
27
27
|
|
28
28
|
attr_reader card_purchase_supplements: Increase::Resources::CardPurchaseSupplements
|
29
29
|
|
30
|
+
attr_reader card_disputes: Increase::Resources::CardDisputes
|
31
|
+
|
30
32
|
attr_reader physical_cards: Increase::Resources::PhysicalCards
|
31
33
|
|
32
34
|
attr_reader digital_card_profiles: Increase::Resources::DigitalCardProfiles
|