dodopayments 1.52.5 → 1.53.2
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 +8 -0
- data/README.md +1 -1
- data/lib/dodopayments/models/customers/customer_wallet.rb +43 -0
- data/lib/dodopayments/models/customers/wallet_list_params.rb +16 -0
- data/lib/dodopayments/models/customers/wallet_list_response.rb +26 -0
- data/lib/dodopayments/models/customers/wallets/customer_wallet_transaction.rb +102 -0
- data/lib/dodopayments/models/customers/wallets/ledger_entry_create_params.rb +67 -0
- data/lib/dodopayments/models/customers/wallets/ledger_entry_list_params.rb +40 -0
- data/lib/dodopayments/models/license_activate_response.rb +87 -0
- data/lib/dodopayments/models/payment.rb +78 -3
- data/lib/dodopayments/models/refund.rb +9 -1
- data/lib/dodopayments/models/refund_list_response.rb +81 -0
- data/lib/dodopayments/models/subscription_charge_params.rb +32 -1
- data/lib/dodopayments/resources/customers/wallets/ledger_entries.rb +75 -0
- data/lib/dodopayments/resources/customers/wallets.rb +38 -0
- data/lib/dodopayments/resources/customers.rb +4 -0
- data/lib/dodopayments/resources/licenses.rb +2 -2
- data/lib/dodopayments/resources/refunds.rb +2 -2
- data/lib/dodopayments/resources/subscriptions.rb +3 -1
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +10 -0
- data/rbi/dodopayments/models/customers/customer_wallet.rbi +66 -0
- data/rbi/dodopayments/models/customers/wallet_list_params.rbi +34 -0
- data/rbi/dodopayments/models/customers/wallet_list_response.rbi +48 -0
- data/rbi/dodopayments/models/customers/wallets/customer_wallet_transaction.rbi +173 -0
- data/rbi/dodopayments/models/customers/wallets/ledger_entry_create_params.rbi +119 -0
- data/rbi/dodopayments/models/customers/wallets/ledger_entry_list_params.rbi +71 -0
- data/rbi/dodopayments/models/license_activate_response.rbi +140 -0
- data/rbi/dodopayments/models/payment.rbi +102 -3
- data/rbi/dodopayments/models/refund.rbi +13 -0
- data/rbi/dodopayments/models/refund_list_response.rbi +104 -0
- data/rbi/dodopayments/models/subscription_charge_params.rbi +74 -0
- data/rbi/dodopayments/resources/customers/wallets/ledger_entries.rbi +67 -0
- data/rbi/dodopayments/resources/customers/wallets.rbi +32 -0
- data/rbi/dodopayments/resources/customers.rbi +3 -0
- data/rbi/dodopayments/resources/licenses.rbi +1 -1
- data/rbi/dodopayments/resources/refunds.rbi +1 -1
- data/rbi/dodopayments/resources/subscriptions.rbi +6 -0
- data/sig/dodopayments/models/customers/customer_wallet.rbs +44 -0
- data/sig/dodopayments/models/customers/wallet_list_params.rbs +17 -0
- data/sig/dodopayments/models/customers/wallet_list_response.rbs +27 -0
- data/sig/dodopayments/models/customers/wallets/customer_wallet_transaction.rbs +102 -0
- data/sig/dodopayments/models/customers/wallets/ledger_entry_create_params.rbs +61 -0
- data/sig/dodopayments/models/customers/wallets/ledger_entry_list_params.rbs +48 -0
- data/sig/dodopayments/models/license_activate_response.rbs +62 -0
- data/sig/dodopayments/models/payment.rbs +61 -4
- data/sig/dodopayments/models/refund.rbs +5 -0
- data/sig/dodopayments/models/refund_list_response.rbs +60 -0
- data/sig/dodopayments/models/subscription_charge_params.rbs +27 -0
- data/sig/dodopayments/resources/customers/wallets/ledger_entries.rbs +29 -0
- data/sig/dodopayments/resources/customers/wallets.rbs +16 -0
- data/sig/dodopayments/resources/customers.rbs +2 -0
- data/sig/dodopayments/resources/licenses.rbs +1 -1
- data/sig/dodopayments/resources/refunds.rbs +1 -1
- data/sig/dodopayments/resources/subscriptions.rbs +1 -0
- metadata +32 -2
@@ -25,6 +25,26 @@ module Dodopayments
|
|
25
25
|
sig { returns(T.nilable(T::Boolean)) }
|
26
26
|
attr_accessor :adaptive_currency_fees_inclusive
|
27
27
|
|
28
|
+
# Specify how customer balance is used for the payment
|
29
|
+
sig do
|
30
|
+
returns(
|
31
|
+
T.nilable(
|
32
|
+
Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig
|
33
|
+
)
|
34
|
+
)
|
35
|
+
end
|
36
|
+
attr_reader :customer_balance_config
|
37
|
+
|
38
|
+
sig do
|
39
|
+
params(
|
40
|
+
customer_balance_config:
|
41
|
+
T.nilable(
|
42
|
+
Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig::OrHash
|
43
|
+
)
|
44
|
+
).void
|
45
|
+
end
|
46
|
+
attr_writer :customer_balance_config
|
47
|
+
|
28
48
|
# Metadata for the payment. If not passed, the metadata of the subscription will
|
29
49
|
# be taken
|
30
50
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
@@ -44,6 +64,10 @@ module Dodopayments
|
|
44
64
|
params(
|
45
65
|
product_price: Integer,
|
46
66
|
adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
|
67
|
+
customer_balance_config:
|
68
|
+
T.nilable(
|
69
|
+
Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig::OrHash
|
70
|
+
),
|
47
71
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
48
72
|
product_currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
49
73
|
product_description: T.nilable(String),
|
@@ -58,6 +82,8 @@ module Dodopayments
|
|
58
82
|
# added on top (false). This field is ignored if adaptive pricing is not enabled
|
59
83
|
# for the business.
|
60
84
|
adaptive_currency_fees_inclusive: nil,
|
85
|
+
# Specify how customer balance is used for the payment
|
86
|
+
customer_balance_config: nil,
|
61
87
|
# Metadata for the payment. If not passed, the metadata of the subscription will
|
62
88
|
# be taken
|
63
89
|
metadata: nil,
|
@@ -76,6 +102,10 @@ module Dodopayments
|
|
76
102
|
{
|
77
103
|
product_price: Integer,
|
78
104
|
adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
|
105
|
+
customer_balance_config:
|
106
|
+
T.nilable(
|
107
|
+
Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig
|
108
|
+
),
|
79
109
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
80
110
|
product_currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
81
111
|
product_description: T.nilable(String),
|
@@ -85,6 +115,50 @@ module Dodopayments
|
|
85
115
|
end
|
86
116
|
def to_hash
|
87
117
|
end
|
118
|
+
|
119
|
+
class CustomerBalanceConfig < Dodopayments::Internal::Type::BaseModel
|
120
|
+
OrHash =
|
121
|
+
T.type_alias do
|
122
|
+
T.any(
|
123
|
+
Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig,
|
124
|
+
Dodopayments::Internal::AnyHash
|
125
|
+
)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Allows Customer Credit to be purchased to settle payments
|
129
|
+
sig { returns(T.nilable(T::Boolean)) }
|
130
|
+
attr_accessor :allow_customer_credits_purchase
|
131
|
+
|
132
|
+
# Allows Customer Credit Balance to be used to settle payments
|
133
|
+
sig { returns(T.nilable(T::Boolean)) }
|
134
|
+
attr_accessor :allow_customer_credits_usage
|
135
|
+
|
136
|
+
# Specify how customer balance is used for the payment
|
137
|
+
sig do
|
138
|
+
params(
|
139
|
+
allow_customer_credits_purchase: T.nilable(T::Boolean),
|
140
|
+
allow_customer_credits_usage: T.nilable(T::Boolean)
|
141
|
+
).returns(T.attached_class)
|
142
|
+
end
|
143
|
+
def self.new(
|
144
|
+
# Allows Customer Credit to be purchased to settle payments
|
145
|
+
allow_customer_credits_purchase: nil,
|
146
|
+
# Allows Customer Credit Balance to be used to settle payments
|
147
|
+
allow_customer_credits_usage: nil
|
148
|
+
)
|
149
|
+
end
|
150
|
+
|
151
|
+
sig do
|
152
|
+
override.returns(
|
153
|
+
{
|
154
|
+
allow_customer_credits_purchase: T.nilable(T::Boolean),
|
155
|
+
allow_customer_credits_usage: T.nilable(T::Boolean)
|
156
|
+
}
|
157
|
+
)
|
158
|
+
end
|
159
|
+
def to_hash
|
160
|
+
end
|
161
|
+
end
|
88
162
|
end
|
89
163
|
end
|
90
164
|
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Resources
|
5
|
+
class Customers
|
6
|
+
class Wallets
|
7
|
+
class LedgerEntries
|
8
|
+
sig do
|
9
|
+
params(
|
10
|
+
customer_id: String,
|
11
|
+
amount: Integer,
|
12
|
+
currency: Dodopayments::Currency::OrSymbol,
|
13
|
+
entry_type:
|
14
|
+
Dodopayments::Customers::Wallets::LedgerEntryCreateParams::EntryType::OrSymbol,
|
15
|
+
idempotency_key: T.nilable(String),
|
16
|
+
reason: T.nilable(String),
|
17
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
18
|
+
).returns(Dodopayments::Customers::CustomerWallet)
|
19
|
+
end
|
20
|
+
def create(
|
21
|
+
# Customer ID
|
22
|
+
customer_id,
|
23
|
+
amount:,
|
24
|
+
# Currency of the wallet to adjust
|
25
|
+
currency:,
|
26
|
+
# Type of ledger entry - credit or debit
|
27
|
+
entry_type:,
|
28
|
+
# Optional idempotency key to prevent duplicate entries
|
29
|
+
idempotency_key: nil,
|
30
|
+
reason: nil,
|
31
|
+
request_options: {}
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
sig do
|
36
|
+
params(
|
37
|
+
customer_id: String,
|
38
|
+
currency: Dodopayments::Currency::OrSymbol,
|
39
|
+
page_number: Integer,
|
40
|
+
page_size: Integer,
|
41
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
42
|
+
).returns(
|
43
|
+
Dodopayments::Internal::DefaultPageNumberPagination[
|
44
|
+
Dodopayments::Customers::Wallets::CustomerWalletTransaction
|
45
|
+
]
|
46
|
+
)
|
47
|
+
end
|
48
|
+
def list(
|
49
|
+
# Customer ID
|
50
|
+
customer_id,
|
51
|
+
# Optional currency filter
|
52
|
+
currency: nil,
|
53
|
+
page_number: nil,
|
54
|
+
page_size: nil,
|
55
|
+
request_options: {}
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
# @api private
|
60
|
+
sig { params(client: Dodopayments::Client).returns(T.attached_class) }
|
61
|
+
def self.new(client:)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Resources
|
5
|
+
class Customers
|
6
|
+
class Wallets
|
7
|
+
sig do
|
8
|
+
returns(Dodopayments::Resources::Customers::Wallets::LedgerEntries)
|
9
|
+
end
|
10
|
+
attr_reader :ledger_entries
|
11
|
+
|
12
|
+
sig do
|
13
|
+
params(
|
14
|
+
customer_id: String,
|
15
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
16
|
+
).returns(Dodopayments::Models::Customers::WalletListResponse)
|
17
|
+
end
|
18
|
+
def list(
|
19
|
+
# Customer ID
|
20
|
+
customer_id,
|
21
|
+
request_options: {}
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
sig { params(client: Dodopayments::Client).returns(T.attached_class) }
|
27
|
+
def self.new(client:)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -8,7 +8,7 @@ module Dodopayments
|
|
8
8
|
license_key: String,
|
9
9
|
name: String,
|
10
10
|
request_options: Dodopayments::RequestOptions::OrHash
|
11
|
-
).returns(Dodopayments::
|
11
|
+
).returns(Dodopayments::Models::LicenseActivateResponse)
|
12
12
|
end
|
13
13
|
def activate(license_key:, name:, request_options: {})
|
14
14
|
end
|
@@ -181,6 +181,10 @@ module Dodopayments
|
|
181
181
|
subscription_id: String,
|
182
182
|
product_price: Integer,
|
183
183
|
adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
|
184
|
+
customer_balance_config:
|
185
|
+
T.nilable(
|
186
|
+
Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig::OrHash
|
187
|
+
),
|
184
188
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
185
189
|
product_currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
186
190
|
product_description: T.nilable(String),
|
@@ -197,6 +201,8 @@ module Dodopayments
|
|
197
201
|
# added on top (false). This field is ignored if adaptive pricing is not enabled
|
198
202
|
# for the business.
|
199
203
|
adaptive_currency_fees_inclusive: nil,
|
204
|
+
# Specify how customer balance is used for the payment
|
205
|
+
customer_balance_config: nil,
|
200
206
|
# Metadata for the payment. If not passed, the metadata of the subscription will
|
201
207
|
# be taken
|
202
208
|
metadata: nil,
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
class CustomerWallet = Customers::CustomerWallet
|
4
|
+
|
5
|
+
module Customers
|
6
|
+
type customer_wallet =
|
7
|
+
{
|
8
|
+
balance: Integer,
|
9
|
+
created_at: Time,
|
10
|
+
currency: Dodopayments::Models::currency,
|
11
|
+
customer_id: String,
|
12
|
+
updated_at: Time
|
13
|
+
}
|
14
|
+
|
15
|
+
class CustomerWallet < Dodopayments::Internal::Type::BaseModel
|
16
|
+
attr_accessor balance: Integer
|
17
|
+
|
18
|
+
attr_accessor created_at: Time
|
19
|
+
|
20
|
+
attr_accessor currency: Dodopayments::Models::currency
|
21
|
+
|
22
|
+
attr_accessor customer_id: String
|
23
|
+
|
24
|
+
attr_accessor updated_at: Time
|
25
|
+
|
26
|
+
def initialize: (
|
27
|
+
balance: Integer,
|
28
|
+
created_at: Time,
|
29
|
+
currency: Dodopayments::Models::currency,
|
30
|
+
customer_id: String,
|
31
|
+
updated_at: Time
|
32
|
+
) -> void
|
33
|
+
|
34
|
+
def to_hash: -> {
|
35
|
+
balance: Integer,
|
36
|
+
created_at: Time,
|
37
|
+
currency: Dodopayments::Models::currency,
|
38
|
+
customer_id: String,
|
39
|
+
updated_at: Time
|
40
|
+
}
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
module Customers
|
4
|
+
type wallet_list_params =
|
5
|
+
{ } & Dodopayments::Internal::Type::request_parameters
|
6
|
+
|
7
|
+
class WalletListParams < Dodopayments::Internal::Type::BaseModel
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
10
|
+
|
11
|
+
def initialize: (?request_options: Dodopayments::request_opts) -> void
|
12
|
+
|
13
|
+
def to_hash: -> { request_options: Dodopayments::RequestOptions }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
module Customers
|
4
|
+
type wallet_list_response =
|
5
|
+
{
|
6
|
+
items: ::Array[Dodopayments::Customers::CustomerWallet],
|
7
|
+
total_balance_usd: Integer
|
8
|
+
}
|
9
|
+
|
10
|
+
class WalletListResponse < Dodopayments::Internal::Type::BaseModel
|
11
|
+
attr_accessor items: ::Array[Dodopayments::Customers::CustomerWallet]
|
12
|
+
|
13
|
+
attr_accessor total_balance_usd: Integer
|
14
|
+
|
15
|
+
def initialize: (
|
16
|
+
items: ::Array[Dodopayments::Customers::CustomerWallet],
|
17
|
+
total_balance_usd: Integer
|
18
|
+
) -> void
|
19
|
+
|
20
|
+
def to_hash: -> {
|
21
|
+
items: ::Array[Dodopayments::Customers::CustomerWallet],
|
22
|
+
total_balance_usd: Integer
|
23
|
+
}
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
module Customers
|
4
|
+
module Wallets
|
5
|
+
type customer_wallet_transaction =
|
6
|
+
{
|
7
|
+
id: String,
|
8
|
+
after_balance: Integer,
|
9
|
+
amount: Integer,
|
10
|
+
before_balance: Integer,
|
11
|
+
business_id: String,
|
12
|
+
created_at: Time,
|
13
|
+
currency: Dodopayments::Models::currency,
|
14
|
+
customer_id: String,
|
15
|
+
event_type: Dodopayments::Models::Customers::Wallets::CustomerWalletTransaction::event_type,
|
16
|
+
is_credit: bool,
|
17
|
+
reason: String?,
|
18
|
+
reference_object_id: String?
|
19
|
+
}
|
20
|
+
|
21
|
+
class CustomerWalletTransaction < Dodopayments::Internal::Type::BaseModel
|
22
|
+
attr_accessor id: String
|
23
|
+
|
24
|
+
attr_accessor after_balance: Integer
|
25
|
+
|
26
|
+
attr_accessor amount: Integer
|
27
|
+
|
28
|
+
attr_accessor before_balance: Integer
|
29
|
+
|
30
|
+
attr_accessor business_id: String
|
31
|
+
|
32
|
+
attr_accessor created_at: Time
|
33
|
+
|
34
|
+
attr_accessor currency: Dodopayments::Models::currency
|
35
|
+
|
36
|
+
attr_accessor customer_id: String
|
37
|
+
|
38
|
+
attr_accessor event_type: Dodopayments::Models::Customers::Wallets::CustomerWalletTransaction::event_type
|
39
|
+
|
40
|
+
attr_accessor is_credit: bool
|
41
|
+
|
42
|
+
attr_accessor reason: String?
|
43
|
+
|
44
|
+
attr_accessor reference_object_id: String?
|
45
|
+
|
46
|
+
def initialize: (
|
47
|
+
id: String,
|
48
|
+
after_balance: Integer,
|
49
|
+
amount: Integer,
|
50
|
+
before_balance: Integer,
|
51
|
+
business_id: String,
|
52
|
+
created_at: Time,
|
53
|
+
currency: Dodopayments::Models::currency,
|
54
|
+
customer_id: String,
|
55
|
+
event_type: Dodopayments::Models::Customers::Wallets::CustomerWalletTransaction::event_type,
|
56
|
+
is_credit: bool,
|
57
|
+
?reason: String?,
|
58
|
+
?reference_object_id: String?
|
59
|
+
) -> void
|
60
|
+
|
61
|
+
def to_hash: -> {
|
62
|
+
id: String,
|
63
|
+
after_balance: Integer,
|
64
|
+
amount: Integer,
|
65
|
+
before_balance: Integer,
|
66
|
+
business_id: String,
|
67
|
+
created_at: Time,
|
68
|
+
currency: Dodopayments::Models::currency,
|
69
|
+
customer_id: String,
|
70
|
+
event_type: Dodopayments::Models::Customers::Wallets::CustomerWalletTransaction::event_type,
|
71
|
+
is_credit: bool,
|
72
|
+
reason: String?,
|
73
|
+
reference_object_id: String?
|
74
|
+
}
|
75
|
+
|
76
|
+
type event_type =
|
77
|
+
:payment
|
78
|
+
| :payment_reversal
|
79
|
+
| :refund
|
80
|
+
| :refund_reversal
|
81
|
+
| :dispute
|
82
|
+
| :dispute_reversal
|
83
|
+
| :merchant_adjustment
|
84
|
+
|
85
|
+
module EventType
|
86
|
+
extend Dodopayments::Internal::Type::Enum
|
87
|
+
|
88
|
+
PAYMENT: :payment
|
89
|
+
PAYMENT_REVERSAL: :payment_reversal
|
90
|
+
REFUND: :refund
|
91
|
+
REFUND_REVERSAL: :refund_reversal
|
92
|
+
DISPUTE: :dispute
|
93
|
+
DISPUTE_REVERSAL: :dispute_reversal
|
94
|
+
MERCHANT_ADJUSTMENT: :merchant_adjustment
|
95
|
+
|
96
|
+
def self?.values: -> ::Array[Dodopayments::Models::Customers::Wallets::CustomerWalletTransaction::event_type]
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
module Customers
|
4
|
+
module Wallets
|
5
|
+
type ledger_entry_create_params =
|
6
|
+
{
|
7
|
+
amount: Integer,
|
8
|
+
currency: Dodopayments::Models::currency,
|
9
|
+
entry_type: Dodopayments::Models::Customers::Wallets::LedgerEntryCreateParams::entry_type,
|
10
|
+
idempotency_key: String?,
|
11
|
+
reason: String?
|
12
|
+
}
|
13
|
+
& Dodopayments::Internal::Type::request_parameters
|
14
|
+
|
15
|
+
class LedgerEntryCreateParams < Dodopayments::Internal::Type::BaseModel
|
16
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
17
|
+
include Dodopayments::Internal::Type::RequestParameters
|
18
|
+
|
19
|
+
attr_accessor amount: Integer
|
20
|
+
|
21
|
+
attr_accessor currency: Dodopayments::Models::currency
|
22
|
+
|
23
|
+
attr_accessor entry_type: Dodopayments::Models::Customers::Wallets::LedgerEntryCreateParams::entry_type
|
24
|
+
|
25
|
+
attr_accessor idempotency_key: String?
|
26
|
+
|
27
|
+
attr_accessor reason: String?
|
28
|
+
|
29
|
+
def initialize: (
|
30
|
+
amount: Integer,
|
31
|
+
currency: Dodopayments::Models::currency,
|
32
|
+
entry_type: Dodopayments::Models::Customers::Wallets::LedgerEntryCreateParams::entry_type,
|
33
|
+
?idempotency_key: String?,
|
34
|
+
?reason: String?,
|
35
|
+
?request_options: Dodopayments::request_opts
|
36
|
+
) -> void
|
37
|
+
|
38
|
+
def to_hash: -> {
|
39
|
+
amount: Integer,
|
40
|
+
currency: Dodopayments::Models::currency,
|
41
|
+
entry_type: Dodopayments::Models::Customers::Wallets::LedgerEntryCreateParams::entry_type,
|
42
|
+
idempotency_key: String?,
|
43
|
+
reason: String?,
|
44
|
+
request_options: Dodopayments::RequestOptions
|
45
|
+
}
|
46
|
+
|
47
|
+
type entry_type = :credit | :debit
|
48
|
+
|
49
|
+
module EntryType
|
50
|
+
extend Dodopayments::Internal::Type::Enum
|
51
|
+
|
52
|
+
CREDIT: :credit
|
53
|
+
DEBIT: :debit
|
54
|
+
|
55
|
+
def self?.values: -> ::Array[Dodopayments::Models::Customers::Wallets::LedgerEntryCreateParams::entry_type]
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
module Customers
|
4
|
+
module Wallets
|
5
|
+
type ledger_entry_list_params =
|
6
|
+
{
|
7
|
+
currency: Dodopayments::Models::currency,
|
8
|
+
page_number: Integer,
|
9
|
+
page_size: Integer
|
10
|
+
}
|
11
|
+
& Dodopayments::Internal::Type::request_parameters
|
12
|
+
|
13
|
+
class LedgerEntryListParams < Dodopayments::Internal::Type::BaseModel
|
14
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
15
|
+
include Dodopayments::Internal::Type::RequestParameters
|
16
|
+
|
17
|
+
attr_reader currency: Dodopayments::Models::currency?
|
18
|
+
|
19
|
+
def currency=: (
|
20
|
+
Dodopayments::Models::currency
|
21
|
+
) -> Dodopayments::Models::currency
|
22
|
+
|
23
|
+
attr_reader page_number: Integer?
|
24
|
+
|
25
|
+
def page_number=: (Integer) -> Integer
|
26
|
+
|
27
|
+
attr_reader page_size: Integer?
|
28
|
+
|
29
|
+
def page_size=: (Integer) -> Integer
|
30
|
+
|
31
|
+
def initialize: (
|
32
|
+
?currency: Dodopayments::Models::currency,
|
33
|
+
?page_number: Integer,
|
34
|
+
?page_size: Integer,
|
35
|
+
?request_options: Dodopayments::request_opts
|
36
|
+
) -> void
|
37
|
+
|
38
|
+
def to_hash: -> {
|
39
|
+
currency: Dodopayments::Models::currency,
|
40
|
+
page_number: Integer,
|
41
|
+
page_size: Integer,
|
42
|
+
request_options: Dodopayments::RequestOptions
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
module Dodopayments
|
2
|
+
module Models
|
3
|
+
type license_activate_response =
|
4
|
+
{
|
5
|
+
id: String,
|
6
|
+
business_id: String,
|
7
|
+
created_at: Time,
|
8
|
+
customer: Dodopayments::CustomerLimitedDetails,
|
9
|
+
license_key_id: String,
|
10
|
+
name: String,
|
11
|
+
product: Dodopayments::Models::LicenseActivateResponse::Product
|
12
|
+
}
|
13
|
+
|
14
|
+
class LicenseActivateResponse < Dodopayments::Internal::Type::BaseModel
|
15
|
+
attr_accessor id: String
|
16
|
+
|
17
|
+
attr_accessor business_id: String
|
18
|
+
|
19
|
+
attr_accessor created_at: Time
|
20
|
+
|
21
|
+
attr_accessor customer: Dodopayments::CustomerLimitedDetails
|
22
|
+
|
23
|
+
attr_accessor license_key_id: String
|
24
|
+
|
25
|
+
attr_accessor name: String
|
26
|
+
|
27
|
+
attr_accessor product: Dodopayments::Models::LicenseActivateResponse::Product
|
28
|
+
|
29
|
+
def initialize: (
|
30
|
+
id: String,
|
31
|
+
business_id: String,
|
32
|
+
created_at: Time,
|
33
|
+
customer: Dodopayments::CustomerLimitedDetails,
|
34
|
+
license_key_id: String,
|
35
|
+
name: String,
|
36
|
+
product: Dodopayments::Models::LicenseActivateResponse::Product
|
37
|
+
) -> void
|
38
|
+
|
39
|
+
def to_hash: -> {
|
40
|
+
id: String,
|
41
|
+
business_id: String,
|
42
|
+
created_at: Time,
|
43
|
+
customer: Dodopayments::CustomerLimitedDetails,
|
44
|
+
license_key_id: String,
|
45
|
+
name: String,
|
46
|
+
product: Dodopayments::Models::LicenseActivateResponse::Product
|
47
|
+
}
|
48
|
+
|
49
|
+
type product = { product_id: String, name: String? }
|
50
|
+
|
51
|
+
class Product < Dodopayments::Internal::Type::BaseModel
|
52
|
+
attr_accessor product_id: String
|
53
|
+
|
54
|
+
attr_accessor name: String?
|
55
|
+
|
56
|
+
def initialize: (product_id: String, ?name: String?) -> void
|
57
|
+
|
58
|
+
def to_hash: -> { product_id: String, name: String? }
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|