yoomoney 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +5 -2
  4. data/lib/yoomoney/client.rb +16 -4
  5. data/lib/yoomoney/internal/transport/base_client.rb +6 -0
  6. data/lib/yoomoney/models/airline.rb +6 -50
  7. data/lib/yoomoney/models/airline_leg.rb +33 -0
  8. data/lib/yoomoney/models/airline_passenger.rb +21 -0
  9. data/lib/yoomoney/models/payment_deal_info.rb +3 -19
  10. data/lib/yoomoney/models/receipt_create_params.rb +2 -120
  11. data/lib/yoomoney/models/receipt_data.rb +3 -123
  12. data/lib/yoomoney/models/receipt_data_item.rb +125 -0
  13. data/lib/yoomoney/models/refund.rb +3 -20
  14. data/lib/yoomoney/models/refund_create_params.rb +3 -20
  15. data/lib/yoomoney/models/settlement_payment_item.rb +21 -0
  16. data/lib/yoomoney/models/settlement_refund_item.rb +21 -0
  17. data/lib/yoomoney/models.rb +10 -0
  18. data/lib/yoomoney/version.rb +1 -1
  19. data/lib/yoomoney.rb +5 -0
  20. data/rbi/yoomoney/client.rbi +11 -4
  21. data/rbi/yoomoney/internal/transport/base_client.rbi +5 -0
  22. data/rbi/yoomoney/models/airline.rbi +8 -84
  23. data/rbi/yoomoney/models/airline_leg.rbi +56 -0
  24. data/rbi/yoomoney/models/airline_passenger.rbi +28 -0
  25. data/rbi/yoomoney/models/payment_deal_info.rbi +3 -45
  26. data/rbi/yoomoney/models/receipt_create_params.rbi +1 -159
  27. data/rbi/yoomoney/models/receipt_data.rbi +3 -185
  28. data/rbi/yoomoney/models/receipt_data_item.rbi +185 -0
  29. data/rbi/yoomoney/models/refund.rbi +3 -44
  30. data/rbi/yoomoney/models/refund_create_params.rbi +3 -52
  31. data/rbi/yoomoney/models/settlement_payment_item.rbi +41 -0
  32. data/rbi/yoomoney/models/settlement_refund_item.rbi +41 -0
  33. data/rbi/yoomoney/models.rbi +10 -0
  34. data/sig/yoomoney/client.rbs +2 -0
  35. data/sig/yoomoney/internal/transport/base_client.rbs +2 -0
  36. data/sig/yoomoney/models/airline.rbs +12 -58
  37. data/sig/yoomoney/models/airline_leg.rbs +37 -0
  38. data/sig/yoomoney/models/airline_passenger.rbs +15 -0
  39. data/sig/yoomoney/models/payment_deal_info.rbs +4 -29
  40. data/sig/yoomoney/models/receipt_create_params.rbs +7 -119
  41. data/sig/yoomoney/models/receipt_data.rbs +4 -128
  42. data/sig/yoomoney/models/receipt_data_item.rbs +127 -0
  43. data/sig/yoomoney/models/refund.rbs +4 -26
  44. data/sig/yoomoney/models/refund_create_params.rbs +4 -28
  45. data/sig/yoomoney/models/settlement_payment_item.rbs +25 -0
  46. data/sig/yoomoney/models/settlement_refund_item.rbs +25 -0
  47. data/sig/yoomoney/models.rbs +10 -0
  48. metadata +17 -2
@@ -196,7 +196,7 @@ module Yoomoney
196
196
  def to_hash
197
197
  end
198
198
 
199
- class Item < Yoomoney::Internal::Type::BaseModel
199
+ class Item < Yoomoney::Models::ReceiptDataItem
200
200
  OrHash =
201
201
  T.type_alias do
202
202
  T.any(
@@ -205,25 +205,6 @@ module Yoomoney
205
205
  )
206
206
  end
207
207
 
208
- # Сумма.
209
- sig { returns(Yoomoney::MonetaryAmount) }
210
- attr_reader :amount
211
-
212
- sig { params(amount: Yoomoney::MonetaryAmount::OrHash).void }
213
- attr_writer :amount
214
-
215
- # Название товара.
216
- sig { returns(String) }
217
- attr_accessor :description
218
-
219
- # Количество.
220
- sig { returns(Float) }
221
- attr_accessor :quantity
222
-
223
- # Ставка НДС.
224
- sig { returns(Integer) }
225
- attr_accessor :vat_code
226
-
227
208
  # Дополнительный реквизит предмета расчета.
228
209
  sig { returns(T.nilable(String)) }
229
210
  attr_reader :additional_payment_subject_props
@@ -239,91 +220,6 @@ module Yoomoney
239
220
  end
240
221
  attr_writer :agent_type
241
222
 
242
- sig { returns(T.nilable(String)) }
243
- attr_reader :country_of_origin_code
244
-
245
- sig { params(country_of_origin_code: String).void }
246
- attr_writer :country_of_origin_code
247
-
248
- sig { returns(T.nilable(String)) }
249
- attr_reader :customs_declaration_number
250
-
251
- sig { params(customs_declaration_number: String).void }
252
- attr_writer :customs_declaration_number
253
-
254
- sig { returns(T.nilable(String)) }
255
- attr_reader :excise
256
-
257
- sig { params(excise: String).void }
258
- attr_writer :excise
259
-
260
- sig { returns(T.nilable(Yoomoney::MarkCodeInfo)) }
261
- attr_reader :mark_code_info
262
-
263
- sig { params(mark_code_info: Yoomoney::MarkCodeInfo::OrHash).void }
264
- attr_writer :mark_code_info
265
-
266
- sig { returns(T.nilable(String)) }
267
- attr_reader :mark_mode
268
-
269
- sig { params(mark_mode: String).void }
270
- attr_writer :mark_mode
271
-
272
- sig { returns(T.nilable(Yoomoney::MarkQuantity)) }
273
- attr_reader :mark_quantity
274
-
275
- sig { params(mark_quantity: Yoomoney::MarkQuantity::OrHash).void }
276
- attr_writer :mark_quantity
277
-
278
- sig { returns(T.nilable(Yoomoney::ReceiptItemMeasure::OrSymbol)) }
279
- attr_reader :measure
280
-
281
- sig { params(measure: Yoomoney::ReceiptItemMeasure::OrSymbol).void }
282
- attr_writer :measure
283
-
284
- sig { returns(T.nilable(Yoomoney::ReceiptItemPaymentMode::OrSymbol)) }
285
- attr_reader :payment_mode
286
-
287
- sig do
288
- params(payment_mode: Yoomoney::ReceiptItemPaymentMode::OrSymbol).void
289
- end
290
- attr_writer :payment_mode
291
-
292
- sig do
293
- returns(T.nilable(Yoomoney::ReceiptItemPaymentSubject::OrSymbol))
294
- end
295
- attr_reader :payment_subject
296
-
297
- sig do
298
- params(
299
- payment_subject: Yoomoney::ReceiptItemPaymentSubject::OrSymbol
300
- ).void
301
- end
302
- attr_writer :payment_subject
303
-
304
- sig { returns(T.nilable(T::Array[Yoomoney::IndustryDetails])) }
305
- attr_reader :payment_subject_industry_details
306
-
307
- sig do
308
- params(
309
- payment_subject_industry_details:
310
- T::Array[Yoomoney::IndustryDetails::OrHash]
311
- ).void
312
- end
313
- attr_writer :payment_subject_industry_details
314
-
315
- sig { returns(T.nilable(Integer)) }
316
- attr_reader :planned_status
317
-
318
- sig { params(planned_status: Integer).void }
319
- attr_writer :planned_status
320
-
321
- sig { returns(T.nilable(String)) }
322
- attr_reader :product_code
323
-
324
- sig { params(product_code: String).void }
325
- attr_writer :product_code
326
-
327
223
  sig do
328
224
  returns(T.nilable(Yoomoney::ReceiptCreateParams::Item::Supplier))
329
225
  end
@@ -338,52 +234,15 @@ module Yoomoney
338
234
 
339
235
  sig do
340
236
  params(
341
- amount: Yoomoney::MonetaryAmount::OrHash,
342
- description: String,
343
- quantity: Float,
344
- vat_code: Integer,
345
237
  additional_payment_subject_props: String,
346
238
  agent_type: Yoomoney::ReceiptItemAgentType::OrSymbol,
347
- country_of_origin_code: String,
348
- customs_declaration_number: String,
349
- excise: String,
350
- mark_code_info: Yoomoney::MarkCodeInfo::OrHash,
351
- mark_mode: String,
352
- mark_quantity: Yoomoney::MarkQuantity::OrHash,
353
- measure: Yoomoney::ReceiptItemMeasure::OrSymbol,
354
- payment_mode: Yoomoney::ReceiptItemPaymentMode::OrSymbol,
355
- payment_subject: Yoomoney::ReceiptItemPaymentSubject::OrSymbol,
356
- payment_subject_industry_details:
357
- T::Array[Yoomoney::IndustryDetails::OrHash],
358
- planned_status: Integer,
359
- product_code: String,
360
239
  supplier: Yoomoney::ReceiptCreateParams::Item::Supplier::OrHash
361
240
  ).returns(T.attached_class)
362
241
  end
363
242
  def self.new(
364
- # Сумма.
365
- amount:,
366
- # Название товара.
367
- description:,
368
- # Количество.
369
- quantity:,
370
- # Ставка НДС.
371
- vat_code:,
372
243
  # Дополнительный реквизит предмета расчета.
373
244
  additional_payment_subject_props: nil,
374
245
  agent_type: nil,
375
- country_of_origin_code: nil,
376
- customs_declaration_number: nil,
377
- excise: nil,
378
- mark_code_info: nil,
379
- mark_mode: nil,
380
- mark_quantity: nil,
381
- measure: nil,
382
- payment_mode: nil,
383
- payment_subject: nil,
384
- payment_subject_industry_details: nil,
385
- planned_status: nil,
386
- product_code: nil,
387
246
  supplier: nil
388
247
  )
389
248
  end
@@ -391,25 +250,8 @@ module Yoomoney
391
250
  sig do
392
251
  override.returns(
393
252
  {
394
- amount: Yoomoney::MonetaryAmount,
395
- description: String,
396
- quantity: Float,
397
- vat_code: Integer,
398
253
  additional_payment_subject_props: String,
399
254
  agent_type: Yoomoney::ReceiptItemAgentType::OrSymbol,
400
- country_of_origin_code: String,
401
- customs_declaration_number: String,
402
- excise: String,
403
- mark_code_info: Yoomoney::MarkCodeInfo,
404
- mark_mode: String,
405
- mark_quantity: Yoomoney::MarkQuantity,
406
- measure: Yoomoney::ReceiptItemMeasure::OrSymbol,
407
- payment_mode: Yoomoney::ReceiptItemPaymentMode::OrSymbol,
408
- payment_subject: Yoomoney::ReceiptItemPaymentSubject::OrSymbol,
409
- payment_subject_industry_details:
410
- T::Array[Yoomoney::IndustryDetails],
411
- planned_status: Integer,
412
- product_code: String,
413
255
  supplier: Yoomoney::ReceiptCreateParams::Item::Supplier
414
256
  }
415
257
  )
@@ -8,7 +8,7 @@ module Yoomoney
8
8
  T.any(Yoomoney::ReceiptData, Yoomoney::Internal::AnyHash)
9
9
  end
10
10
 
11
- sig { returns(T::Array[Yoomoney::ReceiptData::Item]) }
11
+ sig { returns(T::Array[Yoomoney::ReceiptDataItem]) }
12
12
  attr_accessor :items
13
13
 
14
14
  sig { returns(T.nilable(Yoomoney::ReceiptDataCustomer)) }
@@ -57,7 +57,7 @@ module Yoomoney
57
57
 
58
58
  sig do
59
59
  params(
60
- items: T::Array[Yoomoney::ReceiptData::Item::OrHash],
60
+ items: T::Array[Yoomoney::ReceiptDataItem::OrHash],
61
61
  customer: Yoomoney::ReceiptDataCustomer::OrHash,
62
62
  internet: T::Boolean,
63
63
  receipt_industry_details: T::Array[Yoomoney::IndustryDetails::OrHash],
@@ -80,7 +80,7 @@ module Yoomoney
80
80
  sig do
81
81
  override.returns(
82
82
  {
83
- items: T::Array[Yoomoney::ReceiptData::Item],
83
+ items: T::Array[Yoomoney::ReceiptDataItem],
84
84
  customer: Yoomoney::ReceiptDataCustomer,
85
85
  internet: T::Boolean,
86
86
  receipt_industry_details: T::Array[Yoomoney::IndustryDetails],
@@ -92,188 +92,6 @@ module Yoomoney
92
92
  end
93
93
  def to_hash
94
94
  end
95
-
96
- class Item < Yoomoney::Internal::Type::BaseModel
97
- OrHash =
98
- T.type_alias do
99
- T.any(Yoomoney::ReceiptData::Item, Yoomoney::Internal::AnyHash)
100
- end
101
-
102
- # Сумма.
103
- sig { returns(Yoomoney::MonetaryAmount) }
104
- attr_reader :amount
105
-
106
- sig { params(amount: Yoomoney::MonetaryAmount::OrHash).void }
107
- attr_writer :amount
108
-
109
- # Название товара.
110
- sig { returns(String) }
111
- attr_accessor :description
112
-
113
- # Количество.
114
- sig { returns(Float) }
115
- attr_accessor :quantity
116
-
117
- # Ставка НДС.
118
- sig { returns(Integer) }
119
- attr_accessor :vat_code
120
-
121
- sig { returns(T.nilable(String)) }
122
- attr_reader :country_of_origin_code
123
-
124
- sig { params(country_of_origin_code: String).void }
125
- attr_writer :country_of_origin_code
126
-
127
- sig { returns(T.nilable(String)) }
128
- attr_reader :customs_declaration_number
129
-
130
- sig { params(customs_declaration_number: String).void }
131
- attr_writer :customs_declaration_number
132
-
133
- sig { returns(T.nilable(String)) }
134
- attr_reader :excise
135
-
136
- sig { params(excise: String).void }
137
- attr_writer :excise
138
-
139
- sig { returns(T.nilable(Yoomoney::MarkCodeInfo)) }
140
- attr_reader :mark_code_info
141
-
142
- sig { params(mark_code_info: Yoomoney::MarkCodeInfo::OrHash).void }
143
- attr_writer :mark_code_info
144
-
145
- sig { returns(T.nilable(String)) }
146
- attr_reader :mark_mode
147
-
148
- sig { params(mark_mode: String).void }
149
- attr_writer :mark_mode
150
-
151
- sig { returns(T.nilable(Yoomoney::MarkQuantity)) }
152
- attr_reader :mark_quantity
153
-
154
- sig { params(mark_quantity: Yoomoney::MarkQuantity::OrHash).void }
155
- attr_writer :mark_quantity
156
-
157
- sig { returns(T.nilable(Yoomoney::ReceiptItemMeasure::OrSymbol)) }
158
- attr_reader :measure
159
-
160
- sig { params(measure: Yoomoney::ReceiptItemMeasure::OrSymbol).void }
161
- attr_writer :measure
162
-
163
- sig { returns(T.nilable(Yoomoney::ReceiptItemPaymentMode::OrSymbol)) }
164
- attr_reader :payment_mode
165
-
166
- sig do
167
- params(payment_mode: Yoomoney::ReceiptItemPaymentMode::OrSymbol).void
168
- end
169
- attr_writer :payment_mode
170
-
171
- sig do
172
- returns(T.nilable(Yoomoney::ReceiptItemPaymentSubject::OrSymbol))
173
- end
174
- attr_reader :payment_subject
175
-
176
- sig do
177
- params(
178
- payment_subject: Yoomoney::ReceiptItemPaymentSubject::OrSymbol
179
- ).void
180
- end
181
- attr_writer :payment_subject
182
-
183
- sig { returns(T.nilable(T::Array[Yoomoney::IndustryDetails])) }
184
- attr_reader :payment_subject_industry_details
185
-
186
- sig do
187
- params(
188
- payment_subject_industry_details:
189
- T::Array[Yoomoney::IndustryDetails::OrHash]
190
- ).void
191
- end
192
- attr_writer :payment_subject_industry_details
193
-
194
- sig { returns(T.nilable(Integer)) }
195
- attr_reader :planned_status
196
-
197
- sig { params(planned_status: Integer).void }
198
- attr_writer :planned_status
199
-
200
- sig { returns(T.nilable(String)) }
201
- attr_reader :product_code
202
-
203
- sig { params(product_code: String).void }
204
- attr_writer :product_code
205
-
206
- sig do
207
- params(
208
- amount: Yoomoney::MonetaryAmount::OrHash,
209
- description: String,
210
- quantity: Float,
211
- vat_code: Integer,
212
- country_of_origin_code: String,
213
- customs_declaration_number: String,
214
- excise: String,
215
- mark_code_info: Yoomoney::MarkCodeInfo::OrHash,
216
- mark_mode: String,
217
- mark_quantity: Yoomoney::MarkQuantity::OrHash,
218
- measure: Yoomoney::ReceiptItemMeasure::OrSymbol,
219
- payment_mode: Yoomoney::ReceiptItemPaymentMode::OrSymbol,
220
- payment_subject: Yoomoney::ReceiptItemPaymentSubject::OrSymbol,
221
- payment_subject_industry_details:
222
- T::Array[Yoomoney::IndustryDetails::OrHash],
223
- planned_status: Integer,
224
- product_code: String
225
- ).returns(T.attached_class)
226
- end
227
- def self.new(
228
- # Сумма.
229
- amount:,
230
- # Название товара.
231
- description:,
232
- # Количество.
233
- quantity:,
234
- # Ставка НДС.
235
- vat_code:,
236
- country_of_origin_code: nil,
237
- customs_declaration_number: nil,
238
- excise: nil,
239
- mark_code_info: nil,
240
- mark_mode: nil,
241
- mark_quantity: nil,
242
- measure: nil,
243
- payment_mode: nil,
244
- payment_subject: nil,
245
- payment_subject_industry_details: nil,
246
- planned_status: nil,
247
- product_code: nil
248
- )
249
- end
250
-
251
- sig do
252
- override.returns(
253
- {
254
- amount: Yoomoney::MonetaryAmount,
255
- description: String,
256
- quantity: Float,
257
- vat_code: Integer,
258
- country_of_origin_code: String,
259
- customs_declaration_number: String,
260
- excise: String,
261
- mark_code_info: Yoomoney::MarkCodeInfo,
262
- mark_mode: String,
263
- mark_quantity: Yoomoney::MarkQuantity,
264
- measure: Yoomoney::ReceiptItemMeasure::OrSymbol,
265
- payment_mode: Yoomoney::ReceiptItemPaymentMode::OrSymbol,
266
- payment_subject: Yoomoney::ReceiptItemPaymentSubject::OrSymbol,
267
- payment_subject_industry_details:
268
- T::Array[Yoomoney::IndustryDetails],
269
- planned_status: Integer,
270
- product_code: String
271
- }
272
- )
273
- end
274
- def to_hash
275
- end
276
- end
277
95
  end
278
96
  end
279
97
  end
@@ -0,0 +1,185 @@
1
+ # typed: strong
2
+
3
+ module Yoomoney
4
+ module Models
5
+ class ReceiptDataItem < Yoomoney::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Yoomoney::ReceiptDataItem, Yoomoney::Internal::AnyHash)
9
+ end
10
+
11
+ # Сумма.
12
+ sig { returns(Yoomoney::MonetaryAmount) }
13
+ attr_reader :amount
14
+
15
+ sig { params(amount: Yoomoney::MonetaryAmount::OrHash).void }
16
+ attr_writer :amount
17
+
18
+ # Название товара.
19
+ sig { returns(String) }
20
+ attr_accessor :description
21
+
22
+ # Количество.
23
+ sig { returns(Float) }
24
+ attr_accessor :quantity
25
+
26
+ # Ставка НДС.
27
+ sig { returns(Integer) }
28
+ attr_accessor :vat_code
29
+
30
+ sig { returns(T.nilable(String)) }
31
+ attr_reader :country_of_origin_code
32
+
33
+ sig { params(country_of_origin_code: String).void }
34
+ attr_writer :country_of_origin_code
35
+
36
+ sig { returns(T.nilable(String)) }
37
+ attr_reader :customs_declaration_number
38
+
39
+ sig { params(customs_declaration_number: String).void }
40
+ attr_writer :customs_declaration_number
41
+
42
+ sig { returns(T.nilable(String)) }
43
+ attr_reader :excise
44
+
45
+ sig { params(excise: String).void }
46
+ attr_writer :excise
47
+
48
+ sig { returns(T.nilable(Yoomoney::MarkCodeInfo)) }
49
+ attr_reader :mark_code_info
50
+
51
+ sig { params(mark_code_info: Yoomoney::MarkCodeInfo::OrHash).void }
52
+ attr_writer :mark_code_info
53
+
54
+ sig { returns(T.nilable(String)) }
55
+ attr_reader :mark_mode
56
+
57
+ sig { params(mark_mode: String).void }
58
+ attr_writer :mark_mode
59
+
60
+ sig { returns(T.nilable(Yoomoney::MarkQuantity)) }
61
+ attr_reader :mark_quantity
62
+
63
+ sig { params(mark_quantity: Yoomoney::MarkQuantity::OrHash).void }
64
+ attr_writer :mark_quantity
65
+
66
+ sig { returns(T.nilable(Yoomoney::ReceiptItemMeasure::OrSymbol)) }
67
+ attr_reader :measure
68
+
69
+ sig { params(measure: Yoomoney::ReceiptItemMeasure::OrSymbol).void }
70
+ attr_writer :measure
71
+
72
+ sig { returns(T.nilable(Yoomoney::ReceiptItemPaymentMode::OrSymbol)) }
73
+ attr_reader :payment_mode
74
+
75
+ sig do
76
+ params(payment_mode: Yoomoney::ReceiptItemPaymentMode::OrSymbol).void
77
+ end
78
+ attr_writer :payment_mode
79
+
80
+ sig { returns(T.nilable(Yoomoney::ReceiptItemPaymentSubject::OrSymbol)) }
81
+ attr_reader :payment_subject
82
+
83
+ sig do
84
+ params(
85
+ payment_subject: Yoomoney::ReceiptItemPaymentSubject::OrSymbol
86
+ ).void
87
+ end
88
+ attr_writer :payment_subject
89
+
90
+ sig { returns(T.nilable(T::Array[Yoomoney::IndustryDetails])) }
91
+ attr_reader :payment_subject_industry_details
92
+
93
+ sig do
94
+ params(
95
+ payment_subject_industry_details:
96
+ T::Array[Yoomoney::IndustryDetails::OrHash]
97
+ ).void
98
+ end
99
+ attr_writer :payment_subject_industry_details
100
+
101
+ sig { returns(T.nilable(Integer)) }
102
+ attr_reader :planned_status
103
+
104
+ sig { params(planned_status: Integer).void }
105
+ attr_writer :planned_status
106
+
107
+ sig { returns(T.nilable(String)) }
108
+ attr_reader :product_code
109
+
110
+ sig { params(product_code: String).void }
111
+ attr_writer :product_code
112
+
113
+ sig do
114
+ params(
115
+ amount: Yoomoney::MonetaryAmount::OrHash,
116
+ description: String,
117
+ quantity: Float,
118
+ vat_code: Integer,
119
+ country_of_origin_code: String,
120
+ customs_declaration_number: String,
121
+ excise: String,
122
+ mark_code_info: Yoomoney::MarkCodeInfo::OrHash,
123
+ mark_mode: String,
124
+ mark_quantity: Yoomoney::MarkQuantity::OrHash,
125
+ measure: Yoomoney::ReceiptItemMeasure::OrSymbol,
126
+ payment_mode: Yoomoney::ReceiptItemPaymentMode::OrSymbol,
127
+ payment_subject: Yoomoney::ReceiptItemPaymentSubject::OrSymbol,
128
+ payment_subject_industry_details:
129
+ T::Array[Yoomoney::IndustryDetails::OrHash],
130
+ planned_status: Integer,
131
+ product_code: String
132
+ ).returns(T.attached_class)
133
+ end
134
+ def self.new(
135
+ # Сумма.
136
+ amount:,
137
+ # Название товара.
138
+ description:,
139
+ # Количество.
140
+ quantity:,
141
+ # Ставка НДС.
142
+ vat_code:,
143
+ country_of_origin_code: nil,
144
+ customs_declaration_number: nil,
145
+ excise: nil,
146
+ mark_code_info: nil,
147
+ mark_mode: nil,
148
+ mark_quantity: nil,
149
+ measure: nil,
150
+ payment_mode: nil,
151
+ payment_subject: nil,
152
+ payment_subject_industry_details: nil,
153
+ planned_status: nil,
154
+ product_code: nil
155
+ )
156
+ end
157
+
158
+ sig do
159
+ override.returns(
160
+ {
161
+ amount: Yoomoney::MonetaryAmount,
162
+ description: String,
163
+ quantity: Float,
164
+ vat_code: Integer,
165
+ country_of_origin_code: String,
166
+ customs_declaration_number: String,
167
+ excise: String,
168
+ mark_code_info: Yoomoney::MarkCodeInfo,
169
+ mark_mode: String,
170
+ mark_quantity: Yoomoney::MarkQuantity,
171
+ measure: Yoomoney::ReceiptItemMeasure::OrSymbol,
172
+ payment_mode: Yoomoney::ReceiptItemPaymentMode::OrSymbol,
173
+ payment_subject: Yoomoney::ReceiptItemPaymentSubject::OrSymbol,
174
+ payment_subject_industry_details:
175
+ T::Array[Yoomoney::IndustryDetails],
176
+ planned_status: Integer,
177
+ product_code: String
178
+ }
179
+ )
180
+ end
181
+ def to_hash
182
+ end
183
+ end
184
+ end
185
+ end
@@ -228,15 +228,14 @@ module Yoomoney
228
228
  attr_accessor :id
229
229
 
230
230
  # Данные о распределении денег.
231
- sig { returns(T::Array[Yoomoney::Refund::Deal::RefundSettlement]) }
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