increase 1.78.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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -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/declined_transaction.rb +68 -1
  11. data/lib/increase/models/declined_transaction_list_params.rb +3 -0
  12. data/lib/increase/models/event.rb +6 -0
  13. data/lib/increase/models/event_list_params.rb +6 -0
  14. data/lib/increase/models/event_subscription.rb +6 -0
  15. data/lib/increase/models/event_subscription_create_params.rb +6 -0
  16. data/lib/increase/models/transaction.rb +39 -28
  17. data/lib/increase/models/transaction_list_params.rb +3 -0
  18. data/lib/increase/models.rb +0 -8
  19. data/lib/increase/resources/simulations.rb +0 -4
  20. data/lib/increase/version.rb +1 -1
  21. data/lib/increase.rb +0 -7
  22. data/rbi/increase/client.rbi +0 -3
  23. data/rbi/increase/errors.rbi +29 -2
  24. data/rbi/increase/internal/transport/base_client.rbi +4 -5
  25. data/rbi/increase/internal/type/base_page.rbi +1 -1
  26. data/rbi/increase/internal/util.rbi +1 -1
  27. data/rbi/increase/models/declined_transaction.rbi +159 -0
  28. data/rbi/increase/models/declined_transaction_list_params.rbi +7 -0
  29. data/rbi/increase/models/event.rbi +14 -0
  30. data/rbi/increase/models/event_list_params.rbi +14 -0
  31. data/rbi/increase/models/event_subscription.rbi +14 -0
  32. data/rbi/increase/models/event_subscription_create_params.rbi +14 -0
  33. data/rbi/increase/models/transaction.rbi +80 -39
  34. data/rbi/increase/models/transaction_list_params.rbi +7 -0
  35. data/rbi/increase/models.rbi +0 -8
  36. data/rbi/increase/resources/simulations.rbi +0 -3
  37. data/sig/increase/client.rbs +0 -2
  38. data/sig/increase/errors.rbs +7 -0
  39. data/sig/increase/models/declined_transaction.rbs +63 -0
  40. data/sig/increase/models/declined_transaction_list_params.rbs +4 -0
  41. data/sig/increase/models/event.rbs +8 -0
  42. data/sig/increase/models/event_list_params.rbs +8 -0
  43. data/sig/increase/models/event_subscription.rbs +8 -0
  44. data/sig/increase/models/event_subscription_create_params.rbs +8 -0
  45. data/sig/increase/models/transaction.rbs +23 -28
  46. data/sig/increase/models/transaction_list_params.rbs +4 -0
  47. data/sig/increase/models.rbs +0 -8
  48. data/sig/increase/resources/simulations.rbs +0 -2
  49. metadata +2 -23
  50. data/lib/increase/models/card_dispute.rb +0 -302
  51. data/lib/increase/models/card_dispute_create_params.rb +0 -45
  52. data/lib/increase/models/card_dispute_list_params.rb +0 -144
  53. data/lib/increase/models/card_dispute_retrieve_params.rb +0 -14
  54. data/lib/increase/models/simulations/card_dispute_action_params.rb +0 -55
  55. data/lib/increase/resources/card_disputes.rb +0 -97
  56. data/lib/increase/resources/simulations/card_disputes.rb +0 -45
  57. data/rbi/increase/models/card_dispute.rbi +0 -425
  58. data/rbi/increase/models/card_dispute_create_params.rbi +0 -70
  59. data/rbi/increase/models/card_dispute_list_params.rbi +0 -289
  60. data/rbi/increase/models/card_dispute_retrieve_params.rbi +0 -30
  61. data/rbi/increase/models/simulations/card_dispute_action_params.rbi +0 -124
  62. data/rbi/increase/resources/card_disputes.rbi +0 -78
  63. data/rbi/increase/resources/simulations/card_disputes.rbi +0 -38
  64. data/sig/increase/models/card_dispute.rbs +0 -207
  65. data/sig/increase/models/card_dispute_create_params.rbs +0 -34
  66. data/sig/increase/models/card_dispute_list_params.rbs +0 -146
  67. data/sig/increase/models/card_dispute_retrieve_params.rbs +0 -15
  68. data/sig/increase/models/simulations/card_dispute_action_params.rbs +0 -59
  69. data/sig/increase/resources/card_disputes.rbs +0 -28
  70. data/sig/increase/resources/simulations/card_disputes.rbs +0 -16
@@ -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
@@ -1,45 +0,0 @@
1
- # frozen_string_literal: true
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 be reviewed. Since no review happens in sandbox, this endpoint simulates
9
- # moving a Card Dispute into a rejected or accepted state. A Card Dispute can only
10
- # be actioned one time and must have a status of `pending_reviewing`.
11
- #
12
- # @overload action(card_dispute_id, status:, explanation: nil, request_options: {})
13
- #
14
- # @param card_dispute_id [String] The dispute you would like to action.
15
- #
16
- # @param status [Symbol, Increase::Models::Simulations::CardDisputeActionParams::Status] The status to move the dispute to.
17
- #
18
- # @param explanation [String] Why the dispute was rejected. Not required for accepting disputes.
19
- #
20
- # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
21
- #
22
- # @return [Increase::Models::CardDispute]
23
- #
24
- # @see Increase::Models::Simulations::CardDisputeActionParams
25
- def action(card_dispute_id, params)
26
- parsed, options = Increase::Simulations::CardDisputeActionParams.dump_request(params)
27
- @client.request(
28
- method: :post,
29
- path: ["simulations/card_disputes/%1$s/action", card_dispute_id],
30
- body: parsed,
31
- model: Increase::CardDispute,
32
- options: options
33
- )
34
- end
35
-
36
- # @api private
37
- #
38
- # @param client [Increase::Client]
39
- def initialize(client:)
40
- @client = client
41
- end
42
- end
43
- end
44
- end
45
- end