dodopayments 1.51.1 → 1.52.5
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 +18 -0
- data/README.md +1 -1
- data/lib/dodopayments/client.rb +8 -0
- data/lib/dodopayments/models/add_meter_to_price.rb +58 -0
- data/lib/dodopayments/models/event.rb +71 -0
- data/lib/dodopayments/models/event_input.rb +70 -0
- data/lib/dodopayments/models/invoices/payment_retrieve_refund_params.rb +16 -0
- data/lib/dodopayments/models/meter.rb +88 -0
- data/lib/dodopayments/models/meter_aggregation.rb +39 -0
- data/lib/dodopayments/models/meter_archive_params.rb +14 -0
- data/lib/dodopayments/models/meter_create_params.rb +62 -0
- data/lib/dodopayments/models/meter_filter.rb +482 -0
- data/lib/dodopayments/models/meter_list_params.rb +38 -0
- data/lib/dodopayments/models/{product_delete_params.rb → meter_retrieve_params.rb} +2 -2
- data/lib/dodopayments/models/meter_unarchive_params.rb +14 -0
- data/lib/dodopayments/models/payment.rb +10 -1
- data/lib/dodopayments/models/price.rb +122 -7
- data/lib/dodopayments/models/product.rb +2 -2
- data/lib/dodopayments/models/product_archive_params.rb +14 -0
- data/lib/dodopayments/models/product_create_params.rb +2 -2
- data/lib/dodopayments/models/product_list_response.rb +2 -2
- data/lib/dodopayments/models/product_update_params.rb +2 -2
- data/lib/dodopayments/models/subscription.rb +57 -1
- data/lib/dodopayments/models/subscription_retrieve_usage_history_params.rb +54 -0
- data/lib/dodopayments/models/subscription_retrieve_usage_history_response.rb +101 -0
- data/lib/dodopayments/models/usage_event_ingest_params.rb +22 -0
- data/lib/dodopayments/models/usage_event_ingest_response.rb +16 -0
- data/lib/dodopayments/models/usage_event_list_params.rb +75 -0
- data/lib/dodopayments/models/usage_event_retrieve_params.rb +14 -0
- data/lib/dodopayments/models.rb +32 -2
- data/lib/dodopayments/resources/invoices/payments.rb +18 -0
- data/lib/dodopayments/resources/meters.rb +123 -0
- data/lib/dodopayments/resources/products.rb +5 -5
- data/lib/dodopayments/resources/subscriptions.rb +74 -0
- data/lib/dodopayments/resources/usage_events.rb +193 -0
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +21 -1
- data/rbi/dodopayments/client.rbi +6 -0
- data/rbi/dodopayments/models/add_meter_to_price.rbi +75 -0
- data/rbi/dodopayments/models/event.rbi +88 -0
- data/rbi/dodopayments/models/event_input.rbi +102 -0
- data/rbi/dodopayments/models/invoices/payment_retrieve_refund_params.rbi +34 -0
- data/rbi/dodopayments/models/meter.rbi +107 -0
- data/rbi/dodopayments/models/meter_aggregation.rbi +68 -0
- data/rbi/dodopayments/models/meter_archive_params.rbi +32 -0
- data/rbi/dodopayments/models/meter_create_params.rbi +92 -0
- data/rbi/dodopayments/models/meter_filter.rbi +1042 -0
- data/rbi/dodopayments/models/meter_list_params.rbi +68 -0
- data/rbi/dodopayments/models/{product_delete_params.rbi → meter_retrieve_params.rbi} +2 -2
- data/rbi/dodopayments/models/meter_unarchive_params.rbi +32 -0
- data/rbi/dodopayments/models/payment.rbi +10 -0
- data/rbi/dodopayments/models/price.rbi +153 -7
- data/rbi/dodopayments/models/product.rbi +2 -1
- data/rbi/dodopayments/models/product_archive_params.rbi +32 -0
- data/rbi/dodopayments/models/product_create_params.rbi +6 -3
- data/rbi/dodopayments/models/product_list_response.rbi +2 -1
- data/rbi/dodopayments/models/product_update_params.rbi +6 -3
- data/rbi/dodopayments/models/subscription.rbi +78 -0
- data/rbi/dodopayments/models/subscription_retrieve_usage_history_params.rbi +78 -0
- data/rbi/dodopayments/models/subscription_retrieve_usage_history_response.rbi +159 -0
- data/rbi/dodopayments/models/usage_event_ingest_params.rbi +46 -0
- data/rbi/dodopayments/models/usage_event_ingest_response.rbi +26 -0
- data/rbi/dodopayments/models/usage_event_list_params.rbi +119 -0
- data/rbi/dodopayments/models/usage_event_retrieve_params.rbi +32 -0
- data/rbi/dodopayments/models.rbi +33 -2
- data/rbi/dodopayments/resources/invoices/payments.rbi +9 -0
- data/rbi/dodopayments/resources/meters.rbi +102 -0
- data/rbi/dodopayments/resources/products.rbi +5 -3
- data/rbi/dodopayments/resources/subscriptions.rbi +74 -0
- data/rbi/dodopayments/resources/usage_events.rbi +175 -0
- data/sig/dodopayments/client.rbs +4 -0
- data/sig/dodopayments/models/add_meter_to_price.rbs +45 -0
- data/sig/dodopayments/models/event.rbs +53 -0
- data/sig/dodopayments/models/event_input.rbs +48 -0
- data/sig/dodopayments/models/invoices/payment_retrieve_refund_params.rbs +17 -0
- data/sig/dodopayments/models/meter.rbs +65 -0
- data/sig/dodopayments/models/meter_aggregation.rbs +35 -0
- data/sig/dodopayments/models/meter_archive_params.rbs +15 -0
- data/sig/dodopayments/models/meter_create_params.rbs +51 -0
- data/sig/dodopayments/models/meter_filter.rbs +417 -0
- data/sig/dodopayments/models/meter_list_params.rbs +38 -0
- data/sig/dodopayments/models/{product_delete_params.rbs → meter_retrieve_params.rbs} +2 -2
- data/sig/dodopayments/models/meter_unarchive_params.rbs +15 -0
- data/sig/dodopayments/models/payment.rbs +5 -0
- data/sig/dodopayments/models/price.rbs +88 -9
- data/sig/dodopayments/models/product_archive_params.rbs +15 -0
- data/sig/dodopayments/models/subscription.rbs +52 -0
- data/sig/dodopayments/models/subscription_retrieve_usage_history_params.rbs +46 -0
- data/sig/dodopayments/models/subscription_retrieve_usage_history_response.rbs +82 -0
- data/sig/dodopayments/models/usage_event_ingest_params.rbs +24 -0
- data/sig/dodopayments/models/usage_event_ingest_response.rbs +13 -0
- data/sig/dodopayments/models/usage_event_list_params.rbs +70 -0
- data/sig/dodopayments/models/usage_event_retrieve_params.rbs +15 -0
- data/sig/dodopayments/models.rbs +32 -2
- data/sig/dodopayments/resources/invoices/payments.rbs +5 -0
- data/sig/dodopayments/resources/meters.rbs +39 -0
- data/sig/dodopayments/resources/products.rbs +1 -1
- data/sig/dodopayments/resources/subscriptions.rbs +10 -0
- data/sig/dodopayments/resources/usage_events.rbs +28 -0
- metadata +65 -5
@@ -0,0 +1,15 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
type product_archive_params =
|
4
|
+
{ } & Dodopayments::Internal::Type::request_parameters
|
5
|
+
|
6
|
+
class ProductArchiveParams < Dodopayments::Internal::Type::BaseModel
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
def initialize: (?request_options: Dodopayments::request_opts) -> void
|
11
|
+
|
12
|
+
def to_hash: -> { request_options: Dodopayments::RequestOptions }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -9,6 +9,7 @@ module Dodopayments
|
|
9
9
|
currency: Dodopayments::Models::currency,
|
10
10
|
customer: Dodopayments::CustomerLimitedDetails,
|
11
11
|
metadata: ::Hash[Symbol, String],
|
12
|
+
meters: ::Array[Dodopayments::Subscription::Meter],
|
12
13
|
next_billing_date: Time,
|
13
14
|
on_demand: bool,
|
14
15
|
payment_frequency_count: Integer,
|
@@ -44,6 +45,8 @@ module Dodopayments
|
|
44
45
|
|
45
46
|
attr_accessor metadata: ::Hash[Symbol, String]
|
46
47
|
|
48
|
+
attr_accessor meters: ::Array[Dodopayments::Subscription::Meter]
|
49
|
+
|
47
50
|
attr_accessor next_billing_date: Time
|
48
51
|
|
49
52
|
attr_accessor on_demand: bool
|
@@ -88,6 +91,7 @@ module Dodopayments
|
|
88
91
|
currency: Dodopayments::Models::currency,
|
89
92
|
customer: Dodopayments::CustomerLimitedDetails,
|
90
93
|
metadata: ::Hash[Symbol, String],
|
94
|
+
meters: ::Array[Dodopayments::Subscription::Meter],
|
91
95
|
next_billing_date: Time,
|
92
96
|
on_demand: bool,
|
93
97
|
payment_frequency_count: Integer,
|
@@ -116,6 +120,7 @@ module Dodopayments
|
|
116
120
|
currency: Dodopayments::Models::currency,
|
117
121
|
customer: Dodopayments::CustomerLimitedDetails,
|
118
122
|
metadata: ::Hash[Symbol, String],
|
123
|
+
meters: ::Array[Dodopayments::Subscription::Meter],
|
119
124
|
next_billing_date: Time,
|
120
125
|
on_demand: bool,
|
121
126
|
payment_frequency_count: Integer,
|
@@ -135,6 +140,53 @@ module Dodopayments
|
|
135
140
|
discount_id: String?,
|
136
141
|
expires_at: Time?
|
137
142
|
}
|
143
|
+
|
144
|
+
type meter =
|
145
|
+
{
|
146
|
+
currency: Dodopayments::Models::currency,
|
147
|
+
free_threshold: Integer,
|
148
|
+
measurement_unit: String,
|
149
|
+
meter_id: String,
|
150
|
+
name: String,
|
151
|
+
price_per_unit: String,
|
152
|
+
description: String?
|
153
|
+
}
|
154
|
+
|
155
|
+
class Meter < Dodopayments::Internal::Type::BaseModel
|
156
|
+
attr_accessor currency: Dodopayments::Models::currency
|
157
|
+
|
158
|
+
attr_accessor free_threshold: Integer
|
159
|
+
|
160
|
+
attr_accessor measurement_unit: String
|
161
|
+
|
162
|
+
attr_accessor meter_id: String
|
163
|
+
|
164
|
+
attr_accessor name: String
|
165
|
+
|
166
|
+
attr_accessor price_per_unit: String
|
167
|
+
|
168
|
+
attr_accessor description: String?
|
169
|
+
|
170
|
+
def initialize: (
|
171
|
+
currency: Dodopayments::Models::currency,
|
172
|
+
free_threshold: Integer,
|
173
|
+
measurement_unit: String,
|
174
|
+
meter_id: String,
|
175
|
+
name: String,
|
176
|
+
price_per_unit: String,
|
177
|
+
?description: String?
|
178
|
+
) -> void
|
179
|
+
|
180
|
+
def to_hash: -> {
|
181
|
+
currency: Dodopayments::Models::currency,
|
182
|
+
free_threshold: Integer,
|
183
|
+
measurement_unit: String,
|
184
|
+
meter_id: String,
|
185
|
+
name: String,
|
186
|
+
price_per_unit: String,
|
187
|
+
description: String?
|
188
|
+
}
|
189
|
+
end
|
138
190
|
end
|
139
191
|
end
|
140
192
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
type subscription_retrieve_usage_history_params =
|
4
|
+
{
|
5
|
+
end_date: Time?,
|
6
|
+
meter_id: String?,
|
7
|
+
page_number: Integer?,
|
8
|
+
page_size: Integer?,
|
9
|
+
start_date: Time?
|
10
|
+
}
|
11
|
+
& Dodopayments::Internal::Type::request_parameters
|
12
|
+
|
13
|
+
class SubscriptionRetrieveUsageHistoryParams < Dodopayments::Internal::Type::BaseModel
|
14
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
15
|
+
include Dodopayments::Internal::Type::RequestParameters
|
16
|
+
|
17
|
+
attr_accessor end_date: Time?
|
18
|
+
|
19
|
+
attr_accessor meter_id: String?
|
20
|
+
|
21
|
+
attr_accessor page_number: Integer?
|
22
|
+
|
23
|
+
attr_accessor page_size: Integer?
|
24
|
+
|
25
|
+
attr_accessor start_date: Time?
|
26
|
+
|
27
|
+
def initialize: (
|
28
|
+
?end_date: Time?,
|
29
|
+
?meter_id: String?,
|
30
|
+
?page_number: Integer?,
|
31
|
+
?page_size: Integer?,
|
32
|
+
?start_date: Time?,
|
33
|
+
?request_options: Dodopayments::request_opts
|
34
|
+
) -> void
|
35
|
+
|
36
|
+
def to_hash: -> {
|
37
|
+
end_date: Time?,
|
38
|
+
meter_id: String?,
|
39
|
+
page_number: Integer?,
|
40
|
+
page_size: Integer?,
|
41
|
+
start_date: Time?,
|
42
|
+
request_options: Dodopayments::RequestOptions
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
type subscription_retrieve_usage_history_response =
|
4
|
+
{
|
5
|
+
end_date: Time,
|
6
|
+
meters: ::Array[Dodopayments::Models::SubscriptionRetrieveUsageHistoryResponse::Meter],
|
7
|
+
start_date: Time
|
8
|
+
}
|
9
|
+
|
10
|
+
class SubscriptionRetrieveUsageHistoryResponse < Dodopayments::Internal::Type::BaseModel
|
11
|
+
attr_accessor end_date: Time
|
12
|
+
|
13
|
+
attr_accessor meters: ::Array[Dodopayments::Models::SubscriptionRetrieveUsageHistoryResponse::Meter]
|
14
|
+
|
15
|
+
attr_accessor start_date: Time
|
16
|
+
|
17
|
+
def initialize: (
|
18
|
+
end_date: Time,
|
19
|
+
meters: ::Array[Dodopayments::Models::SubscriptionRetrieveUsageHistoryResponse::Meter],
|
20
|
+
start_date: Time
|
21
|
+
) -> void
|
22
|
+
|
23
|
+
def to_hash: -> {
|
24
|
+
end_date: Time,
|
25
|
+
meters: ::Array[Dodopayments::Models::SubscriptionRetrieveUsageHistoryResponse::Meter],
|
26
|
+
start_date: Time
|
27
|
+
}
|
28
|
+
|
29
|
+
type meter =
|
30
|
+
{
|
31
|
+
id: String,
|
32
|
+
chargeable_units: String,
|
33
|
+
consumed_units: String,
|
34
|
+
currency: Dodopayments::Models::currency,
|
35
|
+
free_threshold: Integer,
|
36
|
+
name: String,
|
37
|
+
price_per_unit: String,
|
38
|
+
total_price: Integer
|
39
|
+
}
|
40
|
+
|
41
|
+
class Meter < Dodopayments::Internal::Type::BaseModel
|
42
|
+
attr_accessor id: String
|
43
|
+
|
44
|
+
attr_accessor chargeable_units: String
|
45
|
+
|
46
|
+
attr_accessor consumed_units: String
|
47
|
+
|
48
|
+
attr_accessor currency: Dodopayments::Models::currency
|
49
|
+
|
50
|
+
attr_accessor free_threshold: Integer
|
51
|
+
|
52
|
+
attr_accessor name: String
|
53
|
+
|
54
|
+
attr_accessor price_per_unit: String
|
55
|
+
|
56
|
+
attr_accessor total_price: Integer
|
57
|
+
|
58
|
+
def initialize: (
|
59
|
+
id: String,
|
60
|
+
chargeable_units: String,
|
61
|
+
consumed_units: String,
|
62
|
+
currency: Dodopayments::Models::currency,
|
63
|
+
free_threshold: Integer,
|
64
|
+
name: String,
|
65
|
+
price_per_unit: String,
|
66
|
+
total_price: Integer
|
67
|
+
) -> void
|
68
|
+
|
69
|
+
def to_hash: -> {
|
70
|
+
id: String,
|
71
|
+
chargeable_units: String,
|
72
|
+
consumed_units: String,
|
73
|
+
currency: Dodopayments::Models::currency,
|
74
|
+
free_threshold: Integer,
|
75
|
+
name: String,
|
76
|
+
price_per_unit: String,
|
77
|
+
total_price: Integer
|
78
|
+
}
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
type usage_event_ingest_params =
|
4
|
+
{ events: ::Array[Dodopayments::EventInput] }
|
5
|
+
& Dodopayments::Internal::Type::request_parameters
|
6
|
+
|
7
|
+
class UsageEventIngestParams < Dodopayments::Internal::Type::BaseModel
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
10
|
+
|
11
|
+
attr_accessor events: ::Array[Dodopayments::EventInput]
|
12
|
+
|
13
|
+
def initialize: (
|
14
|
+
events: ::Array[Dodopayments::EventInput],
|
15
|
+
?request_options: Dodopayments::request_opts
|
16
|
+
) -> void
|
17
|
+
|
18
|
+
def to_hash: -> {
|
19
|
+
events: ::Array[Dodopayments::EventInput],
|
20
|
+
request_options: Dodopayments::RequestOptions
|
21
|
+
}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
type usage_event_ingest_response = { ingested_count: Integer }
|
4
|
+
|
5
|
+
class UsageEventIngestResponse < Dodopayments::Internal::Type::BaseModel
|
6
|
+
attr_accessor ingested_count: Integer
|
7
|
+
|
8
|
+
def initialize: (ingested_count: Integer) -> void
|
9
|
+
|
10
|
+
def to_hash: -> { ingested_count: Integer }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
type usage_event_list_params =
|
4
|
+
{
|
5
|
+
customer_id: String,
|
6
|
+
end_: Time,
|
7
|
+
event_name: String,
|
8
|
+
meter_id: String,
|
9
|
+
page_number: Integer,
|
10
|
+
page_size: Integer,
|
11
|
+
start: Time
|
12
|
+
}
|
13
|
+
& Dodopayments::Internal::Type::request_parameters
|
14
|
+
|
15
|
+
class UsageEventListParams < Dodopayments::Internal::Type::BaseModel
|
16
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
17
|
+
include Dodopayments::Internal::Type::RequestParameters
|
18
|
+
|
19
|
+
attr_reader customer_id: String?
|
20
|
+
|
21
|
+
def customer_id=: (String) -> String
|
22
|
+
|
23
|
+
attr_reader end_: Time?
|
24
|
+
|
25
|
+
def end_=: (Time) -> Time
|
26
|
+
|
27
|
+
attr_reader event_name: String?
|
28
|
+
|
29
|
+
def event_name=: (String) -> String
|
30
|
+
|
31
|
+
attr_reader meter_id: String?
|
32
|
+
|
33
|
+
def meter_id=: (String) -> String
|
34
|
+
|
35
|
+
attr_reader page_number: Integer?
|
36
|
+
|
37
|
+
def page_number=: (Integer) -> Integer
|
38
|
+
|
39
|
+
attr_reader page_size: Integer?
|
40
|
+
|
41
|
+
def page_size=: (Integer) -> Integer
|
42
|
+
|
43
|
+
attr_reader start: Time?
|
44
|
+
|
45
|
+
def start=: (Time) -> Time
|
46
|
+
|
47
|
+
def initialize: (
|
48
|
+
?customer_id: String,
|
49
|
+
?end_: Time,
|
50
|
+
?event_name: String,
|
51
|
+
?meter_id: String,
|
52
|
+
?page_number: Integer,
|
53
|
+
?page_size: Integer,
|
54
|
+
?start: Time,
|
55
|
+
?request_options: Dodopayments::request_opts
|
56
|
+
) -> void
|
57
|
+
|
58
|
+
def to_hash: -> {
|
59
|
+
customer_id: String,
|
60
|
+
end_: Time,
|
61
|
+
event_name: String,
|
62
|
+
meter_id: String,
|
63
|
+
page_number: Integer,
|
64
|
+
page_size: Integer,
|
65
|
+
start: Time,
|
66
|
+
request_options: Dodopayments::RequestOptions
|
67
|
+
}
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
type usage_event_retrieve_params =
|
4
|
+
{ } & Dodopayments::Internal::Type::request_parameters
|
5
|
+
|
6
|
+
class UsageEventRetrieveParams < Dodopayments::Internal::Type::BaseModel
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
def initialize: (?request_options: Dodopayments::request_opts) -> void
|
11
|
+
|
12
|
+
def to_hash: -> { request_options: Dodopayments::RequestOptions }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/sig/dodopayments/models.rbs
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
module Dodopayments
|
2
|
+
class AddMeterToPrice = Dodopayments::Models::AddMeterToPrice
|
3
|
+
|
2
4
|
class AddonCartResponseItem = Dodopayments::Models::AddonCartResponseItem
|
3
5
|
|
4
6
|
class AddonCreateParams = Dodopayments::Models::AddonCreateParams
|
@@ -85,6 +87,10 @@ module Dodopayments
|
|
85
87
|
|
86
88
|
module DisputeStatus = Dodopayments::Models::DisputeStatus
|
87
89
|
|
90
|
+
class Event = Dodopayments::Models::Event
|
91
|
+
|
92
|
+
class EventInput = Dodopayments::Models::EventInput
|
93
|
+
|
88
94
|
class GetDispute = Dodopayments::Models::GetDispute
|
89
95
|
|
90
96
|
module IntentStatus = Dodopayments::Models::IntentStatus
|
@@ -117,6 +123,22 @@ module Dodopayments
|
|
117
123
|
|
118
124
|
class LicenseValidateParams = Dodopayments::Models::LicenseValidateParams
|
119
125
|
|
126
|
+
class Meter = Dodopayments::Models::Meter
|
127
|
+
|
128
|
+
class MeterAggregation = Dodopayments::Models::MeterAggregation
|
129
|
+
|
130
|
+
class MeterArchiveParams = Dodopayments::Models::MeterArchiveParams
|
131
|
+
|
132
|
+
class MeterCreateParams = Dodopayments::Models::MeterCreateParams
|
133
|
+
|
134
|
+
class MeterFilter = Dodopayments::Models::MeterFilter
|
135
|
+
|
136
|
+
class MeterListParams = Dodopayments::Models::MeterListParams
|
137
|
+
|
138
|
+
class MeterRetrieveParams = Dodopayments::Models::MeterRetrieveParams
|
139
|
+
|
140
|
+
class MeterUnarchiveParams = Dodopayments::Models::MeterUnarchiveParams
|
141
|
+
|
120
142
|
class MiscListSupportedCountriesParams = Dodopayments::Models::MiscListSupportedCountriesParams
|
121
143
|
|
122
144
|
class NewCustomer = Dodopayments::Models::NewCustomer
|
@@ -143,9 +165,9 @@ module Dodopayments
|
|
143
165
|
|
144
166
|
class Product = Dodopayments::Models::Product
|
145
167
|
|
146
|
-
class
|
168
|
+
class ProductArchiveParams = Dodopayments::Models::ProductArchiveParams
|
147
169
|
|
148
|
-
class
|
170
|
+
class ProductCreateParams = Dodopayments::Models::ProductCreateParams
|
149
171
|
|
150
172
|
class ProductListParams = Dodopayments::Models::ProductListParams
|
151
173
|
|
@@ -181,6 +203,8 @@ module Dodopayments
|
|
181
203
|
|
182
204
|
class SubscriptionRetrieveParams = Dodopayments::Models::SubscriptionRetrieveParams
|
183
205
|
|
206
|
+
class SubscriptionRetrieveUsageHistoryParams = Dodopayments::Models::SubscriptionRetrieveUsageHistoryParams
|
207
|
+
|
184
208
|
module SubscriptionStatus = Dodopayments::Models::SubscriptionStatus
|
185
209
|
|
186
210
|
class SubscriptionUpdateParams = Dodopayments::Models::SubscriptionUpdateParams
|
@@ -189,6 +213,12 @@ module Dodopayments
|
|
189
213
|
|
190
214
|
module TimeInterval = Dodopayments::Models::TimeInterval
|
191
215
|
|
216
|
+
class UsageEventIngestParams = Dodopayments::Models::UsageEventIngestParams
|
217
|
+
|
218
|
+
class UsageEventListParams = Dodopayments::Models::UsageEventListParams
|
219
|
+
|
220
|
+
class UsageEventRetrieveParams = Dodopayments::Models::UsageEventRetrieveParams
|
221
|
+
|
192
222
|
class WebhookCreateParams = Dodopayments::Models::WebhookCreateParams
|
193
223
|
|
194
224
|
class WebhookDeleteParams = Dodopayments::Models::WebhookDeleteParams
|
@@ -7,6 +7,11 @@ module Dodopayments
|
|
7
7
|
?request_options: Dodopayments::request_opts
|
8
8
|
) -> StringIO
|
9
9
|
|
10
|
+
def retrieve_refund: (
|
11
|
+
String refund_id,
|
12
|
+
?request_options: Dodopayments::request_opts
|
13
|
+
) -> StringIO
|
14
|
+
|
10
15
|
def initialize: (client: Dodopayments::Client) -> void
|
11
16
|
end
|
12
17
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Resources
|
3
|
+
class Meters
|
4
|
+
def create: (
|
5
|
+
aggregation: Dodopayments::MeterAggregation,
|
6
|
+
event_name: String,
|
7
|
+
measurement_unit: String,
|
8
|
+
name: String,
|
9
|
+
?description: String?,
|
10
|
+
?filter: Dodopayments::MeterFilter?,
|
11
|
+
?request_options: Dodopayments::request_opts
|
12
|
+
) -> Dodopayments::Meter
|
13
|
+
|
14
|
+
def retrieve: (
|
15
|
+
String id,
|
16
|
+
?request_options: Dodopayments::request_opts
|
17
|
+
) -> Dodopayments::Meter
|
18
|
+
|
19
|
+
def list: (
|
20
|
+
?archived: bool,
|
21
|
+
?page_number: Integer,
|
22
|
+
?page_size: Integer,
|
23
|
+
?request_options: Dodopayments::request_opts
|
24
|
+
) -> Dodopayments::Internal::DefaultPageNumberPagination[Dodopayments::Meter]
|
25
|
+
|
26
|
+
def archive: (
|
27
|
+
String id,
|
28
|
+
?request_options: Dodopayments::request_opts
|
29
|
+
) -> nil
|
30
|
+
|
31
|
+
def unarchive: (
|
32
|
+
String id,
|
33
|
+
?request_options: Dodopayments::request_opts
|
34
|
+
) -> nil
|
35
|
+
|
36
|
+
def initialize: (client: Dodopayments::Client) -> void
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -51,7 +51,7 @@ module Dodopayments
|
|
51
51
|
?request_options: Dodopayments::request_opts
|
52
52
|
) -> Dodopayments::Internal::DefaultPageNumberPagination[Dodopayments::Models::ProductListResponse]
|
53
53
|
|
54
|
-
def
|
54
|
+
def archive: (
|
55
55
|
String id,
|
56
56
|
?request_options: Dodopayments::request_opts
|
57
57
|
) -> nil
|
@@ -67,6 +67,16 @@ module Dodopayments
|
|
67
67
|
?request_options: Dodopayments::request_opts
|
68
68
|
) -> Dodopayments::Models::SubscriptionChargeResponse
|
69
69
|
|
70
|
+
def retrieve_usage_history: (
|
71
|
+
String subscription_id,
|
72
|
+
?end_date: Time?,
|
73
|
+
?meter_id: String?,
|
74
|
+
?page_number: Integer?,
|
75
|
+
?page_size: Integer?,
|
76
|
+
?start_date: Time?,
|
77
|
+
?request_options: Dodopayments::request_opts
|
78
|
+
) -> Dodopayments::Internal::DefaultPageNumberPagination[Dodopayments::Models::SubscriptionRetrieveUsageHistoryResponse]
|
79
|
+
|
70
80
|
def initialize: (client: Dodopayments::Client) -> void
|
71
81
|
end
|
72
82
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Resources
|
3
|
+
class UsageEvents
|
4
|
+
def retrieve: (
|
5
|
+
String event_id,
|
6
|
+
?request_options: Dodopayments::request_opts
|
7
|
+
) -> Dodopayments::Event
|
8
|
+
|
9
|
+
def list: (
|
10
|
+
?customer_id: String,
|
11
|
+
?end_: Time,
|
12
|
+
?event_name: String,
|
13
|
+
?meter_id: String,
|
14
|
+
?page_number: Integer,
|
15
|
+
?page_size: Integer,
|
16
|
+
?start: Time,
|
17
|
+
?request_options: Dodopayments::request_opts
|
18
|
+
) -> Dodopayments::Internal::DefaultPageNumberPagination[Dodopayments::Event]
|
19
|
+
|
20
|
+
def ingest: (
|
21
|
+
events: ::Array[Dodopayments::EventInput],
|
22
|
+
?request_options: Dodopayments::request_opts
|
23
|
+
) -> Dodopayments::Models::UsageEventIngestResponse
|
24
|
+
|
25
|
+
def initialize: (client: Dodopayments::Client) -> void
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|