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
|
@@ -3,25 +3,14 @@
|
|
|
3
3
|
module Yoomoney
|
|
4
4
|
module Resources
|
|
5
5
|
class PersonalData
|
|
6
|
-
# Some parameter documentations has been truncated, see
|
|
7
|
-
# {Yoomoney::Models::PersonalDataCreateParams} for more details.
|
|
8
|
-
#
|
|
9
6
|
# Создание персональных данных
|
|
10
7
|
#
|
|
11
|
-
# @overload create(
|
|
12
|
-
#
|
|
13
|
-
# @param first_name [String] Body param: Имя.
|
|
14
|
-
#
|
|
15
|
-
# @param last_name [String] Body param: Фамилия.
|
|
8
|
+
# @overload create(body:, idempotence_key:, request_options: {})
|
|
16
9
|
#
|
|
17
|
-
# @param
|
|
10
|
+
# @param body [Yoomoney::Models::PersonalDataCreateParams::Body::SbpPayoutRecipientPersonalDataRequest, Yoomoney::Models::PersonalDataCreateParams::Body::PayoutStatementRecipientPersonalDataRequest] Body param
|
|
18
11
|
#
|
|
19
12
|
# @param idempotence_key [String] Header param
|
|
20
13
|
#
|
|
21
|
-
# @param metadata [Hash{Symbol=>String}] Body param: Любые дополнительные данные, которые нужны вам для работы (например,
|
|
22
|
-
#
|
|
23
|
-
# @param middle_name [String] Body param: Отчество.
|
|
24
|
-
#
|
|
25
14
|
# @param request_options [Yoomoney::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
26
15
|
#
|
|
27
16
|
# @return [Yoomoney::Models::PersonalDataAPI]
|
|
@@ -29,12 +18,11 @@ module Yoomoney
|
|
|
29
18
|
# @see Yoomoney::Models::PersonalDataCreateParams
|
|
30
19
|
def create(params)
|
|
31
20
|
parsed, options = Yoomoney::PersonalDataCreateParams.dump_request(params)
|
|
32
|
-
header_params = {idempotence_key: "idempotence-key"}
|
|
33
21
|
@client.request(
|
|
34
22
|
method: :post,
|
|
35
23
|
path: "personal_data",
|
|
36
|
-
headers: parsed.
|
|
37
|
-
body: parsed
|
|
24
|
+
headers: parsed.except(:body).transform_keys(idempotence_key: "idempotence-key"),
|
|
25
|
+
body: parsed[:body],
|
|
38
26
|
model: Yoomoney::PersonalDataAPI,
|
|
39
27
|
options: options
|
|
40
28
|
)
|
|
@@ -91,10 +91,11 @@ module Yoomoney
|
|
|
91
91
|
# @see Yoomoney::Models::ReceiptListParams
|
|
92
92
|
def list(params = {})
|
|
93
93
|
parsed, options = Yoomoney::ReceiptListParams.dump_request(params)
|
|
94
|
+
query = Yoomoney::Internal::Util.encode_query_params(parsed)
|
|
94
95
|
@client.request(
|
|
95
96
|
method: :get,
|
|
96
97
|
path: "receipts",
|
|
97
|
-
query:
|
|
98
|
+
query: query,
|
|
98
99
|
model: Yoomoney::Models::ReceiptListResponse,
|
|
99
100
|
options: options
|
|
100
101
|
)
|
|
@@ -81,10 +81,11 @@ module Yoomoney
|
|
|
81
81
|
# @see Yoomoney::Models::RefundListParams
|
|
82
82
|
def list(params = {})
|
|
83
83
|
parsed, options = Yoomoney::RefundListParams.dump_request(params)
|
|
84
|
+
query = Yoomoney::Internal::Util.encode_query_params(parsed)
|
|
84
85
|
@client.request(
|
|
85
86
|
method: :get,
|
|
86
87
|
path: "refunds",
|
|
87
|
-
query:
|
|
88
|
+
query: query,
|
|
88
89
|
model: Yoomoney::Models::RefundListResponse,
|
|
89
90
|
options: options
|
|
90
91
|
)
|
data/lib/yoomoney/version.rb
CHANGED
data/lib/yoomoney.rb
CHANGED
|
@@ -63,6 +63,7 @@ require_relative "yoomoney/models/payment_method_data"
|
|
|
63
63
|
require_relative "yoomoney/models/confirmation_data"
|
|
64
64
|
require_relative "yoomoney/models/payout_destination"
|
|
65
65
|
require_relative "yoomoney/models/payout_destination_data"
|
|
66
|
+
require_relative "yoomoney/models/personal_data_request"
|
|
66
67
|
require_relative "yoomoney/models/receipt_item_supplier"
|
|
67
68
|
require_relative "yoomoney/models/refund_method"
|
|
68
69
|
require_relative "yoomoney/models/airline"
|
|
@@ -118,7 +119,6 @@ require_relative "yoomoney/models/payouts_list"
|
|
|
118
119
|
require_relative "yoomoney/models/payout_status"
|
|
119
120
|
require_relative "yoomoney/models/personal_data"
|
|
120
121
|
require_relative "yoomoney/models/personal_data_create_params"
|
|
121
|
-
require_relative "yoomoney/models/personal_data_request"
|
|
122
122
|
require_relative "yoomoney/models/personal_data_retrieve_params"
|
|
123
123
|
require_relative "yoomoney/models/personal_data_type"
|
|
124
124
|
require_relative "yoomoney/models/receipt"
|
|
@@ -148,12 +148,20 @@ module Yoomoney
|
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
152
|
+
RFC_3986_NOT_PCHARS = T.let(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/, Regexp)
|
|
153
|
+
|
|
151
154
|
class << self
|
|
152
155
|
# @api private
|
|
153
156
|
sig { params(uri: URI::Generic).returns(String) }
|
|
154
157
|
def uri_origin(uri)
|
|
155
158
|
end
|
|
156
159
|
|
|
160
|
+
# @api private
|
|
161
|
+
sig { params(path: T.any(String, Integer)).returns(String) }
|
|
162
|
+
def encode_path(path)
|
|
163
|
+
end
|
|
164
|
+
|
|
157
165
|
# @api private
|
|
158
166
|
sig { params(path: T.any(String, T::Array[String])).returns(String) }
|
|
159
167
|
def interpolate_path(path)
|
|
@@ -301,6 +309,26 @@ module Yoomoney
|
|
|
301
309
|
T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
|
|
302
310
|
|
|
303
311
|
class << self
|
|
312
|
+
# @api private
|
|
313
|
+
sig do
|
|
314
|
+
params(query: Yoomoney::Internal::AnyHash).returns(
|
|
315
|
+
Yoomoney::Internal::AnyHash
|
|
316
|
+
)
|
|
317
|
+
end
|
|
318
|
+
def encode_query_params(query)
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# @api private
|
|
322
|
+
sig do
|
|
323
|
+
params(
|
|
324
|
+
collection: Yoomoney::Internal::AnyHash,
|
|
325
|
+
key: String,
|
|
326
|
+
element: T.anything
|
|
327
|
+
).void
|
|
328
|
+
end
|
|
329
|
+
private def write_query_param_element!(collection, key, element)
|
|
330
|
+
end
|
|
331
|
+
|
|
304
332
|
# @api private
|
|
305
333
|
sig do
|
|
306
334
|
params(
|
|
@@ -11,15 +11,23 @@ module Yoomoney
|
|
|
11
11
|
T.any(Yoomoney::DealRetrieveParams, Yoomoney::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :deal_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
deal_id: String,
|
|
20
|
+
request_options: Yoomoney::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(deal_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ deal_id: String, request_options: Yoomoney::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|
|
@@ -11,15 +11,23 @@ module Yoomoney
|
|
|
11
11
|
T.any(Yoomoney::InvoiceRetrieveParams, Yoomoney::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :invoice_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
invoice_id: String,
|
|
20
|
+
request_options: Yoomoney::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(invoice_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ invoice_id: String, request_options: Yoomoney::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|
|
@@ -11,21 +11,29 @@ module Yoomoney
|
|
|
11
11
|
T.any(Yoomoney::PaymentCancelParams, Yoomoney::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :payment_id
|
|
16
|
+
|
|
14
17
|
sig { returns(String) }
|
|
15
18
|
attr_accessor :idempotence_key
|
|
16
19
|
|
|
17
20
|
sig do
|
|
18
21
|
params(
|
|
22
|
+
payment_id: String,
|
|
19
23
|
idempotence_key: String,
|
|
20
24
|
request_options: Yoomoney::RequestOptions::OrHash
|
|
21
25
|
).returns(T.attached_class)
|
|
22
26
|
end
|
|
23
|
-
def self.new(idempotence_key:, request_options: {})
|
|
27
|
+
def self.new(payment_id:, idempotence_key:, request_options: {})
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
sig do
|
|
27
31
|
override.returns(
|
|
28
|
-
{
|
|
32
|
+
{
|
|
33
|
+
payment_id: String,
|
|
34
|
+
idempotence_key: String,
|
|
35
|
+
request_options: Yoomoney::RequestOptions
|
|
36
|
+
}
|
|
29
37
|
)
|
|
30
38
|
end
|
|
31
39
|
def to_hash
|
|
@@ -11,6 +11,9 @@ module Yoomoney
|
|
|
11
11
|
T.any(Yoomoney::PaymentCaptureParams, Yoomoney::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :payment_id
|
|
16
|
+
|
|
14
17
|
sig { returns(String) }
|
|
15
18
|
attr_accessor :idempotence_key
|
|
16
19
|
|
|
@@ -51,6 +54,7 @@ module Yoomoney
|
|
|
51
54
|
|
|
52
55
|
sig do
|
|
53
56
|
params(
|
|
57
|
+
payment_id: String,
|
|
54
58
|
idempotence_key: String,
|
|
55
59
|
airline: Yoomoney::Airline::OrHash,
|
|
56
60
|
amount: Yoomoney::MonetaryAmount::OrHash,
|
|
@@ -61,6 +65,7 @@ module Yoomoney
|
|
|
61
65
|
).returns(T.attached_class)
|
|
62
66
|
end
|
|
63
67
|
def self.new(
|
|
68
|
+
payment_id:,
|
|
64
69
|
idempotence_key:,
|
|
65
70
|
# Данные для продажи авиабилетов.
|
|
66
71
|
airline: nil,
|
|
@@ -79,6 +84,7 @@ module Yoomoney
|
|
|
79
84
|
sig do
|
|
80
85
|
override.returns(
|
|
81
86
|
{
|
|
87
|
+
payment_id: String,
|
|
82
88
|
idempotence_key: String,
|
|
83
89
|
airline: Yoomoney::Airline,
|
|
84
90
|
amount: Yoomoney::MonetaryAmount,
|
|
@@ -14,15 +14,26 @@ module Yoomoney
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :payment_method_id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
payment_method_id: String,
|
|
23
|
+
request_options: Yoomoney::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(payment_method_id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
|
-
sig
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{
|
|
32
|
+
payment_method_id: String,
|
|
33
|
+
request_options: Yoomoney::RequestOptions
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
end
|
|
26
37
|
def to_hash
|
|
27
38
|
end
|
|
28
39
|
end
|
|
@@ -11,15 +11,23 @@ module Yoomoney
|
|
|
11
11
|
T.any(Yoomoney::PaymentRetrieveParams, Yoomoney::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :payment_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
payment_id: String,
|
|
20
|
+
request_options: Yoomoney::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(payment_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ payment_id: String, request_options: Yoomoney::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|
|
@@ -11,15 +11,23 @@ module Yoomoney
|
|
|
11
11
|
T.any(Yoomoney::PayoutRetrieveParams, Yoomoney::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :payout_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
payout_id: String,
|
|
20
|
+
request_options: Yoomoney::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(payout_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ payout_id: String, request_options: Yoomoney::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|
|
@@ -11,83 +11,168 @@ module Yoomoney
|
|
|
11
11
|
T.any(Yoomoney::PersonalDataCreateParams, Yoomoney::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
sig { returns(Yoomoney::PersonalDataType::OrSymbol) }
|
|
24
|
-
attr_accessor :type
|
|
14
|
+
sig do
|
|
15
|
+
returns(
|
|
16
|
+
T.any(
|
|
17
|
+
Yoomoney::PersonalDataCreateParams::Body::SbpPayoutRecipientPersonalDataRequest,
|
|
18
|
+
Yoomoney::PersonalDataCreateParams::Body::PayoutStatementRecipientPersonalDataRequest
|
|
19
|
+
)
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
attr_accessor :body
|
|
25
23
|
|
|
26
24
|
sig { returns(String) }
|
|
27
25
|
attr_accessor :idempotence_key
|
|
28
26
|
|
|
29
|
-
# Любые дополнительные данные, которые нужны вам для работы (например, номер
|
|
30
|
-
# заказа). Передаются в виде набора пар «ключ-значение» и возвращаются в ответе от
|
|
31
|
-
# ЮKassa. Ограничения: максимум 16 ключей, имя ключа не больше 32 символов,
|
|
32
|
-
# значение ключа не больше 512 символов, тип данных — строка в формате UTF-8.
|
|
33
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
34
|
-
attr_reader :metadata
|
|
35
|
-
|
|
36
|
-
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
37
|
-
attr_writer :metadata
|
|
38
|
-
|
|
39
|
-
# Отчество.
|
|
40
|
-
sig { returns(T.nilable(String)) }
|
|
41
|
-
attr_reader :middle_name
|
|
42
|
-
|
|
43
|
-
sig { params(middle_name: String).void }
|
|
44
|
-
attr_writer :middle_name
|
|
45
|
-
|
|
46
27
|
sig do
|
|
47
28
|
params(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
29
|
+
body:
|
|
30
|
+
T.any(
|
|
31
|
+
Yoomoney::PersonalDataCreateParams::Body::SbpPayoutRecipientPersonalDataRequest::OrHash,
|
|
32
|
+
Yoomoney::PersonalDataCreateParams::Body::PayoutStatementRecipientPersonalDataRequest::OrHash
|
|
33
|
+
),
|
|
51
34
|
idempotence_key: String,
|
|
52
|
-
metadata: T::Hash[Symbol, String],
|
|
53
|
-
middle_name: String,
|
|
54
35
|
request_options: Yoomoney::RequestOptions::OrHash
|
|
55
36
|
).returns(T.attached_class)
|
|
56
37
|
end
|
|
57
|
-
def self.new(
|
|
58
|
-
# Имя.
|
|
59
|
-
first_name:,
|
|
60
|
-
# Фамилия.
|
|
61
|
-
last_name:,
|
|
62
|
-
# Тип персональных данных.
|
|
63
|
-
type:,
|
|
64
|
-
idempotence_key:,
|
|
65
|
-
# Любые дополнительные данные, которые нужны вам для работы (например, номер
|
|
66
|
-
# заказа). Передаются в виде набора пар «ключ-значение» и возвращаются в ответе от
|
|
67
|
-
# ЮKassa. Ограничения: максимум 16 ключей, имя ключа не больше 32 символов,
|
|
68
|
-
# значение ключа не больше 512 символов, тип данных — строка в формате UTF-8.
|
|
69
|
-
metadata: nil,
|
|
70
|
-
# Отчество.
|
|
71
|
-
middle_name: nil,
|
|
72
|
-
request_options: {}
|
|
73
|
-
)
|
|
38
|
+
def self.new(body:, idempotence_key:, request_options: {})
|
|
74
39
|
end
|
|
75
40
|
|
|
76
41
|
sig do
|
|
77
42
|
override.returns(
|
|
78
43
|
{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
44
|
+
body:
|
|
45
|
+
T.any(
|
|
46
|
+
Yoomoney::PersonalDataCreateParams::Body::SbpPayoutRecipientPersonalDataRequest,
|
|
47
|
+
Yoomoney::PersonalDataCreateParams::Body::PayoutStatementRecipientPersonalDataRequest
|
|
48
|
+
),
|
|
82
49
|
idempotence_key: String,
|
|
83
|
-
metadata: T::Hash[Symbol, String],
|
|
84
|
-
middle_name: String,
|
|
85
50
|
request_options: Yoomoney::RequestOptions
|
|
86
51
|
}
|
|
87
52
|
)
|
|
88
53
|
end
|
|
89
54
|
def to_hash
|
|
90
55
|
end
|
|
56
|
+
|
|
57
|
+
module Body
|
|
58
|
+
extend Yoomoney::Internal::Type::Union
|
|
59
|
+
|
|
60
|
+
Variants =
|
|
61
|
+
T.type_alias do
|
|
62
|
+
T.any(
|
|
63
|
+
Yoomoney::PersonalDataCreateParams::Body::SbpPayoutRecipientPersonalDataRequest,
|
|
64
|
+
Yoomoney::PersonalDataCreateParams::Body::PayoutStatementRecipientPersonalDataRequest
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
class SbpPayoutRecipientPersonalDataRequest < Yoomoney::Models::PersonalDataRequest
|
|
69
|
+
OrHash =
|
|
70
|
+
T.type_alias do
|
|
71
|
+
T.any(
|
|
72
|
+
Yoomoney::PersonalDataCreateParams::Body::SbpPayoutRecipientPersonalDataRequest,
|
|
73
|
+
Yoomoney::Internal::AnyHash
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Имя.
|
|
78
|
+
sig { returns(String) }
|
|
79
|
+
attr_accessor :first_name
|
|
80
|
+
|
|
81
|
+
# Фамилия.
|
|
82
|
+
sig { returns(String) }
|
|
83
|
+
attr_accessor :last_name
|
|
84
|
+
|
|
85
|
+
# Отчество.
|
|
86
|
+
sig { returns(T.nilable(String)) }
|
|
87
|
+
attr_reader :middle_name
|
|
88
|
+
|
|
89
|
+
sig { params(middle_name: String).void }
|
|
90
|
+
attr_writer :middle_name
|
|
91
|
+
|
|
92
|
+
sig do
|
|
93
|
+
params(
|
|
94
|
+
first_name: String,
|
|
95
|
+
last_name: String,
|
|
96
|
+
middle_name: String
|
|
97
|
+
).returns(T.attached_class)
|
|
98
|
+
end
|
|
99
|
+
def self.new(
|
|
100
|
+
# Имя.
|
|
101
|
+
first_name:,
|
|
102
|
+
# Фамилия.
|
|
103
|
+
last_name:,
|
|
104
|
+
# Отчество.
|
|
105
|
+
middle_name: nil
|
|
106
|
+
)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
sig do
|
|
110
|
+
override.returns(
|
|
111
|
+
{ first_name: String, last_name: String, middle_name: String }
|
|
112
|
+
)
|
|
113
|
+
end
|
|
114
|
+
def to_hash
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
class PayoutStatementRecipientPersonalDataRequest < Yoomoney::Models::PersonalDataRequest
|
|
119
|
+
OrHash =
|
|
120
|
+
T.type_alias do
|
|
121
|
+
T.any(
|
|
122
|
+
Yoomoney::PersonalDataCreateParams::Body::PayoutStatementRecipientPersonalDataRequest,
|
|
123
|
+
Yoomoney::Internal::AnyHash
|
|
124
|
+
)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Имя.
|
|
128
|
+
sig { returns(String) }
|
|
129
|
+
attr_accessor :first_name
|
|
130
|
+
|
|
131
|
+
# Фамилия.
|
|
132
|
+
sig { returns(String) }
|
|
133
|
+
attr_accessor :last_name
|
|
134
|
+
|
|
135
|
+
# Отчество.
|
|
136
|
+
sig { returns(T.nilable(String)) }
|
|
137
|
+
attr_reader :middle_name
|
|
138
|
+
|
|
139
|
+
sig { params(middle_name: String).void }
|
|
140
|
+
attr_writer :middle_name
|
|
141
|
+
|
|
142
|
+
sig do
|
|
143
|
+
params(
|
|
144
|
+
first_name: String,
|
|
145
|
+
last_name: String,
|
|
146
|
+
middle_name: String
|
|
147
|
+
).returns(T.attached_class)
|
|
148
|
+
end
|
|
149
|
+
def self.new(
|
|
150
|
+
# Имя.
|
|
151
|
+
first_name:,
|
|
152
|
+
# Фамилия.
|
|
153
|
+
last_name:,
|
|
154
|
+
# Отчество.
|
|
155
|
+
middle_name: nil
|
|
156
|
+
)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
sig do
|
|
160
|
+
override.returns(
|
|
161
|
+
{ first_name: String, last_name: String, middle_name: String }
|
|
162
|
+
)
|
|
163
|
+
end
|
|
164
|
+
def to_hash
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
sig do
|
|
169
|
+
override.returns(
|
|
170
|
+
T::Array[Yoomoney::PersonalDataCreateParams::Body::Variants]
|
|
171
|
+
)
|
|
172
|
+
end
|
|
173
|
+
def self.variants
|
|
174
|
+
end
|
|
175
|
+
end
|
|
91
176
|
end
|
|
92
177
|
end
|
|
93
178
|
end
|
|
@@ -14,15 +14,26 @@ module Yoomoney
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :personal_data_id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
personal_data_id: String,
|
|
23
|
+
request_options: Yoomoney::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(personal_data_id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
|
-
sig
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{
|
|
32
|
+
personal_data_id: String,
|
|
33
|
+
request_options: Yoomoney::RequestOptions
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
end
|
|
26
37
|
def to_hash
|
|
27
38
|
end
|
|
28
39
|
end
|
|
@@ -11,15 +11,23 @@ module Yoomoney
|
|
|
11
11
|
T.any(Yoomoney::ReceiptRetrieveParams, Yoomoney::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :receipt_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
receipt_id: String,
|
|
20
|
+
request_options: Yoomoney::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(receipt_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ receipt_id: String, request_options: Yoomoney::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|
|
@@ -11,15 +11,23 @@ module Yoomoney
|
|
|
11
11
|
T.any(Yoomoney::RefundRetrieveParams, Yoomoney::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :refund_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
refund_id: String,
|
|
20
|
+
request_options: Yoomoney::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(refund_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ refund_id: String, request_options: Yoomoney::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|