g5_foundation_client 0.0.6 → 0.0.7

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: 69c3727758c2c2886e78b7ac26346153c0caaaf7
4
- data.tar.gz: 4f9871dbb191d9112f91f7d87c028bca21569ab4
3
+ metadata.gz: 3e4f389ba2da55a81baec211ca1ce4058921859b
4
+ data.tar.gz: f12bfb5d736ecdb08945f9f31791542e46f9e5a8
5
5
  SHA512:
6
- metadata.gz: 54dff06fb1ddfd2ded90ec0aa1b13d4d14ab3be98bd9147059bb4a08e71446fc30579e7d38e5b652608a8544a85d7866d137f22d04f32e571407b1552e2d505c
7
- data.tar.gz: 381a7bc948a68a80c3069b7cd77c0674be2c3fedf46c0df92e8a547518cafc0cc70da6245f62f42f18ca725ed59b02d2986ee56d95c8b4333490b1d1a89ac8c6
6
+ metadata.gz: e7ad00c0ea3df76cb049f3d1ffb87640678b17c0045c5c62faefe438f79f72a43f286e2dd798ef678fada7a35cba047df1fed916169cdeb9da116fcaded2a71e
7
+ data.tar.gz: 5e52068d6b75f58854f3aa6178a52fd7f8140a7b7eef8006d8a908ef95a02d7d5641b405f53e3fddea6cea411539f2f32cb77ec671cfb6234a5ee732bb28203a
data/README.md CHANGED
@@ -10,6 +10,8 @@ Include `g5_foundation_client` in your Gemfile, or manually install with rubygem
10
10
 
11
11
  ### Usage
12
12
 
13
+ Before you can run any of the code below, your environment must be configured as [G5 Authentication Client](https://github.com/G5/g5_authentication_client) expects.
14
+
13
15
  It's pretty limited right now. You may fetch a Location given a UID, which must point to a G5 Hub Location detail page.
14
16
 
15
17
  ```ruby
@@ -9,12 +9,17 @@ module G5FoundationClient::Deserializers
9
9
 
10
10
  def hcard_to_hash(h)
11
11
  {
12
- inventory_service_url: with_safe_access { h.g5_inventory_service_url },
13
- etl_strategy_name: with_safe_access { h.g5_etl_strategy_name },
14
- vendor_endpoint: with_safe_access { h.g5_vendor_endpoint },
15
- vendor_user_name: with_safe_access { h.g5_vendor_user_name },
16
- vendor_password: with_safe_access { h.g5_vendor_password },
17
- custom_integration_settings: custom_integration_settings_from_hcard(h)
12
+ inventory_service_url: with_safe_access { h.g5_inventory_service_url },
13
+ inventory_service_auth_token: with_safe_access { h.g5_inventory_service_auth_token },
14
+ etl_strategy_name: with_safe_access { h.g5_etl_strategy_name },
15
+ inventory_vendor_endpoint: with_safe_access { h.g5_inventory_vendor_endpoint },
16
+ inventory_vendor_user_name: with_safe_access { h.g5_inventory_vendor_user_name },
17
+ inventory_vendor_password: with_safe_access { h.g5_inventory_vendor_password },
18
+ lead_strategy_name: with_safe_access { h.g5_lead_strategy_name },
19
+ lead_vendor_endpoint: with_safe_access { h.g5_lead_vendor_endpoint },
20
+ lead_vendor_user_name: with_safe_access { h.g5_lead_vendor_user_name },
21
+ lead_vendor_password: with_safe_access { h.g5_lead_vendor_password },
22
+ custom_integration_settings: custom_integration_settings_from_hcard(h)
18
23
  }
19
24
  end
20
25
 
@@ -6,10 +6,15 @@ class G5FoundationClient::IntegrationSetting
6
6
  end
7
7
 
8
8
  attribute :inventory_service_url, String
9
+ attribute :inventory_service_auth_token, String
9
10
  attribute :etl_strategy_name, String
10
- attribute :vendor_endpoint, String
11
- attribute :vendor_user_name, String
12
- attribute :vendor_password, String
11
+ attribute :inventory_vendor_endpoint, String
12
+ attribute :inventory_vendor_user_name, String
13
+ attribute :inventory_vendor_password, String
14
+ attribute :lead_strategy_name, String
15
+ attribute :lead_vendor_endpoint, String
16
+ attribute :lead_vendor_user_name, String
17
+ attribute :lead_vendor_password, String
13
18
  attribute :custom_integration_settings, Hash
14
19
 
15
20
  def to_settings_hash
@@ -1,3 +1,3 @@
1
1
  module G5FoundationClient
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -3,17 +3,17 @@
3
3
  <head></head>
4
4
  <body>
5
5
  <article>
6
- <div class="h-card">
7
- <h2>
8
- <a class="p-name u-uid u-url" href="http://example.com/clients/g5-c-1234-client">Test Client</a>
9
- <small class="p-g5-vertical">Apartments</small>
10
- |
11
- <small class="u-g5-domain">http://example.com/</small>
12
- |
13
- <small class="p-g5-domain-type">MultiDomainClient</small>
14
- <small class="p-g5-urn">g5-c-1234-client</small>
15
- </h2>
16
- <p class="p-adr h-adr">
6
+ <div class="h-card">
7
+ <h2>
8
+ <a class="p-name u-uid u-url" href="http://example.com/clients/g5-c-1234-client">Test Client</a>
9
+ <small class="p-g5-vertical">Apartments</small>
10
+ |
11
+ <small class="u-g5-domain">http://example.com/</small>
12
+ |
13
+ <small class="p-g5-domain-type">MultiDomainClient</small>
14
+ <small class="p-g5-urn">g5-c-1234-client</small>
15
+ </h2>
16
+ <p class="p-adr h-adr">
17
17
  <span class="p-street-address">
18
18
  455 NW Franklin
19
19
 
@@ -23,172 +23,197 @@
23
23
  <span class="p-region">OR</span>
24
24
  <span class="p-postal-code">97701</span>
25
25
  </span>
26
- <span class="p-tel p-fax"></span>
27
- <span class="u-email"></span>
28
- </p>
29
-
30
- <div>
31
- <h4>Locations</h4>
32
- <ul class="list-unstyled">
33
- <li class="p-org h-card">
34
- <a class="p-name u-uid u-url"
35
- href="http://example.com/clients/g5-c-1234-client/locations/g5-cl-1234-location">Test Location
36
- 1</a>
37
- <a class="u-url u-g5-domain" href="http://www.salidadelsolapartments.com">http://www.salidadelsolapartments.com</a>
38
-
39
- <p class="p-adr h-adr">
26
+ <span class="p-tel p-fax"></span>
27
+ <span class="u-email"></span>
28
+ </p>
29
+
30
+ <div>
31
+ <h4>Locations</h4>
32
+ <ul class="list-unstyled">
33
+ <li class="p-org h-card">
34
+ <a class="p-name u-uid u-url"
35
+ href="http://example.com/clients/g5-c-1234-client/locations/g5-cl-1234-location">Test Location
36
+ 1</a>
37
+ <a class="u-url u-g5-domain" href="http://www.salidadelsolapartments.com">http://www.salidadelsolapartments.com</a>
38
+
39
+ <p class="p-adr h-adr">
40
40
  <span class="p-street-address">
41
41
  1125 Sunrise Blvd.
42
42
 
43
43
  </span>
44
- <span class="p-g5-neighborhood">West</span>
44
+ <span class="p-g5-neighborhood">West</span>
45
45
  <span>
46
46
  <span class="p-locality">Ventura</span>
47
47
  <span class="p-region">CA</span>
48
48
  <span class="p-postal-code">93001</span>
49
49
  </span>
50
- <span class="p-tel">805-798-1256</span>
51
- <span class="p-tel p-fax"></span>
52
- <span class="u-email">info@salidadelsolapts.com</span>
53
- </p>
54
-
55
- <p>
56
- <strong>Corporate:</strong>
57
- <br/>
58
- <span class="p-g5-corporate">false</span>
59
- </p>
60
-
61
- <p>
62
- <strong>Floor Plans:</strong>
63
- <br/>
64
- <span class="p-g5-floorplan">1, 2, 3, studio Apartments</span>
65
- </p>
66
-
67
- <p>
68
- <strong>Landmarks:</strong>
69
- <br/>
70
- <span class="p-g5-landmark-1">Venture Marina</span>
71
- <br/>
72
- <span class="p-g5-landmark-2">River Ridge Golf Course</span>
73
- </p>
74
-
75
- <p>
76
- <strong>Property Features or Qualifiers:</strong>
77
- <br/>
78
- <span class="p-g5-aparment-feature-1">Luxury</span>
79
- <br/>
80
- <span class="p-g5-aparment-feature-2">Gated</span>
81
- <br/>
82
- <span class="p-g5-aparment-feature-3"></span>
83
- </p>
84
-
85
- <p>
86
- <strong>Primary Amenities:</strong>
87
- <br/>
88
- <span class="p-g5-aparment-amenity-1">Stainless Steel Appliances</span>
89
- <br/>
90
- <span class="p-g5-community-amenity-1">Fitness Center</span>
91
- </p>
92
-
93
- <h4>Client</h4>
94
-
95
- <p class="p-org h-card">
96
- <a class="p-name u-uid u-url" href="http://example.com/clients/g5-c-1234-client">Test Client</a>
97
- </p>
98
- </li>
99
- <li class="p-org h-card">
100
- <a class="p-name u-uid u-url"
101
- href="http://g5-hub.herokuapp.com/clients/g5-c-1servrzr-luxe-apartment-company/locations/g5-cl-1servrzz-depot-17">Depot
102
- 17</a>
103
- <a class="u-url u-g5-domain" href="http://www.depot17apartments.com">http://www.depot17apartments.com</a>
104
-
105
- <p class="p-adr h-adr">
50
+ <span class="p-tel">805-798-1256</span>
51
+ <span class="p-tel p-fax"></span>
52
+ <span class="u-email">info@salidadelsolapts.com</span>
53
+ </p>
54
+
55
+ <p>
56
+ <strong>Corporate:</strong>
57
+ <br/>
58
+ <span class="p-g5-corporate">false</span>
59
+ </p>
60
+
61
+ <p>
62
+ <strong>Floor Plans:</strong>
63
+ <br/>
64
+ <span class="p-g5-floorplan">1, 2, 3, studio Apartments</span>
65
+ </p>
66
+
67
+ <p>
68
+ <strong>Landmarks:</strong>
69
+ <br/>
70
+ <span class="p-g5-landmark-1">Venture Marina</span>
71
+ <br/>
72
+ <span class="p-g5-landmark-2">River Ridge Golf Course</span>
73
+ </p>
74
+
75
+ <p>
76
+ <strong>Property Features or Qualifiers:</strong>
77
+ <br/>
78
+ <span class="p-g5-aparment-feature-1">Luxury</span>
79
+ <br/>
80
+ <span class="p-g5-aparment-feature-2">Gated</span>
81
+ <br/>
82
+ <span class="p-g5-aparment-feature-3"></span>
83
+ </p>
84
+
85
+ <p>
86
+ <strong>Primary Amenities:</strong>
87
+ <br/>
88
+ <span class="p-g5-aparment-amenity-1">Stainless Steel Appliances</span>
89
+ <br/>
90
+ <span class="p-g5-community-amenity-1">Fitness Center</span>
91
+ </p>
92
+
93
+ <h4>Client</h4>
94
+
95
+ <p class="p-org h-card">
96
+ <a class="p-name u-uid u-url" href="http://example.com/clients/g5-c-1234-client">Test Client</a>
97
+ </p>
98
+ </li>
99
+ <li class="p-org h-card">
100
+ <a class="p-name u-uid u-url"
101
+ href="http://g5-hub.herokuapp.com/clients/g5-c-1servrzr-luxe-apartment-company/locations/g5-cl-1servrzz-depot-17">Depot
102
+ 17</a>
103
+ <a class="u-url u-g5-domain" href="http://www.depot17apartments.com">http://www.depot17apartments.com</a>
104
+
105
+ <p class="p-adr h-adr">
106
106
  <span class="p-street-address">
107
107
  2675 Station St.
108
108
 
109
109
  </span>
110
- <span class="p-g5-neighborhood">Park Slope</span>
110
+ <span class="p-g5-neighborhood">Park Slope</span>
111
111
  <span>
112
112
  <span class="p-locality">Brooklyn</span>
113
113
  <span class="p-region">NY</span>
114
114
  <span class="p-postal-code">11215</span>
115
115
  </span>
116
- <span class="p-tel">718-639-3915</span>
117
- <span class="p-tel p-fax"></span>
118
- <span class="u-email">info@depot17.com</span>
119
- </p>
120
-
121
- <p>
122
- <strong>Corporate:</strong>
123
- <br/>
124
- <span class="p-g5-corporate">false</span>
125
- </p>
126
-
127
- <p>
128
- <strong>Floor Plans:</strong>
129
- <br/>
130
- <span class="p-g5-floorplan"> Apartments</span>
131
- </p>
132
-
133
- <p>
134
- <strong>Landmarks:</strong>
135
- <br/>
136
- <span class="p-g5-landmark-1"></span>
137
- <br/>
138
- <span class="p-g5-landmark-2"></span>
139
- </p>
140
-
141
- <p>
142
- <strong>Property Features or Qualifiers:</strong>
143
- <br/>
144
- <span class="p-g5-aparment-feature-1"></span>
145
- <br/>
146
- <span class="p-g5-aparment-feature-2"></span>
147
- <br/>
148
- <span class="p-g5-aparment-feature-3"></span>
149
- </p>
150
-
151
- <p>
152
- <strong>Primary Amenities:</strong>
153
- <br/>
154
- <span class="p-g5-aparment-amenity-1"></span>
155
- <br/>
156
- <span class="p-g5-community-amenity-1"></span>
157
- </p>
158
-
159
- <div>
160
- <h4>Integration Settings</h4>
161
- <a href="http://192.168.33.30:3000/locations/g5-cl-6hbla15-perry-hertler/integration_settings/1/edit">Edit</a>
162
- <dl class="dl-horizontal">
163
- <dt>Inventory Service URL</dt>
164
- <dd class="p-g5-inventory-service-url">http://myservice.com</dd>
165
-
166
- <dt>ETL Strategy Name</dt>
167
- <dd class="p-g5-etl-strategy-name">centershift</dd>
168
-
169
- <dt>Vendor Endpoint</dt>
170
- <dd class="p-g5-vendor-endpoint">http://centershift.example.com</dd>
171
-
172
- <dt>Vendor User Name</dt>
173
- <dd class="p-g5-vendor-user-name">vun</dd>
174
-
175
- <dt>Vendor Password</dt>
176
- <dd class="p-g5-vendor-password">vpw</dd>
177
-
178
- <dt class=p-g5-custom-integration-setting-name-0>channel</dt>
179
- <dd class=p-g5-custom-integration-setting-value-0>6</dd>
180
- </dl>
181
- </div>
182
-
183
- <h4>Client</h4>
184
-
185
- <p class="p-org h-card">
186
- <a class="p-name u-uid u-url" href="http://example.com/clients/g5-c-1234-client">Test Client</a>
187
- </p>
188
- </li>
189
- </ul>
190
- </div>
191
- </div>
116
+ <span class="p-tel">718-639-3915</span>
117
+ <span class="p-tel p-fax"></span>
118
+ <span class="u-email">info@depot17.com</span>
119
+ </p>
120
+
121
+ <p>
122
+ <strong>Corporate:</strong>
123
+ <br/>
124
+ <span class="p-g5-corporate">false</span>
125
+ </p>
126
+
127
+ <p>
128
+ <strong>Floor Plans:</strong>
129
+ <br/>
130
+ <span class="p-g5-floorplan"> Apartments</span>
131
+ </p>
132
+
133
+ <p>
134
+ <strong>Landmarks:</strong>
135
+ <br/>
136
+ <span class="p-g5-landmark-1"></span>
137
+ <br/>
138
+ <span class="p-g5-landmark-2"></span>
139
+ </p>
140
+
141
+ <p>
142
+ <strong>Property Features or Qualifiers:</strong>
143
+ <br/>
144
+ <span class="p-g5-aparment-feature-1"></span>
145
+ <br/>
146
+ <span class="p-g5-aparment-feature-2"></span>
147
+ <br/>
148
+ <span class="p-g5-aparment-feature-3"></span>
149
+ </p>
150
+
151
+ <p>
152
+ <strong>Primary Amenities:</strong>
153
+ <br/>
154
+ <span class="p-g5-aparment-amenity-1"></span>
155
+ <br/>
156
+ <span class="p-g5-community-amenity-1"></span>
157
+ </p>
158
+
159
+ <div>
160
+ <h4>
161
+ <a href="http://192.168.33.30:3000/locations/g5-cl-6hc1xfr-perry-hertler/integration_settings/1/edit">Integration
162
+ Settings</a>
163
+ </h4>
164
+ <dl class="dl-horizontal">
165
+ <dt>Inventory Service URL</dt>
166
+ <dd class="p-g5-inventory-service-url">http://localhost:5777/api/v1/storage_facilities</dd>
167
+
168
+ <dt>Inventory Service Auth Token</dt>
169
+ <dd class="p-g5-inventory-service-auth-token">
170
+ authtoken
171
+ </dd>
172
+
173
+ <dt>ETL Strategy Name</dt>
174
+ <dd class="p-g5-etl-strategy-name">EtlStrategies::Centershift4</dd>
175
+
176
+ <dt>Inventory Vendor Endpoint</dt>
177
+ <dd class="p-g5-inventory-vendor-endpoint">https://slc.centershift.com/sandbox40/SWS.asmx?WSDL</dd>
178
+
179
+ <dt>Inventory Vendor User Name</dt>
180
+ <dd class="p-g5-inventory-vendor-user-name">G-5TSite</dd>
181
+
182
+ <dt>Inventory Vendor Password</dt>
183
+ <dd class="p-g5-inventory-vendor-password">1qaz@Wsx</dd>
184
+
185
+ <dt>Lead Strategy Name</dt>
186
+ <dd class="p-g5-lead-strategy-name">LeadStrategies::SiteLink</dd>
187
+
188
+ <dt>Lead Vendor Endpoint</dt>
189
+ <dd class="p-g5-lead-vendor-endpoint">https://www.smdservers.net/CCWs_3.5/CallCenterWs.asmx?WSDL
190
+ </dd>
191
+
192
+ <dt>Lead Vendor User Name</dt>
193
+ <dd class="p-g5-lead-vendor-user-name">Administrator</dd>
194
+
195
+ <dt>Lead Vendor Password</dt>
196
+ <dd class="p-g5-lead-vendor-password">Demo</dd>
197
+
198
+ <dt class=p-g5-custom-integration-setting-name-0>corporate_code</dt>
199
+ <dd class=p-g5-custom-integration-setting-value-0>1000000129</dd>
200
+ <dt class=p-g5-custom-integration-setting-name-1>location_code</dt>
201
+ <dd class=p-g5-custom-integration-setting-value-1>1000000678</dd>
202
+ <dt class=p-g5-custom-integration-setting-name-2>channel</dt>
203
+ <dd class=p-g5-custom-integration-setting-value-2>2</dd>
204
+ </dl>
205
+ </div>
206
+
207
+
208
+ <h4>Client</h4>
209
+
210
+ <p class="p-org h-card">
211
+ <a class="p-name u-uid u-url" href="http://example.com/clients/g5-c-1234-client">Test Client</a>
212
+ </p>
213
+ </li>
214
+ </ul>
215
+ </div>
216
+ </div>
192
217
 
193
218
  </article>
194
219
  </body>
@@ -83,29 +83,53 @@
83
83
  </dl>
84
84
 
85
85
  <div>
86
- <h4>Integration Settings</h4>
87
- <a href="http://192.168.33.30:3000/locations/g5-cl-6hbla15-perry-hertler/integration_settings/1/edit">Edit</a>
86
+ <h4>
87
+ <a href="http://192.168.33.30:3000/locations/g5-cl-6hc1xfr-perry-hertler/integration_settings/1/edit">Integration
88
+ Settings</a>
89
+ </h4>
88
90
  <dl class="dl-horizontal">
89
91
  <dt>Inventory Service URL</dt>
90
- <dd class="p-g5-inventory-service-url">http://myservice.com</dd>
92
+ <dd class="p-g5-inventory-service-url">http://localhost:5777/api/v1/storage_facilities</dd>
93
+
94
+ <dt>Inventory Service Auth Token</dt>
95
+ <dd class="p-g5-inventory-service-auth-token">
96
+ authtoken
97
+ </dd>
91
98
 
92
99
  <dt>ETL Strategy Name</dt>
93
- <dd class="p-g5-etl-strategy-name">centershift</dd>
100
+ <dd class="p-g5-etl-strategy-name">EtlStrategies::Centershift4</dd>
101
+
102
+ <dt>Inventory Vendor Endpoint</dt>
103
+ <dd class="p-g5-inventory-vendor-endpoint">https://slc.centershift.com/sandbox40/SWS.asmx?WSDL</dd>
104
+
105
+ <dt>Inventory Vendor User Name</dt>
106
+ <dd class="p-g5-inventory-vendor-user-name">G-5TSite</dd>
94
107
 
95
- <dt>Vendor Endpoint</dt>
96
- <dd class="p-g5-vendor-endpoint">http://centershift.example.com</dd>
108
+ <dt>Inventory Vendor Password</dt>
109
+ <dd class="p-g5-inventory-vendor-password">1qaz@Wsx</dd>
97
110
 
98
- <dt>Vendor User Name</dt>
99
- <dd class="p-g5-vendor-user-name">vun</dd>
111
+ <dt>Lead Strategy Name</dt>
112
+ <dd class="p-g5-lead-strategy-name">LeadStrategies::SiteLink</dd>
100
113
 
101
- <dt>Vendor Password</dt>
102
- <dd class="p-g5-vendor-password">vpw</dd>
114
+ <dt>Lead Vendor Endpoint</dt>
115
+ <dd class="p-g5-lead-vendor-endpoint">https://www.smdservers.net/CCWs_3.5/CallCenterWs.asmx?WSDL</dd>
103
116
 
104
- <dt class=p-g5-custom-integration-setting-name-0>channel</dt>
105
- <dd class=p-g5-custom-integration-setting-value-0>6</dd>
117
+ <dt>Lead Vendor User Name</dt>
118
+ <dd class="p-g5-lead-vendor-user-name">Administrator</dd>
119
+
120
+ <dt>Lead Vendor Password</dt>
121
+ <dd class="p-g5-lead-vendor-password">Demo</dd>
122
+
123
+ <dt class=p-g5-custom-integration-setting-name-0>corporate_code</dt>
124
+ <dd class=p-g5-custom-integration-setting-value-0>1000000129</dd>
125
+ <dt class=p-g5-custom-integration-setting-name-1>location_code</dt>
126
+ <dd class=p-g5-custom-integration-setting-value-1>1000000678</dd>
127
+ <dt class=p-g5-custom-integration-setting-name-2>channel</dt>
128
+ <dd class=p-g5-custom-integration-setting-value-2>2</dd>
106
129
  </dl>
107
130
  </div>
108
131
 
132
+
109
133
  <dl>
110
134
  <dt>Twitter</dt>
111
135
  <dd class="p-nickname p-g5-nickname-twitter">G5Platform</dd>
@@ -7,12 +7,17 @@ describe G5FoundationClient::Deserializers::IntegrationSetting do
7
7
  context 'with many fields provided' do
8
8
  let(:markup) { fixture('location_detail.html') }
9
9
 
10
- its(:inventory_service_url) { should eq('http://myservice.com') }
11
- its(:etl_strategy_name) { should eq('centershift') }
12
- its(:vendor_endpoint) { should eq('http://centershift.example.com') }
13
- its(:vendor_user_name) { should eq('vun') }
14
- its(:vendor_password) { should eq('vpw') }
15
- its(:custom_integration_settings) { should eq({channel: '6'}) }
10
+ its(:inventory_service_url) { should eq('http://localhost:5777/api/v1/storage_facilities') }
11
+ its(:inventory_service_auth_token) { should eq('authtoken') }
12
+ its(:etl_strategy_name) { should eq('EtlStrategies::Centershift4') }
13
+ its(:inventory_vendor_endpoint) { should eq('https://slc.centershift.com/sandbox40/SWS.asmx?WSDL') }
14
+ its(:inventory_vendor_user_name) { should eq('G-5TSite') }
15
+ its(:inventory_vendor_password) { should eq('1qaz@Wsx') }
16
+ its(:lead_strategy_name) { should eq('LeadStrategies::SiteLink') }
17
+ its(:lead_vendor_endpoint) { should eq('https://www.smdservers.net/CCWs_3.5/CallCenterWs.asmx?WSDL') }
18
+ its(:lead_vendor_user_name) { should eq('Administrator') }
19
+ its(:lead_vendor_password) { should eq('Demo') }
20
+ its(:custom_integration_settings) { should eq({corporate_code: '1000000129', location_code: '1000000678', channel: '2'}) }
16
21
  end
17
22
  end
18
23
  end
@@ -5,17 +5,27 @@ describe G5FoundationClient::IntegrationSetting do
5
5
 
6
6
  describe 'instantiating with a hash' do
7
7
  let(:inventory_service_url) { 'http://inventory.service.example.com' }
8
+ let(:inventory_service_auth_token) { 'http://inventory.service.example.com' }
8
9
  let(:etl_strategy_name) { 'Centershift' }
9
- let(:vendor_endpoint) { 'http://centershift.example.com' }
10
- let(:vendor_user_name) { 'uname' }
11
- let(:vendor_password) { 'pw' }
10
+ let(:inventory_vendor_endpoint) { 'http://centershift.example.com' }
11
+ let(:inventory_vendor_user_name) { 'uname' }
12
+ let(:inventory_vendor_password) { 'pw' }
13
+ let(:lead_strategy_name) { 'sitelink' }
14
+ let(:lead_vendor_endpoint) { 'http://sitelink.example.com' }
15
+ let(:lead_vendor_user_name) { 'sluname' }
16
+ let(:lead_vendor_password) { 'slpw' }
12
17
  let(:custom_integration_settings) { {foo: 'bar'} }
13
- let(:init_hash) { {inventory_service_url: inventory_service_url,
14
- etl_strategy_name: etl_strategy_name,
15
- vendor_endpoint: vendor_endpoint,
16
- vendor_user_name: vendor_user_name,
17
- vendor_password: vendor_password,
18
- custom_integration_settings: custom_integration_settings} }
18
+ let(:init_hash) { {inventory_service_url: inventory_service_url,
19
+ inventory_service_auth_token: inventory_service_auth_token,
20
+ etl_strategy_name: etl_strategy_name,
21
+ inventory_vendor_endpoint: inventory_vendor_endpoint,
22
+ inventory_vendor_user_name: inventory_vendor_user_name,
23
+ inventory_vendor_password: inventory_vendor_password,
24
+ lead_strategy_name: lead_strategy_name,
25
+ lead_vendor_endpoint: lead_vendor_endpoint,
26
+ lead_vendor_user_name: lead_vendor_user_name,
27
+ lead_vendor_password: lead_vendor_password,
28
+ custom_integration_settings: custom_integration_settings} }
19
29
  let(:expected_to_settings_hash) do
20
30
  expected = init_hash.clone
21
31
  custom = expected.delete(:custom_integration_settings)
@@ -24,10 +34,15 @@ describe G5FoundationClient::IntegrationSetting do
24
34
  subject { G5FoundationClient::IntegrationSetting.new(init_hash) }
25
35
 
26
36
  its(:inventory_service_url) { should eql(inventory_service_url) }
37
+ its(:inventory_service_auth_token) { should eql(inventory_service_auth_token) }
27
38
  its(:etl_strategy_name) { should eql(etl_strategy_name) }
28
- its(:vendor_endpoint) { should eql(vendor_endpoint) }
29
- its(:vendor_user_name) { should eql(vendor_user_name) }
30
- its(:vendor_password) { should eql(vendor_password) }
39
+ its(:inventory_vendor_endpoint) { should eql(inventory_vendor_endpoint) }
40
+ its(:inventory_vendor_user_name) { should eql(inventory_vendor_user_name) }
41
+ its(:inventory_vendor_password) { should eql(inventory_vendor_password) }
42
+ its(:lead_strategy_name) { should eql(lead_strategy_name) }
43
+ its(:lead_vendor_endpoint) { should eql(lead_vendor_endpoint) }
44
+ its(:lead_vendor_user_name) { should eql(lead_vendor_user_name) }
45
+ its(:lead_vendor_password) { should eql(lead_vendor_password) }
31
46
  its(:custom_integration_settings) { should eql(custom_integration_settings) }
32
47
  its(:to_settings_hash) { should eq(expected_to_settings_hash) }
33
48
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: g5_foundation_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Don Petersen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-16 00:00:00.000000000 Z
11
+ date: 2014-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: virtus