Class: Yoomoney::Resources::Payouts
- Inherits:
-
Object
- Object
- Yoomoney::Resources::Payouts
- Defined in:
- lib/yoomoney/resources/payouts.rb
Instance Method Summary collapse
-
#create(amount:, idempotence_key:, deal: nil, description: nil, metadata: nil, payment_method_id: nil, payout_destination_data: nil, payout_token: nil, personal_data: nil, request_options: {}) ⇒ Yoomoney::Models::Payout
Some parameter documentations has been truncated, see Models::PayoutCreateParams for more details.
-
#initialize(client:) ⇒ Payouts
constructor
private
A new instance of Payouts.
-
#list(created_at: nil, cursor: nil, limit: nil, payout_destination: nil, status: nil, request_options: {}) ⇒ Yoomoney::Models::PayoutsList
Список выплат.
-
#retrieve(payout_id, request_options: {}) ⇒ Yoomoney::Models::Payout
Информация о выплате.
-
#search(created_at: nil, cursor: nil, limit: nil, request_options: {}) ⇒ Yoomoney::Models::PayoutsList
Поиск выплат по метаданным.
Constructor Details
#initialize(client:) ⇒ Payouts
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Payouts.
119 120 121 |
# File 'lib/yoomoney/resources/payouts.rb', line 119 def initialize(client:) @client = client end |
Instance Method Details
#create(amount:, idempotence_key:, deal: nil, description: nil, metadata: nil, payment_method_id: nil, payout_destination_data: nil, payout_token: nil, personal_data: nil, request_options: {}) ⇒ Yoomoney::Models::Payout
Some parameter documentations has been truncated, see Models::PayoutCreateParams for more details.
Создание выплаты
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/yoomoney/resources/payouts.rb', line 36 def create(params) parsed, = Yoomoney::PayoutCreateParams.dump_request(params) header_params = {idempotence_key: "idempotence-key"} @client.request( method: :post, path: "payouts", headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: Yoomoney::Payout, options: ) end |
#list(created_at: nil, cursor: nil, limit: nil, payout_destination: nil, status: nil, request_options: {}) ⇒ Yoomoney::Models::PayoutsList
Список выплат
82 83 84 85 86 87 88 89 90 91 |
# File 'lib/yoomoney/resources/payouts.rb', line 82 def list(params = {}) parsed, = Yoomoney::PayoutListParams.dump_request(params) @client.request( method: :get, path: "payouts", query: parsed, model: Yoomoney::PayoutsList, options: ) end |
#retrieve(payout_id, request_options: {}) ⇒ Yoomoney::Models::Payout
Информация о выплате
59 60 61 62 63 64 65 66 |
# File 'lib/yoomoney/resources/payouts.rb', line 59 def retrieve(payout_id, params = {}) @client.request( method: :get, path: ["payouts/%1$s", payout_id], model: Yoomoney::Payout, options: params[:request_options] ) end |
#search(created_at: nil, cursor: nil, limit: nil, request_options: {}) ⇒ Yoomoney::Models::PayoutsList
Поиск выплат по метаданным
105 106 107 108 109 110 111 112 113 114 |
# File 'lib/yoomoney/resources/payouts.rb', line 105 def search(params = {}) parsed, = Yoomoney::PayoutSearchParams.dump_request(params) @client.request( method: :get, path: "payouts/search", query: parsed, model: Yoomoney::PayoutsList, options: ) end |