loopiator 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/loopiator.rb +1 -1
- data/lib/loopiator/domains.rb +11 -0
- data/lib/loopiator/models/domain.rb +4 -3
- data/loopiator.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92899b5063833e0d5b88af410616c71521664fdb
|
4
|
+
data.tar.gz: 77baa6484ae65c61da51d5ab4cb67fcd5bc36d5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c23dc01ba4cf52a7471c96f5bd3c166e23ccee835df1a65ca0bc384f80c076c22c0909497aff93fbd95079d43faf1cf357805603977ed5b32cda4b79f9b3f94
|
7
|
+
data.tar.gz: c37f217f6381b030ac1ce3c72323c384c0ed5a8dece4fe042ebea4f0336d7d83b97961e105d27d08b8964f7797b0f7a4c52fff162be9507a57a6cef51644c3fb
|
data/lib/loopiator.rb
CHANGED
data/lib/loopiator/domains.rb
CHANGED
@@ -18,6 +18,17 @@ module Loopiator
|
|
18
18
|
return domain
|
19
19
|
end
|
20
20
|
|
21
|
+
def get_domains(customer_number: "")
|
22
|
+
domains = []
|
23
|
+
response = call("getDomains", customer_number)
|
24
|
+
|
25
|
+
response.each do |item|
|
26
|
+
domains << Loopiator::Models::Domain.new(item)
|
27
|
+
end if (response && response.is_a?(Array))
|
28
|
+
|
29
|
+
return domains
|
30
|
+
end
|
31
|
+
|
21
32
|
def order_domain(domain_name, accept_terms: true, customer_number: "", raise_exception_on_occupied: false)
|
22
33
|
response = parse_status_response(call("orderDomain", customer_number, encode_domain(domain_name), accept_terms))
|
23
34
|
|
@@ -1,19 +1,20 @@
|
|
1
1
|
module Loopiator
|
2
2
|
module Models
|
3
3
|
|
4
|
+
#https://www.loopia.se/api/domain_obj/
|
4
5
|
class Domain
|
5
|
-
attr_accessor :
|
6
|
+
attr_accessor :domain, :paid, :registered, :renewal_status, :expiration_date, :reference_number, :unpaid_amount
|
6
7
|
|
7
8
|
def initialize(hash)
|
8
9
|
hash.symbolize_keys!
|
9
10
|
|
11
|
+
self.domain = hash.fetch(:domain, "")
|
10
12
|
self.paid = hash.fetch(:paid, 0).eql?(1)
|
11
|
-
self.unpaid_amount = hash.fetch(:unpaid_amount, 0)
|
12
13
|
self.registered = hash.fetch(:registered, 0).eql?(1)
|
13
|
-
self.domain = hash.fetch(:domain, "")
|
14
14
|
self.renewal_status = hash.fetch(:renewal_status, "")
|
15
15
|
self.expiration_date = hash.fetch(:expiration_date, "")
|
16
16
|
self.reference_number = hash.fetch(:reference_no, "").to_s
|
17
|
+
self.unpaid_amount = hash.fetch(:unpaid_amount, 0)
|
17
18
|
end
|
18
19
|
|
19
20
|
def paid?
|
data/loopiator.gemspec
CHANGED
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
|
|
3
3
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if s.respond_to? :required_rubygems_version=
|
4
4
|
|
5
5
|
s.name = 'loopiator'
|
6
|
-
s.version = '0.3.
|
6
|
+
s.version = '0.3.4'
|
7
7
|
|
8
8
|
s.homepage = "https://github.com/Agiley/Loopiator"
|
9
9
|
s.email = "sebastian@agiley.se"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loopiator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Johnsson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simpleidn
|