mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Merge remote-tracking branch 'origin/master' into 110412166-registrant_change
This commit is contained in:
commit
3d180ec45a
73 changed files with 2782 additions and 276 deletions
|
@ -2,46 +2,54 @@ class Admin::BlockedDomainsController < AdminController
|
|||
load_and_authorize_resource
|
||||
|
||||
def index
|
||||
bd = BlockedDomain.pluck(:name)
|
||||
if bd
|
||||
@blocked_domains = bd.to_yaml.gsub("---\n", '').gsub("-", '').gsub(" ", '')
|
||||
end
|
||||
|
||||
params[:q] ||= {}
|
||||
domains = BlockedDomain.all.order(:name)
|
||||
@q = domains.search(params[:q])
|
||||
@domains = @q.result.page(params[:page])
|
||||
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
|
||||
|
||||
end
|
||||
|
||||
def new
|
||||
|
||||
@domain = BlockedDomain.new
|
||||
|
||||
end
|
||||
|
||||
def create
|
||||
@blocked_domains = params[:blocked_domains]
|
||||
|
||||
begin
|
||||
params[:blocked_domains] = "---\n" if params[:blocked_domains].blank?
|
||||
names = YAML.load(params[:blocked_domains])
|
||||
fail if names == false
|
||||
rescue
|
||||
flash.now[:alert] = I18n.t('invalid_yaml')
|
||||
logger.warn 'Invalid YAML'
|
||||
render :index and return
|
||||
end
|
||||
@domain = BlockedDomain.new(blocked_domain_params)
|
||||
|
||||
names = names.split(' ')
|
||||
result = true
|
||||
BlockedDomain.transaction do
|
||||
existing = BlockedDomain.any_of_domains(names).pluck(:id)
|
||||
BlockedDomain.where.not(id: existing).destroy_all
|
||||
|
||||
names.each do |name|
|
||||
rec = BlockedDomain.find_or_initialize_by(name: name)
|
||||
unless rec.save
|
||||
result = false
|
||||
raise ActiveRecord::Rollback
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if result
|
||||
flash[:notice] = I18n.t('record_updated')
|
||||
redirect_to :back
|
||||
if @domain.save
|
||||
flash[:notice] = I18n.t('domain_added')
|
||||
redirect_to admin_blocked_domains_path
|
||||
else
|
||||
flash.now[:alert] = I18n.t('failed_to_update_record')
|
||||
render :index
|
||||
flash.now[:alert] = I18n.t('failed_to_add_domain')
|
||||
render 'new'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def delete
|
||||
|
||||
if BlockedDomain.find(params[:id]).destroy
|
||||
flash[:notice] = I18n.t('domain_deleted')
|
||||
redirect_to admin_blocked_domains_path
|
||||
else
|
||||
flash.now[:alert] = I18n.t('failed_to_delete_domain')
|
||||
redirect_to admin_blocked_domains_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def blocked_domain_params
|
||||
params.require(:blocked_domain).permit(:name)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_domain
|
||||
@domain = BlockedDomain.find(params[:id])
|
||||
end
|
||||
end
|
|
@ -23,7 +23,7 @@ class Admin::InvoicesController < AdminController
|
|||
|
||||
def index
|
||||
@q = Invoice.includes(:account_activity).search(params[:q])
|
||||
@q.sorts = 'id desc' if @q.sorts.empty?
|
||||
@q.sorts = 'number desc' if @q.sorts.empty?
|
||||
@invoices = @q.result.page(params[:page])
|
||||
end
|
||||
|
||||
|
|
|
@ -1,49 +1,68 @@
|
|||
class Admin::ReservedDomainsController < AdminController
|
||||
load_and_authorize_resource
|
||||
before_action :set_domain, only: [:edit, :update]
|
||||
|
||||
def index
|
||||
names = ReservedDomain.pluck(:name, :password).each_with_object({}){|domain, hash| hash[domain[0]] = domain[1]}
|
||||
names.names = nil if names.blank?
|
||||
@reserved_domains = names.to_yaml.gsub(/---.?\n/, '').gsub(/\.\.\..?\n/, '')
|
||||
|
||||
params[:q] ||= {}
|
||||
domains = ReservedDomain.all.order(:name)
|
||||
@q = domains.search(params[:q])
|
||||
@domains = @q.result.page(params[:page])
|
||||
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
|
||||
|
||||
end
|
||||
|
||||
def new
|
||||
@domain = ReservedDomain.new
|
||||
end
|
||||
|
||||
def edit
|
||||
end
|
||||
|
||||
def create
|
||||
@reserved_domains = params[:reserved_domains]
|
||||
|
||||
begin
|
||||
params[:reserved_domains] = "---\n" if params[:reserved_domains].blank?
|
||||
names = YAML.load(params[:reserved_domains])
|
||||
fail if names == false
|
||||
rescue
|
||||
flash.now[:alert] = I18n.t('invalid_yaml')
|
||||
logger.warn 'Invalid YAML'
|
||||
render :index and return
|
||||
end
|
||||
@domain = ReservedDomain.new(reserved_domain_params)
|
||||
|
||||
result = true
|
||||
ReservedDomain.transaction do
|
||||
# removing old ones
|
||||
existing = ReservedDomain.any_of_domains(names.keys).pluck(:id)
|
||||
ReservedDomain.where.not(id: existing).destroy_all
|
||||
|
||||
#updating and adding
|
||||
names.each do |name, psw|
|
||||
rec = ReservedDomain.find_or_initialize_by(name: name)
|
||||
rec.password = psw
|
||||
|
||||
unless rec.save
|
||||
result = false
|
||||
raise ActiveRecord::Rollback
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if result
|
||||
flash[:notice] = I18n.t('record_updated')
|
||||
redirect_to :back
|
||||
if @domain.save
|
||||
flash[:notice] = I18n.t('domain_added')
|
||||
redirect_to admin_reserved_domains_path
|
||||
else
|
||||
flash.now[:alert] = I18n.t('failed_to_update_record')
|
||||
render :index
|
||||
flash.now[:alert] = I18n.t('failed_to_add_domain')
|
||||
render 'new'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def update
|
||||
|
||||
if @domain.update(reserved_domain_params)
|
||||
flash[:notice] = I18n.t('domain_updated')
|
||||
else
|
||||
flash.now[:alert] = I18n.t('failed_to_update_domain')
|
||||
end
|
||||
render 'edit'
|
||||
|
||||
end
|
||||
|
||||
def delete
|
||||
|
||||
if ReservedDomain.find(params[:id]).destroy
|
||||
flash[:notice] = I18n.t('domain_deleted')
|
||||
redirect_to admin_reserved_domains_path
|
||||
else
|
||||
flash.now[:alert] = I18n.t('failed_to_delete_domain')
|
||||
redirect_to admin_reserved_domains_path
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def reserved_domain_params
|
||||
params.require(:reserved_domain).permit(:name, :password)
|
||||
end
|
||||
|
||||
def set_domain
|
||||
@domain = ReservedDomain.find(params[:id])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -59,6 +59,7 @@ class Admin::SettingsController < AdminController
|
|||
:transfer_wait_time,
|
||||
:invoice_number_min,
|
||||
:invoice_number_max,
|
||||
:days_to_keep_business_registry_cache,
|
||||
:days_to_keep_invoices_active,
|
||||
:days_to_keep_overdue_invoices_active,
|
||||
:days_to_renew_domain_before_expire,
|
||||
|
|
|
@ -32,7 +32,7 @@ class ApplicationController < ActionController::Base
|
|||
if registrar_request?
|
||||
registrar_root_url
|
||||
elsif registrant_request?
|
||||
registrant_root_url
|
||||
registrant_login_url
|
||||
elsif admin_request?
|
||||
admin_root_url
|
||||
end
|
||||
|
|
|
@ -361,9 +361,10 @@ class EppController < ApplicationController
|
|||
if request_command == 'login' && frame.present?
|
||||
frame.gsub!(/pw>.+<\//, 'pw>[FILTERED]</')
|
||||
end
|
||||
trimmed_request = frame.gsub(/<eis:legalDocument([^>]+)>([^<])+<\/eis:legalDocument>/, "<eis:legalDocument>[FILTERED]</eis:legalDocument>")
|
||||
|
||||
ApiLog::EppLog.create({
|
||||
request: frame,
|
||||
request: trimmed_request,
|
||||
request_command: request_command,
|
||||
request_successful: epp_errors.empty?,
|
||||
request_object: params[:epp_object_type],
|
||||
|
|
8
app/controllers/registrant/contacts_controller.rb
Normal file
8
app/controllers/registrant/contacts_controller.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
class Registrant::ContactsController < RegistrantController
|
||||
|
||||
def show
|
||||
@contact = Contact.find(params[:id])
|
||||
authorize! :read, @contact
|
||||
@contact.valid?
|
||||
end
|
||||
end
|
|
@ -1,5 +1,64 @@
|
|||
class Registrant::DomainsController < RegistrantController
|
||||
|
||||
def index
|
||||
authorize! :view, :registrant_domains
|
||||
authorize! :view, :registrant_domains
|
||||
params[:q] ||= {}
|
||||
normalize_search_parameters do
|
||||
@q = domains.search(params[:q])
|
||||
@domains = @q.result.page(params[:page])
|
||||
end
|
||||
end
|
||||
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
|
||||
end
|
||||
|
||||
def show
|
||||
@domain = Domain.find(params[:id])
|
||||
if !(domains.include?(@domain) || @domain.valid?)
|
||||
redirect_to registrant_domains_path
|
||||
end
|
||||
authorize! :read, @domain
|
||||
end
|
||||
|
||||
def set_domain
|
||||
@domain = Domain.find(params[:id])
|
||||
end
|
||||
|
||||
def download_list
|
||||
authorize! :view, :registrant_domains
|
||||
params[:q] ||= {}
|
||||
normalize_search_parameters do
|
||||
@q = domains.search(params[:q])
|
||||
@domains = @q
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
format.csv { render text: @domains.result.to_csv }
|
||||
format.pdf do
|
||||
pdf = @domains.result.pdf(render_to_string('registrant/domains/download_list', layout: false))
|
||||
send_data pdf, filename: 'domains.pdf'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def domains
|
||||
ident_cc, ident = @current_user.registrant_ident.split '-'
|
||||
begin
|
||||
BusinessRegistryCache.fetch_associated_domains ident, ident_cc
|
||||
rescue Soap::Arireg::NotAvailableError => error
|
||||
flash[:notice] = I18n.t(error.json[:message])
|
||||
Rails.logger.fatal("[EXCEPTION] #{error.to_s}")
|
||||
current_user.domains
|
||||
end
|
||||
end
|
||||
|
||||
def normalize_search_parameters
|
||||
ca_cache = params[:q][:valid_to_lteq]
|
||||
begin
|
||||
end_time = params[:q][:valid_to_lteq].try(:to_date)
|
||||
params[:q][:valid_to_lteq] = end_time.try(:end_of_day)
|
||||
rescue
|
||||
logger.warn('Invalid date')
|
||||
end
|
||||
yield
|
||||
params[:q][:valid_to_lteq] = ca_cache
|
||||
end
|
||||
end
|
8
app/controllers/registrant/registrants_controller.rb
Normal file
8
app/controllers/registrant/registrants_controller.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
class Registrant::RegistrantsController < RegistrantController
|
||||
|
||||
def show
|
||||
@contact = Registrant.find(params[:id])
|
||||
authorize! :read, @contact
|
||||
@contact.valid?
|
||||
end
|
||||
end
|
7
app/controllers/registrant/registrars_controller.rb
Normal file
7
app/controllers/registrant/registrars_controller.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
class Registrant::RegistrarsController < RegistrantController
|
||||
|
||||
def show
|
||||
@registrar = Registrar.find(params[:id])
|
||||
authorize! :read, @registrar
|
||||
end
|
||||
end
|
|
@ -6,15 +6,10 @@ class Registrant::SessionsController < Devise::SessionsController
|
|||
|
||||
# rubocop: disable Metrics/AbcSize
|
||||
def id
|
||||
if Rails.env.development?
|
||||
sign_in(RegistrantUser.find_or_create_by_idc_data('test'), event: :authentication)
|
||||
return redirect_to registrant_root_url
|
||||
end
|
||||
id_code, id_issuer = request.env['SSL_CLIENT_S_DN'], request.env['SSL_CLIENT_I_DN_O']
|
||||
id_code, id_issuer = 'test', RegistrantUser::ACCEPTED_ISSUER if Rails.env.development?
|
||||
|
||||
logger.error request.env['SSL_CLIENT_S_DN']
|
||||
logger.error request.env['SSL_CLIENT_S_DN'].encoding
|
||||
logger.error request.env['SSL_CLIENT_I_DN_O']
|
||||
@user = RegistrantUser.find_or_create_by_idc_data(request.env['SSL_CLIENT_S_DN'], request.env['SSL_CLIENT_I_DN_O'])
|
||||
@user = RegistrantUser.find_or_create_by_idc_data(id_code, id_issuer)
|
||||
if @user
|
||||
sign_in(@user, event: :authentication)
|
||||
redirect_to registrant_root_url
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
class Registrant::WhoisController < RegistrantController
|
||||
def index
|
||||
authorize! :view, :registrant_whois
|
||||
|
||||
if params[:domain_name].present?
|
||||
@domain = WhoisRecord.find_by(name: params[:domain_name]);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ class RegenerateRegistrarWhoisesJob < Que::Job
|
|||
registrar = Registrar.find(registrar_id)
|
||||
|
||||
registrar.whois_records.select(:id).find_in_batches(batch_size: 20) do |group|
|
||||
RegenerateWhoisRecordJob.enqueue group.map(&:id)
|
||||
RegenerateWhoisRecordJob.enqueue group.map(&:id), :id
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,7 +1,7 @@
|
|||
class RegenerateWhoisRecordJob < Que::Job
|
||||
def run(ids)
|
||||
def run(ids, attr = :id)
|
||||
ids.each do |id|
|
||||
record = WhoisRecord.find_by(id: id)
|
||||
record = WhoisRecord.find_by(attr => id)
|
||||
return unless record
|
||||
|
||||
record.save
|
||||
|
|
|
@ -16,7 +16,7 @@ class Ability
|
|||
@user.roles.each { |role| send(role) } if @user.roles
|
||||
when 'ApiUser'
|
||||
@user.roles.each { |role| send(role) } if @user.roles
|
||||
when 'RegistrantUser'
|
||||
when 'RegistrantUser'
|
||||
static_registrant
|
||||
end
|
||||
|
||||
|
@ -117,9 +117,11 @@ class Ability
|
|||
end
|
||||
|
||||
def static_registrant
|
||||
customer_service
|
||||
can :manage, :registrant_domains
|
||||
can :manage, :registrant_whois
|
||||
can :manage, Depp::Domain
|
||||
can :manage, Domain
|
||||
end
|
||||
|
||||
def user
|
||||
|
|
|
@ -2,6 +2,7 @@ class BlockedDomain < ActiveRecord::Base
|
|||
include Versions
|
||||
before_save :generate_data
|
||||
before_destroy :remove_data
|
||||
validates :name, domain_name: true, uniqueness: true
|
||||
|
||||
|
||||
class << self
|
||||
|
|
74
app/models/business_registry_cache.rb
Normal file
74
app/models/business_registry_cache.rb
Normal file
|
@ -0,0 +1,74 @@
|
|||
|
||||
=begin
|
||||
The portal for registrants has to offer an overview of the domains the user is related to directly or through an organisation.
|
||||
Personal relation is defined by matching the personal identification code associated with a domain and the one acquired on
|
||||
authentication using electronic ID. Association through a business organisation requires a query to business registry.
|
||||
|
||||
* when user logs in the personal identification code is sent to business registry (using XML service)
|
||||
* business registry returns the list of business registry codes the user is a board member of
|
||||
* the list is cached for two days (configurable)
|
||||
* during that time no new queries are made to business registry for that personal identification code
|
||||
and the cached organisation code listing is used
|
||||
* user sees the listing of domains that are associated with him/her directly or through registered organisation
|
||||
* UI of the portal displays the list of organisation codes and names used to fetch additional domains for the user
|
||||
(currently by clicking on a username in top right corner of the screen).
|
||||
Also time and date of the query to the business registry is displayed with the list of organisations.
|
||||
* if the query to the business registry fails for any reason the list of
|
||||
domains associated directly with the user is still displayed with an error message indicating a problem
|
||||
with receiving current list business entities. Outdated list of organisations cannot be used.
|
||||
=end
|
||||
|
||||
class BusinessRegistryCache < ActiveRecord::Base
|
||||
|
||||
# 1. load domains by business
|
||||
# 2. load domains by person
|
||||
def associated_domains
|
||||
domains = []
|
||||
|
||||
contact_ids = Contact.where(ident_type: 'org', ident: associated_businesses, ident_country_code: 'EE').pluck(:id)
|
||||
contact_ids += Contact.where(ident_type: 'priv', ident: ident, ident_country_code: ident_country_code).pluck(:id)
|
||||
|
||||
unless contact_ids.blank?
|
||||
domains = DomainContact.distinct.where(contact_id: contact_ids).pluck(:domain_id)
|
||||
end
|
||||
|
||||
Domain.includes(:registrar, :registrant).where(id: domains)
|
||||
end
|
||||
|
||||
class << self
|
||||
def fetch_associated_domains(ident_code, ident_cc)
|
||||
fetch_by_ident_and_cc(ident_code, ident_cc).associated_domains
|
||||
end
|
||||
|
||||
def fetch_by_ident_and_cc(ident_code, ident_cc)
|
||||
cache = BusinessRegistryCache.where(ident: ident_code, ident_country_code: ident_cc).first_or_initialize
|
||||
msg_start = "[Ariregister] #{ident_cc}-#{ident_code}:"
|
||||
|
||||
# fetch new data if cache is expired
|
||||
if cache.retrieved_on && cache.retrieved_on > (Time.zone.now - Setting.days_to_keep_business_registry_cache.days)
|
||||
Rails.logger.info("#{msg_start} Info loaded from cache")
|
||||
return cache
|
||||
end
|
||||
|
||||
cache.attributes = business_registry.associated_businesses(ident_code, ident_cc)
|
||||
Rails.logger.info("#{msg_start} Info loaded from server")
|
||||
|
||||
cache.save
|
||||
cache
|
||||
end
|
||||
|
||||
def business_registry
|
||||
Soap::Arireg.new
|
||||
end
|
||||
|
||||
def purge
|
||||
STDOUT << "#{Time.zone.now.utc} - Starting Purge of old BusinessRegistry data from cache\n" unless Rails.env.test?
|
||||
purged = 0
|
||||
BusinessRegistryCache.where('retrieved_on < ?',
|
||||
Time.zone.now < Setting.days_to_keep_business_registry_cache.days).each do |br|
|
||||
br.destroy and purged += 1
|
||||
end
|
||||
STDOUT << "#{Time.zone.now.utc} - Finished purging #{purged} old BusinessRegistry cache items\n" unless Rails.env.test?
|
||||
end
|
||||
end
|
||||
end
|
|
@ -499,7 +499,8 @@ class Contact < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def update_related_whois_records
|
||||
related_domain_descriptions.each{ |x, y| WhoisRecord.find_by(name: x).try(:save) }
|
||||
ids = related_domain_descriptions.keys
|
||||
RegenerateWhoisRecordJob.enqueue(ids, :name) if ids.present?
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -2,14 +2,23 @@ class Directo < ActiveRecord::Base
|
|||
belongs_to :item, polymorphic: true
|
||||
|
||||
def self.send_receipts
|
||||
new_trans = Invoice.where(invoice_type: "DEB", in_directo: false).where.not(cancelled_at: nil)
|
||||
new_trans = Invoice.where(invoice_type: "DEB", in_directo: false).where(cancelled_at: nil)
|
||||
total = new_trans.count
|
||||
counter = 0
|
||||
Rails.logger.info("[DIRECTO] Will try to send #{total} invoices")
|
||||
|
||||
new_trans.find_in_batches(batch_size: 10).each do |group|
|
||||
mappers = {} # need them as no direct connection between invoice
|
||||
builder = Nokogiri::XML::Builder.new(encoding: "UTF-8") do |xml|
|
||||
xml.invoices {
|
||||
group.each do |invoice|
|
||||
next if invoice.account_activity.nil? || invoice.account_activity.bank_transaction.nil?
|
||||
# next if invoice.account_activity.bank_transaction.sum.nil? || invoice.account_activity.bank_transaction.sum != invoice.sum_cache
|
||||
|
||||
if invoice.account_activity.nil? || invoice.account_activity.bank_transaction.nil? ||
|
||||
invoice.account_activity.bank_transaction.sum.nil? || invoice.account_activity.bank_transaction.sum != invoice.sum_cache
|
||||
Rails.logger.info("[DIRECTO] Invoice #{invoice.number} has been skipped")
|
||||
next
|
||||
end
|
||||
counter += 1
|
||||
|
||||
num = invoice.number
|
||||
mappers[num] = invoice
|
||||
|
@ -36,6 +45,8 @@ class Directo < ActiveRecord::Base
|
|||
response = RestClient::Request.execute(url: ENV['directo_invoice_url'], method: :post, payload: {put: "1", what: "invoice", xmldata: data}, verify_ssl: false).to_s
|
||||
dump_result_to_db(mappers, response)
|
||||
end
|
||||
|
||||
STDOUT << "#{Time.zone.now.utc} - Directo receipts sending finished. #{counter} of #{total} are sent\n"
|
||||
end
|
||||
|
||||
def self.dump_result_to_db mappers, xml
|
||||
|
|
|
@ -203,6 +203,31 @@ class Domain < ActiveRecord::Base
|
|||
statuses.include? DomainStatus::SERVER_TECH_CHANGE_PROHIBITED
|
||||
end
|
||||
|
||||
def self.clean_expired_pendings
|
||||
ActiveSupport::Deprecation.instance.deprecation_warning(DomainCron, __method__)
|
||||
DomainCron.send(__method__)
|
||||
end
|
||||
|
||||
def self.start_expire_period
|
||||
ActiveSupport::Deprecation.instance.deprecation_warning(DomainCron, __method__)
|
||||
DomainCron.send(__method__)
|
||||
end
|
||||
|
||||
def self.start_redemption_grace_period
|
||||
ActiveSupport::Deprecation.instance.deprecation_warning(DomainCron, __method__)
|
||||
DomainCron.send(__method__)
|
||||
end
|
||||
|
||||
def self.start_delete_period
|
||||
ActiveSupport::Deprecation.instance.deprecation_warning(DomainCron, __method__)
|
||||
DomainCron.send(__method__)
|
||||
end
|
||||
|
||||
def self.destroy_delete_candidates
|
||||
ActiveSupport::Deprecation.instance.deprecation_warning(DomainCron, __method__)
|
||||
DomainCron.send(__method__)
|
||||
end
|
||||
|
||||
class << self
|
||||
def convert_period_to_time(period, unit)
|
||||
return (period.to_i / 365).years if unit == 'd'
|
||||
|
@ -220,122 +245,6 @@ class Domain < ActiveRecord::Base
|
|||
{ admin_contacts: :registrar }
|
||||
)
|
||||
end
|
||||
|
||||
# rubocop: disable Metrics/AbcSize
|
||||
# rubocop: disable Metrics/CyclomaticComplexity
|
||||
# rubocop: disable Metrics/PerceivedComplexity
|
||||
def clean_expired_pendings
|
||||
STDOUT << "#{Time.zone.now.utc} - Clean expired domain pendings\n" unless Rails.env.test?
|
||||
|
||||
expire_at = Setting.expire_pending_confirmation.hours.ago
|
||||
count = 0
|
||||
expired_pending_domains = Domain.where('registrant_verification_asked_at <= ?', expire_at)
|
||||
expired_pending_domains.each do |domain|
|
||||
unless domain.pending_update? || domain.pending_delete? || domain.pending_delete_confirmation?
|
||||
msg = "#{Time.zone.now.utc} - ISSUE: DOMAIN #{domain.id}: #{domain.name} IS IN EXPIRED PENDING LIST, " \
|
||||
"but no pendingDelete/pendingUpdate state present!\n"
|
||||
STDOUT << msg unless Rails.env.test?
|
||||
next
|
||||
end
|
||||
count += 1
|
||||
if domain.pending_update?
|
||||
domain.send_mail :pending_update_expired_notification_for_new_registrant
|
||||
end
|
||||
if domain.pending_delete? || domain.pending_delete_confirmation?
|
||||
DomainMailer.pending_delete_expired_notification(domain.id, true).deliver
|
||||
end
|
||||
domain.clean_pendings_lowlevel
|
||||
unless Rails.env.test?
|
||||
STDOUT << "#{Time.zone.now.utc} Domain.clean_expired_pendings: ##{domain.id} (#{domain.name})\n"
|
||||
end
|
||||
end
|
||||
STDOUT << "#{Time.zone.now.utc} - Successfully cancelled #{count} domain pendings\n" unless Rails.env.test?
|
||||
count
|
||||
end
|
||||
# rubocop: enable Metrics/PerceivedComplexity
|
||||
# rubocop: enable Metrics/AbcSize
|
||||
# rubocop: enable Metrics/CyclomaticComplexity
|
||||
|
||||
# rubocop: disable Metrics/LineLength
|
||||
def start_expire_period
|
||||
STDOUT << "#{Time.zone.now.utc} - Expiring domains\n" unless Rails.env.test?
|
||||
|
||||
domains = Domain.where('valid_to <= ?', Time.zone.now)
|
||||
domains.each do |domain|
|
||||
next unless domain.expirable?
|
||||
domain.set_graceful_expired
|
||||
DomainMailer.expiration_reminder(domain.id).deliver_in(Setting.expiration_reminder_mail.to_i.days)
|
||||
STDOUT << "#{Time.zone.now.utc} Domain.start_expire_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?
|
||||
domain.save(validate: false)
|
||||
end
|
||||
|
||||
STDOUT << "#{Time.zone.now.utc} - Successfully expired #{domains.count} domains\n" unless Rails.env.test?
|
||||
end
|
||||
|
||||
def start_redemption_grace_period
|
||||
STDOUT << "#{Time.zone.now.utc} - Setting server_hold to domains\n" unless Rails.env.test?
|
||||
|
||||
d = Domain.where('outzone_at <= ?', Time.zone.now)
|
||||
d.each do |domain|
|
||||
next unless domain.server_holdable?
|
||||
domain.statuses << DomainStatus::SERVER_HOLD
|
||||
STDOUT << "#{Time.zone.now.utc} Domain.start_redemption_grace_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?
|
||||
domain.save(validate: false)
|
||||
end
|
||||
|
||||
STDOUT << "#{Time.zone.now.utc} - Successfully set server_hold to #{d.count} domains\n" unless Rails.env.test?
|
||||
end
|
||||
|
||||
def start_delete_period
|
||||
STDOUT << "#{Time.zone.now.utc} - Setting delete_candidate to domains\n" unless Rails.env.test?
|
||||
|
||||
d = Domain.where('delete_at <= ?', Time.zone.now)
|
||||
d.each do |domain|
|
||||
next unless domain.delete_candidateable?
|
||||
domain.statuses << DomainStatus::DELETE_CANDIDATE
|
||||
STDOUT << "#{Time.zone.now.utc} Domain.start_delete_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?
|
||||
domain.save(validate: false)
|
||||
end
|
||||
|
||||
return if Rails.env.test?
|
||||
STDOUT << "#{Time.zone.now.utc} - Successfully set delete_candidate to #{d.count} domains\n"
|
||||
end
|
||||
|
||||
# rubocop:disable Rails/FindEach
|
||||
# rubocop:disable Metrics/AbcSize
|
||||
def destroy_delete_candidates
|
||||
STDOUT << "#{Time.zone.now.utc} - Destroying domains\n" unless Rails.env.test?
|
||||
|
||||
c = 0
|
||||
Domain.where("statuses @> '{deleteCandidate}'::varchar[]").each do |x|
|
||||
WhoisRecord.where(domain_id: x.id).destroy_all
|
||||
destroy_with_message x
|
||||
STDOUT << "#{Time.zone.now.utc} Domain.destroy_delete_candidates: by deleteCandidate ##{x.id} (#{x.name})\n" unless Rails.env.test?
|
||||
|
||||
c += 1
|
||||
end
|
||||
|
||||
Domain.where('force_delete_at <= ?', Time.zone.now).each do |x|
|
||||
WhoisRecord.where(domain_id: x.id).destroy_all
|
||||
destroy_with_message x
|
||||
STDOUT << "#{Time.zone.now.utc} Domain.destroy_delete_candidates: by force delete time ##{x.id} (#{x.name})\n" unless Rails.env.test?
|
||||
c += 1
|
||||
end
|
||||
|
||||
STDOUT << "#{Time.zone.now.utc} - Successfully destroyed #{c} domains\n" unless Rails.env.test?
|
||||
end
|
||||
# rubocop: enable Metrics/AbcSize
|
||||
# rubocop:enable Rails/FindEach
|
||||
# rubocop: enable Metrics/LineLength
|
||||
def destroy_with_message(domain)
|
||||
domain.destroy
|
||||
bye_bye = domain.versions.last
|
||||
domain.registrar.messages.create!(
|
||||
body: "#{I18n.t(:domain_deleted)}: #{domain.name}",
|
||||
attached_obj_id: bye_bye.id,
|
||||
attached_obj_type: bye_bye.class.to_s # DomainVersion
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def name=(value)
|
||||
|
@ -592,7 +501,7 @@ class Domain < ActiveRecord::Base
|
|||
|
||||
def name_in_wire_format
|
||||
res = ''
|
||||
parts = name.split('.')
|
||||
parts = name_puny.split('.')
|
||||
parts.each do |x|
|
||||
res += format('%02X', x.length) # length of label in hex
|
||||
res += x.each_byte.map { |b| format('%02X', b) }.join # label
|
||||
|
@ -728,8 +637,12 @@ class Domain < ActiveRecord::Base
|
|||
case s
|
||||
when DomainStatus::PENDING_DELETE
|
||||
self.delete_at = nil
|
||||
# Handle any other special remove cases?
|
||||
# when DomainStatus::FORCE_DELETE unset_force_delete
|
||||
when DomainStatus::SERVER_MANUAL_INZONE # removal causes server hold to set
|
||||
self.outzone_at = Time.zone.now if self.force_delete_at.present?
|
||||
when DomainStatus::DomainStatus::EXPIRED # removal causes server hold to set
|
||||
self.outzone_at = self.valid_to + 15.day
|
||||
when DomainStatus::DomainStatus::SERVER_HOLD # removal causes server hold to set
|
||||
self.outzone_at = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -841,5 +754,19 @@ class Domain < ActiveRecord::Base
|
|||
DomainMailer.send(action, DomainMailModel.new(self).send(action)).deliver
|
||||
end
|
||||
|
||||
|
||||
def self.to_csv
|
||||
CSV.generate do |csv|
|
||||
csv << column_names
|
||||
all.each do |domain|
|
||||
csv << domain.attributes.values_at(*column_names)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.pdf(html)
|
||||
kit = PDFKit.new(html)
|
||||
kit.to_pdf
|
||||
end
|
||||
end
|
||||
# rubocop: enable Metrics/ClassLength
|
||||
|
|
122
app/models/domain_cron.rb
Normal file
122
app/models/domain_cron.rb
Normal file
|
@ -0,0 +1,122 @@
|
|||
class DomainCron
|
||||
|
||||
def self.clean_expired_pendings
|
||||
STDOUT << "#{Time.zone.now.utc} - Clean expired domain pendings\n" unless Rails.env.test?
|
||||
|
||||
expire_at = Setting.expire_pending_confirmation.hours.ago
|
||||
count = 0
|
||||
expired_pending_domains = Domain.where('registrant_verification_asked_at <= ?', expire_at)
|
||||
expired_pending_domains.each do |domain|
|
||||
unless domain.pending_update? || domain.pending_delete? || domain.pending_delete_confirmation?
|
||||
msg = "#{Time.zone.now.utc} - ISSUE: DOMAIN #{domain.id}: #{domain.name} IS IN EXPIRED PENDING LIST, " \
|
||||
"but no pendingDelete/pendingUpdate state present!\n"
|
||||
STDOUT << msg unless Rails.env.test?
|
||||
next
|
||||
end
|
||||
count += 1
|
||||
if domain.pending_update?
|
||||
DomainMailer.pending_update_expired_notification_for_new_registrant(domain.id).deliver
|
||||
end
|
||||
if domain.pending_delete? || domain.pending_delete_confirmation?
|
||||
DomainMailer.pending_delete_expired_notification(domain.id, deliver_emails).deliver
|
||||
end
|
||||
domain.clean_pendings_lowlevel
|
||||
unless Rails.env.test?
|
||||
STDOUT << "#{Time.zone.now.utc} DomainCron.clean_expired_pendings: ##{domain.id} (#{domain.name})\n"
|
||||
end
|
||||
end
|
||||
STDOUT << "#{Time.zone.now.utc} - Successfully cancelled #{count} domain pendings\n" unless Rails.env.test?
|
||||
count
|
||||
end
|
||||
|
||||
def self.start_expire_period
|
||||
STDOUT << "#{Time.zone.now.utc} - Expiring domains\n" unless Rails.env.test?
|
||||
|
||||
domains = Domain.where('valid_to <= ?', Time.zone.now)
|
||||
marked = 0
|
||||
real = 0
|
||||
domains.each do |domain|
|
||||
next unless domain.expirable?
|
||||
real += 1
|
||||
domain.set_graceful_expired
|
||||
STDOUT << "#{Time.zone.now.utc} DomainCron.start_expire_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?
|
||||
domain.save(validate: false) and marked += 1
|
||||
end
|
||||
|
||||
STDOUT << "#{Time.zone.now.utc} - Successfully expired #{marked} of #{real} domains\n" unless Rails.env.test?
|
||||
end
|
||||
|
||||
def self.start_redemption_grace_period
|
||||
STDOUT << "#{Time.zone.now.utc} - Setting server_hold to domains\n" unless Rails.env.test?
|
||||
|
||||
d = Domain.where('outzone_at <= ?', Time.zone.now)
|
||||
marked = 0
|
||||
real = 0
|
||||
d.each do |domain|
|
||||
next unless domain.server_holdable?
|
||||
real += 1
|
||||
domain.statuses << DomainStatus::SERVER_HOLD
|
||||
STDOUT << "#{Time.zone.now.utc} DomainCron.start_redemption_grace_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?
|
||||
domain.save(validate: false) and marked += 1
|
||||
end
|
||||
|
||||
STDOUT << "#{Time.zone.now.utc} - Successfully set server_hold to #{marked} of #{real} domains\n" unless Rails.env.test?
|
||||
marked
|
||||
end
|
||||
|
||||
def self.start_delete_period
|
||||
begin
|
||||
STDOUT << "#{Time.zone.now.utc} - Setting delete_candidate to domains\n" unless Rails.env.test?
|
||||
|
||||
d = Domain.where('delete_at <= ?', Time.zone.now)
|
||||
marked = 0
|
||||
real = 0
|
||||
d.each do |domain|
|
||||
next unless domain.delete_candidateable?
|
||||
real += 1
|
||||
domain.statuses << DomainStatus::DELETE_CANDIDATE
|
||||
STDOUT << "#{Time.zone.now.utc} DomainCron.start_delete_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?
|
||||
domain.save(validate: false) and marked += 1
|
||||
end
|
||||
ensure # the operator should see what was accomplished
|
||||
STDOUT << "#{Time.zone.now.utc} - Finished setting delete_candidate - #{marked} out of #{real} successfully set\n" unless Rails.env.test?
|
||||
end
|
||||
marked
|
||||
end
|
||||
|
||||
def self.destroy_delete_candidates
|
||||
STDOUT << "#{Time.zone.now.utc} - Destroying domains\n" unless Rails.env.test?
|
||||
|
||||
c = 0
|
||||
Domain.where("statuses @> '{deleteCandidate}'::varchar[]").each do |x|
|
||||
WhoisRecord.where(domain_id: x.id).destroy_all
|
||||
destroy_with_message x
|
||||
STDOUT << "#{Time.zone.now.utc} Domain.destroy_delete_candidates: by deleteCandidate ##{x.id} (#{x.name})\n" unless Rails.env.test?
|
||||
|
||||
c += 1
|
||||
end
|
||||
|
||||
Domain.where('force_delete_at <= ?', Time.zone.now).each do |x|
|
||||
WhoisRecord.where(domain_id: x.id).destroy_all
|
||||
destroy_with_message x
|
||||
STDOUT << "#{Time.zone.now.utc} DomainCron.destroy_delete_candidates: by force delete time ##{x.id} (#{x.name})\n" unless Rails.env.test?
|
||||
c += 1
|
||||
end
|
||||
|
||||
STDOUT << "#{Time.zone.now.utc} - Successfully destroyed #{c} domains\n" unless Rails.env.test?
|
||||
end
|
||||
|
||||
# rubocop: enable Metrics/AbcSize
|
||||
# rubocop:enable Rails/FindEach
|
||||
# rubocop: enable Metrics/LineLength
|
||||
def self.destroy_with_message(domain)
|
||||
domain.destroy
|
||||
bye_bye = domain.versions.last
|
||||
domain.registrar.messages.create!(
|
||||
body: "#{I18n.t(:domain_deleted)}: #{domain.name}",
|
||||
attached_obj_id: bye_bye.id,
|
||||
attached_obj_type: bye_bye.class.to_s # DomainVersion
|
||||
)
|
||||
end
|
||||
|
||||
end
|
|
@ -11,6 +11,18 @@ class Invoice < ActiveRecord::Base
|
|||
scope :unbinded, lambda {
|
||||
where('id NOT IN (SELECT invoice_id FROM account_activities where invoice_id IS NOT NULL)')
|
||||
}
|
||||
scope :all_columns, ->{select("invoices.*")}
|
||||
scope :sort_due_date_column, ->{all_columns.select("CASE WHEN invoices.cancelled_at is not null THEN
|
||||
(invoices.cancelled_at + interval '100 year') ELSE
|
||||
invoices.due_date END AS sort_due_date")}
|
||||
scope :sort_by_sort_due_date_asc, ->{sort_due_date_column.order("sort_due_date ASC")}
|
||||
scope :sort_by_sort_due_date_desc, ->{sort_due_date_column.order("sort_due_date DESC")}
|
||||
scope :sort_receipt_date_column, ->{all_columns.includes(:account_activity).references(:account_activity).select(%Q{
|
||||
CASE WHEN account_activities.created_at is not null THEN account_activities.created_at
|
||||
WHEN invoices.cancelled_at is not null THEN invoices.cancelled_at + interval '100 year'
|
||||
ELSE NULL END AS sort_receipt_date })}
|
||||
scope :sort_by_sort_receipt_date_asc, ->{sort_receipt_date_column.order("sort_receipt_date ASC")}
|
||||
scope :sort_by_sort_receipt_date_desc, ->{sort_receipt_date_column.order("sort_receipt_date DESC")}
|
||||
|
||||
attr_accessor :billing_email
|
||||
validates :billing_email, email_format: { message: :invalid }, allow_blank: true
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
class RegistrantUser < User
|
||||
ACCEPTED_ISSUER = 'AS Sertifitseerimiskeskus'
|
||||
attr_accessor :idc_data
|
||||
|
||||
def ability
|
||||
|
@ -6,6 +7,19 @@ class RegistrantUser < User
|
|||
end
|
||||
delegate :can?, :cannot?, to: :ability
|
||||
|
||||
def ident
|
||||
registrant_ident.to_s.split("-").last
|
||||
end
|
||||
|
||||
def domains
|
||||
ident_cc, ident = registrant_ident.to_s.split '-'
|
||||
Domain.includes(:registrar, :registrant).where(contacts: {
|
||||
ident_type: 'priv',
|
||||
ident: ident, #identity_code,
|
||||
ident_country_code: ident_cc #country_code
|
||||
})
|
||||
end
|
||||
|
||||
def to_s
|
||||
username
|
||||
end
|
||||
|
@ -13,11 +27,9 @@ class RegistrantUser < User
|
|||
class << self
|
||||
def find_or_create_by_idc_data(idc_data, issuer_organization)
|
||||
return false if idc_data.blank?
|
||||
return false if issuer_organization != 'AS Sertifitseerimiskeskus'
|
||||
return false if issuer_organization != ACCEPTED_ISSUER
|
||||
|
||||
idc_data.force_encoding('UTF-8')
|
||||
logger.error(idc_data)
|
||||
logger.error(idc_data.encoding)
|
||||
identity_code = idc_data.scan(/serialNumber=(\d+)/).flatten.first
|
||||
country = idc_data.scan(/^\/C=(.{2})/).flatten.first
|
||||
first_name = idc_data.scan(%r{/GN=(.+)/serialNumber}).flatten.first
|
||||
|
|
|
@ -3,6 +3,9 @@ class ReservedDomain < ActiveRecord::Base
|
|||
before_save :fill_empty_passwords
|
||||
before_save :generate_data
|
||||
before_destroy :remove_data
|
||||
validates :name, domain_name: true, uniqueness: true
|
||||
|
||||
|
||||
|
||||
|
||||
class << self
|
||||
|
@ -22,7 +25,12 @@ class ReservedDomain < ActiveRecord::Base
|
|||
|
||||
|
||||
def fill_empty_passwords
|
||||
self.password = SecureRandom.hex unless self.password
|
||||
|
||||
if self.password.empty?
|
||||
|
||||
self.password = SecureRandom.hex
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
def name= val
|
||||
|
|
219
app/models/soap/arireg.rb
Normal file
219
app/models/soap/arireg.rb
Normal file
|
@ -0,0 +1,219 @@
|
|||
# coding: utf-8
|
||||
require 'savon'
|
||||
=begin
|
||||
|
||||
Estonian Business registry provides information about registered companies via xml (SOAP over HTTPS).
|
||||
|
||||
Note:
|
||||
The SSL endpoint certificate is self signed.
|
||||
|
||||
Documentation:
|
||||
http://www.rik.ee/et/e-ariregister/xml-teenus
|
||||
Specifications are in Eng and Est
|
||||
User contract required
|
||||
|
||||
Testing:
|
||||
https://demo-ariregxml.rik.ee:447/testariport/?wsdl
|
||||
http://demo-ariregxml.rik.ee:81
|
||||
https://demo-ariregxml.rik.ee:447
|
||||
|
||||
Live service:
|
||||
https://ariregxml.rik.ee/ariport/?wsdl
|
||||
https://ariregxml.rik.ee/
|
||||
|
||||
Implements Soap::Arireg # associated_businesses
|
||||
8. arireg.paringesindus_v4
|
||||
Rights of representation of all persons related to the company (newer)
|
||||
http://www2.rik.ee/schemas/xtee/arireg/live/paringesindus_v4.xsd
|
||||
expects personal id code, to fetch list of registered business id codes
|
||||
returning {ident: person, ident_country_code: ... associated_businesses: [...id_codes...]}
|
||||
|
||||
=end
|
||||
|
||||
# do some SSL set up?
|
||||
# ssl_version
|
||||
# ssl_verify_mode
|
||||
# ssl_cert_key_file
|
||||
# ssl_cert_key
|
||||
# ssl_cert_key_password
|
||||
# ssl_cert_file
|
||||
# ssl_cert
|
||||
# ssl_ca_cert_file
|
||||
# ssl_ca_cert
|
||||
|
||||
module Soap
|
||||
|
||||
class Arireg
|
||||
|
||||
class NotAvailableError < StandardError
|
||||
attr_accessor :json
|
||||
def initialize(params)
|
||||
params[:message] = "#{I18n.t(:business_registry_service_not_available)}" unless params.key? :message
|
||||
@json = params
|
||||
|
||||
super(params)
|
||||
end
|
||||
end
|
||||
|
||||
class << self
|
||||
attr_accessor :wsdl, :host, :username, :password
|
||||
end
|
||||
|
||||
def initialize
|
||||
if self.class.username.nil?
|
||||
if Rails.application.secrets.key?(:arireg)
|
||||
arireg = Rails.application.secrets[:arireg].with_indifferent_access
|
||||
self.class.username = arireg[:username]
|
||||
self.class.password = arireg[:password]
|
||||
if self.class.wsdl.nil? # no override of config/environments/* ?
|
||||
self.class.wsdl = arireg[:wsdl]
|
||||
self.class.host = arireg[:host]
|
||||
end
|
||||
else
|
||||
self.class.username = ENV['arireg_username']
|
||||
self.class.password = ENV['arireg_password']
|
||||
end
|
||||
end
|
||||
if self.class.wsdl.nil?
|
||||
self.class.wsdl = ENV['arireg_wsdl']
|
||||
self.class.host = ENV['arireg_host']
|
||||
end
|
||||
|
||||
# note Savon has error if https w/non-standard port,
|
||||
# use non-standard force to pre-set endpoint
|
||||
@client = Savon.client(wsdl: self.class.wsdl,
|
||||
host: self.class.host,
|
||||
endpoint: "#{self.class.host}/cgi-bin/consumer_proxy")
|
||||
@session = nil
|
||||
end
|
||||
|
||||
# retrieve business id codes for business that a person has a legal role
|
||||
def associated_businesses(ident, ident_cc = 'EST')
|
||||
begin
|
||||
msg = {
|
||||
'fyysilise_isiku_kood' => ident,
|
||||
'fyysilise_isiku_koodi_riik' => country_code_3(ident_cc)
|
||||
}
|
||||
Rails.logger.info "[Ariregister] Request sent with data: #{msg.inspect}"
|
||||
|
||||
response = @client.call :paringesindus_v4, message: body(msg)
|
||||
content = extract response, :paringesindus_v4_response
|
||||
Rails.logger.info "[Ariregister] Got response with data: #{content.inspect}"
|
||||
|
||||
if content.present? && content[:ettevotjad].key?(:item)
|
||||
business_ident = items(content, :ettevotjad).map{|item| item[:ariregistri_kood]}
|
||||
else
|
||||
business_ident = []
|
||||
end
|
||||
|
||||
{
|
||||
ident: ident,
|
||||
ident_country_code: ident_cc,
|
||||
# ident_type: 'priv',
|
||||
retrieved_on: Time.now,
|
||||
associated_businesses: business_ident
|
||||
}
|
||||
rescue Savon::SOAPFault => fault
|
||||
Rails.logger.error "[Ariregister] #{fault} Äriregister arireg #{self.class.username} at #{self.class.host }"
|
||||
raise NotAvailableError.new(exception: fault)
|
||||
rescue HTTPI::SSLError => ssl_error
|
||||
Rails.logger.error "[Ariregister] #{ssl_error} at #{self.class.host}"
|
||||
raise NotAvailableError.new(exception: ssl_error)
|
||||
rescue SocketError => sock
|
||||
Rails.logger.error "[Ariregister] #{sock}"
|
||||
raise NotAvailableError.new(exception: sock)
|
||||
end
|
||||
end
|
||||
|
||||
def debug
|
||||
@client.globals.log_level :debug
|
||||
@client.globals.log true
|
||||
@client.globals.pretty_print_xml true
|
||||
@debug = true
|
||||
@client
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# add required elements to request
|
||||
def body(args)
|
||||
if @session.nil?
|
||||
args['ariregister_kasutajanimi'] = self.class.username
|
||||
args['ariregister_parool'] = self.class.password
|
||||
else
|
||||
args['ariregister_sessioon'] = @session
|
||||
end
|
||||
{keha: args}
|
||||
end
|
||||
|
||||
# TLA --- three letter acronym required not two letter acronym, transform
|
||||
def country_code_3(code)
|
||||
if code.length == 2
|
||||
code = CC2X3[code]
|
||||
raise NotAvailableError.new(message: 'Unrecognized Country') if code.nil?
|
||||
end
|
||||
code
|
||||
end
|
||||
|
||||
def extract(response, element)
|
||||
# response envelope body has again header/body under element; header is user and password returned
|
||||
response.hash[:envelope][:body][element][:keha]
|
||||
end
|
||||
|
||||
def items(content, parent)
|
||||
items = content[parent][:item]
|
||||
items.is_a?(Array) ? items : [items]
|
||||
end
|
||||
|
||||
CC2X3 = {"AF"=>"AFG", "AX"=>"ALA", "AL"=>"ALB", "DZ"=>"DZA", "AS"=>"ASM",
|
||||
"AD"=>"AND", "AO"=>"AGO", "AI"=>"AIA", "AQ"=>"ATA", "AG"=>"ATG",
|
||||
"AR"=>"ARG", "AM"=>"ARM", "AW"=>"ABW", "AU"=>"AUS", "AT"=>"AUT",
|
||||
"AZ"=>"AZE", "BS"=>"BHS", "BH"=>"BHR", "BD"=>"BGD", "BB"=>"BRB",
|
||||
"BY"=>"BLR", "BE"=>"BEL", "BZ"=>"BLZ", "BJ"=>"BEN", "BM"=>"BMU",
|
||||
"BT"=>"BTN", "BO"=>"BOL", "BQ"=>"BES", "BA"=>"BIH", "BW"=>"BWA",
|
||||
"BV"=>"BVT", "BR"=>"BRA", "IO"=>"IOT", "BN"=>"BRN", "BG"=>"BGR",
|
||||
"BF"=>"BFA", "BI"=>"BDI", "CV"=>"CPV", "KH"=>"KHM", "CM"=>"CMR",
|
||||
"CA"=>"CAN", "KY"=>"CYM", "CF"=>"CAF", "TD"=>"TCD", "CL"=>"CHL",
|
||||
"CN"=>"CHN", "CX"=>"CXR", "CC"=>"CCK", "CO"=>"COL", "KM"=>"COM",
|
||||
"CD"=>"COD", "CG"=>"COG", "CK"=>"COK", "CR"=>"CRI", "CI"=>"CIV",
|
||||
"HR"=>"HRV", "CU"=>"CUB", "CW"=>"CUW", "CY"=>"CYP", "CZ"=>"CZE",
|
||||
"DK"=>"DNK", "DJ"=>"DJI", "DM"=>"DMA", "DO"=>"DOM", "EC"=>"ECU",
|
||||
"EG"=>"EGY", "SV"=>"SLV", "GQ"=>"GNQ", "ER"=>"ERI", "EE"=>"EST",
|
||||
"ET"=>"ETH", "FK"=>"FLK", "FO"=>"FRO", "FJ"=>"FJI", "FI"=>"FIN",
|
||||
"FR"=>"FRA", "GF"=>"GUF", "PF"=>"PYF", "TF"=>"ATF", "GA"=>"GAB",
|
||||
"GM"=>"GMB", "GE"=>"GEO", "DE"=>"DEU", "GH"=>"GHA", "GI"=>"GIB",
|
||||
"GR"=>"GRC", "GL"=>"GRL", "GD"=>"GRD", "GP"=>"GLP", "GU"=>"GUM",
|
||||
"GT"=>"GTM", "GG"=>"GGY", "GN"=>"GIN", "GW"=>"GNB", "GY"=>"GUY",
|
||||
"HT"=>"HTI", "HM"=>"HMD", "VA"=>"VAT", "HN"=>"HND", "HK"=>"HKG",
|
||||
"HU"=>"HUN", "IS"=>"ISL", "IN"=>"IND", "ID"=>"IDN", "IR"=>"IRN",
|
||||
"IQ"=>"IRQ", "IE"=>"IRL", "IM"=>"IMN", "IL"=>"ISR", "IT"=>"ITA",
|
||||
"JM"=>"JAM", "JP"=>"JPN", "JE"=>"JEY", "JO"=>"JOR", "KZ"=>"KAZ",
|
||||
"KE"=>"KEN", "KI"=>"KIR", "KP"=>"PRK", "KR"=>"KOR", "KW"=>"KWT",
|
||||
"KG"=>"KGZ", "LA"=>"LAO", "LV"=>"LVA", "LB"=>"LBN", "LS"=>"LSO",
|
||||
"LR"=>"LBR", "LY"=>"LBY", "LI"=>"LIE", "LT"=>"LTU", "LU"=>"LUX",
|
||||
"MO"=>"MAC", "MK"=>"MKD", "MG"=>"MDG", "MW"=>"MWI", "MY"=>"MYS",
|
||||
"MV"=>"MDV", "ML"=>"MLI", "MT"=>"MLT", "MH"=>"MHL", "MQ"=>"MTQ",
|
||||
"MR"=>"MRT", "MU"=>"MUS", "YT"=>"MYT", "MX"=>"MEX", "FM"=>"FSM",
|
||||
"MD"=>"MDA", "MC"=>"MCO", "MN"=>"MNG", "ME"=>"MNE", "MS"=>"MSR",
|
||||
"MA"=>"MAR", "MZ"=>"MOZ", "MM"=>"MMR", "NA"=>"NAM", "NR"=>"NRU",
|
||||
"NP"=>"NPL", "NL"=>"NLD", "NC"=>"NCL", "NZ"=>"NZL", "NI"=>"NIC",
|
||||
"NE"=>"NER", "NG"=>"NGA", "NU"=>"NIU", "NF"=>"NFK", "MP"=>"MNP",
|
||||
"NO"=>"NOR", "OM"=>"OMN", "PK"=>"PAK", "PW"=>"PLW", "PS"=>"PSE",
|
||||
"PA"=>"PAN", "PG"=>"PNG", "PY"=>"PRY", "PE"=>"PER", "PH"=>"PHL",
|
||||
"PN"=>"PCN", "PL"=>"POL", "PT"=>"PRT", "PR"=>"PRI", "QA"=>"QAT",
|
||||
"RE"=>"REU", "RO"=>"ROU", "RU"=>"RUS", "RW"=>"RWA", "BL"=>"BLM",
|
||||
"SH"=>"SHN", "KN"=>"KNA", "LC"=>"LCA", "MF"=>"MAF", "PM"=>"SPM",
|
||||
"VC"=>"VCT", "WS"=>"WSM", "SM"=>"SMR", "ST"=>"STP", "SA"=>"SAU",
|
||||
"SN"=>"SEN", "RS"=>"SRB", "SC"=>"SYC", "SL"=>"SLE", "SG"=>"SGP",
|
||||
"SX"=>"SXM", "SK"=>"SVK", "SI"=>"SVN", "SB"=>"SLB", "SO"=>"SOM",
|
||||
"ZA"=>"ZAF", "GS"=>"SGS", "SS"=>"SSD", "ES"=>"ESP", "LK"=>"LKA",
|
||||
"SD"=>"SDN", "SR"=>"SUR", "SJ"=>"SJM", "SZ"=>"SWZ", "SE"=>"SWE",
|
||||
"CH"=>"CHE", "SY"=>"SYR", "TW"=>"TWN", "TJ"=>"TJK", "TZ"=>"TZA",
|
||||
"TH"=>"THA", "TL"=>"TLS", "TG"=>"TGO", "TK"=>"TKL", "TO"=>"TON",
|
||||
"TT"=>"TTO", "TN"=>"TUN", "TR"=>"TUR", "TM"=>"TKM", "TC"=>"TCA",
|
||||
"TV"=>"TUV", "UG"=>"UGA", "UA"=>"UKR", "AE"=>"ARE", "GB"=>"GBR",
|
||||
"UM"=>"UMI", "US"=>"USA", "UY"=>"URY", "UZ"=>"UZB", "VU"=>"VUT",
|
||||
"VE"=>"VEN", "VN"=>"VNM", "VG"=>"VGB", "VI"=>"VIR", "WF"=>"WLF",
|
||||
"EH"=>"ESH", "YE"=>"YEM", "ZM"=>"ZMB", "ZW"=>"ZWE"}
|
||||
end
|
||||
end
|
17
app/views/admin/blocked_domains/_form.haml
Normal file
17
app/views/admin/blocked_domains/_form.haml
Normal file
|
@ -0,0 +1,17 @@
|
|||
= form_for([:admin, @domain], html: {class: 'form-horizontal'}) do |f|
|
||||
= render 'shared/full_errors', object: @domain
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t(:general)
|
||||
.panel-body
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :name
|
||||
.col-md-7
|
||||
= f.text_field(:name, class: 'form-control')
|
||||
.row
|
||||
.col-md-8.text-right
|
||||
= button_tag(t(:save), class: 'btn btn-primary')
|
3
app/views/admin/blocked_domains/edit.haml
Normal file
3
app/views/admin/blocked_domains/edit.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
= render 'shared/title', name: t(:edit_pw)
|
||||
|
||||
= render 'form'
|
|
@ -1,10 +1,68 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:new), new_admin_blocked_domain_path, class: 'btn btn-primary')
|
||||
= render 'shared/title', name: t(:blocked_domains)
|
||||
|
||||
= form_tag([:admin, :blocked_domains]) do |f|
|
||||
.row
|
||||
.col-md-12
|
||||
= text_area_tag :blocked_domains, @blocked_domains, class: 'form-control', rows: 30
|
||||
%hr
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
%button.btn.btn-warning=t(:save)
|
||||
.row
|
||||
.col-md-12
|
||||
= search_form_for [:admin, @q], html: { style: 'margin-bottom: 0;', class: 'js-form', autocomplete: 'off' } do |f|
|
||||
.row
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label :name
|
||||
= f.search_field :name_matches, value: params[:q][:name_matches], class: 'form-control', placeholder: t(:name)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:created_at_from)
|
||||
= f.search_field :created_at_gteq, value: params[:q][:created_at_gteq], class: 'form-control datepicker', placeholder: t(:created_at_from)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:created_at_until)
|
||||
= f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control datepicker', placeholder: t(:created_at_until)
|
||||
.row
|
||||
.col-md-3
|
||||
.form-group
|
||||
= label_tag t(:results_per_page)
|
||||
= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page)
|
||||
.col-md-3{style: 'padding-top: 25px;'}
|
||||
%button.btn.btn-primary
|
||||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'name')
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'created_at', t(:created_at))
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'updated_at', t(:updated_at))
|
||||
%th{class: 'col-xs-1'}
|
||||
= t(:actions)
|
||||
%tbody
|
||||
- @domains.each do |x|
|
||||
%tr
|
||||
%td= x.name
|
||||
%td= l(x.created_at, format: :short)
|
||||
%td= l(x.updated_at, format: :short)
|
||||
%td
|
||||
%div{class: 'text-center'}
|
||||
= link_to(t(:delete), delete_admin_blocked_domain_path(id: x.id),
|
||||
data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger btn-xs')
|
||||
.row
|
||||
.col-md-6
|
||||
= paginate @domains
|
||||
.col-md-6.text-right
|
||||
.pagination
|
||||
= t(:result_count, count: @domains.total_count)
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_blocked_domains_path}"
|
||||
|
|
3
app/views/admin/blocked_domains/new.haml
Normal file
3
app/views/admin/blocked_domains/new.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
= render 'shared/title', name: t(:add_blocked_domain)
|
||||
|
||||
= render 'form'
|
|
@ -8,13 +8,13 @@
|
|||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-3'}
|
||||
= sort_link(@q, 'invoice')
|
||||
= sort_link(@q, :number)
|
||||
%th{class: 'col-xs-3'}
|
||||
= sort_link(@q, 'buyer')
|
||||
= sort_link(@q, :buyer_name, "Buyer")
|
||||
%th{class: 'col-xs-3'}
|
||||
= sort_link(@q, 'due_date')
|
||||
= sort_link(@q, :sort_due_date, "Due date")
|
||||
%th{class: 'col-xs-3'}
|
||||
= sort_link(@q, 'receipt_date')
|
||||
= sort_link(@q, :sort_receipt_date, "Receipt date")
|
||||
%tbody
|
||||
- @invoices.each do |x|
|
||||
%tr
|
||||
|
|
22
app/views/admin/reserved_domains/_form.haml
Normal file
22
app/views/admin/reserved_domains/_form.haml
Normal file
|
@ -0,0 +1,22 @@
|
|||
= form_for([:admin, @domain], html: {class: 'form-horizontal'}) do |f|
|
||||
= render 'shared/full_errors', object: @domain
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t(:general)
|
||||
.panel-body
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :name
|
||||
.col-md-7
|
||||
= f.text_field(:name, class: 'form-control', disabled: !f.object.new_record?)
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :password
|
||||
.col-md-7
|
||||
= f.text_field(:password, placeholder: t(:optional), class: 'form-control')
|
||||
.row
|
||||
.col-md-8.text-right
|
||||
= button_tag(t(:save), class: 'btn btn-primary')
|
3
app/views/admin/reserved_domains/edit.haml
Normal file
3
app/views/admin/reserved_domains/edit.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
= render 'shared/title', name: t(:edit_pw)
|
||||
|
||||
= render 'form'
|
|
@ -1,14 +1,72 @@
|
|||
- content_for :actions do
|
||||
= link_to('#', class: 'btn btn-default', "data-container": "body", "data-title": t('list_format_is_in_yaml'), "data-content": "domain.ee: authinfopw<br>seconddomain.ee:<br>thirddomain.ee: authinfo3<br><br>#{t('if_auth_info_is_left_empty_it_will_be_auto_generated')}<br>#{t('each_domain_name_must_end_with_colon_sign')}", "data-placement": "left", "data-toggle": "popover", "data-html" => "true") do
|
||||
%span.glyphicon.glyphicon-info-sign{"aria-hidden" => "true"}
|
||||
|
||||
= link_to(t(:new), new_admin_reserved_domain_path, class: 'btn btn-primary')
|
||||
= render 'shared/title', name: t(:reserved_domains)
|
||||
|
||||
= form_tag([:admin, :reserved_domains]) do |f|
|
||||
.row
|
||||
.col-md-12
|
||||
= text_area_tag :reserved_domains, @reserved_domains, class: 'form-control', rows: 30
|
||||
%hr
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
%button.btn.btn-warning=t(:save)
|
||||
.row
|
||||
.col-md-12
|
||||
= search_form_for [:admin, @q], html: { style: 'margin-bottom: 0;', class: 'js-form', autocomplete: 'off' } do |f|
|
||||
.row
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label :name
|
||||
= f.search_field :name_matches, value: params[:q][:name_matches], class: 'form-control', placeholder: t(:name)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:created_at_from)
|
||||
= f.search_field :created_at_gteq, value: params[:q][:created_at_gteq], class: 'form-control datepicker', placeholder: t(:created_at_from)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:created_at_until)
|
||||
= f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control datepicker', placeholder: t(:created_at_until)
|
||||
.row
|
||||
.col-md-3
|
||||
.form-group
|
||||
= label_tag t(:results_per_page)
|
||||
= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page)
|
||||
.col-md-3{style: 'padding-top: 25px;'}
|
||||
%button.btn.btn-primary
|
||||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'name')
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'password')
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'created_at', t(:created_at))
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'updated_at', t(:updated_at))
|
||||
%th{class: 'col-xs-2'}
|
||||
= t(:actions)
|
||||
%tbody
|
||||
- @domains.each do |x|
|
||||
%tr
|
||||
%td= x.name
|
||||
%td= x.password
|
||||
%td= l(x.created_at, format: :short)
|
||||
%td= l(x.updated_at, format: :short)
|
||||
%td
|
||||
= link_to(t(:edit_pw), edit_admin_reserved_domain_path(id: x.id),
|
||||
class: 'btn btn-primary btn-xs')
|
||||
= link_to(t(:delete), delete_admin_reserved_domain_path(id: x.id),
|
||||
data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger btn-xs')
|
||||
.row
|
||||
.col-md-6
|
||||
= paginate @domains
|
||||
.col-md-6.text-right
|
||||
.pagination
|
||||
= t(:result_count, count: @domains.total_count)
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_reserved_domains_path}"
|
||||
|
|
3
app/views/admin/reserved_domains/new.haml
Normal file
3
app/views/admin/reserved_domains/new.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
= render 'shared/title', name: t(:add_reserved_domain)
|
||||
|
||||
= render 'form'
|
|
@ -51,6 +51,7 @@
|
|||
= render 'setting_row', var: :transfer_wait_time
|
||||
= render 'setting_row', var: :ds_digest_type
|
||||
= render 'setting_row', var: :client_side_status_editing_enabled
|
||||
= render 'setting_row', var: :days_to_keep_business_registry_cache
|
||||
= render 'setting_row', var: :api_ip_whitelist_enabled
|
||||
= render 'setting_row', var: :registrar_ip_whitelist_enabled
|
||||
= render 'setting_row', var: :request_confrimation_on_registrant_change_enabled
|
||||
|
|
23
app/views/registrant/contacts/partials/_address.haml
Normal file
23
app/views/registrant/contacts/partials/_address.haml
Normal file
|
@ -0,0 +1,23 @@
|
|||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:address)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
- if @contact.org_name.present?
|
||||
%dt= t(:org_name)
|
||||
%dd= @contact.org_name
|
||||
|
||||
%dt= t(:street)
|
||||
%dd= @contact.street.to_s.gsub("\n", '<br>').html_safe
|
||||
|
||||
%dt= t(:city)
|
||||
%dd= @contact.city
|
||||
|
||||
%dt= t(:zip)
|
||||
%dd= @contact.zip
|
||||
|
||||
%dt= t(:state)
|
||||
%dd= @contact.state
|
||||
|
||||
%dt= t(:country)
|
||||
%dd= @contact.country
|
30
app/views/registrant/contacts/partials/_domains.haml
Normal file
30
app/views/registrant/contacts/partials/_domains.haml
Normal file
|
@ -0,0 +1,30 @@
|
|||
- domains = contact.all_domains(page: params[:domain_page], per: 20, params: params)
|
||||
#contacts.panel.panel-default
|
||||
.panel-heading
|
||||
.pull-left
|
||||
= t(:domains)
|
||||
.pull-right
|
||||
= form_tag request.path, method: :get do
|
||||
= select_tag :domain_filter, options_for_select(%w(Registrant AdminDomainContact TechDomainContact), selected: params[:domain_filter]),
|
||||
include_blank: true, class: 'form-control2 selectize2'
|
||||
%button.btn.btn-primary
|
||||
%span.glyphicon.glyphicon-search
|
||||
.clearfix
|
||||
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-3'}=custom_sort_link t(:domain_name), :name
|
||||
%th{class: 'col-xs-3'}=custom_sort_link t(:registrar), :registrar_name
|
||||
%th{class: 'col-xs-3'}=custom_sort_link t(:valid_to), :valid_to
|
||||
%th{class: 'col-xs-3'}= t(:roles)
|
||||
%tbody
|
||||
- domains.each do |x|
|
||||
%tr
|
||||
%td= link_to(x.name, [:registrant, x])
|
||||
%td= link_to(x.registrar, [:registrant, x.registrar])
|
||||
%td= l(x.valid_to, format: :short)
|
||||
%td= x.roles.join(", ")
|
||||
|
||||
= paginate domains, param_name: :domain_page
|
45
app/views/registrant/contacts/partials/_general.haml
Normal file
45
app/views/registrant/contacts/partials/_general.haml
Normal file
|
@ -0,0 +1,45 @@
|
|||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:general)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:id)
|
||||
%dd= @contact.code
|
||||
|
||||
%dt= t(:password)
|
||||
%dd
|
||||
= text_field_tag :auth_info, @contact.auth_info, readonly: true, class: 'partially-hidden'
|
||||
|
||||
%br
|
||||
|
||||
%dt= t(:ident)
|
||||
%dd= ident_for(@contact)
|
||||
|
||||
%dt= t(:email)
|
||||
%dd= @contact.email
|
||||
|
||||
%dt= t(:phone)
|
||||
%dd= @contact.phone
|
||||
|
||||
- if @contact.fax
|
||||
%dt= t(:fax)
|
||||
%dd= @contact.fax
|
||||
|
||||
%br
|
||||
|
||||
%dt= t(:created)
|
||||
%dd
|
||||
= l(@contact.created_at, format: :short)
|
||||
by
|
||||
= creator_link(@contact)
|
||||
|
||||
%dt= t(:updated)
|
||||
%dd
|
||||
= l(@contact.updated_at, format: :short)
|
||||
by
|
||||
= updator_link(@contact)
|
||||
|
||||
%dt= t(:registrar)
|
||||
%dd
|
||||
- if @contact.registrar.present?
|
||||
= link_to(@contact.registrar, registrant_registrar_path(@contact.registrar))
|
6
app/views/registrant/contacts/partials/_search.haml
Normal file
6
app/views/registrant/contacts/partials/_search.haml
Normal file
|
@ -0,0 +1,6 @@
|
|||
= search_form_for [:registrant, @q] do |f|
|
||||
= f.search_field :name_cont
|
||||
= f.submit do
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
|
21
app/views/registrant/contacts/partials/_statuses.haml
Normal file
21
app/views/registrant/contacts/partials/_statuses.haml
Normal file
|
@ -0,0 +1,21 @@
|
|||
- panel_class = contact.errors.messages[:statuses] ? 'panel-danger' : 'panel-default'
|
||||
#contact_statuses.panel{class: panel_class}
|
||||
.panel-heading.clearfix
|
||||
= t(:statuses)
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-6'}= t(:status)
|
||||
%th{class: 'col-xs-6'}= t(:notes)
|
||||
%tbody
|
||||
- contact.statuses.each do |status|
|
||||
%tr
|
||||
%td= status
|
||||
%td= contact.status_notes[status]
|
||||
|
||||
- if contact.errors.messages[:statuses]
|
||||
%tfoot
|
||||
- @domain.errors.messages[:statuses].each do |s|
|
||||
%tr
|
||||
%td{colspan: 4}= s
|
12
app/views/registrant/contacts/show.haml
Normal file
12
app/views/registrant/contacts/show.haml
Normal file
|
@ -0,0 +1,12 @@
|
|||
- content_for :actions do
|
||||
= render 'shared/title', name: @contact.name
|
||||
|
||||
.row
|
||||
.col-md-6= render 'registrant/contacts/partials/general'
|
||||
.col-md-6= render 'registrant/contacts/partials/address'
|
||||
.row
|
||||
.col-md-12= render 'registrant/contacts/partials/statuses', contact: @contact
|
||||
.row
|
||||
.col-md-12= render 'registrant/contacts/partials/domains', contact: @contact
|
||||
|
||||
|
28
app/views/registrant/domains/download_list.haml
Normal file
28
app/views/registrant/domains/download_list.haml
Normal file
|
@ -0,0 +1,28 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
|
||||
%title Contacts
|
||||
%body
|
||||
.col-md-12
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-2'}
|
||||
=t(:name)
|
||||
%th{class: 'col-xs-2'}
|
||||
=t(:registrant)
|
||||
%th{class: 'col-xs-2'}
|
||||
=t(:valid_to)
|
||||
%th{class: 'col-xs-2'}
|
||||
=t(:registrar)
|
||||
%tbody
|
||||
- @domains.result.each do |x|
|
||||
%tr
|
||||
%td= x.name
|
||||
%td= x.registrant
|
||||
%td= l(x.valid_to, format: :short)
|
||||
%td= x.registrar
|
||||
.row
|
||||
.col-md-6
|
|
@ -1,5 +1,52 @@
|
|||
= render 'shared/title', name: t(:domains)
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
= search_form_for [:registrant, @q], html: { style: 'margin-bottom: 0;', class: 'js-form', autocomplete: 'off' } do |f|
|
||||
.row
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label :name
|
||||
= f.search_field :name_matches, value: params[:q][:name_matches], class: 'form-control', placeholder: t(:name)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:registrant_ident)
|
||||
= f.search_field :registrant_ident_eq, class: 'form-control', placeholder: t(:registrant_ident)
|
||||
.row
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:valid_to_from)
|
||||
= f.search_field :valid_to_gteq, value: params[:q][:valid_to_gteq], class: 'form-control datepicker', placeholder: t(:valid_to_from)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:valid_to_until)
|
||||
= f.search_field :valid_to_lteq, value: params[:q][:valid_to_lteq], class: 'form-control datepicker', placeholder: t(:valid_to_until)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= label_tag t(:results_per_page)
|
||||
= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page)
|
||||
.col-md-3{style: 'padding-top: 25px;'}
|
||||
%button.btn.btn-primary
|
||||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
.row
|
||||
.col-md-3
|
||||
.btn-group{:role => "group"}
|
||||
%button.btn.btn-default.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button"}
|
||||
Download
|
||||
%span.caret
|
||||
%ul.dropdown-menu
|
||||
%li= link_to 'PDF', download_list_registrant_domains_path(q: params[:q], format: "pdf")
|
||||
%li= link_to 'CSV', download_list_registrant_domains_path(q: params[:q], format: "csv")
|
||||
.col-md-3
|
||||
.col-md-3
|
||||
.col-md-3
|
||||
|
||||
|
||||
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
|
@ -8,20 +55,33 @@
|
|||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-2'}
|
||||
= t(:name)
|
||||
= sort_link(@q, 'name')
|
||||
%th{class: 'col-xs-2'}
|
||||
= t(:registrant)
|
||||
= sort_link(@q, 'registrant_name', t(:registrant))
|
||||
%th{class: 'col-xs-2'}
|
||||
= t(:valid_to)
|
||||
= sort_link(@q, 'valid_to', t(:valid_to))
|
||||
%th{class: 'col-xs-2'}
|
||||
= t(:registrar)
|
||||
= sort_link(@q, 'registrar_name', t(:registrar))
|
||||
%tbody
|
||||
-# - @domains.each do |x|
|
||||
-# %tr
|
||||
-# %td= link_to(x, admin_domain_path(x))
|
||||
-# %td
|
||||
-# - if x.registrant
|
||||
-# = link_to(x.registrant, [:admin, x.registrant])
|
||||
- @domains.each do |x|
|
||||
%tr
|
||||
%td= link_to(x, registrant_domain_path(x))
|
||||
%td
|
||||
- if x.registrant
|
||||
= link_to(x.registrant, [:registrant, x.registrant]) if x.registrant
|
||||
|
||||
%td= l(x.valid_to, format: :short)
|
||||
%td= link_to(x.registrar, registrant_registrar_path(x.registrar)) if x.registrar
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
= paginate @domains
|
||||
.col-md-6.text-right
|
||||
.pagination
|
||||
= t(:result_count, count: @domains.total_count)
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{registrant_domains_path}"
|
||||
|
||||
-# %td= l(x.valid_to, format: :short)
|
||||
-# %td= link_to(x.registrar, admin_registrar_path(x.registrar)) if x.registrar
|
||||
|
|
22
app/views/registrant/domains/partials/_admin_contacts.haml
Normal file
22
app/views/registrant/domains/partials/_admin_contacts.haml
Normal file
|
@ -0,0 +1,22 @@
|
|||
- panel_class = @domain.errors.messages[:admin_contacts] ? 'panel-danger' : 'panel-default'
|
||||
.panel{class: panel_class}
|
||||
.panel-heading.clearfix
|
||||
= t(:admin_contacts)
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-4'}= t(:name)
|
||||
%th{class: 'col-xs-4'}= t(:id)
|
||||
%th{class: 'col-xs-4'}= t(:email)
|
||||
%tbody
|
||||
- @domain.admin_contacts.each do |ac|
|
||||
%tr
|
||||
%td= link_to(ac, registrant_contact_path(ac))
|
||||
%td= ac.code
|
||||
%td= ac.email
|
||||
- if @domain.errors.messages[:admin_contacts]
|
||||
%tfoot
|
||||
- @domain.errors.messages[:admin_contacts].each do |x|
|
||||
%tr
|
||||
%td{colspan: 4}= x
|
25
app/views/registrant/domains/partials/_dnskeys.haml
Normal file
25
app/views/registrant/domains/partials/_dnskeys.haml
Normal file
|
@ -0,0 +1,25 @@
|
|||
- panel_class = @domain.errors.messages[:dnskeys] ? 'panel-danger' : 'panel-default'
|
||||
#dnskeys.panel{class: panel_class}
|
||||
.panel-heading.clearfix
|
||||
= t(:dnskeys)
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-1'}= t(:flag)
|
||||
%th{class: 'col-xs-1'}= t(:protocol)
|
||||
%th{class: 'col-xs-1'}= t(:algorithm)
|
||||
%th{class: 'col-xs-9'}= t(:public_key)
|
||||
%tbody
|
||||
- @domain.dnskeys.each do |x|
|
||||
%tr
|
||||
%td= x.flags
|
||||
%td= x.protocol
|
||||
%td= x.alg
|
||||
%td= x.public_key
|
||||
- if @domain.errors.messages[:dnskeys]
|
||||
%tfoot
|
||||
- @domain.errors.messages[:dnskeys].each do |x|
|
||||
%tr
|
||||
%td{colspan: 4}= x
|
||||
|
32
app/views/registrant/domains/partials/_general.haml
Normal file
32
app/views/registrant/domains/partials/_general.haml
Normal file
|
@ -0,0 +1,32 @@
|
|||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:general)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:name)
|
||||
%dd= @domain.name
|
||||
|
||||
%dt= t(:registered_at)
|
||||
%dd= l(@domain.registered_at)
|
||||
|
||||
%dt= t(:registrar)
|
||||
%dd= link_to(@domain.registrar, registrant_registrar_path(@domain.registrar))
|
||||
|
||||
%dt= t(:authinfo_pw)
|
||||
%dd
|
||||
= text_field_tag :password, @domain.auth_info, readonly: true, class: 'partially-hidden'
|
||||
|
||||
%dt= t(:valid_from)
|
||||
%dd= l(@domain.valid_from)
|
||||
|
||||
%dt= t(:valid_to)
|
||||
%dd= l(@domain.valid_to)
|
||||
|
||||
%dt= t(:outzone_at)
|
||||
%dd= l(@domain.outzone_at)
|
||||
|
||||
%dt= t(:delete_at)
|
||||
%dd= l(@domain.delete_at)
|
||||
|
||||
%dt= t(:force_delete_at)
|
||||
%dd= l(@domain.force_delete_at)
|
20
app/views/registrant/domains/partials/_keyrelays.haml
Normal file
20
app/views/registrant/domains/partials/_keyrelays.haml
Normal file
|
@ -0,0 +1,20 @@
|
|||
.panel{class: 'panel-default'}
|
||||
.panel-heading.clearfix
|
||||
= t(:keyrelays)
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-4'}= t(:uploaded_at)
|
||||
%th{class: 'col-xs-3'}= t(:expiry)
|
||||
%th{class: 'col-xs-2'}= t(:requester)
|
||||
%th{class: 'col-xs-2'}= t(:accepter)
|
||||
%th{class: 'col-xs-1'}= t(:status)
|
||||
%tbody
|
||||
- @domain.keyrelays.includes([:requester, :accepter]).order(pa_date: :desc).each do |x|
|
||||
%tr
|
||||
%td= link_to(x.pa_date, [:registrar, x])
|
||||
%td= x.expiry
|
||||
%td= link_to(x.requester, [:registrar, x.requester])
|
||||
%td= link_to(x.accepter, [:registrar, x.accepter])
|
||||
%td= x.status
|
14
app/views/registrant/domains/partials/_legal_documents.haml
Normal file
14
app/views/registrant/domains/partials/_legal_documents.haml
Normal file
|
@ -0,0 +1,14 @@
|
|||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
= t(:legal_documents)
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-8'}= t(:created_at)
|
||||
%th{class: 'col-xs-4'}= t(:type)
|
||||
%tbody
|
||||
- legal_documents.each do |x|
|
||||
%tr
|
||||
%td= link_to(x.created_at, [:registrar, x])
|
||||
%td= x.document_type
|
23
app/views/registrant/domains/partials/_nameservers.haml
Normal file
23
app/views/registrant/domains/partials/_nameservers.haml
Normal file
|
@ -0,0 +1,23 @@
|
|||
- panel_class = @domain.errors.messages[:nameservers] ? 'panel-danger' : 'panel-default'
|
||||
#nameservers.panel{class: panel_class}
|
||||
.panel-heading.clearfix
|
||||
= t(:nameservers)
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-4'}= t(:hostname)
|
||||
%th{class: 'col-xs-4'}= t(:ipv4)
|
||||
%th{class: 'col-xs-4'}= t(:ipv6)
|
||||
%tbody
|
||||
- @domain.nameservers.each do |x|
|
||||
%tr
|
||||
%td= x
|
||||
%td= x.ipv4
|
||||
%td= x.ipv6
|
||||
- if @domain.errors.messages[:nameservers]
|
||||
%tfoot
|
||||
- @domain.errors.messages[:nameservers].each do |x|
|
||||
%tr
|
||||
%td{colspan: 3}= x
|
||||
|
19
app/views/registrant/domains/partials/_owner.haml
Normal file
19
app/views/registrant/domains/partials/_owner.haml
Normal file
|
@ -0,0 +1,19 @@
|
|||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:registrant)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:name)
|
||||
%dd= link_to(@domain.registrant, [:registrar, @domain.registrant])
|
||||
|
||||
%dt= t(:id)
|
||||
%dd= @domain.registrant_code
|
||||
|
||||
%dt= t(:identity_code)
|
||||
%dd= @domain.registrant_ident
|
||||
|
||||
%dt= t(:email)
|
||||
%dd= @domain.registrant_email
|
||||
|
||||
%dt= t(:phone)
|
||||
%dd= @domain.registrant_phone
|
18
app/views/registrant/domains/partials/_statuses.haml
Normal file
18
app/views/registrant/domains/partials/_statuses.haml
Normal file
|
@ -0,0 +1,18 @@
|
|||
#domain_statuses.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
= t(:statuses)
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-6'}= t(:status)
|
||||
%th{class: 'col-xs-6'}= t(:notes)
|
||||
%tbody
|
||||
- @domain.statuses.each do |status|
|
||||
%tr
|
||||
%td
|
||||
- if @domain.pending_json.present? && [DomainStatus::PENDING_UPDATE, DomainStatus::PENDING_DELETE].include?(status)
|
||||
= link_to status, admin_domain_domain_versions_path(@domain.id)
|
||||
- else
|
||||
= status
|
||||
%td= @domain.status_notes[status]
|
22
app/views/registrant/domains/partials/_tech_contacts.haml
Normal file
22
app/views/registrant/domains/partials/_tech_contacts.haml
Normal file
|
@ -0,0 +1,22 @@
|
|||
- panel_class = @domain.errors.messages[:tech_contacts] ? 'panel-danger' : 'panel-default'
|
||||
#tech_contacts.panel{class: panel_class}
|
||||
.panel-heading.clearfix
|
||||
= t(:tech_contacts)
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-4'}= t(:name)
|
||||
%th{class: 'col-xs-4'}= t(:id)
|
||||
%th{class: 'col-xs-4'}= t(:email)
|
||||
%tbody
|
||||
- @domain.tech_contacts.each do |tc|
|
||||
%tr
|
||||
%td= link_to(tc, registrant_contact_path(tc))
|
||||
%td= tc.code
|
||||
%td= tc.email
|
||||
- if @domain.errors.messages[:tech_contacts]
|
||||
%tfoot
|
||||
- @domain.errors.messages[:tech_contacts].each do |x|
|
||||
%tr
|
||||
%td{colspan: 4}= x
|
17
app/views/registrant/domains/show.haml
Normal file
17
app/views/registrant/domains/show.haml
Normal file
|
@ -0,0 +1,17 @@
|
|||
- content_for :actions do
|
||||
= render 'shared/title', name: @domain.name
|
||||
|
||||
.row
|
||||
.col-md-6= render 'registrant/domains/partials/general'
|
||||
.row
|
||||
.col-md-12= render 'registrant/domains/partials/tech_contacts'
|
||||
.row
|
||||
.col-md-12= render 'registrant/domains/partials/admin_contacts'
|
||||
.row
|
||||
.col-md-12= render 'registrant/domains/partials/statuses'
|
||||
.row
|
||||
.col-md-12= render 'registrant/domains/partials/nameservers'
|
||||
.row
|
||||
.col-md-12= render 'registrant/domains/partials/dnskeys'
|
||||
.row
|
||||
.col-md-12= render 'registrant/domains/partials/keyrelays'
|
112
app/views/registrant/registrants/index.haml
Normal file
112
app/views/registrant/registrants/index.haml
Normal file
|
@ -0,0 +1,112 @@
|
|||
= render 'shared/title', name: t(:contacts)
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
= search_form_for [:registrar, @q], html: { style: 'margin-bottom: 0;', class: 'js-form', autocomplete: 'off' } do |f|
|
||||
.row
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label :name
|
||||
= f.search_field :name_matches, value: params[:q][:name_matches], class: 'form-control', placeholder: t(:name)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:id)
|
||||
= f.search_field :code_eq, class: 'form-control', placeholder: t(:id)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:ident)
|
||||
= f.search_field :ident_matches, class: 'form-control', placeholder: t(:ident)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= label_tag t(:ident_type)
|
||||
= select_tag '[q][ident_type_eq]', options_for_select(Contact::IDENT_TYPES, params[:q][:ident_type_eq]), { include_blank: true, placeholder: t(:choose), class: 'form-control selectize' }
|
||||
.row
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:email)
|
||||
= f.search_field :email_matches, class: 'form-control', placeholder: t(:email)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= label_tag t(:country)
|
||||
= select_tag '[q][country_code_eq]', SortedCountry.all_options(params[:q][:country_code_eq]), { include_blank: true, placeholder: t(:choose), class: 'form-control selectize' }
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:is_registrant)
|
||||
%div
|
||||
= f.check_box :registrant_domains_id_not_null
|
||||
.col-md-3
|
||||
.form-group
|
||||
= label_tag t(:contact_type)
|
||||
= select_tag '[q][domain_contacts_type_in]', options_for_select([['admin', 'AdminDomainContact'], ['tech', 'TechDomainContact']], params[:q][:domain_contacts_type_in]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' }
|
||||
.row
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:registrar)
|
||||
= f.select :registrar_id_eq, Registrar.all.map { |x| [x, x.id] }, { include_blank: true }, class: 'form-control selectize', placeholder: t(:choose)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:created_at_from)
|
||||
= f.search_field :created_at_gteq, value: params[:q][:created_at_gteq], class: 'form-control datepicker', placeholder: t(:created_at_from)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:created_at_until)
|
||||
= f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control datepicker', placeholder: t(:created_at_until)
|
||||
.col-md-3
|
||||
.form-group
|
||||
= f.label t(:updated_at)
|
||||
= f.search_field :updated_at_gteq, value: params[:q][:updated_at_gteq], class: 'form-control datepicker', placeholder: t(:updated_at)
|
||||
.row
|
||||
.col-md-6
|
||||
.form-group
|
||||
= label_tag t(:status)
|
||||
= select_tag :statuses_contains, options_for_select(Contact::STATUSES, params[:statuses_contains]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' }
|
||||
.col-md-3
|
||||
.form-group
|
||||
= label_tag t(:results_per_page)
|
||||
= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page)
|
||||
.col-md-3{style: 'padding-top: 25px;'}
|
||||
%button.btn.btn-primary
|
||||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%button.btn.btn-default.js-reset-form
|
||||
= t(:clear_fields)
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'name', t(:name))
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'code', t(:id))
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'ident', t(:ident))
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'email', t(:created_at))
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'registrar_name', t(:registrar))
|
||||
%tbody
|
||||
- @contacts.each do |contact|
|
||||
%tr
|
||||
%td= link_to(contact, registrar_contact_path(contact))
|
||||
%td= contact.code
|
||||
%td= ident_for(contact)
|
||||
%td= l(contact.created_at, format: :short)
|
||||
%td
|
||||
- if contact.registrar
|
||||
= link_to(contact.registrar, registrar_registrar_path(contact.registrar))
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
= paginate @contacts
|
||||
.col-md-6.text-right
|
||||
.pagination
|
||||
= t(:result_count, count: @contacts.total_count)
|
||||
|
||||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{registrar_contacts_path}"
|
75
app/views/registrant/registrants/show.haml
Normal file
75
app/views/registrant/registrants/show.haml
Normal file
|
@ -0,0 +1,75 @@
|
|||
= render 'shared/title', name: @contact.name
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:general)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:id)
|
||||
%dd= @contact.code
|
||||
|
||||
%dt= t(:authinfo_pw)
|
||||
%dd
|
||||
= text_field_tag :auth_info, @contact.auth_info, readonly: true, class: 'partially-hidden'
|
||||
|
||||
%br
|
||||
|
||||
%dt= t(:ident)
|
||||
%dd= ident_for(@contact)
|
||||
|
||||
%dt= t(:email)
|
||||
%dd= @contact.email
|
||||
|
||||
%dt= t(:phone)
|
||||
%dd= @contact.phone
|
||||
|
||||
- if @contact.fax
|
||||
%dt= t(:fax)
|
||||
%dd= @contact.fax
|
||||
|
||||
%br
|
||||
|
||||
%dt= t(:created)
|
||||
%dd
|
||||
= l(@contact.created_at, format: :short)
|
||||
by
|
||||
= creator_link(@contact)
|
||||
|
||||
%dt= t(:updated)
|
||||
%dd
|
||||
= l(@contact.updated_at, format: :short)
|
||||
by
|
||||
= updator_link(@contact)
|
||||
|
||||
%dt= t(:registrar)
|
||||
%dd
|
||||
- if @contact.registrar.present?
|
||||
= link_to(@contact.registrar, registrant_registrar_path(@contact.registrar)) if @contact.registrar
|
||||
|
||||
.col-md-6
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:contact)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dl.dl-horizontal
|
||||
- if @contact.org_name.present?
|
||||
%dt= t(:org_name)
|
||||
%dd= @contact.org_name
|
||||
|
||||
%dt= t(:street)
|
||||
%dd= @contact.street.to_s.gsub("\n", '<br>').html_safe
|
||||
|
||||
%dt= t(:city)
|
||||
%dd= @contact.city
|
||||
|
||||
%dt= t(:zip)
|
||||
%dd= @contact.zip
|
||||
|
||||
%dt= t(:state)
|
||||
%dd= @contact.state
|
||||
|
||||
%dt= t(:country)
|
||||
%dd= @contact.country
|
21
app/views/registrant/registrars/index.haml
Normal file
21
app/views/registrant/registrars/index.haml
Normal file
|
@ -0,0 +1,21 @@
|
|||
- content_for :actions do
|
||||
= render 'shared/title', name: t(:registrars)
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-6'}
|
||||
= sort_link(@q, 'name')
|
||||
%th{class: 'col-xs-6'}
|
||||
= sort_link(@q, 'reg_no', t(:reg_no))
|
||||
%tbody
|
||||
- @registrars.each do |x|
|
||||
%tr
|
||||
%td= link_to(x, [:registrar, x])
|
||||
%td= x.reg_no
|
||||
.row
|
||||
.col-md-12
|
||||
= paginate @registrars
|
53
app/views/registrant/registrars/show.haml
Normal file
53
app/views/registrant/registrars/show.haml
Normal file
|
@ -0,0 +1,53 @@
|
|||
= render 'shared/title', name: @registrar.name
|
||||
|
||||
- if @registrar.errors.any?
|
||||
- @registrar.errors.each do |attr, err|
|
||||
= err
|
||||
%br
|
||||
- if @registrar.errors.any?
|
||||
%hr
|
||||
.row
|
||||
.col-md-6
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:general)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:name)
|
||||
%dd= @registrar.name
|
||||
|
||||
%dt= t(:reg_no)
|
||||
%dd= @registrar.reg_no
|
||||
|
||||
%dt= t(:vat_no)
|
||||
%dd= @registrar.vat_no
|
||||
|
||||
%dt= t(:reference_no)
|
||||
%dd= @registrar.reference_no
|
||||
|
||||
%dt= t(:id)
|
||||
%dd= @registrar.code
|
||||
|
||||
.col-md-6
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:contact)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:country)
|
||||
%dd= @registrar.country
|
||||
|
||||
%dt= t(:address)
|
||||
%dd= @registrar.address
|
||||
|
||||
%dt= t(:contact_phone)
|
||||
%dd= @registrar.phone
|
||||
|
||||
%dt= t(:contact_email)
|
||||
%dd= @registrar.email
|
||||
|
||||
%dt= t(:billing_address)
|
||||
%dd= @registrar.billing_address
|
||||
|
||||
%dt= t(:billing_email)
|
||||
%dd= @registrar.billing_email
|
|
@ -17,5 +17,5 @@
|
|||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%hr
|
||||
- if @results
|
||||
= @results
|
||||
- if @domain
|
||||
%pre= @domain.body
|
|
@ -88,6 +88,16 @@ repp_url: 'https://repp.gitlab.eu/repp/v1/'
|
|||
#
|
||||
restful_whois_url: 'https://restful-whois.example.com'
|
||||
|
||||
#
|
||||
# Estonian Business Registry
|
||||
#
|
||||
# config/secrets.yml --- arireg: {username, password}
|
||||
arireg_username: 'kasutaja'
|
||||
arireg_password: 'parool'
|
||||
# config/environments/production.rb --- Soap::Arireg.wsdl, Soap::Arireg.host
|
||||
arireg_wsdl: 'lib/schemas/testariport.wsdl' # https://demo-ariregxml.rik.ee:447/testariport/?wsdl
|
||||
#arireg_wsdl: 'lib/schemas/ariport.wsdl' # https://ariregxml.rik.ee/ariport/?wsdl
|
||||
arireg_host: 'https://demo-ariregxml.rik.ee:447' # https://ariregxml.rik.ee/
|
||||
|
||||
#
|
||||
# REGISTRAR AND REGISTRANT
|
||||
|
|
|
@ -7,6 +7,8 @@ require 'action_controller/railtie'
|
|||
require 'action_mailer/railtie'
|
||||
require 'action_view/railtie'
|
||||
require 'sprockets/railtie'
|
||||
require 'csv'
|
||||
require 'rails/all'
|
||||
# require "rails/test_unit/railtie"
|
||||
|
||||
# Require the gems listed in Gemfile, including any gems
|
||||
|
|
|
@ -70,7 +70,7 @@ Rails.application.configure do
|
|||
config.i18n.fallbacks = true
|
||||
|
||||
# Send deprecation notices to registered listeners.
|
||||
config.active_support.deprecation = :notify
|
||||
config.active_support.deprecation = :log
|
||||
|
||||
# Disable automatic flushing of the log to improve performance.
|
||||
# config.autoflush_log = false
|
||||
|
|
|
@ -70,7 +70,7 @@ Rails.application.configure do
|
|||
config.i18n.fallbacks = true
|
||||
|
||||
# Send deprecation notices to registered listeners.
|
||||
config.active_support.deprecation = :notify
|
||||
config.active_support.deprecation = :log
|
||||
|
||||
# Disable automatic flushing of the log to improve performance.
|
||||
# config.autoflush_log = false
|
||||
|
|
40
config/initializers/eis_ransack.rb
Normal file
40
config/initializers/eis_ransack.rb
Normal file
|
@ -0,0 +1,40 @@
|
|||
# A custom initializer that enables sorting via custom scopes in Ransack (like the same feature in MetaSearch)
|
||||
|
||||
module Ransack
|
||||
module Adapters
|
||||
module ActiveRecord
|
||||
class Context < ::Ransack::Context
|
||||
|
||||
# Allows for sorting by custom scopes
|
||||
#
|
||||
#
|
||||
# Define your custom scopes in your model, e. g. sort_by_title_asc and sort_by_title_desc
|
||||
# (The scopes would sort by some calculated column or a column added via some crazy join, etc.)
|
||||
#
|
||||
# In your sort links refer to the scopes like to standard fields, e. g.
|
||||
# <%= sort_link(@q, :title, 'Crazy calculated title') %>
|
||||
def evaluate(search, opts = {})
|
||||
viz = Visitor.new
|
||||
relation = @object.where(viz.accept(search.base))
|
||||
if search.sorts.any?
|
||||
custom_scopes = search.sorts.select do |s|
|
||||
custom_scope_name = :"sort_by_#{s.name}_#{s.dir}"
|
||||
relation.respond_to?(custom_scope_name)
|
||||
end
|
||||
attribute_scopes = search.sorts - custom_scopes
|
||||
|
||||
relation = relation.except(:order)
|
||||
|
||||
custom_scopes.each do |s|
|
||||
custom_scope_name = :"sort_by_#{s.name}_#{s.dir}"
|
||||
relation = relation.public_send(custom_scope_name)
|
||||
end
|
||||
|
||||
relation = relation.reorder(viz.accept(attribute_scopes)) if attribute_scopes.any?
|
||||
end
|
||||
opts[:distinct] ? relation.distinct : relation
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -28,6 +28,8 @@ if con.present? && con.table_exists?('settings')
|
|||
|
||||
Setting.save_default(:client_side_status_editing_enabled, false)
|
||||
|
||||
Setting.save_default(:days_to_keep_business_registry_cache, 2)
|
||||
|
||||
Setting.save_default(:invoice_number_min, 131050)
|
||||
Setting.save_default(:invoice_number_max, 149999)
|
||||
Setting.save_default(:days_to_keep_invoices_active, 30)
|
||||
|
|
|
@ -537,6 +537,7 @@ en:
|
|||
switch_to: Switch to
|
||||
admin_menu: Admin
|
||||
domain_transfer_was_approved: 'Domain transfer was approved, associated contacts were: %{contacts} and registrant was %{registrant}'
|
||||
business_registry_service_not_available: "Business Registry service Ärireg is not available"
|
||||
|
||||
# DEPP
|
||||
activemodel:
|
||||
|
@ -932,3 +933,7 @@ en:
|
|||
each_domain_name_must_end_with_colon_sign: 'Each domain name must end with colon (:) sign.'
|
||||
expiration_remind_subject: 'The %{name} domain has expired'
|
||||
contact_already_associated_with_the_domain: 'Object association prohibits operation, contact already associated with the domain'
|
||||
add_reserved_domain: 'Add domain to reserved list'
|
||||
add_blocked_domain: 'Add domain to blocked list'
|
||||
edit_pw: 'Edit Pw'
|
||||
optional: 'Optional'
|
||||
|
|
|
@ -103,6 +103,12 @@ Rails.application.routes.draw do
|
|||
namespace :registrant do
|
||||
root 'domains#index'
|
||||
|
||||
resources :domains do
|
||||
collection do
|
||||
get :download_list
|
||||
end
|
||||
end
|
||||
|
||||
# resources :invoices do
|
||||
# member do
|
||||
# get 'download_pdf'
|
||||
|
@ -141,6 +147,17 @@ Rails.application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
resources :registrars do
|
||||
resources :api_users
|
||||
resources :white_ips
|
||||
collection do
|
||||
get :search
|
||||
end
|
||||
end
|
||||
|
||||
resources :registrants
|
||||
resources :contacts
|
||||
|
||||
resources :whois
|
||||
# resources :contacts do
|
||||
# member do
|
||||
|
@ -204,8 +221,16 @@ Rails.application.routes.draw do
|
|||
|
||||
resources :settings
|
||||
|
||||
resources :blocked_domains
|
||||
resources :reserved_domains
|
||||
resources :blocked_domains do
|
||||
member do
|
||||
get 'delete'
|
||||
end
|
||||
end
|
||||
resources :reserved_domains do
|
||||
member do
|
||||
get 'delete'
|
||||
end
|
||||
end
|
||||
|
||||
resources :registrars do
|
||||
resources :api_users
|
||||
|
|
|
@ -31,7 +31,7 @@ if @cron_group == 'registry'
|
|||
# end
|
||||
|
||||
every :day, at: '12:20am' do
|
||||
runner 'Domain.clean_expired_pendings'
|
||||
runner 'DomainCron.clean_expired_pendings'
|
||||
end
|
||||
|
||||
every 3.hours do
|
||||
|
@ -39,19 +39,19 @@ if @cron_group == 'registry'
|
|||
end
|
||||
|
||||
every 42.minutes do
|
||||
runner 'Domain.destroy_delete_candidates'
|
||||
runner 'DomainCron.destroy_delete_candidates'
|
||||
end
|
||||
|
||||
every 45.minutes do
|
||||
runner 'Domain.start_expire_period'
|
||||
runner 'DomainCron.start_expire_period'
|
||||
end
|
||||
|
||||
every 50.minutes do
|
||||
runner 'Domain.start_delete_period'
|
||||
runner 'DomainCron.start_delete_period'
|
||||
end
|
||||
|
||||
every 52.minutes do
|
||||
runner 'Domain.start_redemption_grace_period'
|
||||
runner 'DomainCron.start_redemption_grace_period'
|
||||
end
|
||||
|
||||
every :day, at: '19:00pm' do
|
||||
|
|
13
db/migrate/20151209122816_create_business_registry_caches.rb
Normal file
13
db/migrate/20151209122816_create_business_registry_caches.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
class CreateBusinessRegistryCaches < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :business_registry_caches do |t|
|
||||
t.string :ident
|
||||
t.string :ident_country_code
|
||||
t.datetime :retrieved_on
|
||||
t.string :associated_businesses, array: true
|
||||
t.timestamps null: false
|
||||
end
|
||||
|
||||
add_index :business_registry_caches, :ident
|
||||
end
|
||||
end
|
5
db/migrate/20160218102355_index_domain_statuses.rb
Normal file
5
db/migrate/20160218102355_index_domain_statuses.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class IndexDomainStatuses < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :domains, :statuses, using: :gin
|
||||
end
|
||||
end
|
510
lib/schemas/ariport.wsdl
Normal file
510
lib/schemas/ariport.wsdl
Normal file
|
@ -0,0 +1,510 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- WSDL for AR X-road API -->
|
||||
<!-- Version: 3.5.12-live, date 2015-09-22 12:57, by user ando -->
|
||||
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:sawsdl="http://www.w3.org/ns/sawsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:typens="http://producers.arireg.xtee.riik.ee/producer/arireg" xmlns:wsdl="http://www.w3.org/ns/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xtee="http://x-tee.riik.ee/xsd/xtee.xsd" name="AriregAPI" targetNamespace="http://producers.arireg.xtee.riik.ee/producer/arireg">
|
||||
<types>
|
||||
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://producers.arireg.xtee.riik.ee/producer/arireg">
|
||||
|
||||
<import namespace="http://x-tee.riik.ee/xsd/xtee.xsd" schemaLocation="http://x-tee.riik.ee/xsd/xtee.xsd"/>
|
||||
|
||||
<!-- listMethods -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/listMethods.xsd"/>
|
||||
|
||||
<!-- detailandmed_v5 -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/detailandmed_v5.xsd"/>
|
||||
|
||||
<!-- ettevotja_dokumentide_loetelu -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/ettevotja_dokumentide_loetelu.xsd"/>
|
||||
|
||||
<!-- ettevotja_esmakanded -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/ettevotja_esmakanded.xsd"/>
|
||||
|
||||
<!-- ettevotja_muudatused tasuline -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/ettevotja_muudatused_tasuline.xsd"/>
|
||||
|
||||
<!-- ettevotja rekvisiitide päring -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/ettevotja_rekvisiidid.xsd"/>
|
||||
|
||||
<!-- ettevotja rekvisiitide fail -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/ettevotja_rekvisiidid_fail.xsd"/>
|
||||
|
||||
<!-- isikuotsing -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/seotud_isiku_otsing.xsd"/>
|
||||
|
||||
<!-- klassifikaatorid -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/klassifikaatorid.xsd"/>
|
||||
|
||||
<!-- majandusaasta_aruanded -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/majandusaasta_aruannete_kirjed.xsd"/>
|
||||
|
||||
<!-- majandusaasta_aruannete loetelu -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/majandusaasta_aruannete_loetelu.xsd"/>
|
||||
|
||||
<!-- toimiku_dokument -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/toimiku_dokument.xsd"/>
|
||||
|
||||
<!-- paringliht_v5 -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/paringliht_v5.xsd"/>
|
||||
|
||||
<!-- paringliht_tasuta -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/paringliht_tasuta.xsd"/>
|
||||
|
||||
<!-- paringesindus_v3 -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/paringesindus_v3.xsd"/>
|
||||
|
||||
<!-- paringesindus_v4 -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/paringesindus_v4.xsd"/>
|
||||
|
||||
<!-- ettevottega_seotud_isikud -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/live/ettevottega_seotud_isikud.xsd"/>
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
|
||||
<!-- Messages for AR APIs -->
|
||||
<message name="listMethodsInputMessage">
|
||||
<!-- <part name="keha" type="xsd:string"/> -->
|
||||
</message>
|
||||
<message name="listMethodsOutputMessage">
|
||||
<part name="keha" type="typens:listMethodsVastus"/>
|
||||
</message>
|
||||
<message name="testSystemInputMessage">
|
||||
</message>
|
||||
<message name="testSystemOutputMessage">
|
||||
</message>
|
||||
<message name="ettevotja_dokumentide_loeteluInputMessage">
|
||||
<part name="keha" type="typens:ettevotja_dokumentide_loetelu_paring"/>
|
||||
</message>
|
||||
<message name="ettevotja_dokumentide_loeteluOutputMessage">
|
||||
<part name="paring" type="typens:ettevotja_dokumentide_loetelu_paring"/>
|
||||
<part name="keha" type="typens:ettevotja_dokumentide_loetelu_vastus"/>
|
||||
</message>
|
||||
<message name="ettevotja_esmakandedInputMessage">
|
||||
<part name="keha" type="typens:ettevotja_esmakanded_paring"/>
|
||||
</message>
|
||||
<message name="ettevotja_esmakandedOutputMessage">
|
||||
<part name="paring" type="typens:ettevotja_esmakanded_paring"/>
|
||||
<part name="keha" type="typens:ettevotja_esmakanded_vastus"/>
|
||||
</message>
|
||||
<message name="ettevotja_muudatused_tasulineInputMessage">
|
||||
<part name="keha" type="typens:ettevotja_muudatused_tasuline_paring"/>
|
||||
</message>
|
||||
<message name="ettevotja_muudatused_tasulineOutputMessage">
|
||||
<part name="paring" type="typens:ettevotja_muudatused_tasuline_paring"/>
|
||||
<part name="keha" type="typens:ettevotja_muudatused_tasuline_vastus"/>
|
||||
</message>
|
||||
<message name="ettevotja_rekvisiididInputMessage">
|
||||
<part name="keha" type="typens:ettevotja_rekvisiidid_paring"/>
|
||||
</message>
|
||||
<message name="ettevotja_rekvisiididOutputMessage">
|
||||
<part name="paring" type="typens:ettevotja_rekvisiidid_paring"/>
|
||||
<part name="keha" type="typens:ettevotja_rekvisiidid_vastus"/>
|
||||
</message>
|
||||
<message name="ettevotja_rekvisiidid_failInputMessage">
|
||||
<part name="keha" type="typens:ettevotja_rekvisiidid_fail_paring"/>
|
||||
</message>
|
||||
<message name="ettevotja_rekvisiidid_failOutputMessage">
|
||||
<part name="paring" type="typens:ettevotja_rekvisiidid_fail_paring"/>
|
||||
<part name="keha" type="typens:ettevotja_rekvisiidid_fail_vastus"/>
|
||||
</message>
|
||||
<message name="seotud_isiku_otsingInputMessage">
|
||||
<part name="keha" type="typens:seotud_isiku_otsing_paring"/>
|
||||
</message>
|
||||
<message name="seotud_isiku_otsingOutputMessage">
|
||||
<part name="paring" type="typens:seotud_isiku_otsing_paring"/>
|
||||
<part name="keha" type="typens:seotud_isiku_otsing_vastus"/>
|
||||
</message>
|
||||
<message name="klassifikaatoridInputMessage">
|
||||
<part name="keha" type="typens:klassifikaatorid_paring"/>
|
||||
</message>
|
||||
<message name="klassifikaatoridOutputMessage">
|
||||
<part name="paring" type="typens:klassifikaatorid_paring"/>
|
||||
<part name="keha" type="typens:klassifikaatorid_vastus"/>
|
||||
</message>
|
||||
<message name="majandusaasta_aruannete_kirjedInputMessage">
|
||||
<part name="keha" type="typens:majandusaasta_aruannete_kirjed_paring"/>
|
||||
</message>
|
||||
<message name="majandusaasta_aruannete_kirjedOutputMessage">
|
||||
<part name="paring" type="typens:majandusaasta_aruannete_kirjed_paring"/>
|
||||
<part name="keha" type="typens:majandusaasta_aruannete_kirjed_vastus"/>
|
||||
</message>
|
||||
<message name="majandusaasta_aruannete_loeteluInputMessage">
|
||||
<part name="keha" type="typens:majandusaasta_aruannete_loetelu_paring"/>
|
||||
</message>
|
||||
<message name="majandusaasta_aruannete_loeteluOutputMessage">
|
||||
<part name="paring" type="typens:majandusaasta_aruannete_loetelu_paring"/>
|
||||
<part name="keha" type="typens:majandusaasta_aruannete_loetelu_vastus"/>
|
||||
</message>
|
||||
<message name="detailandmed_v5_InputMessage">
|
||||
<part name="keha" type="typens:detailandmed_v5_Query"/>
|
||||
</message>
|
||||
<message name="detailandmed_v5_OutputMessage">
|
||||
<part name="paring" type="typens:detailandmed_v5_Query"/>
|
||||
<part name="keha" type="typens:detailandmed_v5_Vastus"/>
|
||||
</message>
|
||||
<message name="toimiku_dokumentInputMessage">
|
||||
<part name="keha" type="typens:toimiku_dokumentRequest"/>
|
||||
</message>
|
||||
<message name="toimiku_dokumentOutputMessage">
|
||||
<part name="paring" type="typens:toimiku_dokumentRequest"/>
|
||||
<part name="keha" type="typens:toimiku_dokumentVastus"/>
|
||||
</message>
|
||||
<message name="paringliht_v5_InputMessage">
|
||||
<part name="keha" type="typens:paringliht_v5_paring"/>
|
||||
</message>
|
||||
<message name="paringliht_v5_OutputMessage">
|
||||
<part name="paring" type="typens:paringliht_v5_paring"/>
|
||||
<part name="keha" type="typens:paringliht_v5_vastus"/>
|
||||
</message>
|
||||
<message name="paringliht_tasuta_InputMessage">
|
||||
<part name="keha" type="typens:paringliht_tasuta_paring"/>
|
||||
</message>
|
||||
<message name="paringliht_tasuta_OutputMessage">
|
||||
<part name="paring" type="typens:paringliht_tasuta_paring"/>
|
||||
<part name="keha" type="typens:paringliht_tasuta_vastus"/>
|
||||
</message>
|
||||
<message name="paringesindus_v3_InputMessage">
|
||||
<part name="keha" type="typens:paringesindus_v3_paring"/>
|
||||
</message>
|
||||
<message name="paringesindus_v3_OutputMessage">
|
||||
<part name="paring" type="typens:paringesindus_v3_paring"/>
|
||||
<part name="keha" type="typens:paringesindus_v3_vastus"/>
|
||||
</message>
|
||||
<message name="paringesindus_v4_InputMessage">
|
||||
<part name="keha" type="typens:paringesindus_v4_paring"/>
|
||||
</message>
|
||||
<message name="paringesindus_v4_OutputMessage">
|
||||
<part name="paring" type="typens:paringesindus_v4_paring"/>
|
||||
<part name="keha" type="typens:paringesindus_v4_vastus"/>
|
||||
</message>
|
||||
<message name="ettevottega_seotud_isikud_InputMessage">
|
||||
<part name="keha" type="typens:ettevottega_seotud_isikud_paring"/>
|
||||
</message>
|
||||
<message name="ettevottega_seotud_isikud_OutputMessage">
|
||||
<part name="paring" type="typens:ettevottega_seotud_isikud_paring"/>
|
||||
<part name="keha" type="typens:ettevottega_seotud_isikud_vastus"/>
|
||||
</message>
|
||||
|
||||
<!-- Port for AR, "Arireg" -->
|
||||
<portType name="AriregPort">
|
||||
<operation name="listMethods">
|
||||
<documentation>
|
||||
<xtee:title>Teenuste nimekiri</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:listMethodsInputMessage"/>
|
||||
<output message="typens:listMethodsOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="testSystem">
|
||||
<documentation>
|
||||
<xtee:title>Adapteri test</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:testSystemInputMessage"/>
|
||||
<output message="typens:testSystemOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="ettevotja_dokumentide_loetelu">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtjaga seotud dokumentide loetelu päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:ettevotja_dokumentide_loeteluInputMessage"/>
|
||||
<output message="typens:ettevotja_dokumentide_loeteluOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="ettevotja_esmakanded">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja esmakannete päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:ettevotja_esmakandedInputMessage"/>
|
||||
<output message="typens:ettevotja_esmakandedOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="ettevotja_muudatused_tasuline">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja muudatuste loetelu tasuline päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:ettevotja_muudatused_tasulineInputMessage"/>
|
||||
<output message="typens:ettevotja_muudatused_tasulineOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="ettevotja_rekvisiidid">
|
||||
<documentation>
|
||||
<xtee:title>Ettevotja rekvisiitide päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:ettevotja_rekvisiididInputMessage"/>
|
||||
<output message="typens:ettevotja_rekvisiididOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="ettevotja_rekvisiidid_fail">
|
||||
<documentation>
|
||||
<xtee:title>Ettevotja rekvisiitide fail</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:ettevotja_rekvisiidid_failInputMessage"/>
|
||||
<output message="typens:ettevotja_rekvisiidid_failOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="seotud_isiku_otsing">
|
||||
<documentation>
|
||||
<xtee:title>Isikute otsing</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:seotud_isiku_otsingInputMessage"/>
|
||||
<output message="typens:seotud_isiku_otsingOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="klassifikaatorid">
|
||||
<documentation>
|
||||
<xtee:title>Klassifikaatorite päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:klassifikaatoridInputMessage"/>
|
||||
<output message="typens:klassifikaatoridOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="majandusaasta_aruannete_kirjed">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja majandusaasta aruande päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:majandusaasta_aruannete_kirjedInputMessage"/>
|
||||
<output message="typens:majandusaasta_aruannete_kirjedOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="majandusaasta_aruannete_loetelu">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja majandusaasta aruande loetelu päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:majandusaasta_aruannete_loeteluInputMessage"/>
|
||||
<output message="typens:majandusaasta_aruannete_loeteluOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="detailandmed_v5">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja detailandmete päring v5</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:detailandmed_v5_InputMessage"/>
|
||||
<output message="typens:detailandmed_v5_OutputMessage"/>
|
||||
</operation>
|
||||
<operation name="toimiku_dokument">
|
||||
<documentation>
|
||||
<xtee:title>E-notar: toimiku dokumendi sisu</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:toimiku_dokumentInputMessage"/>
|
||||
<output message="typens:toimiku_dokumentOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="paringliht_v5">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja lihtandmete päring v5</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:paringliht_v5_InputMessage"/>
|
||||
<output message="typens:paringliht_v5_OutputMessage"/>
|
||||
</operation>
|
||||
<operation name="paringliht_tasuta">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja lihtandmete päring tasuta</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:paringliht_tasuta_InputMessage"/>
|
||||
<output message="typens:paringliht_tasuta_OutputMessage"/>
|
||||
</operation>
|
||||
<operation name="paringesindus_v3">
|
||||
<documentation>
|
||||
<xtee:title>Esindusõiguste päring v3</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:paringesindus_v3_InputMessage"/>
|
||||
<output message="typens:paringesindus_v3_OutputMessage"/>
|
||||
</operation>
|
||||
<operation name="paringesindus_v4">
|
||||
<documentation>
|
||||
<xtee:title>Esindusõiguste päring v4</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:paringesindus_v4_InputMessage"/>
|
||||
<output message="typens:paringesindus_v4_OutputMessage"/>
|
||||
</operation>
|
||||
<operation name="ettevottega_seotud_isikud">
|
||||
<documentation>
|
||||
<xtee:title>Visuaalse Äriregistri ettevõtete-isikute vaheliste seoste päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:ettevottega_seotud_isikud_InputMessage"/>
|
||||
<output message="typens:ettevottega_seotud_isikud_OutputMessage"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<!-- Binding for AR APIs - RPC, SOAP over HTTP -->
|
||||
<binding name="AriregBinding" type="typens:AriregPort">
|
||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="listMethods">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://x-tee.riik.ee/xsd/xtee.xsd" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://x-tee.riik.ee/xsd/xtee.xsd" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testSystem">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body namespace="http://x-rd.net/xsd/xroad.xsd" use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body namespace="http://x-rd.net/xsd/xroad.xsd" use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="majandusaasta_aruannete_kirjed">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="majandusaasta_aruannete_loetelu">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="ettevotja_dokumentide_loetelu">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="ettevotja_esmakanded">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="ettevotja_muudatused_tasuline">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="ettevotja_rekvisiidid">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="ettevotja_rekvisiidid_fail">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="seotud_isiku_otsing">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="klassifikaatorid">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="detailandmed_v5">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="toimiku_dokument">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="paringliht_v5">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="paringliht_tasuta">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="paringesindus_v3">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="paringesindus_v4">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="ettevottega_seotud_isikud">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<!-- Endpoint for AR APIs -->
|
||||
<service name="arireg">
|
||||
<port binding="typens:AriregBinding" name="AriregPort">
|
||||
<soap:address location="http://TURVASERVER/cgi-bin/consumer_proxy"/>
|
||||
<xtee:title>Äriregister_uus</xtee:title>
|
||||
<xtee:address producer="arireg"/>
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
510
lib/schemas/testariport.wsdl
Normal file
510
lib/schemas/testariport.wsdl
Normal file
|
@ -0,0 +1,510 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- WSDL for AR X-road API -->
|
||||
<!-- Version: 3.5.12-test, date 2015-09-22 12:57, by user ando -->
|
||||
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:sawsdl="http://www.w3.org/ns/sawsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:typens="http://producers.arireg.xtee.riik.ee/producer/arireg" xmlns:wsdl="http://www.w3.org/ns/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xtee="http://x-tee.riik.ee/xsd/xtee.xsd" name="AriregAPI" targetNamespace="http://producers.arireg.xtee.riik.ee/producer/arireg">
|
||||
<types>
|
||||
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://producers.arireg.xtee.riik.ee/producer/arireg">
|
||||
|
||||
<import namespace="http://x-tee.riik.ee/xsd/xtee.xsd" schemaLocation="http://x-tee.riik.ee/xsd/xtee.xsd"/>
|
||||
|
||||
<!-- listMethods -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/listMethods.xsd"/>
|
||||
|
||||
<!-- detailandmed_v5 -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/detailandmed_v5.xsd"/>
|
||||
|
||||
<!-- ettevotja_dokumentide_loetelu -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/ettevotja_dokumentide_loetelu.xsd"/>
|
||||
|
||||
<!-- ettevotja_esmakanded -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/ettevotja_esmakanded.xsd"/>
|
||||
|
||||
<!-- ettevotja_muudatused tasuline -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/ettevotja_muudatused_tasuline.xsd"/>
|
||||
|
||||
<!-- ettevotja rekvisiitide päring -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/ettevotja_rekvisiidid.xsd"/>
|
||||
|
||||
<!-- ettevotja rekvisiitide fail -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/ettevotja_rekvisiidid_fail.xsd"/>
|
||||
|
||||
<!-- isikuotsing -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/seotud_isiku_otsing.xsd"/>
|
||||
|
||||
<!-- klassifikaatorid -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/klassifikaatorid.xsd"/>
|
||||
|
||||
<!-- majandusaasta_aruanded -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/majandusaasta_aruannete_kirjed.xsd"/>
|
||||
|
||||
<!-- majandusaasta_aruannete loetelu -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/majandusaasta_aruannete_loetelu.xsd"/>
|
||||
|
||||
<!-- toimiku_dokument -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/toimiku_dokument.xsd"/>
|
||||
|
||||
<!-- paringliht_v5 -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/paringliht_v5.xsd"/>
|
||||
|
||||
<!-- paringliht_tasuta -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/paringliht_tasuta.xsd"/>
|
||||
|
||||
<!-- paringesindus_v3 -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/paringesindus_v3.xsd"/>
|
||||
|
||||
<!-- paringesindus_v4 -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/paringesindus_v4.xsd"/>
|
||||
|
||||
<!-- ettevottega_seotud_isikud -->
|
||||
<include schemaLocation="http://www2.rik.ee/schemas/xtee/arireg/test/ettevottega_seotud_isikud.xsd"/>
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
|
||||
<!-- Messages for AR APIs -->
|
||||
<message name="listMethodsInputMessage">
|
||||
<!-- <part name="keha" type="xsd:string"/> -->
|
||||
</message>
|
||||
<message name="listMethodsOutputMessage">
|
||||
<part name="keha" type="typens:listMethodsVastus"/>
|
||||
</message>
|
||||
<message name="testSystemInputMessage">
|
||||
</message>
|
||||
<message name="testSystemOutputMessage">
|
||||
</message>
|
||||
<message name="ettevotja_dokumentide_loeteluInputMessage">
|
||||
<part name="keha" type="typens:ettevotja_dokumentide_loetelu_paring"/>
|
||||
</message>
|
||||
<message name="ettevotja_dokumentide_loeteluOutputMessage">
|
||||
<part name="paring" type="typens:ettevotja_dokumentide_loetelu_paring"/>
|
||||
<part name="keha" type="typens:ettevotja_dokumentide_loetelu_vastus"/>
|
||||
</message>
|
||||
<message name="ettevotja_esmakandedInputMessage">
|
||||
<part name="keha" type="typens:ettevotja_esmakanded_paring"/>
|
||||
</message>
|
||||
<message name="ettevotja_esmakandedOutputMessage">
|
||||
<part name="paring" type="typens:ettevotja_esmakanded_paring"/>
|
||||
<part name="keha" type="typens:ettevotja_esmakanded_vastus"/>
|
||||
</message>
|
||||
<message name="ettevotja_muudatused_tasulineInputMessage">
|
||||
<part name="keha" type="typens:ettevotja_muudatused_tasuline_paring"/>
|
||||
</message>
|
||||
<message name="ettevotja_muudatused_tasulineOutputMessage">
|
||||
<part name="paring" type="typens:ettevotja_muudatused_tasuline_paring"/>
|
||||
<part name="keha" type="typens:ettevotja_muudatused_tasuline_vastus"/>
|
||||
</message>
|
||||
<message name="ettevotja_rekvisiididInputMessage">
|
||||
<part name="keha" type="typens:ettevotja_rekvisiidid_paring"/>
|
||||
</message>
|
||||
<message name="ettevotja_rekvisiididOutputMessage">
|
||||
<part name="paring" type="typens:ettevotja_rekvisiidid_paring"/>
|
||||
<part name="keha" type="typens:ettevotja_rekvisiidid_vastus"/>
|
||||
</message>
|
||||
<message name="ettevotja_rekvisiidid_failInputMessage">
|
||||
<part name="keha" type="typens:ettevotja_rekvisiidid_fail_paring"/>
|
||||
</message>
|
||||
<message name="ettevotja_rekvisiidid_failOutputMessage">
|
||||
<part name="paring" type="typens:ettevotja_rekvisiidid_fail_paring"/>
|
||||
<part name="keha" type="typens:ettevotja_rekvisiidid_fail_vastus"/>
|
||||
</message>
|
||||
<message name="seotud_isiku_otsingInputMessage">
|
||||
<part name="keha" type="typens:seotud_isiku_otsing_paring"/>
|
||||
</message>
|
||||
<message name="seotud_isiku_otsingOutputMessage">
|
||||
<part name="paring" type="typens:seotud_isiku_otsing_paring"/>
|
||||
<part name="keha" type="typens:seotud_isiku_otsing_vastus"/>
|
||||
</message>
|
||||
<message name="klassifikaatoridInputMessage">
|
||||
<part name="keha" type="typens:klassifikaatorid_paring"/>
|
||||
</message>
|
||||
<message name="klassifikaatoridOutputMessage">
|
||||
<part name="paring" type="typens:klassifikaatorid_paring"/>
|
||||
<part name="keha" type="typens:klassifikaatorid_vastus"/>
|
||||
</message>
|
||||
<message name="majandusaasta_aruannete_kirjedInputMessage">
|
||||
<part name="keha" type="typens:majandusaasta_aruannete_kirjed_paring"/>
|
||||
</message>
|
||||
<message name="majandusaasta_aruannete_kirjedOutputMessage">
|
||||
<part name="paring" type="typens:majandusaasta_aruannete_kirjed_paring"/>
|
||||
<part name="keha" type="typens:majandusaasta_aruannete_kirjed_vastus"/>
|
||||
</message>
|
||||
<message name="majandusaasta_aruannete_loeteluInputMessage">
|
||||
<part name="keha" type="typens:majandusaasta_aruannete_loetelu_paring"/>
|
||||
</message>
|
||||
<message name="majandusaasta_aruannete_loeteluOutputMessage">
|
||||
<part name="paring" type="typens:majandusaasta_aruannete_loetelu_paring"/>
|
||||
<part name="keha" type="typens:majandusaasta_aruannete_loetelu_vastus"/>
|
||||
</message>
|
||||
<message name="detailandmed_v5_InputMessage">
|
||||
<part name="keha" type="typens:detailandmed_v5_Query"/>
|
||||
</message>
|
||||
<message name="detailandmed_v5_OutputMessage">
|
||||
<part name="paring" type="typens:detailandmed_v5_Query"/>
|
||||
<part name="keha" type="typens:detailandmed_v5_Vastus"/>
|
||||
</message>
|
||||
<message name="toimiku_dokumentInputMessage">
|
||||
<part name="keha" type="typens:toimiku_dokumentRequest"/>
|
||||
</message>
|
||||
<message name="toimiku_dokumentOutputMessage">
|
||||
<part name="paring" type="typens:toimiku_dokumentRequest"/>
|
||||
<part name="keha" type="typens:toimiku_dokumentVastus"/>
|
||||
</message>
|
||||
<message name="paringliht_v5_InputMessage">
|
||||
<part name="keha" type="typens:paringliht_v5_paring"/>
|
||||
</message>
|
||||
<message name="paringliht_v5_OutputMessage">
|
||||
<part name="paring" type="typens:paringliht_v5_paring"/>
|
||||
<part name="keha" type="typens:paringliht_v5_vastus"/>
|
||||
</message>
|
||||
<message name="paringliht_tasuta_InputMessage">
|
||||
<part name="keha" type="typens:paringliht_tasuta_paring"/>
|
||||
</message>
|
||||
<message name="paringliht_tasuta_OutputMessage">
|
||||
<part name="paring" type="typens:paringliht_tasuta_paring"/>
|
||||
<part name="keha" type="typens:paringliht_tasuta_vastus"/>
|
||||
</message>
|
||||
<message name="paringesindus_v3_InputMessage">
|
||||
<part name="keha" type="typens:paringesindus_v3_paring"/>
|
||||
</message>
|
||||
<message name="paringesindus_v3_OutputMessage">
|
||||
<part name="paring" type="typens:paringesindus_v3_paring"/>
|
||||
<part name="keha" type="typens:paringesindus_v3_vastus"/>
|
||||
</message>
|
||||
<message name="paringesindus_v4_InputMessage">
|
||||
<part name="keha" type="typens:paringesindus_v4_paring"/>
|
||||
</message>
|
||||
<message name="paringesindus_v4_OutputMessage">
|
||||
<part name="paring" type="typens:paringesindus_v4_paring"/>
|
||||
<part name="keha" type="typens:paringesindus_v4_vastus"/>
|
||||
</message>
|
||||
<message name="ettevottega_seotud_isikud_InputMessage">
|
||||
<part name="keha" type="typens:ettevottega_seotud_isikud_paring"/>
|
||||
</message>
|
||||
<message name="ettevottega_seotud_isikud_OutputMessage">
|
||||
<part name="paring" type="typens:ettevottega_seotud_isikud_paring"/>
|
||||
<part name="keha" type="typens:ettevottega_seotud_isikud_vastus"/>
|
||||
</message>
|
||||
|
||||
<!-- Port for AR, "Arireg" -->
|
||||
<portType name="AriregPort">
|
||||
<operation name="listMethods">
|
||||
<documentation>
|
||||
<xtee:title>Teenuste nimekiri</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:listMethodsInputMessage"/>
|
||||
<output message="typens:listMethodsOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="testSystem">
|
||||
<documentation>
|
||||
<xtee:title>Adapteri test</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:testSystemInputMessage"/>
|
||||
<output message="typens:testSystemOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="ettevotja_dokumentide_loetelu">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtjaga seotud dokumentide loetelu päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:ettevotja_dokumentide_loeteluInputMessage"/>
|
||||
<output message="typens:ettevotja_dokumentide_loeteluOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="ettevotja_esmakanded">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja esmakannete päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:ettevotja_esmakandedInputMessage"/>
|
||||
<output message="typens:ettevotja_esmakandedOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="ettevotja_muudatused_tasuline">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja muudatuste loetelu tasuline päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:ettevotja_muudatused_tasulineInputMessage"/>
|
||||
<output message="typens:ettevotja_muudatused_tasulineOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="ettevotja_rekvisiidid">
|
||||
<documentation>
|
||||
<xtee:title>Ettevotja rekvisiitide päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:ettevotja_rekvisiididInputMessage"/>
|
||||
<output message="typens:ettevotja_rekvisiididOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="ettevotja_rekvisiidid_fail">
|
||||
<documentation>
|
||||
<xtee:title>Ettevotja rekvisiitide fail</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:ettevotja_rekvisiidid_failInputMessage"/>
|
||||
<output message="typens:ettevotja_rekvisiidid_failOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="seotud_isiku_otsing">
|
||||
<documentation>
|
||||
<xtee:title>Isikute otsing</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:seotud_isiku_otsingInputMessage"/>
|
||||
<output message="typens:seotud_isiku_otsingOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="klassifikaatorid">
|
||||
<documentation>
|
||||
<xtee:title>Klassifikaatorite päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:klassifikaatoridInputMessage"/>
|
||||
<output message="typens:klassifikaatoridOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="majandusaasta_aruannete_kirjed">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja majandusaasta aruande päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:majandusaasta_aruannete_kirjedInputMessage"/>
|
||||
<output message="typens:majandusaasta_aruannete_kirjedOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="majandusaasta_aruannete_loetelu">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja majandusaasta aruande loetelu päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:majandusaasta_aruannete_loeteluInputMessage"/>
|
||||
<output message="typens:majandusaasta_aruannete_loeteluOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="detailandmed_v5">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja detailandmete päring v5</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:detailandmed_v5_InputMessage"/>
|
||||
<output message="typens:detailandmed_v5_OutputMessage"/>
|
||||
</operation>
|
||||
<operation name="toimiku_dokument">
|
||||
<documentation>
|
||||
<xtee:title>E-notar: toimiku dokumendi sisu</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:toimiku_dokumentInputMessage"/>
|
||||
<output message="typens:toimiku_dokumentOutputMessage"/>
|
||||
</operation>
|
||||
<operation name="paringliht_v5">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja lihtandmete päring v5</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:paringliht_v5_InputMessage"/>
|
||||
<output message="typens:paringliht_v5_OutputMessage"/>
|
||||
</operation>
|
||||
<operation name="paringliht_tasuta">
|
||||
<documentation>
|
||||
<xtee:title>Ettevõtja lihtandmete päring tasuta</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:paringliht_tasuta_InputMessage"/>
|
||||
<output message="typens:paringliht_tasuta_OutputMessage"/>
|
||||
</operation>
|
||||
<operation name="paringesindus_v3">
|
||||
<documentation>
|
||||
<xtee:title>Esindusõiguste päring v3</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:paringesindus_v3_InputMessage"/>
|
||||
<output message="typens:paringesindus_v3_OutputMessage"/>
|
||||
</operation>
|
||||
<operation name="paringesindus_v4">
|
||||
<documentation>
|
||||
<xtee:title>Esindusõiguste päring v4</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:paringesindus_v4_InputMessage"/>
|
||||
<output message="typens:paringesindus_v4_OutputMessage"/>
|
||||
</operation>
|
||||
<operation name="ettevottega_seotud_isikud">
|
||||
<documentation>
|
||||
<xtee:title>Visuaalse Äriregistri ettevõtete-isikute vaheliste seoste päring</xtee:title>
|
||||
</documentation>
|
||||
<input message="typens:ettevottega_seotud_isikud_InputMessage"/>
|
||||
<output message="typens:ettevottega_seotud_isikud_OutputMessage"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<!-- Binding for AR APIs - RPC, SOAP over HTTP -->
|
||||
<binding name="AriregBinding" type="typens:AriregPort">
|
||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="listMethods">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://x-tee.riik.ee/xsd/xtee.xsd" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://x-tee.riik.ee/xsd/xtee.xsd" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="testSystem">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body namespace="http://x-rd.net/xsd/xroad.xsd" use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body namespace="http://x-rd.net/xsd/xroad.xsd" use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="majandusaasta_aruannete_kirjed">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="majandusaasta_aruannete_loetelu">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="ettevotja_dokumentide_loetelu">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="ettevotja_esmakanded">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="ettevotja_muudatused_tasuline">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="ettevotja_rekvisiidid">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="ettevotja_rekvisiidid_fail">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="seotud_isiku_otsing">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="klassifikaatorid">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="detailandmed_v5">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="toimiku_dokument">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="paringliht_v5">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="paringliht_tasuta">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="paringesindus_v3">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="paringesindus_v4">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="ettevottega_seotud_isikud">
|
||||
<xtee:version>v1</xtee:version>
|
||||
<soap:operation soapAction=""/>
|
||||
<input>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://producers.arireg.xtee.riik.ee/producer/arireg" use="encoded"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<!-- Endpoint for AR APIs -->
|
||||
<service name="arireg">
|
||||
<port binding="typens:AriregBinding" name="AriregPort">
|
||||
<soap:address location="http://TURVASERVER/cgi-bin/consumer_proxy"/>
|
||||
<xtee:title>Äriregister_uus</xtee:title>
|
||||
<xtee:address producer="arireg"/>
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
19
lib/tasks/epp.rake
Normal file
19
lib/tasks/epp.rake
Normal file
|
@ -0,0 +1,19 @@
|
|||
namespace :epp do
|
||||
|
||||
desc 'EPP actions'
|
||||
task all: :environment do
|
||||
Rake::Task['epp:trim_documents'].invoke
|
||||
end
|
||||
|
||||
desc 'Trim logs'
|
||||
task trim_documents: :environment do
|
||||
puts '-----> Running query'
|
||||
sql = <<-SQL
|
||||
UPDATE epp_logs SET request = regexp_replace(request, '<eis:legalDocument(.|\n)*?<\/eis:legalDocument>', '<eis:legalDocument>[FILTERED]<\eis:legalDocument>');
|
||||
SQL
|
||||
ApiLog::EppLog.connection.execute(sql)
|
||||
|
||||
puts "-----> Query done"
|
||||
end
|
||||
end
|
||||
|
|
@ -140,20 +140,20 @@ describe Domain do
|
|||
domain.registrant_verification_asked_at = 30.days.ago
|
||||
domain.pending_delete!
|
||||
|
||||
Domain.clean_expired_pendings.should == 1
|
||||
DomainCron.clean_expired_pendings.should == 1
|
||||
domain.reload.pending_delete?.should == false
|
||||
domain.pending_json.should == {}
|
||||
end
|
||||
|
||||
it 'should expire domains' do
|
||||
Domain.start_expire_period
|
||||
DomainCron.start_expire_period
|
||||
@domain.statuses.include?(DomainStatus::EXPIRED).should == false
|
||||
|
||||
old_valid_to = Time.zone.now - 10.days
|
||||
@domain.valid_to = old_valid_to
|
||||
@domain.save
|
||||
|
||||
Domain.start_expire_period
|
||||
DomainCron.start_expire_period
|
||||
@domain.reload
|
||||
@domain.statuses.include?(DomainStatus::EXPIRED).should == true
|
||||
@domain.outzone_at.should be_within(5).of(old_valid_to + Setting.expire_warning_period.days)
|
||||
|
@ -161,7 +161,7 @@ describe Domain do
|
|||
old_valid_to + Setting.expire_warning_period.days + Setting.redemption_grace_period.days
|
||||
)
|
||||
|
||||
Domain.start_expire_period
|
||||
DomainCron.start_expire_period
|
||||
@domain.reload
|
||||
@domain.statuses.include?(DomainStatus::EXPIRED).should == true
|
||||
end
|
||||
|
@ -173,7 +173,7 @@ describe Domain do
|
|||
@domain.outzone_at, @domain.delete_at = nil, nil
|
||||
@domain.save
|
||||
|
||||
Domain.start_expire_period
|
||||
DomainCron.start_expire_period
|
||||
@domain.reload
|
||||
@domain.statuses.include?(DomainStatus::EXPIRED).should == true
|
||||
@domain.outzone_at.should be_within(5).of(old_valid_to + Setting.expire_warning_period.days)
|
||||
|
@ -183,7 +183,7 @@ describe Domain do
|
|||
end
|
||||
|
||||
it 'should start redemption grace period' do
|
||||
Domain.start_redemption_grace_period
|
||||
DomainCron.start_redemption_grace_period
|
||||
@domain.reload
|
||||
@domain.statuses.include?(DomainStatus::SERVER_HOLD).should == false
|
||||
|
||||
|
@ -191,20 +191,20 @@ describe Domain do
|
|||
@domain.statuses << DomainStatus::SERVER_MANUAL_INZONE # this prohibits server_hold
|
||||
@domain.save
|
||||
|
||||
Domain.start_redemption_grace_period
|
||||
DomainCron.start_redemption_grace_period
|
||||
@domain.reload
|
||||
@domain.statuses.include?(DomainStatus::SERVER_HOLD).should == false
|
||||
|
||||
@domain.statuses = []
|
||||
@domain.save
|
||||
|
||||
Domain.start_redemption_grace_period
|
||||
DomainCron.start_redemption_grace_period
|
||||
@domain.reload
|
||||
@domain.statuses.include?(DomainStatus::SERVER_HOLD).should == true
|
||||
end
|
||||
|
||||
it 'should start delete period' do
|
||||
Domain.start_delete_period
|
||||
DomainCron.start_delete_period
|
||||
@domain.reload
|
||||
@domain.statuses.include?(DomainStatus::DELETE_CANDIDATE).should == false
|
||||
|
||||
|
@ -212,13 +212,13 @@ describe Domain do
|
|||
@domain.statuses << DomainStatus::SERVER_DELETE_PROHIBITED # this prohibits delete_candidate
|
||||
@domain.save
|
||||
|
||||
Domain.start_delete_period
|
||||
DomainCron.start_delete_period
|
||||
@domain.reload
|
||||
@domain.statuses.include?(DomainStatus::DELETE_CANDIDATE).should == false
|
||||
|
||||
@domain.statuses = []
|
||||
@domain.save
|
||||
Domain.start_delete_period
|
||||
DomainCron.start_delete_period
|
||||
@domain.reload
|
||||
|
||||
@domain.statuses.include?(DomainStatus::DELETE_CANDIDATE).should == true
|
||||
|
@ -234,7 +234,7 @@ describe Domain do
|
|||
|
||||
Domain.count.should == 2
|
||||
|
||||
Domain.start_delete_period
|
||||
DomainCron.start_delete_period
|
||||
|
||||
Domain.destroy_delete_candidates
|
||||
Domain.count.should == 0
|
||||
|
@ -391,7 +391,7 @@ describe Domain do
|
|||
end
|
||||
|
||||
it 'should start redemption grace period' do
|
||||
Domain.start_redemption_grace_period
|
||||
DomainCron.start_redemption_grace_period
|
||||
@domain.reload
|
||||
@domain.statuses.include?(DomainStatus::SERVER_HOLD).should == false
|
||||
|
||||
|
@ -399,14 +399,14 @@ describe Domain do
|
|||
@domain.statuses << DomainStatus::SERVER_MANUAL_INZONE # this prohibits server_hold
|
||||
@domain.save
|
||||
|
||||
Domain.start_redemption_grace_period
|
||||
DomainCron.start_redemption_grace_period
|
||||
@domain.reload
|
||||
@domain.statuses.include?(DomainStatus::SERVER_HOLD).should == false
|
||||
|
||||
@domain.statuses = []
|
||||
@domain.save
|
||||
|
||||
Domain.start_redemption_grace_period
|
||||
DomainCron.start_redemption_grace_period
|
||||
@domain.reload
|
||||
@domain.statuses.include?(DomainStatus::SERVER_HOLD).should == true
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue