gotransverse-tract-api 0.5.3 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ module GoTransverseTractApi
4
+
5
+ RSpec.describe Product::DiscountIdentifier do
6
+ before(:each) { http_auth }
7
+
8
+ context ".find_by_eid" do
9
+ it "returns a discount identifier for the given eid" do
10
+ end
11
+ end
12
+
13
+ context ".find_all" do
14
+ it "returns all discount identifiers" do
15
+ data = described_class.find_all
16
+ expect(data.count).to be >= 0
17
+ end
18
+ end
19
+
20
+ end
21
+ end
@@ -8,9 +8,9 @@ module GoTransverseTractApi
8
8
  let(:eid) { '48406' }
9
9
  let(:root_attrs) {
10
10
  {
11
- :identifier => 'New id',
12
- :status => 'AVAILABLE',
13
- :description => 'Test'
11
+ identifier: 'New id',
12
+ status: 'AVAILABLE',
13
+ description: 'Test'
14
14
  }
15
15
  }
16
16
 
@@ -24,7 +24,7 @@ module GoTransverseTractApi
24
24
  context ".create_service_resource" do
25
25
  it "creates a service resource" do
26
26
  data = {
27
- :category => {
27
+ category: {
28
28
  eid: '324234'
29
29
  }
30
30
  }
@@ -36,7 +36,7 @@ module GoTransverseTractApi
36
36
  context ".request" do
37
37
  it "requests a service resource" do
38
38
  data = {
39
- :service_resource_category => {
39
+ service_resource_category: {
40
40
  eid: '324234'
41
41
  }
42
42
  }
@@ -50,8 +50,8 @@ module GoTransverseTractApi
50
50
  context ".change" do
51
51
  it "changes a service resource" do
52
52
  data = {
53
- :change_to_service_resource => root_attrs,
54
- :category => { eid: '324234' }
53
+ change_to_service_resource: root_attrs,
54
+ category: { eid: '324234' }
55
55
  }
56
56
 
57
57
  allow(subject).to receive(:change).with(eid, data).and_return(response)
@@ -13,39 +13,39 @@ module GoTransverseTractApi
13
13
 
14
14
  data = {
15
15
  eid: eid,
16
- :billing_account => {
16
+ billing_account: {
17
17
  eid: '324234'
18
18
  },
19
- :order => {
20
- :order_items => {
21
- :order_item => {
22
- :quantity => '1',
23
- :sequence => '1',
24
- :product => {
19
+ order: {
20
+ order_items: {
21
+ order_item: {
22
+ quantity: '1',
23
+ sequence: '1',
24
+ product: {
25
25
  eid: '3453'
26
26
  },
27
- :selected_agreement => {
27
+ selected_agreement: {
28
28
  eid: '349'
29
29
  }
30
30
  }
31
31
  },
32
- :billing_account => {
32
+ billing_account: {
33
33
  eid: '324234'
34
34
  },
35
- :payments => {
36
- :payment => {
37
- :amount => '10.00',
38
- :description => 'Testing',
39
- :billing_account => {
35
+ payments: {
36
+ payment: {
37
+ amount: '10.00',
38
+ description: 'Testing',
39
+ billing_account: {
40
40
  eid: '324234'
41
41
  },
42
- :credit_card_payment => {
43
- :card_type => 'VISA',
44
- :card_holder_first_name => 'Mary',
45
- :card_holder_middle_name => 'M',
46
- :card_holder_last_name => 'Smith',
47
- :card_identifier_number => '4111111111111111111',
48
- :card_expiration => '12/2016'
42
+ credit_card_payment: {
43
+ card_type: 'VISA',
44
+ card_holder_first_name: 'Mary',
45
+ card_holder_middle_name: 'M',
46
+ card_holder_last_name: 'Smith',
47
+ card_identifier_number: '4111111111111111111',
48
+ card_expiration: '12/2016'
49
49
  }
50
50
  },
51
51
  }
@@ -61,73 +61,73 @@ module GoTransverseTractApi
61
61
  it "adds a discount identifier" do
62
62
 
63
63
  data = {
64
- :amount => '10.00',
65
- :start_date => '2015-01-01T10:10:10',
66
- :status => 'ACTIVE',
67
- :description => 'Testing',
68
- :renewal_count => '0',
64
+ amount: '10.00',
65
+ start_date: '2015-01-01T101010',
66
+ status: 'ACTIVE',
67
+ description: 'Testing',
68
+ renewal_count: '0',
69
69
  eid: eid,
70
- :query_scope => 'SHALLOW',
71
- :billing_account => {
70
+ query_scope: 'SHALLOW',
71
+ billing_account: {
72
72
  eid: '324234',
73
- :query_scope => 'EID',
73
+ query_scope: 'EID',
74
74
  },
75
- :service_resources => {
76
- :page_number => '1',
77
- :page_size => '50',
78
- :total_elements => '3',
79
- :element_count => '0',
80
- :total_pages => '0'
75
+ service_resources: {
76
+ page_number: '1',
77
+ page_size: '50',
78
+ total_elements: '3',
79
+ element_count: '0',
80
+ total_pages: '0'
81
81
  },
82
- :product => {
82
+ product: {
83
83
  eid: '608',
84
- :query_scope => 'EID'
84
+ query_scope: 'EID'
85
85
  },
86
- :service_periods => {
87
- :page_number => '1',
88
- :page_size => '50',
89
- :total_elements => '3',
90
- :element_count => '0',
91
- :total_pages => '1'
86
+ service_periods: {
87
+ page_number: '1',
88
+ page_size: '50',
89
+ total_elements: '3',
90
+ element_count: '0',
91
+ total_pages: '1'
92
92
  },
93
- :service_prices => {
94
- :page_number => '1',
95
- :page_size => '50',
96
- :total_elements => '1',
97
- :element_count => '0',
98
- :total_pages => '1'
93
+ service_prices: {
94
+ page_number: '1',
95
+ page_size: '50',
96
+ total_elements: '1',
97
+ element_count: '0',
98
+ total_pages: '1'
99
99
  },
100
- :service_usage_rules => {
101
- :page_number => '1',
102
- :page_size => '50',
103
- :total_elements => '0',
104
- :element_count => '0',
105
- :total_pages => '0'
100
+ service_usage_rules: {
101
+ page_number: '1',
102
+ page_size: '50',
103
+ total_elements: '0',
104
+ element_count: '0',
105
+ total_pages: '0'
106
106
  },
107
- :counters => {
108
- :page_number => '1',
109
- :page_size => '50',
110
- :total_elements => '1',
111
- :element_count => '0',
112
- :total_pages => '1'
107
+ counters: {
108
+ page_number: '1',
109
+ page_size: '50',
110
+ total_elements: '1',
111
+ element_count: '0',
112
+ total_pages: '1'
113
113
  },
114
- :custom_field_values => {
115
- :page_number => '1',
116
- :page_size => '50',
117
- :total_elements => '1',
118
- :element_count => '0',
119
- :total_pages => '1'
114
+ custom_field_values: {
115
+ page_number: '1',
116
+ page_size: '50',
117
+ total_elements: '1',
118
+ element_count: '0',
119
+ total_pages: '1'
120
120
  },
121
- :discount_identifier => {
122
- :status => 'ACTIVE',
123
- :unlimited => 'true',
124
- :uses => '12',
125
- :identifier => 'dfsf',
121
+ discount_identifier: {
122
+ status: 'ACTIVE',
123
+ unlimited: 'true',
124
+ uses: '12',
125
+ identifier: 'dfsf',
126
126
  eid: '23453',
127
- :query_scope => 'DDGHJ',
128
- :category => {
127
+ query_scope: 'DDGHJ',
128
+ category: {
129
129
  eid: '97',
130
- :query_scope => 'EID'
130
+ query_scope: 'EID'
131
131
  }
132
132
  }
133
133
  }
@@ -140,12 +140,12 @@ module GoTransverseTractApi
140
140
  context ".add_agreement" do
141
141
  it "adds an agreement to the service" do
142
142
  data = {
143
- :service => {eid: eid},
144
- :agreement_service => {
145
- :end_action => 'RENEW_SERVICE',
146
- :end_date => '2015-11-11T11:00:00',
147
- :start_date => '2015-01-11T11:00:00',
148
- :agreement => {eid: '123'}
143
+ service: {eid: eid},
144
+ agreement_service: {
145
+ end_action: 'RENEW_SERVICE',
146
+ end_date: '2015-11-11T110000',
147
+ start_date: '2015-01-11T110000',
148
+ agreement: {eid: '123'}
149
149
  }
150
150
  }
151
151
 
@@ -8,12 +8,12 @@ module GoTransverseTractApi
8
8
  let(:response) { {a: 'b', c: 'd'} }
9
9
  let(:event) {
10
10
  {
11
- :start_time => '2015-11-25T10:10:10',
12
- :service_resource_id => 'quote6',
13
- :usage_uom => 'COUNT',
14
- :usage_amount => '1200.00',
15
- :description => 'Testing',
16
- :service_resource_type => 'GENERICSRVCRESOURCE'
11
+ start_time: '2015-11-25T10:10:10',
12
+ service_resource_id: 'quote6',
13
+ usage_uom: 'COUNT',
14
+ usage_amount: '1200.00',
15
+ description: 'Testing',
16
+ service_resource_type: 'GENERICSRVCRESOURCE'
17
17
  }
18
18
  }
19
19
 
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.5.3
4
+ version: 0.6.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-02-03 00:00:00.000000000 Z
12
+ date: 2016-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -224,6 +224,7 @@ files:
224
224
  - spec/gotransverse-tract-api/order/payment_term_spec.rb
225
225
  - spec/gotransverse-tract-api/order/people_spec.rb
226
226
  - spec/gotransverse-tract-api/order/sales_order_spec.rb
227
+ - spec/gotransverse-tract-api/product/discount_identifier_spec.rb
227
228
  - spec/gotransverse-tract-api/product/product_price_spec.rb
228
229
  - spec/gotransverse-tract-api/product/product_spec.rb
229
230
  - spec/gotransverse-tract-api/service/service_resource_spec.rb
@@ -276,6 +277,7 @@ test_files:
276
277
  - spec/gotransverse-tract-api/order/payment_term_spec.rb
277
278
  - spec/gotransverse-tract-api/order/people_spec.rb
278
279
  - spec/gotransverse-tract-api/order/sales_order_spec.rb
280
+ - spec/gotransverse-tract-api/product/discount_identifier_spec.rb
279
281
  - spec/gotransverse-tract-api/product/product_price_spec.rb
280
282
  - spec/gotransverse-tract-api/product/product_spec.rb
281
283
  - spec/gotransverse-tract-api/service/service_resource_spec.rb