dodopayments 1.20.0 → 1.22.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 +32 -0
- data/README.md +2 -2
- data/lib/dodopayments/client.rb +9 -8
- data/lib/dodopayments/internal/default_page_number_pagination.rb +2 -2
- data/lib/dodopayments/internal/transport/base_client.rb +2 -2
- data/lib/dodopayments/internal/type/base_model.rb +1 -9
- data/lib/dodopayments/internal/type/request_parameters.rb +2 -8
- data/lib/dodopayments/internal/util.rb +17 -1
- data/lib/dodopayments/models/dispute.rb +9 -2
- data/lib/dodopayments/models/dispute_list_response.rb +76 -0
- data/lib/dodopayments/models/dispute_retrieve_response.rb +99 -0
- data/lib/dodopayments/models/payment.rb +33 -1
- data/lib/dodopayments/models/subscription_change_plan_params.rb +31 -1
- data/lib/dodopayments/models.rb +167 -0
- data/lib/dodopayments/resources/disputes.rb +4 -4
- data/lib/dodopayments/resources/invoices/payments.rb +3 -2
- data/lib/dodopayments/resources/subscriptions.rb +6 -1
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +2 -0
- data/rbi/dodopayments/client.rbi +5 -4
- data/rbi/dodopayments/internal/util.rbi +5 -1
- data/rbi/dodopayments/models/dispute.rbi +11 -3
- data/rbi/dodopayments/models/dispute_list_response.rbi +85 -0
- data/rbi/dodopayments/models/dispute_retrieve_response.rbi +112 -0
- data/rbi/dodopayments/models/payment.rbi +32 -0
- data/rbi/dodopayments/models/subscription_change_plan_params.rbi +26 -0
- data/rbi/dodopayments/models.rbi +167 -0
- data/rbi/dodopayments/resources/disputes.rbi +2 -2
- data/rbi/dodopayments/resources/invoices/payments.rbi +1 -1
- data/rbi/dodopayments/resources/subscriptions.rbi +6 -0
- data/sig/dodopayments/client.rbs +2 -2
- data/sig/dodopayments/internal/util.rbs +2 -0
- data/sig/dodopayments/models/dispute.rbs +6 -2
- data/sig/dodopayments/models/dispute_list_response.rbs +46 -0
- data/sig/dodopayments/models/dispute_retrieve_response.rbs +58 -0
- data/sig/dodopayments/models/payment.rbs +16 -0
- data/sig/dodopayments/models/subscription_change_plan_params.rbs +17 -1
- data/sig/dodopayments/models.rbs +165 -0
- data/sig/dodopayments/resources/disputes.rbs +2 -2
- data/sig/dodopayments/resources/invoices/payments.rbs +1 -1
- data/sig/dodopayments/resources/subscriptions.rbs +1 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0db8ac6abab224124982361204de2655bd917a370eba199ce6c6ee668296f06
|
4
|
+
data.tar.gz: 268aa11f3fb3430ac18eb2c483ca6fc1d49d1df9801aa6f706b9233f330840f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38271ef5ae9db50f038f12341d8ab2153eb7683a96f8e0b1ace1a229287099acdaf9a2e0aa0cc9cf4d3cb5a9ceb76c792b6683ccdb9ea02e09a54bcef431831d
|
7
|
+
data.tar.gz: fa6f3f577a1a045311e8525fc720148981c4f0db35f7b1899c1e40467c47fff43c36d2531c1a3b5f6a949148d50cc9606586b9da656a6a98a5deee13968a49ef
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,37 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.22.0 (2025-05-09)
|
4
|
+
|
5
|
+
Full Changelog: [v1.20.0...v1.22.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.20.0...v1.22.0)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** fixed api key schema to bearer ([06d3549](https://github.com/dodopayments/dodopayments-ruby/commit/06d354910a3eb15c036d35f68cfb5393c5a20c62))
|
10
|
+
* **api:** manual updates ([eae9353](https://github.com/dodopayments/dodopayments-ruby/commit/eae935376b239dc03bc8ad8ed201e9ca9c2eeaa4))
|
11
|
+
* **api:** updated openapi spec ([c369261](https://github.com/dodopayments/dodopayments-ruby/commit/c369261442be58e8b31890f0362fba1536bb9593))
|
12
|
+
|
13
|
+
|
14
|
+
### Bug Fixes
|
15
|
+
|
16
|
+
* **internal:** fix formatting script for macos ([8abfc9c](https://github.com/dodopayments/dodopayments-ruby/commit/8abfc9c2b3921e5fb3e5903612111e02a87e92d1))
|
17
|
+
|
18
|
+
|
19
|
+
### Chores
|
20
|
+
|
21
|
+
* accept all nd-json mimetype variants ([b0dd5d6](https://github.com/dodopayments/dodopayments-ruby/commit/b0dd5d644ce5ebbcd0259dca5f9113befa548b54))
|
22
|
+
* always check if current page is empty in `next_page?` ([45b817d](https://github.com/dodopayments/dodopayments-ruby/commit/45b817d504e3c4cbc17b328c53ab9a310d038b22))
|
23
|
+
* **internal:** codegen related update ([e3ce1b3](https://github.com/dodopayments/dodopayments-ruby/commit/e3ce1b36a1ea8dba0fbd2915a6deadc01820d280))
|
24
|
+
* **internal:** codegen related update ([2cd0f3e](https://github.com/dodopayments/dodopayments-ruby/commit/2cd0f3e089a67097c26e9abef90b55cecfaa014c))
|
25
|
+
* re-export top level models under library namespace ([bbc82df](https://github.com/dodopayments/dodopayments-ruby/commit/bbc82df831d64038e9169ff0912401d2e333082b))
|
26
|
+
* remove Gemfile.lock during bootstrap ([a484914](https://github.com/dodopayments/dodopayments-ruby/commit/a48491445f25a274883dd8068913efcd9e68c32d))
|
27
|
+
* revert ignoring Gemfile.lock ([8ba5e6a](https://github.com/dodopayments/dodopayments-ruby/commit/8ba5e6a4f876f0823b33eb92443ebd5d97c2139f))
|
28
|
+
* validate request option coercion correctness ([1ac286c](https://github.com/dodopayments/dodopayments-ruby/commit/1ac286ccf79b674d312bf50fa29bb8a1f7e37176))
|
29
|
+
|
30
|
+
|
31
|
+
### Documentation
|
32
|
+
|
33
|
+
* illustrate environmental defaults for auth variables ([520d6cf](https://github.com/dodopayments/dodopayments-ruby/commit/520d6cf3692d5aeaf3faee980160521d81bd3867))
|
34
|
+
|
3
35
|
## 1.20.0 (2025-05-01)
|
4
36
|
|
5
37
|
Full Changelog: [v1.19.0...v1.20.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.19.0...v1.20.0)
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
17
17
|
<!-- x-release-please-start-version -->
|
18
18
|
|
19
19
|
```ruby
|
20
|
-
gem "dodopayments", "~> 1.
|
20
|
+
gem "dodopayments", "~> 1.22.0"
|
21
21
|
```
|
22
22
|
|
23
23
|
<!-- x-release-please-end -->
|
@@ -29,7 +29,7 @@ require "bundler/setup"
|
|
29
29
|
require "dodopayments"
|
30
30
|
|
31
31
|
dodo_payments = Dodopayments::Client.new(
|
32
|
-
|
32
|
+
bearer_token: ENV["DODO_PAYMENTS_API_KEY"], # This is the default and can be omitted
|
33
33
|
environment: "test_mode" # defaults to "live_mode"
|
34
34
|
)
|
35
35
|
|
data/lib/dodopayments/client.rb
CHANGED
@@ -20,8 +20,9 @@ module Dodopayments
|
|
20
20
|
ENVIRONMENTS = {live_mode: "https://live.dodopayments.com", test_mode: "https://test.dodopayments.com"}
|
21
21
|
# rubocop:enable Style/MutableConstant
|
22
22
|
|
23
|
+
# Bearer Token for API authentication
|
23
24
|
# @return [String]
|
24
|
-
attr_reader :
|
25
|
+
attr_reader :bearer_token
|
25
26
|
|
26
27
|
# @return [Dodopayments::Resources::Payments]
|
27
28
|
attr_reader :payments
|
@@ -72,14 +73,14 @@ module Dodopayments
|
|
72
73
|
#
|
73
74
|
# @return [Hash{String=>String}]
|
74
75
|
private def auth_headers
|
75
|
-
return {} if @
|
76
|
+
return {} if @bearer_token.nil?
|
76
77
|
|
77
|
-
{"authorization" => "Bearer #{@
|
78
|
+
{"authorization" => "Bearer #{@bearer_token}"}
|
78
79
|
end
|
79
80
|
|
80
81
|
# Creates and returns a new client for interacting with the API.
|
81
82
|
#
|
82
|
-
# @param
|
83
|
+
# @param bearer_token [String, nil] Bearer Token for API authentication Defaults to `ENV["DODO_PAYMENTS_API_KEY"]`
|
83
84
|
#
|
84
85
|
# @param environment [:live_mode, :test_mode, nil] Specifies the environment to use for the API.
|
85
86
|
#
|
@@ -99,7 +100,7 @@ module Dodopayments
|
|
99
100
|
#
|
100
101
|
# @param max_retry_delay [Float]
|
101
102
|
def initialize(
|
102
|
-
|
103
|
+
bearer_token: ENV["DODO_PAYMENTS_API_KEY"],
|
103
104
|
environment: nil,
|
104
105
|
base_url: ENV["DODO_PAYMENTS_BASE_URL"],
|
105
106
|
max_retries: Dodopayments::Client::DEFAULT_MAX_RETRIES,
|
@@ -112,11 +113,11 @@ module Dodopayments
|
|
112
113
|
raise ArgumentError.new(message)
|
113
114
|
end
|
114
115
|
|
115
|
-
if
|
116
|
-
raise ArgumentError.new("
|
116
|
+
if bearer_token.nil?
|
117
|
+
raise ArgumentError.new("bearer_token is required, and can be set via environ: \"DODO_PAYMENTS_API_KEY\"")
|
117
118
|
end
|
118
119
|
|
119
|
-
@
|
120
|
+
@bearer_token = bearer_token.to_s
|
120
121
|
|
121
122
|
super(
|
122
123
|
base_url: base_url,
|
@@ -72,8 +72,8 @@ module Dodopayments
|
|
72
72
|
super
|
73
73
|
|
74
74
|
case page_data
|
75
|
-
in {items: Array
|
76
|
-
@items = items
|
75
|
+
in {items: Array => items}
|
76
|
+
@items = items.map { Dodopayments::Internal::Type::Converter.coerce(@model, _1) }
|
77
77
|
else
|
78
78
|
end
|
79
79
|
end
|
@@ -461,9 +461,9 @@ module Dodopayments
|
|
461
461
|
|
462
462
|
decoded = Dodopayments::Internal::Util.decode_content(response, stream: stream)
|
463
463
|
case req
|
464
|
-
in {
|
464
|
+
in {stream: Class => st}
|
465
465
|
st.new(model: model, url: url, status: status, response: response, stream: decoded)
|
466
|
-
in {
|
466
|
+
in {page: Class => page}
|
467
467
|
page.new(client: self, req: req, headers: response, page_data: decoded)
|
468
468
|
else
|
469
469
|
unwrapped = Dodopayments::Internal::Util.dig(decoded, req[:unwrap])
|
@@ -395,15 +395,7 @@ module Dodopayments
|
|
395
395
|
# Create a new instance of a model.
|
396
396
|
#
|
397
397
|
# @param data [Hash{Symbol=>Object}, self]
|
398
|
-
def initialize(data = {})
|
399
|
-
case Dodopayments::Internal::Util.coerce_hash(data)
|
400
|
-
in Hash => coerced
|
401
|
-
@data = coerced
|
402
|
-
else
|
403
|
-
message = "Expected a #{Hash} or #{Dodopayments::Internal::Type::BaseModel}, got #{data.inspect}"
|
404
|
-
raise ArgumentError.new(message)
|
405
|
-
end
|
406
|
-
end
|
398
|
+
def initialize(data = {}) = (@data = Dodopayments::Internal::Util.coerce_hash!(data).to_h)
|
407
399
|
|
408
400
|
class << self
|
409
401
|
# @api private
|
@@ -28,14 +28,8 @@ module Dodopayments
|
|
28
28
|
state = {can_retry: true}
|
29
29
|
case (dumped = dump(params, state: state))
|
30
30
|
in Hash
|
31
|
-
options = Dodopayments::Internal::Util.coerce_hash(dumped[:request_options])
|
32
|
-
request_options =
|
33
|
-
case [options, state.fetch(:can_retry)]
|
34
|
-
in [Hash | nil, false]
|
35
|
-
{**options.to_h, max_retries: 0}
|
36
|
-
else
|
37
|
-
options
|
38
|
-
end
|
31
|
+
options = Dodopayments::Internal::Util.coerce_hash!(dumped[:request_options]).to_h
|
32
|
+
request_options = state.fetch(:can_retry) ? options : {**options, max_retries: 0}
|
39
33
|
[dumped.except(:request_options), request_options]
|
40
34
|
else
|
41
35
|
[dumped, nil]
|
@@ -128,6 +128,22 @@ module Dodopayments
|
|
128
128
|
input.respond_to?(:to_h) ? input.to_h : input
|
129
129
|
end
|
130
130
|
end
|
131
|
+
|
132
|
+
# @api private
|
133
|
+
#
|
134
|
+
# @param input [Object]
|
135
|
+
#
|
136
|
+
# @raise [ArgumentError]
|
137
|
+
# @return [Hash{Object=>Object}, nil]
|
138
|
+
def coerce_hash!(input)
|
139
|
+
case coerce_hash(input)
|
140
|
+
in Hash | nil => coerced
|
141
|
+
coerced
|
142
|
+
else
|
143
|
+
message = "Expected a #{Hash} or #{Dodopayments::Internal::Type::BaseModel}, got #{data.inspect}"
|
144
|
+
raise ArgumentError.new(message)
|
145
|
+
end
|
146
|
+
end
|
131
147
|
end
|
132
148
|
|
133
149
|
class << self
|
@@ -454,7 +470,7 @@ module Dodopayments
|
|
454
470
|
# @type [Regexp]
|
455
471
|
JSON_CONTENT = %r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}
|
456
472
|
# @type [Regexp]
|
457
|
-
JSONL_CONTENT = %r{^application/(?:x-)?jsonl}
|
473
|
+
JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
|
458
474
|
|
459
475
|
class << self
|
460
476
|
# @api private
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
module Dodopayments
|
4
4
|
module Models
|
5
|
-
# @see Dodopayments::Resources::Disputes#retrieve
|
6
5
|
class Dispute < Dodopayments::Internal::Type::BaseModel
|
7
6
|
# @!attribute amount
|
8
7
|
# The amount involved in the dispute, represented as a string to accommodate
|
@@ -51,7 +50,13 @@ module Dodopayments
|
|
51
50
|
# @return [String]
|
52
51
|
required :payment_id, String
|
53
52
|
|
54
|
-
# @!
|
53
|
+
# @!attribute remarks
|
54
|
+
# Remarks
|
55
|
+
#
|
56
|
+
# @return [String, nil]
|
57
|
+
optional :remarks, String, nil?: true
|
58
|
+
|
59
|
+
# @!method initialize(amount:, business_id:, created_at:, currency:, dispute_id:, dispute_stage:, dispute_status:, payment_id:, remarks: nil)
|
55
60
|
# Some parameter documentations has been truncated, see
|
56
61
|
# {Dodopayments::Models::Dispute} for more details.
|
57
62
|
#
|
@@ -71,6 +76,8 @@ module Dodopayments
|
|
71
76
|
# @param dispute_status [Symbol, Dodopayments::Models::DisputeStatus]
|
72
77
|
#
|
73
78
|
# @param payment_id [String] The unique identifier of the payment associated with the dispute.
|
79
|
+
#
|
80
|
+
# @param remarks [String, nil] Remarks
|
74
81
|
end
|
75
82
|
end
|
76
83
|
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
# @see Dodopayments::Resources::Disputes#list
|
6
|
+
class DisputeListResponse < Dodopayments::Internal::Type::BaseModel
|
7
|
+
# @!attribute amount
|
8
|
+
# The amount involved in the dispute, represented as a string to accommodate
|
9
|
+
# precision.
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
required :amount, String
|
13
|
+
|
14
|
+
# @!attribute business_id
|
15
|
+
# The unique identifier of the business involved in the dispute.
|
16
|
+
#
|
17
|
+
# @return [String]
|
18
|
+
required :business_id, String
|
19
|
+
|
20
|
+
# @!attribute created_at
|
21
|
+
# The timestamp of when the dispute was created, in UTC.
|
22
|
+
#
|
23
|
+
# @return [Time]
|
24
|
+
required :created_at, Time
|
25
|
+
|
26
|
+
# @!attribute currency
|
27
|
+
# The currency of the disputed amount, represented as an ISO 4217 currency code.
|
28
|
+
#
|
29
|
+
# @return [String]
|
30
|
+
required :currency, String
|
31
|
+
|
32
|
+
# @!attribute dispute_id
|
33
|
+
# The unique identifier of the dispute.
|
34
|
+
#
|
35
|
+
# @return [String]
|
36
|
+
required :dispute_id, String
|
37
|
+
|
38
|
+
# @!attribute dispute_stage
|
39
|
+
#
|
40
|
+
# @return [Symbol, Dodopayments::Models::DisputeStage]
|
41
|
+
required :dispute_stage, enum: -> { Dodopayments::Models::DisputeStage }
|
42
|
+
|
43
|
+
# @!attribute dispute_status
|
44
|
+
#
|
45
|
+
# @return [Symbol, Dodopayments::Models::DisputeStatus]
|
46
|
+
required :dispute_status, enum: -> { Dodopayments::Models::DisputeStatus }
|
47
|
+
|
48
|
+
# @!attribute payment_id
|
49
|
+
# The unique identifier of the payment associated with the dispute.
|
50
|
+
#
|
51
|
+
# @return [String]
|
52
|
+
required :payment_id, String
|
53
|
+
|
54
|
+
# @!method initialize(amount:, business_id:, created_at:, currency:, dispute_id:, dispute_stage:, dispute_status:, payment_id:)
|
55
|
+
# Some parameter documentations has been truncated, see
|
56
|
+
# {Dodopayments::Models::DisputeListResponse} for more details.
|
57
|
+
#
|
58
|
+
# @param amount [String] The amount involved in the dispute, represented as a string to accommodate preci
|
59
|
+
# ...
|
60
|
+
#
|
61
|
+
# @param business_id [String] The unique identifier of the business involved in the dispute.
|
62
|
+
#
|
63
|
+
# @param created_at [Time] The timestamp of when the dispute was created, in UTC.
|
64
|
+
#
|
65
|
+
# @param currency [String] The currency of the disputed amount, represented as an ISO 4217 currency code.
|
66
|
+
#
|
67
|
+
# @param dispute_id [String] The unique identifier of the dispute.
|
68
|
+
#
|
69
|
+
# @param dispute_stage [Symbol, Dodopayments::Models::DisputeStage]
|
70
|
+
#
|
71
|
+
# @param dispute_status [Symbol, Dodopayments::Models::DisputeStatus]
|
72
|
+
#
|
73
|
+
# @param payment_id [String] The unique identifier of the payment associated with the dispute.
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
# @see Dodopayments::Resources::Disputes#retrieve
|
6
|
+
class DisputeRetrieveResponse < Dodopayments::Internal::Type::BaseModel
|
7
|
+
# @!attribute amount
|
8
|
+
# The amount involved in the dispute, represented as a string to accommodate
|
9
|
+
# precision.
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
required :amount, String
|
13
|
+
|
14
|
+
# @!attribute business_id
|
15
|
+
# The unique identifier of the business involved in the dispute.
|
16
|
+
#
|
17
|
+
# @return [String]
|
18
|
+
required :business_id, String
|
19
|
+
|
20
|
+
# @!attribute created_at
|
21
|
+
# The timestamp of when the dispute was created, in UTC.
|
22
|
+
#
|
23
|
+
# @return [Time]
|
24
|
+
required :created_at, Time
|
25
|
+
|
26
|
+
# @!attribute currency
|
27
|
+
# The currency of the disputed amount, represented as an ISO 4217 currency code.
|
28
|
+
#
|
29
|
+
# @return [String]
|
30
|
+
required :currency, String
|
31
|
+
|
32
|
+
# @!attribute customer
|
33
|
+
#
|
34
|
+
# @return [Dodopayments::Models::CustomerLimitedDetails]
|
35
|
+
required :customer, -> { Dodopayments::Models::CustomerLimitedDetails }
|
36
|
+
|
37
|
+
# @!attribute dispute_id
|
38
|
+
# The unique identifier of the dispute.
|
39
|
+
#
|
40
|
+
# @return [String]
|
41
|
+
required :dispute_id, String
|
42
|
+
|
43
|
+
# @!attribute dispute_stage
|
44
|
+
#
|
45
|
+
# @return [Symbol, Dodopayments::Models::DisputeStage]
|
46
|
+
required :dispute_stage, enum: -> { Dodopayments::Models::DisputeStage }
|
47
|
+
|
48
|
+
# @!attribute dispute_status
|
49
|
+
#
|
50
|
+
# @return [Symbol, Dodopayments::Models::DisputeStatus]
|
51
|
+
required :dispute_status, enum: -> { Dodopayments::Models::DisputeStatus }
|
52
|
+
|
53
|
+
# @!attribute payment_id
|
54
|
+
# The unique identifier of the payment associated with the dispute.
|
55
|
+
#
|
56
|
+
# @return [String]
|
57
|
+
required :payment_id, String
|
58
|
+
|
59
|
+
# @!attribute reason
|
60
|
+
# Reason for the dispute
|
61
|
+
#
|
62
|
+
# @return [String, nil]
|
63
|
+
optional :reason, String, nil?: true
|
64
|
+
|
65
|
+
# @!attribute remarks
|
66
|
+
# Remarks
|
67
|
+
#
|
68
|
+
# @return [String, nil]
|
69
|
+
optional :remarks, String, nil?: true
|
70
|
+
|
71
|
+
# @!method initialize(amount:, business_id:, created_at:, currency:, customer:, dispute_id:, dispute_stage:, dispute_status:, payment_id:, reason: nil, remarks: nil)
|
72
|
+
# Some parameter documentations has been truncated, see
|
73
|
+
# {Dodopayments::Models::DisputeRetrieveResponse} for more details.
|
74
|
+
#
|
75
|
+
# @param amount [String] The amount involved in the dispute, represented as a string to accommodate preci
|
76
|
+
# ...
|
77
|
+
#
|
78
|
+
# @param business_id [String] The unique identifier of the business involved in the dispute.
|
79
|
+
#
|
80
|
+
# @param created_at [Time] The timestamp of when the dispute was created, in UTC.
|
81
|
+
#
|
82
|
+
# @param currency [String] The currency of the disputed amount, represented as an ISO 4217 currency code.
|
83
|
+
#
|
84
|
+
# @param customer [Dodopayments::Models::CustomerLimitedDetails]
|
85
|
+
#
|
86
|
+
# @param dispute_id [String] The unique identifier of the dispute.
|
87
|
+
#
|
88
|
+
# @param dispute_stage [Symbol, Dodopayments::Models::DisputeStage]
|
89
|
+
#
|
90
|
+
# @param dispute_status [Symbol, Dodopayments::Models::DisputeStatus]
|
91
|
+
#
|
92
|
+
# @param payment_id [String] The unique identifier of the payment associated with the dispute.
|
93
|
+
#
|
94
|
+
# @param reason [String, nil] Reason for the dispute
|
95
|
+
#
|
96
|
+
# @param remarks [String, nil] Remarks
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -74,6 +74,30 @@ module Dodopayments
|
|
74
74
|
# @return [Integer]
|
75
75
|
required :total_amount, Integer
|
76
76
|
|
77
|
+
# @!attribute card_issuing_country
|
78
|
+
# ISO country code alpha2 variant
|
79
|
+
#
|
80
|
+
# @return [Symbol, Dodopayments::Models::CountryCode, nil]
|
81
|
+
optional :card_issuing_country, enum: -> { Dodopayments::Models::CountryCode }, nil?: true
|
82
|
+
|
83
|
+
# @!attribute card_last_four
|
84
|
+
# The last four digits of the card
|
85
|
+
#
|
86
|
+
# @return [String, nil]
|
87
|
+
optional :card_last_four, String, nil?: true
|
88
|
+
|
89
|
+
# @!attribute card_network
|
90
|
+
# Card network like VISA, MASTERCARD etc.
|
91
|
+
#
|
92
|
+
# @return [String, nil]
|
93
|
+
optional :card_network, String, nil?: true
|
94
|
+
|
95
|
+
# @!attribute card_type
|
96
|
+
# The type of card DEBIT or CREDIT
|
97
|
+
#
|
98
|
+
# @return [String, nil]
|
99
|
+
optional :card_type, String, nil?: true
|
100
|
+
|
77
101
|
# @!attribute discount_id
|
78
102
|
# The discount id if discount is applied
|
79
103
|
#
|
@@ -143,7 +167,7 @@ module Dodopayments
|
|
143
167
|
# @return [Time, nil]
|
144
168
|
optional :updated_at, Time, nil?: true
|
145
169
|
|
146
|
-
# @!method initialize(billing:, business_id:, created_at:, currency:, customer:, disputes:, metadata:, payment_id:, refunds:, settlement_amount:, settlement_currency:, total_amount:, discount_id: nil, error_message: nil, payment_link: nil, payment_method: nil, payment_method_type: nil, product_cart: nil, settlement_tax: nil, status: nil, subscription_id: nil, tax: nil, updated_at: nil)
|
170
|
+
# @!method initialize(billing:, business_id:, created_at:, currency:, customer:, disputes:, metadata:, payment_id:, refunds:, settlement_amount:, settlement_currency:, total_amount:, card_issuing_country: nil, card_last_four: nil, card_network: nil, card_type: nil, discount_id: nil, error_message: nil, payment_link: nil, payment_method: nil, payment_method_type: nil, product_cart: nil, settlement_tax: nil, status: nil, subscription_id: nil, tax: nil, updated_at: nil)
|
147
171
|
# Some parameter documentations has been truncated, see
|
148
172
|
# {Dodopayments::Models::Payment} for more details.
|
149
173
|
#
|
@@ -173,6 +197,14 @@ module Dodopayments
|
|
173
197
|
# @param total_amount [Integer] Total amount charged to the customer including tax, in smallest currency unit (e
|
174
198
|
# ...
|
175
199
|
#
|
200
|
+
# @param card_issuing_country [Symbol, Dodopayments::Models::CountryCode, nil] ISO country code alpha2 variant
|
201
|
+
#
|
202
|
+
# @param card_last_four [String, nil] The last four digits of the card
|
203
|
+
#
|
204
|
+
# @param card_network [String, nil] Card network like VISA, MASTERCARD etc.
|
205
|
+
#
|
206
|
+
# @param card_type [String, nil] The type of card DEBIT or CREDIT
|
207
|
+
#
|
176
208
|
# @param discount_id [String, nil] The discount id if discount is applied
|
177
209
|
#
|
178
210
|
# @param error_message [String, nil] An error message if the payment failed
|
@@ -25,13 +25,27 @@ module Dodopayments
|
|
25
25
|
# @return [Integer]
|
26
26
|
required :quantity, Integer
|
27
27
|
|
28
|
-
# @!
|
28
|
+
# @!attribute addons
|
29
|
+
# Addons for the new plan. Note : Leaving this empty would remove any existing
|
30
|
+
# addons
|
31
|
+
#
|
32
|
+
# @return [Array<Dodopayments::Models::SubscriptionChangePlanParams::Addon>, nil]
|
33
|
+
optional :addons,
|
34
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::SubscriptionChangePlanParams::Addon] },
|
35
|
+
nil?: true
|
36
|
+
|
37
|
+
# @!method initialize(product_id:, proration_billing_mode:, quantity:, addons: nil, request_options: {})
|
38
|
+
# Some parameter documentations has been truncated, see
|
39
|
+
# {Dodopayments::Models::SubscriptionChangePlanParams} for more details.
|
40
|
+
#
|
29
41
|
# @param product_id [String] Unique identifier of the product to subscribe to
|
30
42
|
#
|
31
43
|
# @param proration_billing_mode [Symbol, Dodopayments::Models::SubscriptionChangePlanParams::ProrationBillingMode]
|
32
44
|
#
|
33
45
|
# @param quantity [Integer] Number of units to subscribe for. Must be at least 1.
|
34
46
|
#
|
47
|
+
# @param addons [Array<Dodopayments::Models::SubscriptionChangePlanParams::Addon>, nil] Addons for the new plan. ...
|
48
|
+
#
|
35
49
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
36
50
|
|
37
51
|
module ProrationBillingMode
|
@@ -42,6 +56,22 @@ module Dodopayments
|
|
42
56
|
# @!method self.values
|
43
57
|
# @return [Array<Symbol>]
|
44
58
|
end
|
59
|
+
|
60
|
+
class Addon < Dodopayments::Internal::Type::BaseModel
|
61
|
+
# @!attribute addon_id
|
62
|
+
#
|
63
|
+
# @return [String]
|
64
|
+
required :addon_id, String
|
65
|
+
|
66
|
+
# @!attribute quantity
|
67
|
+
#
|
68
|
+
# @return [Integer]
|
69
|
+
required :quantity, Integer
|
70
|
+
|
71
|
+
# @!method initialize(addon_id:, quantity:)
|
72
|
+
# @param addon_id [String]
|
73
|
+
# @param quantity [Integer]
|
74
|
+
end
|
45
75
|
end
|
46
76
|
end
|
47
77
|
end
|