yoomoney 0.4.0 → 0.5.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 +44 -0
- data/README.md +1 -1
- data/lib/yoomoney/client.rb +15 -1
- data/lib/yoomoney/internal/transport/base_client.rb +2 -0
- data/lib/yoomoney/internal/util.rb +53 -7
- data/lib/yoomoney/models/deal_retrieve_params.rb +7 -1
- data/lib/yoomoney/models/invoice_retrieve_params.rb +7 -1
- data/lib/yoomoney/models/payment_cancel_params.rb +7 -1
- data/lib/yoomoney/models/payment_capture_params.rb +8 -1
- data/lib/yoomoney/models/payment_method_retrieve_params.rb +7 -1
- data/lib/yoomoney/models/payment_retrieve_params.rb +7 -1
- data/lib/yoomoney/models/payout_retrieve_params.rb +7 -1
- data/lib/yoomoney/models/personal_data_create_params.rb +70 -46
- data/lib/yoomoney/models/personal_data_retrieve_params.rb +7 -1
- data/lib/yoomoney/models/receipt_retrieve_params.rb +7 -1
- data/lib/yoomoney/models/refund_retrieve_params.rb +7 -1
- data/lib/yoomoney/models/webhook_delete_params.rb +7 -1
- data/lib/yoomoney/resources/deals.rb +2 -1
- data/lib/yoomoney/resources/me.rb +2 -1
- data/lib/yoomoney/resources/payments.rb +2 -1
- data/lib/yoomoney/resources/payouts.rb +4 -2
- data/lib/yoomoney/resources/personal_data.rb +4 -16
- data/lib/yoomoney/resources/receipts.rb +2 -1
- data/lib/yoomoney/resources/refunds.rb +2 -1
- data/lib/yoomoney/version.rb +1 -1
- data/lib/yoomoney.rb +1 -1
- data/rbi/yoomoney/internal/util.rbi +28 -0
- data/rbi/yoomoney/models/deal_retrieve_params.rbi +13 -5
- data/rbi/yoomoney/models/invoice_retrieve_params.rbi +13 -5
- data/rbi/yoomoney/models/payment_cancel_params.rbi +10 -2
- data/rbi/yoomoney/models/payment_capture_params.rbi +6 -0
- data/rbi/yoomoney/models/payment_method_retrieve_params.rbi +16 -5
- data/rbi/yoomoney/models/payment_retrieve_params.rbi +13 -5
- data/rbi/yoomoney/models/payout_retrieve_params.rbi +13 -5
- data/rbi/yoomoney/models/personal_data_create_params.rbi +140 -55
- data/rbi/yoomoney/models/personal_data_retrieve_params.rbi +16 -5
- data/rbi/yoomoney/models/receipt_retrieve_params.rbi +13 -5
- data/rbi/yoomoney/models/refund_retrieve_params.rbi +13 -5
- data/rbi/yoomoney/models/webhook_delete_params.rbi +13 -5
- data/rbi/yoomoney/resources/personal_data.rbi +7 -19
- data/sig/yoomoney/internal/util.rbs +14 -0
- data/sig/yoomoney/models/deal_retrieve_params.rbs +11 -3
- data/sig/yoomoney/models/invoice_retrieve_params.rbs +11 -3
- data/sig/yoomoney/models/payment_cancel_params.rbs +6 -1
- data/sig/yoomoney/models/payment_capture_params.rbs +5 -0
- data/sig/yoomoney/models/payment_method_retrieve_params.rbs +12 -3
- data/sig/yoomoney/models/payment_retrieve_params.rbs +11 -3
- data/sig/yoomoney/models/payout_retrieve_params.rbs +11 -3
- data/sig/yoomoney/models/personal_data_create_params.rbs +73 -29
- data/sig/yoomoney/models/personal_data_retrieve_params.rbs +12 -3
- data/sig/yoomoney/models/receipt_retrieve_params.rbs +11 -3
- data/sig/yoomoney/models/refund_retrieve_params.rbs +11 -3
- data/sig/yoomoney/models/webhook_delete_params.rbs +11 -3
- data/sig/yoomoney/resources/personal_data.rbs +1 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 116b577dd94dc89b2d69be97dc4d82df0193d712a2d1f8cf30ab64766f779a27
|
|
4
|
+
data.tar.gz: 897f850b6bc8dd6589fe8ff6863d256c5c2e4ecbff4a2b70bdb94e9954058fe2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 512e4744d0456924bf05dec0897c3f47ffe8c60395c5e1937e22084e83e32e237ce09adf4f19ea27913ce2b7fe3f013d87c01165436ffc292e6a399e670c5b45
|
|
7
|
+
data.tar.gz: 9a0e7dfc0421721ecc623869def7a7eb1a3402a663015f5323ba65dff7c9c8f9658b93ee574a2b4ddb601c68e047b2c11cf3134716943bc5204c4e14980d0612
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 (2026-05-14)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.4.1...v0.5.0](https://github.com/Hexlet/yoomoney-ruby/compare/v0.4.1...v0.5.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* support setting headers via env ([56d1e96](https://github.com/Hexlet/yoomoney-ruby/commit/56d1e963c6df51152c0d93f8211f158378949339))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* align path encoding with RFC 3986 section 3.3 ([9bd4272](https://github.com/Hexlet/yoomoney-ruby/commit/9bd4272cb3ac8f124da75aa27ec3a39f7c8b0666))
|
|
15
|
+
* **client:** elide content type header on requests without body ([437bba0](https://github.com/Hexlet/yoomoney-ruby/commit/437bba09741612ee2bdf1cd4c7b550bbfa9c37c2))
|
|
16
|
+
* **internal:** correct multipart form field name encoding ([c92d15c](https://github.com/Hexlet/yoomoney-ruby/commit/c92d15c3f6eed70c96278d9f43bfa96e6a0e951b))
|
|
17
|
+
* multipart encoding for file arrays ([b8e11b9](https://github.com/Hexlet/yoomoney-ruby/commit/b8e11b90d5985fcb84a7dcc96ad06d22ea6c9fad))
|
|
18
|
+
* variable name typo ([7470296](https://github.com/Hexlet/yoomoney-ruby/commit/7470296ce37a30019e968a86b72fa910b045702d))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Chores
|
|
22
|
+
|
|
23
|
+
* **ci:** skip lint on metadata-only changes ([9f29e5b](https://github.com/Hexlet/yoomoney-ruby/commit/9f29e5b7f76fa07d4c03220b203563f2d0e6b026))
|
|
24
|
+
* **ci:** support opting out of skipping builds on metadata-only commits ([823e1af](https://github.com/Hexlet/yoomoney-ruby/commit/823e1af5ed00238d318236fb6f13d0d35380a53e))
|
|
25
|
+
* **internal:** more robust bootstrap script ([9813a57](https://github.com/Hexlet/yoomoney-ruby/commit/9813a5744c83c44425e6b43267c500ec09e6bd29))
|
|
26
|
+
* **internal:** tweak CI branches ([f732219](https://github.com/Hexlet/yoomoney-ruby/commit/f7322192ae33c7a63dcda5ee362df4144cc65598))
|
|
27
|
+
* **internal:** update gitignore ([25dfa03](https://github.com/Hexlet/yoomoney-ruby/commit/25dfa03491acfe4fc43aa3745101e2add214cbe4))
|
|
28
|
+
|
|
29
|
+
## 0.4.1 (2026-03-07)
|
|
30
|
+
|
|
31
|
+
Full Changelog: [v0.4.0...v0.4.1](https://github.com/Hexlet/yoomoney-ruby/compare/v0.4.0...v0.4.1)
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* properly mock time in ruby ci tests ([0b0f2b9](https://github.com/Hexlet/yoomoney-ruby/commit/0b0f2b9b46b018511f77974f9c07bf16c41b9de8))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Chores
|
|
39
|
+
|
|
40
|
+
* **ci:** add build step ([97e903b](https://github.com/Hexlet/yoomoney-ruby/commit/97e903b2e36f772efddd46fe27068e52c83bbd9c))
|
|
41
|
+
* **ci:** skip uploading artifacts on stainless-internal branches ([769989f](https://github.com/Hexlet/yoomoney-ruby/commit/769989fb624918ba20854868cb63f4f5205a0e4a))
|
|
42
|
+
* **internal:** codegen related update ([9f0b901](https://github.com/Hexlet/yoomoney-ruby/commit/9f0b9017a1935611d16145bee578e2bd020b2e3e))
|
|
43
|
+
* **internal:** codegen related update ([a3a34e9](https://github.com/Hexlet/yoomoney-ruby/commit/a3a34e92ccdbaf9b73180348eb9e6d748027aaf5))
|
|
44
|
+
* **internal:** remove mock server code ([ff71548](https://github.com/Hexlet/yoomoney-ruby/commit/ff7154864d2ab53d55c4eeacb28120965dca14a1))
|
|
45
|
+
* update mock server docs ([98bf708](https://github.com/Hexlet/yoomoney-ruby/commit/98bf7084f1c04c1d0c816d96584a4074e9187024))
|
|
46
|
+
|
|
3
47
|
## 0.4.0 (2026-02-19)
|
|
4
48
|
|
|
5
49
|
Full Changelog: [v0.3.0...v0.4.0](https://github.com/Hexlet/yoomoney-ruby/compare/v0.3.0...v0.4.0)
|
data/README.md
CHANGED
data/lib/yoomoney/client.rb
CHANGED
|
@@ -95,6 +95,19 @@ module Yoomoney
|
|
|
95
95
|
)
|
|
96
96
|
base_url ||= "https://api.yookassa.ru/v3"
|
|
97
97
|
|
|
98
|
+
headers = {}
|
|
99
|
+
custom_headers_env = ENV["YOOMONEY_CUSTOM_HEADERS"]
|
|
100
|
+
unless custom_headers_env.nil?
|
|
101
|
+
parsed = {}
|
|
102
|
+
custom_headers_env.split("\n").each do |line|
|
|
103
|
+
colon = line.index(":")
|
|
104
|
+
unless colon.nil?
|
|
105
|
+
parsed[line[0...colon].strip] = line[(colon + 1)..].strip
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
headers = parsed.merge(headers)
|
|
109
|
+
end
|
|
110
|
+
|
|
98
111
|
@username = username&.to_s
|
|
99
112
|
@password = password&.to_s
|
|
100
113
|
|
|
@@ -103,7 +116,8 @@ module Yoomoney
|
|
|
103
116
|
timeout: timeout,
|
|
104
117
|
max_retries: max_retries,
|
|
105
118
|
initial_retry_delay: initial_retry_delay,
|
|
106
|
-
max_retry_delay: max_retry_delay
|
|
119
|
+
max_retry_delay: max_retry_delay,
|
|
120
|
+
headers: headers
|
|
107
121
|
)
|
|
108
122
|
|
|
109
123
|
@payments = Yoomoney::Resources::Payments.new(client: self)
|
|
@@ -306,6 +306,8 @@ module Yoomoney
|
|
|
306
306
|
Yoomoney::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
|
|
307
307
|
end
|
|
308
308
|
|
|
309
|
+
headers.delete("content-type") if body.nil?
|
|
310
|
+
|
|
309
311
|
url = Yoomoney::Internal::Util.join_parsed_uri(
|
|
310
312
|
@base_url_components,
|
|
311
313
|
{**req, path: path, query: query}
|
|
@@ -157,7 +157,7 @@ module Yoomoney
|
|
|
157
157
|
in Hash | nil => coerced
|
|
158
158
|
coerced
|
|
159
159
|
else
|
|
160
|
-
message = "Expected a #{Hash} or #{Yoomoney::Internal::Type::BaseModel}, got #{
|
|
160
|
+
message = "Expected a #{Hash} or #{Yoomoney::Internal::Type::BaseModel}, got #{input.inspect}"
|
|
161
161
|
raise ArgumentError.new(message)
|
|
162
162
|
end
|
|
163
163
|
end
|
|
@@ -237,6 +237,11 @@ module Yoomoney
|
|
|
237
237
|
end
|
|
238
238
|
end
|
|
239
239
|
|
|
240
|
+
# @type [Regexp]
|
|
241
|
+
#
|
|
242
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
243
|
+
RFC_3986_NOT_PCHARS = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/
|
|
244
|
+
|
|
240
245
|
class << self
|
|
241
246
|
# @api private
|
|
242
247
|
#
|
|
@@ -247,6 +252,15 @@ module Yoomoney
|
|
|
247
252
|
"#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
|
|
248
253
|
end
|
|
249
254
|
|
|
255
|
+
# @api private
|
|
256
|
+
#
|
|
257
|
+
# @param path [String, Integer]
|
|
258
|
+
#
|
|
259
|
+
# @return [String]
|
|
260
|
+
def encode_path(path)
|
|
261
|
+
path.to_s.gsub(Yoomoney::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) }
|
|
262
|
+
end
|
|
263
|
+
|
|
250
264
|
# @api private
|
|
251
265
|
#
|
|
252
266
|
# @param path [String, Array<String>]
|
|
@@ -259,7 +273,7 @@ module Yoomoney
|
|
|
259
273
|
in []
|
|
260
274
|
""
|
|
261
275
|
in [String => p, *interpolations]
|
|
262
|
-
encoded = interpolations.map {
|
|
276
|
+
encoded = interpolations.map { encode_path(_1) }
|
|
263
277
|
format(p, *encoded)
|
|
264
278
|
end
|
|
265
279
|
end
|
|
@@ -490,6 +504,37 @@ module Yoomoney
|
|
|
490
504
|
JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
|
|
491
505
|
|
|
492
506
|
class << self
|
|
507
|
+
# @api private
|
|
508
|
+
#
|
|
509
|
+
# @param query [Hash{Symbol=>Object}]
|
|
510
|
+
#
|
|
511
|
+
# @return [Hash{Symbol=>Object}]
|
|
512
|
+
def encode_query_params(query)
|
|
513
|
+
out = {}
|
|
514
|
+
query.each { write_query_param_element!(out, _1, _2) }
|
|
515
|
+
out
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
# @api private
|
|
519
|
+
#
|
|
520
|
+
# @param collection [Hash{Symbol=>Object}]
|
|
521
|
+
# @param key [String]
|
|
522
|
+
# @param element [Object]
|
|
523
|
+
#
|
|
524
|
+
# @return [nil]
|
|
525
|
+
private def write_query_param_element!(collection, key, element)
|
|
526
|
+
case element
|
|
527
|
+
in Hash
|
|
528
|
+
element.each do |name, value|
|
|
529
|
+
write_query_param_element!(collection, "#{key}[#{name}]", value)
|
|
530
|
+
end
|
|
531
|
+
in Array
|
|
532
|
+
collection[key] = element.map(&:to_s).join(",")
|
|
533
|
+
else
|
|
534
|
+
collection[key] = element.to_s
|
|
535
|
+
end
|
|
536
|
+
end
|
|
537
|
+
|
|
493
538
|
# @api private
|
|
494
539
|
#
|
|
495
540
|
# @param y [Enumerator::Yielder]
|
|
@@ -540,16 +585,15 @@ module Yoomoney
|
|
|
540
585
|
y << "Content-Disposition: form-data"
|
|
541
586
|
|
|
542
587
|
unless key.nil?
|
|
543
|
-
|
|
544
|
-
y << "; name=\"#{name}\""
|
|
588
|
+
y << "; name=\"#{key}\""
|
|
545
589
|
end
|
|
546
590
|
|
|
547
591
|
case val
|
|
548
592
|
in Yoomoney::FilePart unless val.filename.nil?
|
|
549
|
-
filename =
|
|
593
|
+
filename = encode_path(val.filename)
|
|
550
594
|
y << "; filename=\"#{filename}\""
|
|
551
595
|
in Pathname | IO
|
|
552
|
-
filename =
|
|
596
|
+
filename = encode_path(::File.basename(val.to_path))
|
|
553
597
|
y << "; filename=\"#{filename}\""
|
|
554
598
|
else
|
|
555
599
|
end
|
|
@@ -566,6 +610,7 @@ module Yoomoney
|
|
|
566
610
|
#
|
|
567
611
|
# @return [Array(String, Enumerable<String>)]
|
|
568
612
|
private def encode_multipart_streaming(body)
|
|
613
|
+
# rubocop:disable Style/CaseEquality
|
|
569
614
|
# RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
|
|
570
615
|
boundary = SecureRandom.urlsafe_base64(46)
|
|
571
616
|
|
|
@@ -575,7 +620,7 @@ module Yoomoney
|
|
|
575
620
|
in Hash
|
|
576
621
|
body.each do |key, val|
|
|
577
622
|
case val
|
|
578
|
-
in Array if val.all? { primitive?(_1) }
|
|
623
|
+
in Array if val.all? { primitive?(_1) || Yoomoney::Internal::Type::FileInput === _1 }
|
|
579
624
|
val.each do |v|
|
|
580
625
|
write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
|
|
581
626
|
end
|
|
@@ -591,6 +636,7 @@ module Yoomoney
|
|
|
591
636
|
|
|
592
637
|
fused_io = fused_enum(strio) { closing.each(&:call) }
|
|
593
638
|
[boundary, fused_io]
|
|
639
|
+
# rubocop:enable Style/CaseEquality
|
|
594
640
|
end
|
|
595
641
|
|
|
596
642
|
# @api private
|
|
@@ -7,7 +7,13 @@ module Yoomoney
|
|
|
7
7
|
extend Yoomoney::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Yoomoney::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute deal_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :deal_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(deal_id:, request_options: {})
|
|
16
|
+
# @param deal_id [String]
|
|
11
17
|
# @param request_options [Yoomoney::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,7 +7,13 @@ module Yoomoney
|
|
|
7
7
|
extend Yoomoney::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Yoomoney::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute invoice_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :invoice_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(invoice_id:, request_options: {})
|
|
16
|
+
# @param invoice_id [String]
|
|
11
17
|
# @param request_options [Yoomoney::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,12 +7,18 @@ module Yoomoney
|
|
|
7
7
|
extend Yoomoney::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Yoomoney::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute payment_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :payment_id, String
|
|
14
|
+
|
|
10
15
|
# @!attribute idempotence_key
|
|
11
16
|
#
|
|
12
17
|
# @return [String]
|
|
13
18
|
required :idempotence_key, String
|
|
14
19
|
|
|
15
|
-
# @!method initialize(idempotence_key:, request_options: {})
|
|
20
|
+
# @!method initialize(payment_id:, idempotence_key:, request_options: {})
|
|
21
|
+
# @param payment_id [String]
|
|
16
22
|
# @param idempotence_key [String]
|
|
17
23
|
# @param request_options [Yoomoney::RequestOptions, Hash{Symbol=>Object}]
|
|
18
24
|
end
|
|
@@ -7,6 +7,11 @@ module Yoomoney
|
|
|
7
7
|
extend Yoomoney::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Yoomoney::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute payment_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :payment_id, String
|
|
14
|
+
|
|
10
15
|
# @!attribute idempotence_key
|
|
11
16
|
#
|
|
12
17
|
# @return [String]
|
|
@@ -42,7 +47,9 @@ module Yoomoney
|
|
|
42
47
|
# @return [Array<Yoomoney::Models::TransferData>, nil]
|
|
43
48
|
optional :transfers, -> { Yoomoney::Internal::Type::ArrayOf[Yoomoney::TransferData] }
|
|
44
49
|
|
|
45
|
-
# @!method initialize(idempotence_key:, airline: nil, amount: nil, deal: nil, receipt: nil, transfers: nil, request_options: {})
|
|
50
|
+
# @!method initialize(payment_id:, idempotence_key:, airline: nil, amount: nil, deal: nil, receipt: nil, transfers: nil, request_options: {})
|
|
51
|
+
# @param payment_id [String]
|
|
52
|
+
#
|
|
46
53
|
# @param idempotence_key [String]
|
|
47
54
|
#
|
|
48
55
|
# @param airline [Yoomoney::Models::Airline] Данные для продажи авиабилетов.
|
|
@@ -7,7 +7,13 @@ module Yoomoney
|
|
|
7
7
|
extend Yoomoney::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Yoomoney::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute payment_method_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :payment_method_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(payment_method_id:, request_options: {})
|
|
16
|
+
# @param payment_method_id [String]
|
|
11
17
|
# @param request_options [Yoomoney::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,7 +7,13 @@ module Yoomoney
|
|
|
7
7
|
extend Yoomoney::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Yoomoney::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute payment_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :payment_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(payment_id:, request_options: {})
|
|
16
|
+
# @param payment_id [String]
|
|
11
17
|
# @param request_options [Yoomoney::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,7 +7,13 @@ module Yoomoney
|
|
|
7
7
|
extend Yoomoney::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Yoomoney::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute payout_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :payout_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(payout_id:, request_options: {})
|
|
16
|
+
# @param payout_id [String]
|
|
11
17
|
# @param request_options [Yoomoney::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,61 +7,85 @@ module Yoomoney
|
|
|
7
7
|
extend Yoomoney::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Yoomoney::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!attribute
|
|
11
|
-
# Имя.
|
|
10
|
+
# @!attribute body
|
|
12
11
|
#
|
|
13
|
-
# @return [
|
|
14
|
-
required :
|
|
15
|
-
|
|
16
|
-
# @!attribute last_name
|
|
17
|
-
# Фамилия.
|
|
18
|
-
#
|
|
19
|
-
# @return [String]
|
|
20
|
-
required :last_name, String
|
|
21
|
-
|
|
22
|
-
# @!attribute type
|
|
23
|
-
# Тип персональных данных.
|
|
24
|
-
#
|
|
25
|
-
# @return [Symbol, Yoomoney::Models::PersonalDataType]
|
|
26
|
-
required :type, enum: -> { Yoomoney::PersonalDataType }
|
|
12
|
+
# @return [Yoomoney::Models::PersonalDataCreateParams::Body::SbpPayoutRecipientPersonalDataRequest, Yoomoney::Models::PersonalDataCreateParams::Body::PayoutStatementRecipientPersonalDataRequest]
|
|
13
|
+
required :body, union: -> { Yoomoney::PersonalDataCreateParams::Body }
|
|
27
14
|
|
|
28
15
|
# @!attribute idempotence_key
|
|
29
16
|
#
|
|
30
17
|
# @return [String]
|
|
31
18
|
required :idempotence_key, String
|
|
32
19
|
|
|
33
|
-
# @!
|
|
34
|
-
#
|
|
35
|
-
# заказа). Передаются в виде набора пар «ключ-значение» и возвращаются в ответе от
|
|
36
|
-
# ЮKassa. Ограничения: максимум 16 ключей, имя ключа не больше 32 символов,
|
|
37
|
-
# значение ключа не больше 512 символов, тип данных — строка в формате UTF-8.
|
|
38
|
-
#
|
|
39
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
40
|
-
optional :metadata, Yoomoney::Internal::Type::HashOf[String]
|
|
41
|
-
|
|
42
|
-
# @!attribute middle_name
|
|
43
|
-
# Отчество.
|
|
44
|
-
#
|
|
45
|
-
# @return [String, nil]
|
|
46
|
-
optional :middle_name, String
|
|
47
|
-
|
|
48
|
-
# @!method initialize(first_name:, last_name:, type:, idempotence_key:, metadata: nil, middle_name: nil, request_options: {})
|
|
49
|
-
# Some parameter documentations has been truncated, see
|
|
50
|
-
# {Yoomoney::Models::PersonalDataCreateParams} for more details.
|
|
51
|
-
#
|
|
52
|
-
# @param first_name [String] Имя.
|
|
53
|
-
#
|
|
54
|
-
# @param last_name [String] Фамилия.
|
|
55
|
-
#
|
|
56
|
-
# @param type [Symbol, Yoomoney::Models::PersonalDataType] Тип персональных данных.
|
|
57
|
-
#
|
|
20
|
+
# @!method initialize(body:, idempotence_key:, request_options: {})
|
|
21
|
+
# @param body [Yoomoney::Models::PersonalDataCreateParams::Body::SbpPayoutRecipientPersonalDataRequest, Yoomoney::Models::PersonalDataCreateParams::Body::PayoutStatementRecipientPersonalDataRequest]
|
|
58
22
|
# @param idempotence_key [String]
|
|
59
|
-
#
|
|
60
|
-
# @param metadata [Hash{Symbol=>String}] Любые дополнительные данные, которые нужны вам для работы (например, номер заказ
|
|
61
|
-
#
|
|
62
|
-
# @param middle_name [String] Отчество.
|
|
63
|
-
#
|
|
64
23
|
# @param request_options [Yoomoney::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
|
|
25
|
+
module Body
|
|
26
|
+
extend Yoomoney::Internal::Type::Union
|
|
27
|
+
|
|
28
|
+
variant -> { Yoomoney::PersonalDataCreateParams::Body::SbpPayoutRecipientPersonalDataRequest }
|
|
29
|
+
|
|
30
|
+
variant -> { Yoomoney::PersonalDataCreateParams::Body::PayoutStatementRecipientPersonalDataRequest }
|
|
31
|
+
|
|
32
|
+
class SbpPayoutRecipientPersonalDataRequest < Yoomoney::Models::PersonalDataRequest
|
|
33
|
+
# @!attribute first_name
|
|
34
|
+
# Имя.
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
required :first_name, String
|
|
38
|
+
|
|
39
|
+
# @!attribute last_name
|
|
40
|
+
# Фамилия.
|
|
41
|
+
#
|
|
42
|
+
# @return [String]
|
|
43
|
+
required :last_name, String
|
|
44
|
+
|
|
45
|
+
# @!attribute middle_name
|
|
46
|
+
# Отчество.
|
|
47
|
+
#
|
|
48
|
+
# @return [String, nil]
|
|
49
|
+
optional :middle_name, String
|
|
50
|
+
|
|
51
|
+
# @!method initialize(first_name:, last_name:, middle_name: nil)
|
|
52
|
+
# @param first_name [String] Имя.
|
|
53
|
+
#
|
|
54
|
+
# @param last_name [String] Фамилия.
|
|
55
|
+
#
|
|
56
|
+
# @param middle_name [String] Отчество.
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
class PayoutStatementRecipientPersonalDataRequest < Yoomoney::Models::PersonalDataRequest
|
|
60
|
+
# @!attribute first_name
|
|
61
|
+
# Имя.
|
|
62
|
+
#
|
|
63
|
+
# @return [String]
|
|
64
|
+
required :first_name, String
|
|
65
|
+
|
|
66
|
+
# @!attribute last_name
|
|
67
|
+
# Фамилия.
|
|
68
|
+
#
|
|
69
|
+
# @return [String]
|
|
70
|
+
required :last_name, String
|
|
71
|
+
|
|
72
|
+
# @!attribute middle_name
|
|
73
|
+
# Отчество.
|
|
74
|
+
#
|
|
75
|
+
# @return [String, nil]
|
|
76
|
+
optional :middle_name, String
|
|
77
|
+
|
|
78
|
+
# @!method initialize(first_name:, last_name:, middle_name: nil)
|
|
79
|
+
# @param first_name [String] Имя.
|
|
80
|
+
#
|
|
81
|
+
# @param last_name [String] Фамилия.
|
|
82
|
+
#
|
|
83
|
+
# @param middle_name [String] Отчество.
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# @!method self.variants
|
|
87
|
+
# @return [Array(Yoomoney::Models::PersonalDataCreateParams::Body::SbpPayoutRecipientPersonalDataRequest, Yoomoney::Models::PersonalDataCreateParams::Body::PayoutStatementRecipientPersonalDataRequest)]
|
|
88
|
+
end
|
|
65
89
|
end
|
|
66
90
|
end
|
|
67
91
|
end
|
|
@@ -7,7 +7,13 @@ module Yoomoney
|
|
|
7
7
|
extend Yoomoney::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Yoomoney::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute personal_data_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :personal_data_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(personal_data_id:, request_options: {})
|
|
16
|
+
# @param personal_data_id [String]
|
|
11
17
|
# @param request_options [Yoomoney::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,7 +7,13 @@ module Yoomoney
|
|
|
7
7
|
extend Yoomoney::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Yoomoney::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute receipt_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :receipt_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(receipt_id:, request_options: {})
|
|
16
|
+
# @param receipt_id [String]
|
|
11
17
|
# @param request_options [Yoomoney::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,7 +7,13 @@ module Yoomoney
|
|
|
7
7
|
extend Yoomoney::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Yoomoney::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute refund_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :refund_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(refund_id:, request_options: {})
|
|
16
|
+
# @param refund_id [String]
|
|
11
17
|
# @param request_options [Yoomoney::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,7 +7,13 @@ module Yoomoney
|
|
|
7
7
|
extend Yoomoney::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Yoomoney::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute webhook_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :webhook_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(webhook_id:, request_options: {})
|
|
16
|
+
# @param webhook_id [String]
|
|
11
17
|
# @param request_options [Yoomoney::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -74,10 +74,11 @@ module Yoomoney
|
|
|
74
74
|
# @see Yoomoney::Models::DealListParams
|
|
75
75
|
def list(params = {})
|
|
76
76
|
parsed, options = Yoomoney::DealListParams.dump_request(params)
|
|
77
|
+
query = Yoomoney::Internal::Util.encode_query_params(parsed)
|
|
77
78
|
@client.request(
|
|
78
79
|
method: :get,
|
|
79
80
|
path: "deals",
|
|
80
|
-
query:
|
|
81
|
+
query: query,
|
|
81
82
|
model: Yoomoney::Models::DealListResponse,
|
|
82
83
|
options: options
|
|
83
84
|
)
|
|
@@ -15,10 +15,11 @@ module Yoomoney
|
|
|
15
15
|
# @see Yoomoney::Models::MeRetrieveParams
|
|
16
16
|
def retrieve(params = {})
|
|
17
17
|
parsed, options = Yoomoney::MeRetrieveParams.dump_request(params)
|
|
18
|
+
query = Yoomoney::Internal::Util.encode_query_params(parsed)
|
|
18
19
|
@client.request(
|
|
19
20
|
method: :get,
|
|
20
21
|
path: "me",
|
|
21
|
-
query:
|
|
22
|
+
query: query,
|
|
22
23
|
model: Yoomoney::Models::MeRetrieveResponse,
|
|
23
24
|
options: options
|
|
24
25
|
)
|
|
@@ -104,10 +104,11 @@ module Yoomoney
|
|
|
104
104
|
# @see Yoomoney::Models::PaymentListParams
|
|
105
105
|
def list(params = {})
|
|
106
106
|
parsed, options = Yoomoney::PaymentListParams.dump_request(params)
|
|
107
|
+
query = Yoomoney::Internal::Util.encode_query_params(parsed)
|
|
107
108
|
@client.request(
|
|
108
109
|
method: :get,
|
|
109
110
|
path: "payments",
|
|
110
|
-
query:
|
|
111
|
+
query: query,
|
|
111
112
|
model: Yoomoney::Models::PaymentListResponse,
|
|
112
113
|
options: options
|
|
113
114
|
)
|
|
@@ -81,10 +81,11 @@ module Yoomoney
|
|
|
81
81
|
# @see Yoomoney::Models::PayoutListParams
|
|
82
82
|
def list(params = {})
|
|
83
83
|
parsed, options = Yoomoney::PayoutListParams.dump_request(params)
|
|
84
|
+
query = Yoomoney::Internal::Util.encode_query_params(parsed)
|
|
84
85
|
@client.request(
|
|
85
86
|
method: :get,
|
|
86
87
|
path: "payouts",
|
|
87
|
-
query:
|
|
88
|
+
query: query,
|
|
88
89
|
model: Yoomoney::PayoutsList,
|
|
89
90
|
options: options
|
|
90
91
|
)
|
|
@@ -104,10 +105,11 @@ module Yoomoney
|
|
|
104
105
|
# @see Yoomoney::Models::PayoutSearchParams
|
|
105
106
|
def search(params = {})
|
|
106
107
|
parsed, options = Yoomoney::PayoutSearchParams.dump_request(params)
|
|
108
|
+
query = Yoomoney::Internal::Util.encode_query_params(parsed)
|
|
107
109
|
@client.request(
|
|
108
110
|
method: :get,
|
|
109
111
|
path: "payouts/search",
|
|
110
|
-
query:
|
|
112
|
+
query: query,
|
|
111
113
|
model: Yoomoney::PayoutsList,
|
|
112
114
|
options: options
|
|
113
115
|
)
|