yoomoney 0.1.0 → 0.2.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 +8 -0
- data/README.md +1 -1
- data/lib/yoomoney/client.rb +6 -4
- data/lib/yoomoney/models/payment_deal_info.rb +3 -19
- data/lib/yoomoney/models/refund.rb +3 -20
- data/lib/yoomoney/models/refund_create_params.rb +3 -20
- data/lib/yoomoney/models/settlement_payment_item.rb +21 -0
- data/lib/yoomoney/models/settlement_refund_item.rb +21 -0
- data/lib/yoomoney/models.rb +4 -0
- data/lib/yoomoney/version.rb +1 -1
- data/lib/yoomoney.rb +2 -0
- data/rbi/yoomoney/client.rbi +6 -4
- data/rbi/yoomoney/models/payment_deal_info.rbi +3 -45
- data/rbi/yoomoney/models/refund.rbi +3 -44
- data/rbi/yoomoney/models/refund_create_params.rbi +3 -52
- data/rbi/yoomoney/models/settlement_payment_item.rbi +41 -0
- data/rbi/yoomoney/models/settlement_refund_item.rbi +41 -0
- data/rbi/yoomoney/models.rbi +4 -0
- data/sig/yoomoney/models/payment_deal_info.rbs +4 -29
- data/sig/yoomoney/models/refund.rbs +4 -26
- data/sig/yoomoney/models/refund_create_params.rbs +4 -28
- data/sig/yoomoney/models/settlement_payment_item.rbs +25 -0
- data/sig/yoomoney/models/settlement_refund_item.rbs +25 -0
- data/sig/yoomoney/models.rbs +4 -0
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3720ec618b6bda1461affd3652745c26a53bee8dd933b3fe7f3ac78d12a27d2d
|
|
4
|
+
data.tar.gz: cd9cf0bfc9caf25038fc077f9ea3e6fb27c52d00139e7e24c488079a06392e8a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3fa339cf8f608baa8764fa81e8b44e882da02639562bdc5b628a83fc4a502ccf9becbaa9db6debc8281994973a44788dd4fb52ba9354ef40735bdcdd1bc5d81
|
|
7
|
+
data.tar.gz: 59bdf76ecdbc77ba83cd4ad74733329306a2533a1178b1d2aada178bfa76d795aae893570882f7d86a92edd98eaf14975221954e5ba84bf627ab552e005fce1f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0 (2026-02-14)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0...v0.2.0](https://github.com/Hexlet/yoomoney-ruby/compare/v0.1.0...v0.2.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([178e2b8](https://github.com/Hexlet/yoomoney-ruby/commit/178e2b818b6ca12707291d1aaada0787f3cbcc47))
|
|
10
|
+
|
|
3
11
|
## 0.1.0 (2026-02-14)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.0.2...v0.1.0](https://github.com/Hexlet/yoomoney-ruby/compare/v0.0.2...v0.1.0)
|
data/README.md
CHANGED
data/lib/yoomoney/client.rb
CHANGED
|
@@ -15,11 +15,11 @@ module Yoomoney
|
|
|
15
15
|
# Default max retry delay in seconds.
|
|
16
16
|
DEFAULT_MAX_RETRY_DELAY = 8.0
|
|
17
17
|
|
|
18
|
-
# HTTP Basic аутентификация клиента ЮKassa
|
|
18
|
+
# HTTP Basic аутентификация клиента ЮKassa (shopId)
|
|
19
19
|
# @return [String, nil]
|
|
20
20
|
attr_reader :username
|
|
21
21
|
|
|
22
|
-
# HTTP Basic аутентификация клиента ЮKassa
|
|
22
|
+
# HTTP Basic аутентификация клиента ЮKassa (секретный ключ)
|
|
23
23
|
# @return [String, nil]
|
|
24
24
|
attr_reader :password
|
|
25
25
|
|
|
@@ -58,9 +58,11 @@ module Yoomoney
|
|
|
58
58
|
|
|
59
59
|
# Creates and returns a new client for interacting with the API.
|
|
60
60
|
#
|
|
61
|
-
# @param username [String, nil] HTTP Basic аутентификация клиента ЮKassa Defaults to
|
|
61
|
+
# @param username [String, nil] HTTP Basic аутентификация клиента ЮKassa (shopId) Defaults to
|
|
62
|
+
# `ENV["YOOMONEY_USERNAME"]`
|
|
62
63
|
#
|
|
63
|
-
# @param password [String, nil] HTTP Basic аутентификация клиента ЮKassa Defaults to
|
|
64
|
+
# @param password [String, nil] HTTP Basic аутентификация клиента ЮKassa (секретный ключ) Defaults to
|
|
65
|
+
# `ENV["YOOMONEY_PASSWORD"]`
|
|
64
66
|
#
|
|
65
67
|
# @param base_url [String, nil] Override the default base URL for the API, e.g.,
|
|
66
68
|
# `"https://api.example.com/v2/"`. Defaults to `ENV["YOOMONEY_BASE_URL"]`
|
|
@@ -12,29 +12,13 @@ module Yoomoney
|
|
|
12
12
|
# @!attribute settlements
|
|
13
13
|
# Данные о распределении денег.
|
|
14
14
|
#
|
|
15
|
-
# @return [Array<Yoomoney::Models::
|
|
16
|
-
required :settlements, -> { Yoomoney::Internal::Type::ArrayOf[Yoomoney::
|
|
15
|
+
# @return [Array<Yoomoney::Models::SettlementPaymentItem>]
|
|
16
|
+
required :settlements, -> { Yoomoney::Internal::Type::ArrayOf[Yoomoney::SettlementPaymentItem] }
|
|
17
17
|
|
|
18
18
|
# @!method initialize(id:, settlements:)
|
|
19
19
|
# @param id [String] Идентификатор сделки.
|
|
20
20
|
#
|
|
21
|
-
# @param settlements [Array<Yoomoney::Models::
|
|
22
|
-
|
|
23
|
-
class Settlement < Yoomoney::Internal::Type::BaseModel
|
|
24
|
-
# @!attribute amount
|
|
25
|
-
#
|
|
26
|
-
# @return [Yoomoney::Models::MonetaryAmount]
|
|
27
|
-
required :amount, -> { Yoomoney::MonetaryAmount }
|
|
28
|
-
|
|
29
|
-
# @!attribute type
|
|
30
|
-
#
|
|
31
|
-
# @return [Symbol, Yoomoney::Models::SettlementItemType]
|
|
32
|
-
required :type, enum: -> { Yoomoney::SettlementItemType }
|
|
33
|
-
|
|
34
|
-
# @!method initialize(amount:, type:)
|
|
35
|
-
# @param amount [Yoomoney::Models::MonetaryAmount]
|
|
36
|
-
# @param type [Symbol, Yoomoney::Models::SettlementItemType]
|
|
37
|
-
end
|
|
21
|
+
# @param settlements [Array<Yoomoney::Models::SettlementPaymentItem>] Данные о распределении денег.
|
|
38
22
|
end
|
|
39
23
|
end
|
|
40
24
|
end
|
|
@@ -145,32 +145,15 @@ module Yoomoney
|
|
|
145
145
|
# @!attribute refund_settlements
|
|
146
146
|
# Данные о распределении денег.
|
|
147
147
|
#
|
|
148
|
-
# @return [Array<Yoomoney::Models::
|
|
149
|
-
required :refund_settlements,
|
|
150
|
-
-> { Yoomoney::Internal::Type::ArrayOf[Yoomoney::Refund::Deal::RefundSettlement] }
|
|
148
|
+
# @return [Array<Yoomoney::Models::SettlementRefundItem>]
|
|
149
|
+
required :refund_settlements, -> { Yoomoney::Internal::Type::ArrayOf[Yoomoney::SettlementRefundItem] }
|
|
151
150
|
|
|
152
151
|
# @!method initialize(id:, refund_settlements:)
|
|
153
152
|
# Данные о сделке.
|
|
154
153
|
#
|
|
155
154
|
# @param id [String] Идентификатор сделки.
|
|
156
155
|
#
|
|
157
|
-
# @param refund_settlements [Array<Yoomoney::Models::
|
|
158
|
-
|
|
159
|
-
class RefundSettlement < Yoomoney::Internal::Type::BaseModel
|
|
160
|
-
# @!attribute amount
|
|
161
|
-
#
|
|
162
|
-
# @return [Yoomoney::Models::MonetaryAmount]
|
|
163
|
-
required :amount, -> { Yoomoney::MonetaryAmount }
|
|
164
|
-
|
|
165
|
-
# @!attribute type
|
|
166
|
-
#
|
|
167
|
-
# @return [Symbol, Yoomoney::Models::SettlementItemType]
|
|
168
|
-
required :type, enum: -> { Yoomoney::SettlementItemType }
|
|
169
|
-
|
|
170
|
-
# @!method initialize(amount:, type:)
|
|
171
|
-
# @param amount [Yoomoney::Models::MonetaryAmount]
|
|
172
|
-
# @param type [Symbol, Yoomoney::Models::SettlementItemType]
|
|
173
|
-
end
|
|
156
|
+
# @param refund_settlements [Array<Yoomoney::Models::SettlementRefundItem>] Данные о распределении денег.
|
|
174
157
|
end
|
|
175
158
|
|
|
176
159
|
# @see Yoomoney::Models::Refund#refund_authorization_details
|
|
@@ -91,30 +91,13 @@ module Yoomoney
|
|
|
91
91
|
# @!attribute refund_settlements
|
|
92
92
|
# Данные о распределении денег.
|
|
93
93
|
#
|
|
94
|
-
# @return [Array<Yoomoney::Models::
|
|
95
|
-
required :refund_settlements,
|
|
96
|
-
-> { Yoomoney::Internal::Type::ArrayOf[Yoomoney::RefundCreateParams::Deal::RefundSettlement] }
|
|
94
|
+
# @return [Array<Yoomoney::Models::SettlementRefundItem>]
|
|
95
|
+
required :refund_settlements, -> { Yoomoney::Internal::Type::ArrayOf[Yoomoney::SettlementRefundItem] }
|
|
97
96
|
|
|
98
97
|
# @!method initialize(refund_settlements:)
|
|
99
98
|
# Данные о сделке.
|
|
100
99
|
#
|
|
101
|
-
# @param refund_settlements [Array<Yoomoney::Models::
|
|
102
|
-
|
|
103
|
-
class RefundSettlement < Yoomoney::Internal::Type::BaseModel
|
|
104
|
-
# @!attribute amount
|
|
105
|
-
#
|
|
106
|
-
# @return [Yoomoney::Models::MonetaryAmount]
|
|
107
|
-
required :amount, -> { Yoomoney::MonetaryAmount }
|
|
108
|
-
|
|
109
|
-
# @!attribute type
|
|
110
|
-
#
|
|
111
|
-
# @return [Symbol, Yoomoney::Models::SettlementItemType]
|
|
112
|
-
required :type, enum: -> { Yoomoney::SettlementItemType }
|
|
113
|
-
|
|
114
|
-
# @!method initialize(amount:, type:)
|
|
115
|
-
# @param amount [Yoomoney::Models::MonetaryAmount]
|
|
116
|
-
# @param type [Symbol, Yoomoney::Models::SettlementItemType]
|
|
117
|
-
end
|
|
100
|
+
# @param refund_settlements [Array<Yoomoney::Models::SettlementRefundItem>] Данные о распределении денег.
|
|
118
101
|
end
|
|
119
102
|
|
|
120
103
|
class RefundMethodData < Yoomoney::Internal::Type::BaseModel
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Yoomoney
|
|
4
|
+
module Models
|
|
5
|
+
class SettlementPaymentItem < Yoomoney::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute amount
|
|
7
|
+
#
|
|
8
|
+
# @return [Yoomoney::Models::MonetaryAmount]
|
|
9
|
+
required :amount, -> { Yoomoney::MonetaryAmount }
|
|
10
|
+
|
|
11
|
+
# @!attribute type
|
|
12
|
+
#
|
|
13
|
+
# @return [Symbol, Yoomoney::Models::SettlementItemType]
|
|
14
|
+
required :type, enum: -> { Yoomoney::SettlementItemType }
|
|
15
|
+
|
|
16
|
+
# @!method initialize(amount:, type:)
|
|
17
|
+
# @param amount [Yoomoney::Models::MonetaryAmount]
|
|
18
|
+
# @param type [Symbol, Yoomoney::Models::SettlementItemType]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Yoomoney
|
|
4
|
+
module Models
|
|
5
|
+
class SettlementRefundItem < Yoomoney::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute amount
|
|
7
|
+
#
|
|
8
|
+
# @return [Yoomoney::Models::MonetaryAmount]
|
|
9
|
+
required :amount, -> { Yoomoney::MonetaryAmount }
|
|
10
|
+
|
|
11
|
+
# @!attribute type
|
|
12
|
+
#
|
|
13
|
+
# @return [Symbol, Yoomoney::Models::SettlementItemType]
|
|
14
|
+
required :type, enum: -> { Yoomoney::SettlementItemType }
|
|
15
|
+
|
|
16
|
+
# @!method initialize(amount:, type:)
|
|
17
|
+
# @param amount [Yoomoney::Models::MonetaryAmount]
|
|
18
|
+
# @param type [Symbol, Yoomoney::Models::SettlementItemType]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/lib/yoomoney/models.rb
CHANGED
|
@@ -219,6 +219,10 @@ module Yoomoney
|
|
|
219
219
|
|
|
220
220
|
SettlementItemType = Yoomoney::Models::SettlementItemType
|
|
221
221
|
|
|
222
|
+
SettlementPaymentItem = Yoomoney::Models::SettlementPaymentItem
|
|
223
|
+
|
|
224
|
+
SettlementRefundItem = Yoomoney::Models::SettlementRefundItem
|
|
225
|
+
|
|
222
226
|
TransferData = Yoomoney::Models::TransferData
|
|
223
227
|
|
|
224
228
|
Webhook = Yoomoney::Models::Webhook
|
data/lib/yoomoney/version.rb
CHANGED
data/lib/yoomoney.rb
CHANGED
|
@@ -149,6 +149,8 @@ require_relative "yoomoney/models/sbp_bank_list_params"
|
|
|
149
149
|
require_relative "yoomoney/models/sbp_bank_list_response"
|
|
150
150
|
require_relative "yoomoney/models/settlement"
|
|
151
151
|
require_relative "yoomoney/models/settlement_item_type"
|
|
152
|
+
require_relative "yoomoney/models/settlement_payment_item"
|
|
153
|
+
require_relative "yoomoney/models/settlement_refund_item"
|
|
152
154
|
require_relative "yoomoney/models/webhook"
|
|
153
155
|
require_relative "yoomoney/models/webhook_create_params"
|
|
154
156
|
require_relative "yoomoney/models/webhook_delete_params"
|
data/rbi/yoomoney/client.rbi
CHANGED
|
@@ -10,11 +10,11 @@ module Yoomoney
|
|
|
10
10
|
|
|
11
11
|
DEFAULT_MAX_RETRY_DELAY = T.let(8.0, Float)
|
|
12
12
|
|
|
13
|
-
# HTTP Basic аутентификация клиента ЮKassa
|
|
13
|
+
# HTTP Basic аутентификация клиента ЮKassa (shopId)
|
|
14
14
|
sig { returns(T.nilable(String)) }
|
|
15
15
|
attr_reader :username
|
|
16
16
|
|
|
17
|
-
# HTTP Basic аутентификация клиента ЮKassa
|
|
17
|
+
# HTTP Basic аутентификация клиента ЮKassa (секретный ключ)
|
|
18
18
|
sig { returns(T.nilable(String)) }
|
|
19
19
|
attr_reader :password
|
|
20
20
|
|
|
@@ -64,9 +64,11 @@ module Yoomoney
|
|
|
64
64
|
).returns(T.attached_class)
|
|
65
65
|
end
|
|
66
66
|
def self.new(
|
|
67
|
-
# HTTP Basic аутентификация клиента ЮKassa Defaults to
|
|
67
|
+
# HTTP Basic аутентификация клиента ЮKassa (shopId) Defaults to
|
|
68
|
+
# `ENV["YOOMONEY_USERNAME"]`
|
|
68
69
|
username: ENV["YOOMONEY_USERNAME"],
|
|
69
|
-
# HTTP Basic аутентификация клиента ЮKassa Defaults to
|
|
70
|
+
# HTTP Basic аутентификация клиента ЮKassa (секретный ключ) Defaults to
|
|
71
|
+
# `ENV["YOOMONEY_PASSWORD"]`
|
|
70
72
|
password: ENV["YOOMONEY_PASSWORD"],
|
|
71
73
|
# Override the default base URL for the API, e.g.,
|
|
72
74
|
# `"https://api.example.com/v2/"`. Defaults to `ENV["YOOMONEY_BASE_URL"]`
|
|
@@ -13,13 +13,13 @@ module Yoomoney
|
|
|
13
13
|
attr_accessor :id
|
|
14
14
|
|
|
15
15
|
# Данные о распределении денег.
|
|
16
|
-
sig { returns(T::Array[Yoomoney::
|
|
16
|
+
sig { returns(T::Array[Yoomoney::SettlementPaymentItem]) }
|
|
17
17
|
attr_accessor :settlements
|
|
18
18
|
|
|
19
19
|
sig do
|
|
20
20
|
params(
|
|
21
21
|
id: String,
|
|
22
|
-
settlements: T::Array[Yoomoney::
|
|
22
|
+
settlements: T::Array[Yoomoney::SettlementPaymentItem::OrHash]
|
|
23
23
|
).returns(T.attached_class)
|
|
24
24
|
end
|
|
25
25
|
def self.new(
|
|
@@ -32,53 +32,11 @@ module Yoomoney
|
|
|
32
32
|
|
|
33
33
|
sig do
|
|
34
34
|
override.returns(
|
|
35
|
-
{
|
|
36
|
-
id: String,
|
|
37
|
-
settlements: T::Array[Yoomoney::PaymentDealInfo::Settlement]
|
|
38
|
-
}
|
|
35
|
+
{ id: String, settlements: T::Array[Yoomoney::SettlementPaymentItem] }
|
|
39
36
|
)
|
|
40
37
|
end
|
|
41
38
|
def to_hash
|
|
42
39
|
end
|
|
43
|
-
|
|
44
|
-
class Settlement < Yoomoney::Internal::Type::BaseModel
|
|
45
|
-
OrHash =
|
|
46
|
-
T.type_alias do
|
|
47
|
-
T.any(
|
|
48
|
-
Yoomoney::PaymentDealInfo::Settlement,
|
|
49
|
-
Yoomoney::Internal::AnyHash
|
|
50
|
-
)
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
sig { returns(Yoomoney::MonetaryAmount) }
|
|
54
|
-
attr_reader :amount
|
|
55
|
-
|
|
56
|
-
sig { params(amount: Yoomoney::MonetaryAmount::OrHash).void }
|
|
57
|
-
attr_writer :amount
|
|
58
|
-
|
|
59
|
-
sig { returns(Yoomoney::SettlementItemType::OrSymbol) }
|
|
60
|
-
attr_accessor :type
|
|
61
|
-
|
|
62
|
-
sig do
|
|
63
|
-
params(
|
|
64
|
-
amount: Yoomoney::MonetaryAmount::OrHash,
|
|
65
|
-
type: Yoomoney::SettlementItemType::OrSymbol
|
|
66
|
-
).returns(T.attached_class)
|
|
67
|
-
end
|
|
68
|
-
def self.new(amount:, type:)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
sig do
|
|
72
|
-
override.returns(
|
|
73
|
-
{
|
|
74
|
-
amount: Yoomoney::MonetaryAmount,
|
|
75
|
-
type: Yoomoney::SettlementItemType::OrSymbol
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
end
|
|
79
|
-
def to_hash
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
40
|
end
|
|
83
41
|
end
|
|
84
42
|
end
|
|
@@ -228,15 +228,14 @@ module Yoomoney
|
|
|
228
228
|
attr_accessor :id
|
|
229
229
|
|
|
230
230
|
# Данные о распределении денег.
|
|
231
|
-
sig { returns(T::Array[Yoomoney::
|
|
231
|
+
sig { returns(T::Array[Yoomoney::SettlementRefundItem]) }
|
|
232
232
|
attr_accessor :refund_settlements
|
|
233
233
|
|
|
234
234
|
# Данные о сделке.
|
|
235
235
|
sig do
|
|
236
236
|
params(
|
|
237
237
|
id: String,
|
|
238
|
-
refund_settlements:
|
|
239
|
-
T::Array[Yoomoney::Refund::Deal::RefundSettlement::OrHash]
|
|
238
|
+
refund_settlements: T::Array[Yoomoney::SettlementRefundItem::OrHash]
|
|
240
239
|
).returns(T.attached_class)
|
|
241
240
|
end
|
|
242
241
|
def self.new(
|
|
@@ -251,52 +250,12 @@ module Yoomoney
|
|
|
251
250
|
override.returns(
|
|
252
251
|
{
|
|
253
252
|
id: String,
|
|
254
|
-
refund_settlements:
|
|
255
|
-
T::Array[Yoomoney::Refund::Deal::RefundSettlement]
|
|
253
|
+
refund_settlements: T::Array[Yoomoney::SettlementRefundItem]
|
|
256
254
|
}
|
|
257
255
|
)
|
|
258
256
|
end
|
|
259
257
|
def to_hash
|
|
260
258
|
end
|
|
261
|
-
|
|
262
|
-
class RefundSettlement < Yoomoney::Internal::Type::BaseModel
|
|
263
|
-
OrHash =
|
|
264
|
-
T.type_alias do
|
|
265
|
-
T.any(
|
|
266
|
-
Yoomoney::Refund::Deal::RefundSettlement,
|
|
267
|
-
Yoomoney::Internal::AnyHash
|
|
268
|
-
)
|
|
269
|
-
end
|
|
270
|
-
|
|
271
|
-
sig { returns(Yoomoney::MonetaryAmount) }
|
|
272
|
-
attr_reader :amount
|
|
273
|
-
|
|
274
|
-
sig { params(amount: Yoomoney::MonetaryAmount::OrHash).void }
|
|
275
|
-
attr_writer :amount
|
|
276
|
-
|
|
277
|
-
sig { returns(Yoomoney::SettlementItemType::TaggedSymbol) }
|
|
278
|
-
attr_accessor :type
|
|
279
|
-
|
|
280
|
-
sig do
|
|
281
|
-
params(
|
|
282
|
-
amount: Yoomoney::MonetaryAmount::OrHash,
|
|
283
|
-
type: Yoomoney::SettlementItemType::OrSymbol
|
|
284
|
-
).returns(T.attached_class)
|
|
285
|
-
end
|
|
286
|
-
def self.new(amount:, type:)
|
|
287
|
-
end
|
|
288
|
-
|
|
289
|
-
sig do
|
|
290
|
-
override.returns(
|
|
291
|
-
{
|
|
292
|
-
amount: Yoomoney::MonetaryAmount,
|
|
293
|
-
type: Yoomoney::SettlementItemType::TaggedSymbol
|
|
294
|
-
}
|
|
295
|
-
)
|
|
296
|
-
end
|
|
297
|
-
def to_hash
|
|
298
|
-
end
|
|
299
|
-
end
|
|
300
259
|
end
|
|
301
260
|
|
|
302
261
|
class RefundAuthorizationDetails < Yoomoney::Internal::Type::BaseModel
|
|
@@ -146,20 +146,13 @@ module Yoomoney
|
|
|
146
146
|
end
|
|
147
147
|
|
|
148
148
|
# Данные о распределении денег.
|
|
149
|
-
sig
|
|
150
|
-
returns(
|
|
151
|
-
T::Array[Yoomoney::RefundCreateParams::Deal::RefundSettlement]
|
|
152
|
-
)
|
|
153
|
-
end
|
|
149
|
+
sig { returns(T::Array[Yoomoney::SettlementRefundItem]) }
|
|
154
150
|
attr_accessor :refund_settlements
|
|
155
151
|
|
|
156
152
|
# Данные о сделке.
|
|
157
153
|
sig do
|
|
158
154
|
params(
|
|
159
|
-
refund_settlements:
|
|
160
|
-
T::Array[
|
|
161
|
-
Yoomoney::RefundCreateParams::Deal::RefundSettlement::OrHash
|
|
162
|
-
]
|
|
155
|
+
refund_settlements: T::Array[Yoomoney::SettlementRefundItem::OrHash]
|
|
163
156
|
).returns(T.attached_class)
|
|
164
157
|
end
|
|
165
158
|
def self.new(
|
|
@@ -170,53 +163,11 @@ module Yoomoney
|
|
|
170
163
|
|
|
171
164
|
sig do
|
|
172
165
|
override.returns(
|
|
173
|
-
{
|
|
174
|
-
refund_settlements:
|
|
175
|
-
T::Array[Yoomoney::RefundCreateParams::Deal::RefundSettlement]
|
|
176
|
-
}
|
|
166
|
+
{ refund_settlements: T::Array[Yoomoney::SettlementRefundItem] }
|
|
177
167
|
)
|
|
178
168
|
end
|
|
179
169
|
def to_hash
|
|
180
170
|
end
|
|
181
|
-
|
|
182
|
-
class RefundSettlement < Yoomoney::Internal::Type::BaseModel
|
|
183
|
-
OrHash =
|
|
184
|
-
T.type_alias do
|
|
185
|
-
T.any(
|
|
186
|
-
Yoomoney::RefundCreateParams::Deal::RefundSettlement,
|
|
187
|
-
Yoomoney::Internal::AnyHash
|
|
188
|
-
)
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
sig { returns(Yoomoney::MonetaryAmount) }
|
|
192
|
-
attr_reader :amount
|
|
193
|
-
|
|
194
|
-
sig { params(amount: Yoomoney::MonetaryAmount::OrHash).void }
|
|
195
|
-
attr_writer :amount
|
|
196
|
-
|
|
197
|
-
sig { returns(Yoomoney::SettlementItemType::OrSymbol) }
|
|
198
|
-
attr_accessor :type
|
|
199
|
-
|
|
200
|
-
sig do
|
|
201
|
-
params(
|
|
202
|
-
amount: Yoomoney::MonetaryAmount::OrHash,
|
|
203
|
-
type: Yoomoney::SettlementItemType::OrSymbol
|
|
204
|
-
).returns(T.attached_class)
|
|
205
|
-
end
|
|
206
|
-
def self.new(amount:, type:)
|
|
207
|
-
end
|
|
208
|
-
|
|
209
|
-
sig do
|
|
210
|
-
override.returns(
|
|
211
|
-
{
|
|
212
|
-
amount: Yoomoney::MonetaryAmount,
|
|
213
|
-
type: Yoomoney::SettlementItemType::OrSymbol
|
|
214
|
-
}
|
|
215
|
-
)
|
|
216
|
-
end
|
|
217
|
-
def to_hash
|
|
218
|
-
end
|
|
219
|
-
end
|
|
220
171
|
end
|
|
221
172
|
|
|
222
173
|
class RefundMethodData < Yoomoney::Internal::Type::BaseModel
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Yoomoney
|
|
4
|
+
module Models
|
|
5
|
+
class SettlementPaymentItem < Yoomoney::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Yoomoney::SettlementPaymentItem, Yoomoney::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(Yoomoney::MonetaryAmount) }
|
|
12
|
+
attr_reader :amount
|
|
13
|
+
|
|
14
|
+
sig { params(amount: Yoomoney::MonetaryAmount::OrHash).void }
|
|
15
|
+
attr_writer :amount
|
|
16
|
+
|
|
17
|
+
sig { returns(Yoomoney::SettlementItemType::OrSymbol) }
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
amount: Yoomoney::MonetaryAmount::OrHash,
|
|
23
|
+
type: Yoomoney::SettlementItemType::OrSymbol
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(amount:, type:)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{
|
|
32
|
+
amount: Yoomoney::MonetaryAmount,
|
|
33
|
+
type: Yoomoney::SettlementItemType::OrSymbol
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
def to_hash
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Yoomoney
|
|
4
|
+
module Models
|
|
5
|
+
class SettlementRefundItem < Yoomoney::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Yoomoney::SettlementRefundItem, Yoomoney::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(Yoomoney::MonetaryAmount) }
|
|
12
|
+
attr_reader :amount
|
|
13
|
+
|
|
14
|
+
sig { params(amount: Yoomoney::MonetaryAmount::OrHash).void }
|
|
15
|
+
attr_writer :amount
|
|
16
|
+
|
|
17
|
+
sig { returns(Yoomoney::SettlementItemType::OrSymbol) }
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
amount: Yoomoney::MonetaryAmount::OrHash,
|
|
23
|
+
type: Yoomoney::SettlementItemType::OrSymbol
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(amount:, type:)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{
|
|
32
|
+
amount: Yoomoney::MonetaryAmount,
|
|
33
|
+
type: Yoomoney::SettlementItemType::OrSymbol
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
def to_hash
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
data/rbi/yoomoney/models.rbi
CHANGED
|
@@ -183,6 +183,10 @@ module Yoomoney
|
|
|
183
183
|
|
|
184
184
|
SettlementItemType = Yoomoney::Models::SettlementItemType
|
|
185
185
|
|
|
186
|
+
SettlementPaymentItem = Yoomoney::Models::SettlementPaymentItem
|
|
187
|
+
|
|
188
|
+
SettlementRefundItem = Yoomoney::Models::SettlementRefundItem
|
|
189
|
+
|
|
186
190
|
TransferData = Yoomoney::Models::TransferData
|
|
187
191
|
|
|
188
192
|
Webhook = Yoomoney::Models::Webhook
|
|
@@ -1,47 +1,22 @@
|
|
|
1
1
|
module Yoomoney
|
|
2
2
|
module Models
|
|
3
3
|
type payment_deal_info =
|
|
4
|
-
{
|
|
5
|
-
id: String,
|
|
6
|
-
settlements: ::Array[Yoomoney::PaymentDealInfo::Settlement]
|
|
7
|
-
}
|
|
4
|
+
{ id: String, settlements: ::Array[Yoomoney::SettlementPaymentItem] }
|
|
8
5
|
|
|
9
6
|
class PaymentDealInfo < Yoomoney::Internal::Type::BaseModel
|
|
10
7
|
attr_accessor id: String
|
|
11
8
|
|
|
12
|
-
attr_accessor settlements: ::Array[Yoomoney::
|
|
9
|
+
attr_accessor settlements: ::Array[Yoomoney::SettlementPaymentItem]
|
|
13
10
|
|
|
14
11
|
def initialize: (
|
|
15
12
|
id: String,
|
|
16
|
-
settlements: ::Array[Yoomoney::
|
|
13
|
+
settlements: ::Array[Yoomoney::SettlementPaymentItem]
|
|
17
14
|
) -> void
|
|
18
15
|
|
|
19
16
|
def to_hash: -> {
|
|
20
17
|
id: String,
|
|
21
|
-
settlements: ::Array[Yoomoney::
|
|
18
|
+
settlements: ::Array[Yoomoney::SettlementPaymentItem]
|
|
22
19
|
}
|
|
23
|
-
|
|
24
|
-
type settlement =
|
|
25
|
-
{
|
|
26
|
-
amount: Yoomoney::MonetaryAmount,
|
|
27
|
-
type: Yoomoney::Models::settlement_item_type
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
class Settlement < Yoomoney::Internal::Type::BaseModel
|
|
31
|
-
attr_accessor amount: Yoomoney::MonetaryAmount
|
|
32
|
-
|
|
33
|
-
attr_accessor type: Yoomoney::Models::settlement_item_type
|
|
34
|
-
|
|
35
|
-
def initialize: (
|
|
36
|
-
amount: Yoomoney::MonetaryAmount,
|
|
37
|
-
type: Yoomoney::Models::settlement_item_type
|
|
38
|
-
) -> void
|
|
39
|
-
|
|
40
|
-
def to_hash: -> {
|
|
41
|
-
amount: Yoomoney::MonetaryAmount,
|
|
42
|
-
type: Yoomoney::Models::settlement_item_type
|
|
43
|
-
}
|
|
44
|
-
end
|
|
45
20
|
end
|
|
46
21
|
end
|
|
47
22
|
end
|
|
@@ -117,45 +117,23 @@ module Yoomoney
|
|
|
117
117
|
type deal =
|
|
118
118
|
{
|
|
119
119
|
id: String,
|
|
120
|
-
refund_settlements: ::Array[Yoomoney::
|
|
120
|
+
refund_settlements: ::Array[Yoomoney::SettlementRefundItem]
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
class Deal < Yoomoney::Internal::Type::BaseModel
|
|
124
124
|
attr_accessor id: String
|
|
125
125
|
|
|
126
|
-
attr_accessor refund_settlements: ::Array[Yoomoney::
|
|
126
|
+
attr_accessor refund_settlements: ::Array[Yoomoney::SettlementRefundItem]
|
|
127
127
|
|
|
128
128
|
def initialize: (
|
|
129
129
|
id: String,
|
|
130
|
-
refund_settlements: ::Array[Yoomoney::
|
|
130
|
+
refund_settlements: ::Array[Yoomoney::SettlementRefundItem]
|
|
131
131
|
) -> void
|
|
132
132
|
|
|
133
133
|
def to_hash: -> {
|
|
134
134
|
id: String,
|
|
135
|
-
refund_settlements: ::Array[Yoomoney::
|
|
135
|
+
refund_settlements: ::Array[Yoomoney::SettlementRefundItem]
|
|
136
136
|
}
|
|
137
|
-
|
|
138
|
-
type refund_settlement =
|
|
139
|
-
{
|
|
140
|
-
amount: Yoomoney::MonetaryAmount,
|
|
141
|
-
type: Yoomoney::Models::settlement_item_type
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
class RefundSettlement < Yoomoney::Internal::Type::BaseModel
|
|
145
|
-
attr_accessor amount: Yoomoney::MonetaryAmount
|
|
146
|
-
|
|
147
|
-
attr_accessor type: Yoomoney::Models::settlement_item_type
|
|
148
|
-
|
|
149
|
-
def initialize: (
|
|
150
|
-
amount: Yoomoney::MonetaryAmount,
|
|
151
|
-
type: Yoomoney::Models::settlement_item_type
|
|
152
|
-
) -> void
|
|
153
|
-
|
|
154
|
-
def to_hash: -> {
|
|
155
|
-
amount: Yoomoney::MonetaryAmount,
|
|
156
|
-
type: Yoomoney::Models::settlement_item_type
|
|
157
|
-
}
|
|
158
|
-
end
|
|
159
137
|
end
|
|
160
138
|
|
|
161
139
|
type refund_authorization_details = { rrn: String }
|
|
@@ -81,42 +81,18 @@ module Yoomoney
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
type deal =
|
|
84
|
-
{
|
|
85
|
-
refund_settlements: ::Array[Yoomoney::RefundCreateParams::Deal::RefundSettlement]
|
|
86
|
-
}
|
|
84
|
+
{ refund_settlements: ::Array[Yoomoney::SettlementRefundItem] }
|
|
87
85
|
|
|
88
86
|
class Deal < Yoomoney::Internal::Type::BaseModel
|
|
89
|
-
attr_accessor refund_settlements: ::Array[Yoomoney::
|
|
87
|
+
attr_accessor refund_settlements: ::Array[Yoomoney::SettlementRefundItem]
|
|
90
88
|
|
|
91
89
|
def initialize: (
|
|
92
|
-
refund_settlements: ::Array[Yoomoney::
|
|
90
|
+
refund_settlements: ::Array[Yoomoney::SettlementRefundItem]
|
|
93
91
|
) -> void
|
|
94
92
|
|
|
95
93
|
def to_hash: -> {
|
|
96
|
-
refund_settlements: ::Array[Yoomoney::
|
|
94
|
+
refund_settlements: ::Array[Yoomoney::SettlementRefundItem]
|
|
97
95
|
}
|
|
98
|
-
|
|
99
|
-
type refund_settlement =
|
|
100
|
-
{
|
|
101
|
-
amount: Yoomoney::MonetaryAmount,
|
|
102
|
-
type: Yoomoney::Models::settlement_item_type
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
class RefundSettlement < Yoomoney::Internal::Type::BaseModel
|
|
106
|
-
attr_accessor amount: Yoomoney::MonetaryAmount
|
|
107
|
-
|
|
108
|
-
attr_accessor type: Yoomoney::Models::settlement_item_type
|
|
109
|
-
|
|
110
|
-
def initialize: (
|
|
111
|
-
amount: Yoomoney::MonetaryAmount,
|
|
112
|
-
type: Yoomoney::Models::settlement_item_type
|
|
113
|
-
) -> void
|
|
114
|
-
|
|
115
|
-
def to_hash: -> {
|
|
116
|
-
amount: Yoomoney::MonetaryAmount,
|
|
117
|
-
type: Yoomoney::Models::settlement_item_type
|
|
118
|
-
}
|
|
119
|
-
end
|
|
120
96
|
end
|
|
121
97
|
|
|
122
98
|
type refund_method_data = { type: Yoomoney::Models::refund_method_type }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Yoomoney
|
|
2
|
+
module Models
|
|
3
|
+
type settlement_payment_item =
|
|
4
|
+
{
|
|
5
|
+
amount: Yoomoney::MonetaryAmount,
|
|
6
|
+
type: Yoomoney::Models::settlement_item_type
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
class SettlementPaymentItem < Yoomoney::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor amount: Yoomoney::MonetaryAmount
|
|
11
|
+
|
|
12
|
+
attr_accessor type: Yoomoney::Models::settlement_item_type
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
amount: Yoomoney::MonetaryAmount,
|
|
16
|
+
type: Yoomoney::Models::settlement_item_type
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> {
|
|
20
|
+
amount: Yoomoney::MonetaryAmount,
|
|
21
|
+
type: Yoomoney::Models::settlement_item_type
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Yoomoney
|
|
2
|
+
module Models
|
|
3
|
+
type settlement_refund_item =
|
|
4
|
+
{
|
|
5
|
+
amount: Yoomoney::MonetaryAmount,
|
|
6
|
+
type: Yoomoney::Models::settlement_item_type
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
class SettlementRefundItem < Yoomoney::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor amount: Yoomoney::MonetaryAmount
|
|
11
|
+
|
|
12
|
+
attr_accessor type: Yoomoney::Models::settlement_item_type
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
amount: Yoomoney::MonetaryAmount,
|
|
16
|
+
type: Yoomoney::Models::settlement_item_type
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> {
|
|
20
|
+
amount: Yoomoney::MonetaryAmount,
|
|
21
|
+
type: Yoomoney::Models::settlement_item_type
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
data/sig/yoomoney/models.rbs
CHANGED
|
@@ -179,6 +179,10 @@ module Yoomoney
|
|
|
179
179
|
|
|
180
180
|
module SettlementItemType = Yoomoney::Models::SettlementItemType
|
|
181
181
|
|
|
182
|
+
class SettlementPaymentItem = Yoomoney::Models::SettlementPaymentItem
|
|
183
|
+
|
|
184
|
+
class SettlementRefundItem = Yoomoney::Models::SettlementRefundItem
|
|
185
|
+
|
|
182
186
|
class TransferData = Yoomoney::Models::TransferData
|
|
183
187
|
|
|
184
188
|
class Webhook = Yoomoney::Models::Webhook
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yoomoney
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yoomoney
|
|
@@ -165,6 +165,8 @@ files:
|
|
|
165
165
|
- lib/yoomoney/models/sbp_bank_list_response.rb
|
|
166
166
|
- lib/yoomoney/models/settlement.rb
|
|
167
167
|
- lib/yoomoney/models/settlement_item_type.rb
|
|
168
|
+
- lib/yoomoney/models/settlement_payment_item.rb
|
|
169
|
+
- lib/yoomoney/models/settlement_refund_item.rb
|
|
168
170
|
- lib/yoomoney/models/transfer_data.rb
|
|
169
171
|
- lib/yoomoney/models/webhook.rb
|
|
170
172
|
- lib/yoomoney/models/webhook_create_params.rb
|
|
@@ -301,6 +303,8 @@ files:
|
|
|
301
303
|
- rbi/yoomoney/models/sbp_bank_list_response.rbi
|
|
302
304
|
- rbi/yoomoney/models/settlement.rbi
|
|
303
305
|
- rbi/yoomoney/models/settlement_item_type.rbi
|
|
306
|
+
- rbi/yoomoney/models/settlement_payment_item.rbi
|
|
307
|
+
- rbi/yoomoney/models/settlement_refund_item.rbi
|
|
304
308
|
- rbi/yoomoney/models/transfer_data.rbi
|
|
305
309
|
- rbi/yoomoney/models/webhook.rbi
|
|
306
310
|
- rbi/yoomoney/models/webhook_create_params.rbi
|
|
@@ -436,6 +440,8 @@ files:
|
|
|
436
440
|
- sig/yoomoney/models/sbp_bank_list_response.rbs
|
|
437
441
|
- sig/yoomoney/models/settlement.rbs
|
|
438
442
|
- sig/yoomoney/models/settlement_item_type.rbs
|
|
443
|
+
- sig/yoomoney/models/settlement_payment_item.rbs
|
|
444
|
+
- sig/yoomoney/models/settlement_refund_item.rbs
|
|
439
445
|
- sig/yoomoney/models/transfer_data.rbs
|
|
440
446
|
- sig/yoomoney/models/webhook.rbs
|
|
441
447
|
- sig/yoomoney/models/webhook_create_params.rbs
|