Initial commit

This commit is contained in:
Yaser
2026-08-13 19:50:53 +03:30
commit 38084458fe
879 changed files with 95198 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
# encoding: UTF-8
# frozen_string_literal: true
module API
module V2
module Entities
class PaymentAddress < Base
expose(
:currencies,
documentation: {
desc: 'Currencies codes.',
is_array: true,
example: -> { ::Currency.visible.codes }
}
) do |pa|
pa.wallet.currencies.codes
end
expose(
:address,
documentation: {
desc: 'Payment address.',
type: String
}
) do |pa, options|
options[:address_format] ? pa.format_address(options[:address_format]) : pa.address
end
expose(
:state,
documentation: {
desc: 'Payment address state.',
type: String
}
) do |pa|
pa.address.present? ? 'active' : 'pending'
end
end
end
end
end