loopiator 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc65dc0ed358865f9e04035ddc87a7d7e56c8c6b
4
- data.tar.gz: a24334dc1016bc71ec185ba49baf96a2c987e915
3
+ metadata.gz: 92899b5063833e0d5b88af410616c71521664fdb
4
+ data.tar.gz: 77baa6484ae65c61da51d5ab4cb67fcd5bc36d5c
5
5
  SHA512:
6
- metadata.gz: 345a83d52c1488574892cb12e4c4e049a2c9fa860fa41e8ece88b13a18eb0682032c122580b675d1dcca78e2b4e6b0761a70cd51c7917145006863bb004e04f7
7
- data.tar.gz: 233de04b3747022b55c2d80080e57063fb8271713f1461f24a920afef0b103ca26bda102775c07f2cc1e9db0c18dc077f14ce602d97e0bd43e9db346e944a8a3
6
+ metadata.gz: 1c23dc01ba4cf52a7471c96f5bd3c166e23ccee835df1a65ca0bc384f80c076c22c0909497aff93fbd95079d43faf1cf357805603977ed5b32cda4b79f9b3f94
7
+ data.tar.gz: c37f217f6381b030ac1ce3c72323c384c0ed5a8dece4fe042ebea4f0336d7d83b97961e105d27d08b8964f7797b0f7a4c52fff162be9507a57a6cef51644c3fb
data/lib/loopiator.rb CHANGED
@@ -10,7 +10,7 @@ require File.join(File.dirname(__FILE__), 'loopiator/credits')
10
10
  require File.join(File.dirname(__FILE__), 'loopiator/client')
11
11
 
12
12
  module Loopiator
13
- VERSION = "0.3.3"
13
+ VERSION = "0.3.4"
14
14
 
15
15
  class << self
16
16
  attr_writer :configuration
@@ -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 :paid, :unpaid_amount, :registered, :domain, :renewal_status, :expiration_date, :reference_number
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.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.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-23 00:00:00.000000000 Z
11
+ date: 2015-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simpleidn