loopiator 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/loopiator.rb +1 -1
- data/lib/loopiator/client.rb +3 -1
- data/lib/loopiator/domains.rb +7 -8
- 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: 94e8d678e272050cac8d328bee4b66a5d9ca0fe4
|
4
|
+
data.tar.gz: b5ae29c7299d90722c283b02fba4ceab193722d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 869842bcbff26040973acefdfa10b3aa237b5b3d6643bb473da39ddad55db215447d9b4b29bdf0542bc14ce81709aff4a81b819c5cd8455d9f36be0f71042b43
|
7
|
+
data.tar.gz: 42205aa66f0f2242ea257243274b53165369c23aa7dc0a4165720a1a13c42041955a94b59ba9475830f14566b73f6bd501f9318e8b9071ca30727f3e142ddad3
|
data/lib/loopiator.rb
CHANGED
data/lib/loopiator/client.rb
CHANGED
@@ -41,7 +41,9 @@ module Loopiator
|
|
41
41
|
when :rate_limited then raise Loopiator::RateLimitError
|
42
42
|
when :insufficient_funds then raise Loopiator::InsufficientFundsError
|
43
43
|
when :bad_indata then raise Loopiator::InvalidParameterError
|
44
|
-
|
44
|
+
# :unknown_error will be returned when calling 'orderDomain' and the domain already exists in a customer account
|
45
|
+
# do not raise an error until Loopia has updated their API to add an additional error code specifically targeting this phenomena
|
46
|
+
#when :unknown_error then raise Loopiator::UnknownError
|
45
47
|
else
|
46
48
|
return response
|
47
49
|
end
|
data/lib/loopiator/domains.rb
CHANGED
@@ -39,14 +39,13 @@ module Loopiator
|
|
39
39
|
|
40
40
|
def purchase_domain(domain_name, customer_number: "", raise_exception_on_occupied: false)
|
41
41
|
success = false
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
42
|
+
|
43
|
+
order_domain(domain_name, accept_terms: true, customer_number: customer_number, raise_exception_on_occupied: raise_exception_on_occupied)
|
44
|
+
|
45
|
+
domain = get_domain(domain_name, customer_number: customer_number)
|
46
|
+
|
47
|
+
if (domain && domain.needs_to_be_paid? && !domain.reference_number.nil? && !domain.reference_number.empty?)
|
48
|
+
success = pay_invoice_using_credits(domain.reference_number, customer_number: customer_number)
|
50
49
|
end
|
51
50
|
|
52
51
|
return success
|
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.8'
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Johnsson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simpleidn
|