Merge branch 'staging' of http://github.com/internetee/registry into staging

This commit is contained in:
Matt Farnsworth 2015-11-26 18:57:35 +02:00
commit 14a2a6cc02
6 changed files with 109 additions and 16 deletions

View file

@ -35,7 +35,7 @@ module Repp
error! I18n.t('errors.messages.epp_authorization_error'), 401 unless domain.auth_info.eql? request.headers['Auth-Code'] error! I18n.t('errors.messages.epp_authorization_error'), 401 unless domain.auth_info.eql? request.headers['Auth-Code']
contact_repp_json = proc{|contact| contact_repp_json = proc{|contact|
contact.attributes.slice("code", "ident_type", "ident_country_code", "phone", "email", "street", "city", "zip","country_code", "statuses") contact.attributes.slice("code", "name", "ident", "ident_type", "ident_country_code", "phone", "email", "street", "city", "zip","country_code", "statuses")
} }
@response = { @response = {

View file

@ -4,7 +4,7 @@ class ContactMailer < ApplicationMailer
def email_updated(email, contact_id, should_deliver) def email_updated(email, contact_id, should_deliver)
@contact = Contact.find_by(id: contact_id) @contact = Contact.find_by(id: contact_id)
return unless email || @contact return unless email || @contact
return if delivery_off?(contact, should_deliver) return if delivery_off?(@contact, should_deliver)
return if whitelist_blocked?(email) return if whitelist_blocked?(email)
begin begin

View file

@ -1,3 +1,5 @@
# Domain listing
## GET /repp/v1/domains ## GET /repp/v1/domains
Returns domains of the current registrar. Returns domains of the current registrar.
@ -98,3 +100,83 @@ Content-Type: application/json
"total_number_of_records": 2 "total_number_of_records": 2
} }
``` ```
# Transfer info
## GET /repp/v1/domains/*domainname.ee*/transfer_info
Returns details of contacts associated with a domain to be transfered. Necessary for pre-transfer checks and better user experience in automated registrar systems.
Please note the domain name in the path
#### Request
```
GET /repp/v1/domains/ee-test.ee/transfer_info HTTP/1.1
Accept: application/json
Authorization: Basic Z2l0bGFiOmdoeXQ5ZTRmdQ==
Content-Length: 0
Content-Type: application/json
Auth-Code: authinfopw
```
Please note that domain transfer/authorisation code must be placed in header - *Auth-Code*
#### Response
```
HTTP/1.1 200 OK
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 784
Content-Type: application/json
{
"domain":"ee-test.ee",
"registrant":{
"code":"EE:R1",
"ident_type":"org",
"ident_country_code":"EE",
"phone":"+372.1234567",
"email":"registrant@cache.ee",
"street":"Businesstreet 1",
"city":"Tallinn",
"zip":"10101",
"country_code":"EE",
"statuses":[
"ok",
"linked"
]
},
"admin_contacts":[
{
"code":"EE:A1",
"ident_type":"priv",
"ident_country_code":"EE",
"phone":"+372.7654321",
"email":"admin@cache.ee",
"street":"Adminstreet 2",
"city":"Tallinn",
"zip":"12345",
"country_code":"EE",
"statuses":[
"ok",
"linked"
]
}
],
"tech_contacts":[
{
"code":"EE:T1",
"ident_type":"org",
"ident_country_code":"EE",
"phone":"+372.7654321",
"email":"tech@cache.ee",
"street":"Techstreet 1",
"city":"Tallinn",
"zip":"12345",
"country_code":"EE",
"statuses":[
"ok",
"linked"
]
}
]
}
```

View file

@ -20,15 +20,19 @@
schemaLocation="eppcom-1.0.xsd"/> schemaLocation="eppcom-1.0.xsd"/>
<import namespace="urn:ietf:params:xml:ns:epp-1.0" <import namespace="urn:ietf:params:xml:ns:epp-1.0"
schemaLocation="epp-1.0.xsd"/> schemaLocation="epp-1.0.xsd"/>
<!-- EPP protocol extension: DNSSEC -->
<import namespace="urn:ietf:params:xml:ns:secDNS-1.1"
schemaLocation="secNDS-1.1.xsd"/>
<import namespace="urn:ietf:params:xml:ns:host-1.0"
schemaLocation="host-1.0.xsd"/>
<!-- EPP protocol extension: .ee specific -->
<import namespace="https://epp.tld.ee/schema/eis-1.0"
schemaLocation="eis-1.0.xsd"/>
<import namespace="https://epp.tld.ee/schema/contact-eis-1.0" <import namespace="https://epp.tld.ee/schema/contact-eis-1.0"
schemaLocation="contact-eis-1.0.xsd"/> schemaLocation="contact-eis-1.0.xsd"/>
<import namespace="https://epp.tld.ee/schema/domain-eis-1.0" <import namespace="https://epp.tld.ee/schema/domain-eis-1.0"
schemaLocation="domain-eis-1.0.xsd"/> schemaLocation="domain-eis-1.0.xsd"/>
<!-- EPP protocol extensions -->
<import namespace="urn:ietf:params:xml:ns:secDNS-1.1"
schemaLocation="secNDS-1.1.xsd"/>
<import namespace="https://epp.tld.ee/schema/eis-1.0"
schemaLocation="eis-1.0.xsd"/>
<annotation> <annotation>
<documentation> <documentation>

View file

@ -10,9 +10,9 @@
<!-- <!--
Import common element types. Import common element types.
--> -->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="http://www.iana.org/assignments/xml-registry/schema/eppcom-1.0.xsd"/> <import namespace="urn:ietf:params:xml:ns:eppcom-1.0"/>
<import namespace="urn:ietf:params:xml:ns:epp-1.0" schemaLocation="http://www.iana.org/assignments/xml-registry/schema/epp-1.0.xsd"/> <import namespace="urn:ietf:params:xml:ns:epp-1.0"/>
<import namespace="https://epp.tld.ee/schema/eis-1.0.xsd" schemaLocation="doc/schemas/eis-1.0.xsd"/> <import namespace="https://epp.tld.ee/schema/eis-1.0.xsd"/>
<annotation> <annotation>
<documentation> <documentation>

View file

@ -11,11 +11,11 @@
<!-- <!--
Import common element types. Import common element types.
--> -->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="http://www.iana.org/assignments/xml-registry/schema/eppcom-1.0.xsd"/> <import namespace="urn:ietf:params:xml:ns:eppcom-1.0"/>
<import namespace="urn:ietf:params:xml:ns:epp-1.0" schemaLocation="http://www.iana.org/assignments/xml-registry/schema/epp-1.0.xsd"/> <import namespace="urn:ietf:params:xml:ns:epp-1.0"/>
<import namespace="urn:ietf:params:xml:ns:host-1.0" schemaLocation="http://www.iana.org/assignments/xml-registry/schema/host-1.0.xsd"/> <import namespace="urn:ietf:params:xml:ns:host-1.0"/>
<import namespace="urn:ietf:params:xml:ns:secDNS-1.1" schemaLocation="http://www.iana.org/assignments/xml-registry/schema/secDNS-1.1.xsd"/> <import namespace="urn:ietf:params:xml:ns:secDNS-1.1"/>
<import namespace="https://epp.tld.ee/schema/eis-1.0.xsd" schemaLocation="doc/schemas/eis-1.0.xsd"/> <import namespace="https://epp.tld.ee/schema/eis-1.0.xsd"/>
<annotation> <annotation>
<documentation> <documentation>
@ -92,7 +92,6 @@
<sequence> <sequence>
<element name="hostName" type="eppcom:labelType"/> <element name="hostName" type="eppcom:labelType"/>
<element name="hostAddr" type="host:addrType" <element name="hostAddr" type="host:addrType"
minOccurs="0" maxOccurs="unbounded"/> minOccurs="0" maxOccurs="unbounded"/>
</sequence> </sequence>
</complexType> </complexType>
@ -386,16 +385,24 @@
<enumeration value="clientUpdateProhibited"/> <enumeration value="clientUpdateProhibited"/>
<enumeration value="inactive"/> <enumeration value="inactive"/>
<enumeration value="ok"/> <enumeration value="ok"/>
<enumeration value="expired"/>
<enumeration value="pendingCreate"/> <enumeration value="pendingCreate"/>
<enumeration value="pendingDelete"/> <enumeration value="pendingDelete"/>
<enumeration value="pendingRenew"/> <enumeration value="pendingRenew"/>
<enumeration value="pendingTransfer"/> <enumeration value="pendingTransfer"/>
<enumeration value="pendingUpdate"/> <enumeration value="pendingUpdate"/>
<enumeration value="pendingDeleteConfirmation"/>
<enumeration value="serverDeleteProhibited"/> <enumeration value="serverDeleteProhibited"/>
<enumeration value="serverHold"/> <enumeration value="serverHold"/>
<enumeration value="serverRenewProhibited"/> <enumeration value="serverRenewProhibited"/>
<enumeration value="serverTransferProhibited"/> <enumeration value="serverTransferProhibited"/>
<enumeration value="serverUpdateProhibited"/> <enumeration value="serverUpdateProhibited"/>
<enumeration value="serverForceDelete"/>
<enumeration value="serverManualInzone"/>
<enumeration value="serverRegistrantChangeProhibited"/>
<enumeration value="serverAdminChangeProhibited"/>
<enumeration value="serverTechChangeProhibited"/>
<enumeration value="deleteCandidate"/>
</restriction> </restriction>
</simpleType> </simpleType>