gotransverse-tract-api 0.2.5 → 0.3.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: cd6cc6b14b09d4a33bad506168be07a374f1688e
4
- data.tar.gz: a07266cae5ec70c5f7ee577ed1420659c278740d
3
+ metadata.gz: 8199841a7a460fe44ea9249ee1fed72a5ba37257
4
+ data.tar.gz: fdd5de0f22493091530f471d6c48e5205def13cb
5
5
  SHA512:
6
- metadata.gz: dacbd3bae9e636cf77971c32af0d698af17153ecff97311037f69970dd3c289fa194203af3c194484ca2ee90295f3f74ca648191893223b60c6a95d6affc96af
7
- data.tar.gz: 384d90f0f4c23d5e823fb1e69f15f493c8d35de6b96f7b3da1429ae34e90470b97f498cabc1c18c2e3e36cbff4f9e5c571e937567a47345e286b1ef4088e1743
6
+ metadata.gz: 80cb0e42f663689405b084f15518b9f4c390cfaee823ec9f1f6d0aa6dee7b9149b8356ca618c2a69d032bfbea1a35ce9eee235d5164f78c8ff9b70ce154059ae
7
+ data.tar.gz: 957da0c34f3f44dc27315e7c0779af20f184f14457636e50285d28d5cd778aff815aad5901138071e3e4c2cad51d30c67b3f6582d14221eb51909728c0ae44dc
@@ -0,0 +1,40 @@
1
+ module GoTransverseTractApi
2
+
3
+ module Usage
4
+
5
+ class GlobalUsageRule
6
+
7
+ class << self
8
+
9
+ def find_by_all
10
+ GoTransverseTractApi.get_response_for(self)
11
+ end
12
+
13
+ #
14
+ # @param {Long} eid
15
+ #
16
+ def find_by_eid eid
17
+ GoTransverseTractApi.get_response_for(self, {eid: eid})
18
+ end
19
+
20
+ #
21
+ # @param {Boolean} is_global
22
+ #
23
+ def find_by_is_global is_global
24
+ GoTransverseTractApi.get_response_for(self, {is_global: is_global})
25
+ end
26
+
27
+ #
28
+ # @param {String} status
29
+ #
30
+ def find_by_status status
31
+ GoTransverseTractApi.get_response_for(self, {status: status})
32
+ end
33
+
34
+ end
35
+
36
+ end
37
+
38
+ end
39
+
40
+ end
@@ -4,8 +4,33 @@ module GoTransverseTractApi
4
4
 
5
5
  class OrderItemUsageRule
6
6
 
7
+ class << self
8
+
9
+ #
10
+ # @param {Long} eid
11
+ #
12
+ def find_by_eid eid
13
+ GoTransverseTractApi.get_response_for(self, {eid: eid})
14
+ end
15
+
16
+ #
17
+ # @param {Long} order_item_eid
18
+ #
19
+ def find_by_order_item_eid order_item_eid
20
+ GoTransverseTractApi.get_response_for(self, {order_item_eid: order_item_eid})
21
+ end
22
+
23
+ #
24
+ # @param {String} status
25
+ #
26
+ def find_by_status status
27
+ GoTransverseTractApi.get_response_for(self, {status: status})
28
+ end
29
+
30
+ end
31
+
7
32
  end
8
33
 
9
34
  end
10
35
 
11
- end
36
+ end
@@ -4,8 +4,40 @@ module GoTransverseTractApi
4
4
 
5
5
  class ProductUsageRule
6
6
 
7
+ class << self
8
+
9
+ #
10
+ # @param {Long} eid
11
+ #
12
+ def find_by_eid eid
13
+ GoTransverseTractApi.get_response_for(self, {eid: eid})
14
+ end
15
+
16
+ #
17
+ # @param {Long} product_eid
18
+ #
19
+ def find_by_product_eid product_eid
20
+ GoTransverseTractApi.get_response_for(self, {product_eid: product_eid})
21
+ end
22
+
23
+ #
24
+ # @param {Long} product_price_eid
25
+ #
26
+ def find_by_product_price_eid product_price_eid
27
+ GoTransverseTractApi.get_response_for(self, {product_price_eid: product_price_eid})
28
+ end
29
+
30
+ #
31
+ # @param {String} status
32
+ #
33
+ def find_by_status status
34
+ GoTransverseTractApi.get_response_for(self, {status: status})
35
+ end
36
+
37
+ end
38
+
7
39
  end
8
40
 
9
41
  end
10
42
 
11
- end
43
+ end
@@ -4,8 +4,26 @@ module GoTransverseTractApi
4
4
 
5
5
  class RateTable
6
6
 
7
+ class << self
8
+
9
+ #
10
+ # @param {Long} eid
11
+ #
12
+ def find_by_eid eid
13
+ GoTransverseTractApi.get_response_for(self, {eid: eid})
14
+ end
15
+
16
+ #
17
+ # @param {String} name
18
+ #
19
+ def find_by_name name
20
+ GoTransverseTractApi.get_response_for(self, {name: name})
21
+ end
22
+
23
+ end
24
+
7
25
  end
8
26
 
9
27
  end
10
28
 
11
- end
29
+ end
@@ -4,8 +4,33 @@ module GoTransverseTractApi
4
4
 
5
5
  class ServiceUsageRule
6
6
 
7
+ class << self
8
+
9
+ #
10
+ # @param {Long} eid
11
+ #
12
+ def find_by_eid eid
13
+ GoTransverseTractApi.get_response_for(self, {eid: eid})
14
+ end
15
+
16
+ #
17
+ # @param {Long} service_eid
18
+ #
19
+ def find_by_service_eid service_eid
20
+ GoTransverseTractApi.get_response_for(self, {service_eid: service_eid})
21
+ end
22
+
23
+ #
24
+ # @param {String} status
25
+ #
26
+ def find_by_status status
27
+ GoTransverseTractApi.get_response_for(self, {status: status})
28
+ end
29
+
30
+ end
31
+
7
32
  end
8
33
 
9
34
  end
10
35
 
11
- end
36
+ end
@@ -4,8 +4,92 @@ module GoTransverseTractApi
4
4
 
5
5
  class UsageEvent
6
6
 
7
+ class << self
8
+
9
+ #
10
+ # @param {Long} eid
11
+ #
12
+ def find_by_eid eid
13
+ GoTransverseTractApi.get_response_for(self, {eid: eid})
14
+ end
15
+
16
+ #
17
+ # @param {Long} billing_account_eid
18
+ # @param {Boolean} closed
19
+ #
20
+ def find_by_billing_account_eid billing_account_eid, closed
21
+ GoTransverseTractApi.get_response_for(self, {billing_account_eid: billing_account_eid, closed: closed})
22
+ end
23
+
24
+ #
25
+ # @param {Long} account_num
26
+ # @param {Boolean} closed
27
+ #
28
+ def find_by_account_num account_num, closed
29
+ GoTransverseTractApi.get_response_for(self, {account_num: account_num, closed: closed})
30
+ end
31
+
32
+ #
33
+ # @param {Long} service_period_eid
34
+ #
35
+ def find_by_service_period_eid service_period_eid
36
+ GoTransverseTractApi.get_response_for(self, {service_period_eid: service_period_eid})
37
+ end
38
+
39
+ #
40
+ # @param {Long} service_resource_identifier
41
+ #
42
+ def find_by_service_resource_identifier service_resource_identifier
43
+ GoTransverseTractApi.get_response_for(self, {service_resource_identifier: service_resource_identifier})
44
+ end
45
+
46
+ #
47
+ # @param {DateTime} start_time
48
+ #
49
+ def find_by_start_time start_time
50
+ GoTransverseTractApi.get_response_for(self, {start_time: start_time})
51
+ end
52
+
53
+ #
54
+ # @param {DateTime} end_time
55
+ #
56
+ def find_by_end_time end_time
57
+ GoTransverseTractApi.get_response_for(self, {end_time: end_time})
58
+ end
59
+
60
+ #
61
+ # @param {Long} reference_id
62
+ # @param {Long} sequence_id (optional)
63
+ #
64
+ def find_by_reference_id reference_id, sequence_id=nil
65
+ GoTransverseTractApi.get_response_for(self, {reference_id: reference_id, sequence_id: sequence_id})
66
+ end
67
+
68
+ #
69
+ # @param {Hash} usage_event
70
+ #
71
+ def create_usage_event usage_event
72
+ GoTransverseTractApi.post_request_for(self, {}, usage_event, "")
73
+ end
74
+
75
+ #
76
+ # @param {Hash} usage_event
77
+ #
78
+ def bulk usage_event
79
+ GoTransverseTractApi.post_request_for(self, {}, usage_event, "bulk")
80
+ end
81
+
82
+ #
83
+ # @param {Hash} usage_event
84
+ #
85
+ def void_event usage_event
86
+ GoTransverseTractApi.post_request_for(self, {}, usage_event, "void_event")
87
+ end
88
+
89
+ end
90
+
7
91
  end
8
92
 
9
93
  end
10
94
 
11
- end
95
+ end
@@ -4,8 +4,33 @@ module GoTransverseTractApi
4
4
 
5
5
  class UsageLookupTable
6
6
 
7
+ class << self
8
+
9
+ #
10
+ # @param {Long} eid
11
+ #
12
+ def find_by_eid eid
13
+ GoTransverseTractApi.get_response_for(self, {eid: eid})
14
+ end
15
+
16
+ #
17
+ # @param {String} name
18
+ #
19
+ def find_by_name name
20
+ GoTransverseTractApi.get_response_for(self, {name: name})
21
+ end
22
+
23
+ #
24
+ # @param {String} status
25
+ #
26
+ def find_by_status status
27
+ GoTransverseTractApi.get_response_for(self, {status: status})
28
+ end
29
+
30
+ end
31
+
7
32
  end
8
33
 
9
34
  end
10
35
 
11
- end
36
+ end
@@ -4,8 +4,40 @@ module GoTransverseTractApi
4
4
 
5
5
  class UsageLookupTableEntry
6
6
 
7
+ class << self
8
+
9
+ #
10
+ # @param {Long} eid
11
+ #
12
+ def find_by_eid eid
13
+ GoTransverseTractApi.get_response_for(self, {eid: eid})
14
+ end
15
+
16
+ #
17
+ # @param {Long} usage_lookup_table_eid
18
+ #
19
+ def find_by_usage_lookup_table_eid usage_lookup_table_eid
20
+ GoTransverseTractApi.get_response_for(self, {usage_lookup_table_eid: usage_lookup_table_eid})
21
+ end
22
+
23
+ #
24
+ # @param {String} key
25
+ #
26
+ def find_by_key key
27
+ GoTransverseTractApi.get_response_for(self, {key: key})
28
+ end
29
+
30
+ #
31
+ # @param {String} value
32
+ #
33
+ def find_by_value value
34
+ GoTransverseTractApi.get_response_for(self, {value: value})
35
+ end
36
+
37
+ end
38
+
7
39
  end
8
40
 
9
41
  end
10
42
 
11
- end
43
+ end
@@ -0,0 +1,33 @@
1
+ module GoTransverseTractApi
2
+
3
+ module Usage
4
+
5
+ class UsagePriceCategory
6
+
7
+ class << self
8
+
9
+ def find_by_all
10
+ GoTransverseTractApi.get_response_for(self)
11
+ end
12
+
13
+ #
14
+ # @param {Long} eid
15
+ #
16
+ def find_by_eid eid
17
+ GoTransverseTractApi.get_response_for(self, {eid: eid})
18
+ end
19
+
20
+ #
21
+ # @param {String} name
22
+ #
23
+ def find_by_name name
24
+ GoTransverseTractApi.get_response_for(self, {name: name})
25
+ end
26
+
27
+ end
28
+
29
+ end
30
+
31
+ end
32
+
33
+ end
@@ -4,8 +4,26 @@ module GoTransverseTractApi
4
4
 
5
5
  class UsageRule
6
6
 
7
+ class << self
8
+
9
+ #
10
+ # @param {Long} eid
11
+ #
12
+ def find_by_eid eid
13
+ GoTransverseTractApi.get_response_for(self, {eid: eid})
14
+ end
15
+
16
+ #
17
+ # @param {Long} service_period_eid
18
+ #
19
+ def find_by_service_period_eid service_period_eid
20
+ GoTransverseTractApi.get_response_for(self, {service_period_eid: service_period_eid})
21
+ end
22
+
23
+ end
24
+
7
25
  end
8
26
 
9
27
  end
10
28
 
11
- end
29
+ end
@@ -1,6 +1,6 @@
1
1
  module GoTransverseTractApi
2
2
 
3
- VERSION = "0.2.5"
3
+ VERSION = "0.3.0"
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.2.5
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien DeFrance
@@ -185,6 +185,7 @@ files:
185
185
  - lib/gotransverse-tract-api/service/service_price_range.rb
186
186
  - lib/gotransverse-tract-api/service/service_resource.rb
187
187
  - lib/gotransverse-tract-api/service/service_resource_category.rb
188
+ - lib/gotransverse-tract-api/usage/global_usage_rule.rb
188
189
  - lib/gotransverse-tract-api/usage/order_item_usage_rule.rb
189
190
  - lib/gotransverse-tract-api/usage/product_usage_rule.rb
190
191
  - lib/gotransverse-tract-api/usage/rate_table.rb
@@ -192,6 +193,7 @@ files:
192
193
  - lib/gotransverse-tract-api/usage/usage_event.rb
193
194
  - lib/gotransverse-tract-api/usage/usage_lookup_table.rb
194
195
  - lib/gotransverse-tract-api/usage/usage_lookup_table_entry.rb
196
+ - lib/gotransverse-tract-api/usage/usage_price_category.rb
195
197
  - lib/gotransverse-tract-api/usage/usage_rule.rb
196
198
  - lib/gotransverse-tract-api/version.rb
197
199
  - spec/auth_helper.rb