gotransverse-tract-api 0.1.7 → 0.1.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d400cd1ca96b512e3e5b7b0e740980e90bc1714d
4
- data.tar.gz: b5745c2429643ee5f91aa86ee487fd9e4779d10c
3
+ metadata.gz: 06b789ee39703041636a1bdb4b4a9c5c3092fcc8
4
+ data.tar.gz: dc53204c8082464cac0d8ca64331d5af0563a3a9
5
5
  SHA512:
6
- metadata.gz: 708447a1b552d2bea3b0a6ecdf1faca2d27d2ee9b59d00c33fb4fb71503958577f662bf135bc53ed3410c32a93a92929d4a72063cae2ed2f569425f8031468c9
7
- data.tar.gz: 7ca613ac03e3142367d6f18da5ee733ff08e065b0ddf572268c8e1a6d32ab068d4173e864755f866310254817fa46b70c879d9551c3e8aa1abf692dca5e426f4
6
+ metadata.gz: 15431161f8fdca74f828ea26ae2cbb0bf4467d2e591f0acf82525ab97332fa34acb7ab45f0e1bd86fbf80293c4e964b2aa518b996d2ac61d0948f8d02301af3c
7
+ data.tar.gz: 2b3b23974c81b160bc4437dc072e69016d64081836524f201c56b254e0ea182eb97ce15b6f11374f3c4298d9c206af3766dfc998e1ef3d127f99590d80b999c1
@@ -42,9 +42,10 @@ require "gotransverse-tract-api/product/operation_attribute"
42
42
  require "gotransverse-tract-api/product/price_list"
43
43
  require "gotransverse-tract-api/product/product_price_range"
44
44
  require "gotransverse-tract-api/product/product"
45
- require "gotransverse-tract-api/product/product_category"
45
+ # require "gotransverse-tract-api/product/product_category"
46
46
  require "gotransverse-tract-api/product/product_price"
47
47
  require "gotransverse-tract-api/product/usage_rule"
48
+ # require "gotransverse-tract-api/product/discount_category"
48
49
 
49
50
  require "gotransverse-tract-api/service/service"
50
51
  require "gotransverse-tract-api/service/service_device_inventory_item"
@@ -87,7 +88,7 @@ module GoTransverseTractApi
87
88
  # end
88
89
  #
89
90
  def self.configure
90
- self.configuration ||= Configuration.new
91
+ self.configuration ||= GoTransverseTractApi::Configuration.new
91
92
  yield(configuration)
92
93
  end
93
94
 
@@ -111,6 +112,8 @@ module GoTransverseTractApi
111
112
 
112
113
  api_url = GoTransverseTractApi.get_api_url_for(klass)
113
114
 
115
+ pp "api_url: " + api_url
116
+
114
117
  if GoTransverseTractApi.configuration.cache_enabled
115
118
  return self.get_cached_response_from(klass, api_params)
116
119
  end
@@ -1,40 +1,42 @@
1
- class Configuration
1
+ module GoTransverseTractApi
2
2
 
3
- attr_accessor :user_id
4
- attr_accessor :password
5
- attr_accessor :basic_credentials
3
+ class Configuration
6
4
 
7
- attr_accessor :cache_enabled
5
+ attr_accessor :user_id
6
+ attr_accessor :password
7
+ attr_accessor :basic_credentials
8
8
 
9
- attr_accessor :tract_api_host
10
- attr_accessor :tract_api_url
9
+ attr_accessor :cache_enabled
11
10
 
12
- #
13
- # initialize
14
- #
15
- def initialize
16
- @tract_api_host ||= "https://my.tractbilling.com"
17
- @tract_api_url = "#{@tract_api_host}/t/s/r/#{GoTransverseTractApi::TARGET_API_VERSION}"
18
- set_basic_credentials
19
- end
11
+ attr_accessor :tract_api_host
12
+ attr_accessor :tract_api_url
20
13
 
21
- private
14
+ #
15
+ # initialize
16
+ #
17
+ def initialize
18
+ @tract_api_host ||= "https://my.tractbilling.com"
19
+ @tract_api_url = "#{@tract_api_host}/t/s/r/#{GoTransverseTractApi::TARGET_API_VERSION}"
20
+ set_basic_credentials
21
+ end
22
22
 
23
- #
24
- # set_basic_credentials
25
- #
26
- def set_basic_credentials
23
+ private
27
24
 
28
- # Perform Base-64 encoding of API login information
29
- user_pass = "#{@user_id.to_s}:#{@password.to_s}"
25
+ #
26
+ # set_basic_credentials
27
+ #
28
+ def set_basic_credentials
30
29
 
31
- # Sets basic_credentials attr_accessor
32
- @basic_credentials = Base64.encode64(user_pass)
30
+ # Perform Base-64 encoding of API login information
31
+ user_pass = "#{@user_id.to_s}:#{@password.to_s}"
33
32
 
34
- # Erase in-clear credentials
35
- @user_id = @password = nil
33
+ # Sets basic_credentials attr_accessor
34
+ @basic_credentials = Base64.encode64(user_pass)
36
35
 
37
- end
36
+ # Erase in-clear credentials
37
+ @user_id = @password = nil
38
38
 
39
- end
39
+ end
40
40
 
41
+ end
42
+ end
@@ -1,6 +1,6 @@
1
1
  module GoTransverseTractApi
2
2
 
3
- VERSION = "0.1.7"
3
+ VERSION = "0.1.8"
4
4
  TARGET_API_VERSION = "1.28"
5
5
 
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gotransverse-tract-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien DeFrance
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-23 00:00:00.000000000 Z
12
+ date: 2015-11-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler