зеркало из
https://github.com/glebtv/yookassa.git
synced 2026-09-03 17:55:51 +03:00
20 строки
507 B
Ruby
20 строки
507 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "client"
|
|
require_relative "entity/payout"
|
|
require_relative "entity/collection"
|
|
|
|
module Yookassa
|
|
class Payouts < Client
|
|
def find(payout_id:)
|
|
data = get("payouts/#{payout_id}")
|
|
Entity::Payout.new(**data)
|
|
end
|
|
|
|
def create(payload:, idempotency_key: SecureRandom.hex(10))
|
|
data = post("payouts", payload: payload, idempotency_key: idempotency_key)
|
|
Entity::Payout.new(**data, idempotency_key: idempotency_key)
|
|
end
|
|
end
|
|
end
|