gotransverse-tract-api 0.9.2 → 0.10.0

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: fce9f9f3e3f911147aaf81a575781c67600ddd97
4
- data.tar.gz: f776201ed0e6a007baff0db725c7c752ea84a1ed
3
+ metadata.gz: 35e8b89d98bdc9b4e3b2798f81223aa935e82f80
4
+ data.tar.gz: cbeb6201500413e0536ca7168fc32925091ad5a2
5
5
  SHA512:
6
- metadata.gz: 570bb59248b7a871f612ad16db32846c5461e6f6d9268ff46551663901f509bfb8b1571091bd0e6e82f7116c0cd6dfbbd2d0bdd819eba2a08288aef4dee40be3
7
- data.tar.gz: 68f1dbab0601e8e1b09b7f1315f7b4917f89c4b3c66a33256d69a0286154208e3ae32939da19c3ee4298a1182c4cff0b0382d8ccc2c0549205a6cdfefbacc0fa
6
+ metadata.gz: dc6327f7ee657d9333f677ab18644cd97ad64b34d87274da7028fb4a33c37c51d8a31c98e791afe5cf568c6ef58d9f38c0f276b10d949aebe80d456ca508d605
7
+ data.tar.gz: 2782bccda49cabaddb3673c8d58366c3d93e80bf31d9b008f900bfa74461f416cafce3373338168278074e8ccab6b6e18b5d6c214f841ca24291cf44c94344d4
@@ -86,6 +86,7 @@ require "gotransverse-tract-api/usage/global_usage_rule"
86
86
  require "gotransverse-tract-api/usage/order_item_usage_rule"
87
87
  require "gotransverse-tract-api/usage/product_usage_rule"
88
88
  require "gotransverse-tract-api/usage/rate_table"
89
+ require "gotransverse-tract-api/usage/rate_table_entry"
89
90
  require "gotransverse-tract-api/usage/service_usage_rule"
90
91
  require "gotransverse-tract-api/usage/usage_event"
91
92
  require "gotransverse-tract-api/usage/usage_lookup_table"
@@ -0,0 +1,26 @@
1
+ module GoTransverseTractApi
2
+
3
+ module Usage
4
+
5
+ class RateTableEntry
6
+
7
+ class << self
8
+
9
+ #
10
+ # @param {Long} eid
11
+ # @param {Hash} options
12
+ #
13
+ def find_by_eid eid, options={}
14
+ return nil unless eid.present?
15
+
16
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({rateTableEid: eid}, options)
17
+ GoTransverseTractApi.get_response_for(self, params)
18
+ end
19
+
20
+ end
21
+
22
+ end
23
+
24
+ end
25
+
26
+ end
@@ -1,6 +1,6 @@
1
1
  module GoTransverseTractApi
2
2
 
3
- VERSION = "0.9.2"
3
+ VERSION = "0.10.0"
4
4
  TARGET_API_VERSION = "1.29"
5
5
 
6
6
  end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ module GoTransverseTractApi
4
+
5
+ RSpec.describe Usage::RateTableEntry do
6
+ before(:each) { http_auth }
7
+
8
+ let(:response) { {a: 'b', c: 'd'} }
9
+
10
+ describe ".find_by_eid" do
11
+ it "returns rate table entries for a given rate table eid" do
12
+ data = described_class.find_by_eid(5)
13
+ expect(data).to_not be_nil
14
+ end
15
+ end
16
+
17
+ end
18
+
19
+ 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.9.2
4
+ version: 0.10.0
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: 2016-03-17 00:00:00.000000000 Z
12
+ date: 2016-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -196,6 +196,7 @@ files:
196
196
  - lib/gotransverse-tract-api/usage/order_item_usage_rule.rb
197
197
  - lib/gotransverse-tract-api/usage/product_usage_rule.rb
198
198
  - lib/gotransverse-tract-api/usage/rate_table.rb
199
+ - lib/gotransverse-tract-api/usage/rate_table_entry.rb
199
200
  - lib/gotransverse-tract-api/usage/service_usage_rule.rb
200
201
  - lib/gotransverse-tract-api/usage/usage_event.rb
201
202
  - lib/gotransverse-tract-api/usage/usage_lookup_table.rb
@@ -233,6 +234,7 @@ files:
233
234
  - spec/gotransverse-tract-api/service/service_spec.rb
234
235
  - spec/gotransverse-tract-api/usage/order_item_usage_rule_spec.rb
235
236
  - spec/gotransverse-tract-api/usage/product_usage_rule_spec.rb
237
+ - spec/gotransverse-tract-api/usage/rate_table_entry_spec.rb
236
238
  - spec/gotransverse-tract-api/usage/rate_table_spec.rb
237
239
  - spec/gotransverse-tract-api/usage/usage_event_spec.rb
238
240
  - spec/gotransverse-tract-api_spec.rb
@@ -290,6 +292,7 @@ test_files:
290
292
  - spec/gotransverse-tract-api/service/service_spec.rb
291
293
  - spec/gotransverse-tract-api/usage/order_item_usage_rule_spec.rb
292
294
  - spec/gotransverse-tract-api/usage/product_usage_rule_spec.rb
295
+ - spec/gotransverse-tract-api/usage/rate_table_entry_spec.rb
293
296
  - spec/gotransverse-tract-api/usage/rate_table_spec.rb
294
297
  - spec/gotransverse-tract-api/usage/usage_event_spec.rb
295
298
  - spec/gotransverse-tract-api_spec.rb