aloha_relevant 0.1.0

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.
Files changed (57) hide show
  1. data/Gemfile +4 -0
  2. data/Gemfile.lock +17 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +271 -0
  5. data/Rakefile +3 -0
  6. data/aloha.gemspec +25 -0
  7. data/example/.gitignore +16 -0
  8. data/example/Gemfile +48 -0
  9. data/example/Gemfile.lock +152 -0
  10. data/example/README.rdoc +28 -0
  11. data/example/Rakefile +6 -0
  12. data/example/app/assets/images/.keep +0 -0
  13. data/example/app/assets/javascripts/application.js +16 -0
  14. data/example/app/assets/stylesheets/application.css +13 -0
  15. data/example/app/controllers/application_controller.rb +5 -0
  16. data/example/app/controllers/concerns/.keep +0 -0
  17. data/example/app/helpers/application_helper.rb +2 -0
  18. data/example/app/mailers/.keep +0 -0
  19. data/example/app/models/.keep +0 -0
  20. data/example/app/models/concerns/.keep +0 -0
  21. data/example/app/views/layouts/application.html.erb +14 -0
  22. data/example/bin/bundle +3 -0
  23. data/example/bin/rails +4 -0
  24. data/example/bin/rake +4 -0
  25. data/example/config.ru +4 -0
  26. data/example/config/application.rb +28 -0
  27. data/example/config/boot.rb +4 -0
  28. data/example/config/database.yml.example +60 -0
  29. data/example/config/environment.rb +5 -0
  30. data/example/config/environments/development.rb +29 -0
  31. data/example/config/environments/production.rb +80 -0
  32. data/example/config/environments/test.rb +36 -0
  33. data/example/config/initializers/backtrace_silencers.rb +7 -0
  34. data/example/config/initializers/filter_parameter_logging.rb +4 -0
  35. data/example/config/initializers/inflections.rb +16 -0
  36. data/example/config/initializers/mime_types.rb +5 -0
  37. data/example/config/initializers/secret_token.rb +12 -0
  38. data/example/config/initializers/session_store.rb +3 -0
  39. data/example/config/initializers/wrap_parameters.rb +14 -0
  40. data/example/config/locales/en.yml +23 -0
  41. data/example/config/routes.rb +56 -0
  42. data/example/db/schema.rb +16 -0
  43. data/example/db/seeds.rb +7 -0
  44. data/example/lib/assets/.keep +0 -0
  45. data/example/lib/tasks/.keep +0 -0
  46. data/example/log/.keep +0 -0
  47. data/example/public/404.html +58 -0
  48. data/example/public/422.html +58 -0
  49. data/example/public/500.html +57 -0
  50. data/example/public/favicon.ico +0 -0
  51. data/example/public/robots.txt +5 -0
  52. data/example/vendor/assets/javascripts/.keep +0 -0
  53. data/example/vendor/assets/stylesheets/.keep +0 -0
  54. data/lib/aloha.rb +339 -0
  55. data/lib/aloha/helper.rb +73 -0
  56. data/lib/aloha/version.rb +3 -0
  57. metadata +166 -0
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in aloha.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,17 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ aloha (0.0.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ rake (0.9.2.2)
10
+
11
+ PLATFORMS
12
+ ruby
13
+
14
+ DEPENDENCIES
15
+ aloha!
16
+ bundler (~> 1.5)
17
+ rake
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 inoe
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,271 @@
1
+ # Aloha
2
+
3
+ Aloha is a gem to access the web services
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'aloha', git: 'git://github.com/bainur/aloha.git'
11
+ ```
12
+
13
+ And then execute:
14
+ ```ruby
15
+ $ bundle install
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ The first, you create a variable eg. `client`, for default setting without parameter like this:
21
+ ```ruby
22
+ client = Aloha::Soap.new
23
+ ```
24
+ or with parameters :
25
+ ```ruby
26
+ eg. url = https://memberlinkWS.alohaenterprise.com/insightws/MemberLinkWS?wsdl
27
+
28
+ client = Aloha::Soap.new(
29
+ system_id: 'system ID',
30
+ company_id: 'company ID',
31
+ user_id: 'user ID',
32
+ account_password: 'password',
33
+ system_password: 'password',
34
+ wsdl_url: url)
35
+ ```
36
+
37
+ Then, you can access for :
38
+
39
+ * Add member profile
40
+ ```ruby
41
+ client.add_member_profile(
42
+ member_account_id: :integer,
43
+ card_number: :string,
44
+ first_name: :string,
45
+ last_name: :string,
46
+ company: :string,
47
+ date_of_birth: {
48
+ date: :string,
49
+ locale: :string
50
+ },
51
+ anniversary_date: {
52
+ date: :string,
53
+ locale: :string
54
+ },
55
+ drivers_license: :string,
56
+ address1: :string,
57
+ address2: :string,
58
+ city: :string,
59
+ state_province: :string,
60
+ country: :string,
61
+ postal_code: :string,
62
+ email_address: :string,
63
+ phone_number: :string,
64
+ other_phone_number: :string,
65
+ profile_exists: :boolean,
66
+ company_defined1: :string,
67
+ company_defined2: :string,
68
+ company_defined3: :string,
69
+ company_defined4: :string,
70
+ company_defined5: :string,
71
+ company_defined6: :string,
72
+ company_defined7: :string,
73
+ company_defined8: :string,
74
+ company_defined9: :string,
75
+ company_defined10: :string,
76
+ company_defined11: :string,
77
+ company_defined12: :string,
78
+ company_defined13: :string,
79
+ company_defined14: :string,
80
+ company_defined15: :string,
81
+ company_defined16: :string,
82
+ company_defined17: :string,
83
+ company_defined18: :string,
84
+ company_defined19: :string,
85
+ company_defined20: :string,
86
+ company_defined21: :string,
87
+ company_defined22: :string,
88
+ company_defined23: :string,
89
+ company_defined24: :string,
90
+ company_defined25: :string,
91
+ company_defined26: :string,
92
+ company_defined27: :string,
93
+ company_defined28: :string,
94
+ company_defined29: :string,
95
+ company_defined30: :string)
96
+ ```
97
+
98
+ * Adjust credit
99
+ ```ruby
100
+ client.adjust_credit(
101
+ card_number: :string,
102
+ bpid: :integer,
103
+ adjustment_type: :string,
104
+ bp_credit: :integer,
105
+ reason: :string)
106
+ ```
107
+
108
+ * Get bonus plan history
109
+ ```ruby
110
+ client.get_bonus_plan_history(
111
+ card_number: :string,
112
+ number_of_assignments: :integer,
113
+ number_of_days: :integer,
114
+ start_date: :string,
115
+ end_date: :string)
116
+ ```
117
+
118
+ * Check email exists
119
+ ```ruby
120
+ client.email_exists(email_address: :string)
121
+ ```
122
+
123
+ * Get card number by email
124
+ ```ruby
125
+ client.get_card_number_by_email(
126
+ account_status: :string,
127
+ email_address: :string)
128
+ ```
129
+
130
+ * Get card number by phone
131
+ ```ruby
132
+ client.get_card_number_by_phone(
133
+ account_status: :string,
134
+ phone_number: :string)
135
+ ```
136
+
137
+ * Get card status
138
+ ```ruby
139
+ client.get_card_status(card_number: :string)
140
+ ```
141
+
142
+ * Get member profile
143
+ ```ruby
144
+ client.get_member_profile(card_number: :string)
145
+ ```
146
+
147
+ * Check card number by phone
148
+ ```ruby
149
+ client.phone_number_exists(phone_number: :string)
150
+ ```
151
+
152
+ * Update member profile
153
+ ```ruby
154
+ client.update_member_profile(
155
+ member_account_id: :integer,
156
+ card_number: :string,
157
+ first_name: :string,
158
+ last_name: :string,
159
+ company: :string,
160
+ date_of_birth: {
161
+ date: :string,
162
+ locale: :string
163
+ },
164
+ anniversary_date: {
165
+ date: :string,
166
+ locale: :string
167
+ },
168
+ drivers_license: :string,
169
+ address1: :string,
170
+ address2: :string,
171
+ city: :string,
172
+ state_province: :string,
173
+ country: :string,
174
+ postal_code: :string,
175
+ email_address: :string,
176
+ phone_number: :string,
177
+ other_phone_number: :string,
178
+ profile_exists: :boolean,
179
+ company_defined1: :string,
180
+ company_defined2: :string,
181
+ company_defined3: :string,
182
+ company_defined4: :string,
183
+ company_defined5: :string,
184
+ company_defined6: :string,
185
+ company_defined7: :string,
186
+ company_defined8: :string,
187
+ company_defined9: :string,
188
+ company_defined10: :string,
189
+ company_defined11: :string,
190
+ company_defined12: :string,
191
+ company_defined13: :string,
192
+ company_defined14: :string,
193
+ company_defined15: :string,
194
+ company_defined16: :string,
195
+ company_defined17: :string,
196
+ company_defined18: :string,
197
+ company_defined19: :string,
198
+ company_defined20: :string,
199
+ company_defined21: :string,
200
+ company_defined22: :string,
201
+ company_defined23: :string,
202
+ company_defined24: :string,
203
+ company_defined25: :string,
204
+ company_defined26: :string,
205
+ company_defined27: :string,
206
+ company_defined28: :string,
207
+ company_defined29: :string,
208
+ company_defined30: :string)
209
+ ```
210
+
211
+ * Assign forgotten card
212
+ ```ruby
213
+ client.assign_forgotten_card(
214
+ card_number: :string,
215
+ claim_id: :string)
216
+ ```
217
+
218
+ * Get check detail
219
+ ```ruby
220
+ client.get_check_detail(
221
+ claim_id: :string,
222
+ store_id: :integer,
223
+ date_of_business: :string)
224
+ ```
225
+
226
+ * Create virtual card
227
+ ```ruby
228
+ client.create_virtual_card(card_series: :string)
229
+ ```
230
+
231
+ * New virtual card
232
+ ```ruby
233
+ client.new_virtual_card(card_series: :string)
234
+ ```
235
+
236
+ * Opt out
237
+ ```ruby
238
+ client.opt_out(card_number: :string)
239
+ ```
240
+
241
+ * Phone number exists
242
+ ```ruby
243
+ client.phone_number_exists(phone_number: :string)
244
+ ```
245
+
246
+
247
+ * Activate new card
248
+ ```ruby
249
+ client.activate_new_card(batch_id: :integer)
250
+ ```
251
+
252
+ * Create new card
253
+ ```ruby
254
+ client.create_new_card(
255
+ activate_card: :boolean,
256
+ batch_desc: :string,
257
+ batch_id: :integer,
258
+ card_series: :string,
259
+ number_of_cards: :integer,
260
+ numeric_sequence_type: :integer,
261
+ starting_card_number: :integer)
262
+ ```
263
+
264
+
265
+ ## Contributing
266
+
267
+ 1. Fork it ( http://github.com/bainur/aloha/fork )
268
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
269
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
270
+ 4. Push to the branch (`git push origin my-new-feature`)
271
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ require "bundler/gem_tasks"
2
+ require 'bundler'
3
+ Bundler::GemHelper.install_tasks
data/aloha.gemspec ADDED
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'aloha/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'aloha_relevant'
8
+ spec.version = '0.1.0'
9
+ spec.authors = ['Bainur']
10
+ spec.email = ['mbainurb@gmail.com']
11
+ spec.summary = 'Aloha'
12
+ spec.description = 'Aloha'
13
+ spec.homepage = ''
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_development_dependency 'bundler', '~> 1.5'
22
+ spec.add_development_dependency 'rake'
23
+ spec.add_dependency 'savon'
24
+ spec.add_dependency 'httpclient'
25
+ end
@@ -0,0 +1,16 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-journal
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*.log
16
+ /tmp
data/example/Gemfile ADDED
@@ -0,0 +1,48 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
4
+ gem 'rails', '4.0.0'
5
+
6
+ # Use postgresql as the database for Active Record
7
+ gem 'pg'
8
+
9
+ # Use SCSS for stylesheets
10
+ gem 'sass-rails', '~> 4.0.0'
11
+
12
+ # Use Aloha
13
+ gem 'aloha', path: '../'
14
+
15
+ # Use Uglifier as compressor for JavaScript assets
16
+ gem 'uglifier', '>= 1.3.0'
17
+
18
+ # Use CoffeeScript for .js.coffee assets and views
19
+ gem 'coffee-rails', '~> 4.0.0'
20
+
21
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
22
+ # gem 'therubyracer', platforms: :ruby
23
+
24
+ # Use jquery as the JavaScript library
25
+ gem 'jquery-rails'
26
+
27
+ # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
28
+ gem 'turbolinks'
29
+
30
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
31
+ gem 'jbuilder', '~> 1.2'
32
+
33
+ group :doc do
34
+ # bundle exec rake doc:rails generates the API under doc/api.
35
+ gem 'sdoc', require: false
36
+ end
37
+
38
+ # Use ActiveModel has_secure_password
39
+ # gem 'bcrypt-ruby', '~> 3.0.0'
40
+
41
+ # Use unicorn as the app server
42
+ # gem 'unicorn'
43
+
44
+ # Use Capistrano for deployment
45
+ # gem 'capistrano', group: :development
46
+
47
+ # Use debugger
48
+ # gem 'debugger', group: [:development, :test]
@@ -0,0 +1,152 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ aloha (0.0.1)
5
+ httpclient
6
+ savon
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.0.0)
12
+ actionpack (= 4.0.0)
13
+ mail (~> 2.5.3)
14
+ actionpack (4.0.0)
15
+ activesupport (= 4.0.0)
16
+ builder (~> 3.1.0)
17
+ erubis (~> 2.7.0)
18
+ rack (~> 1.5.2)
19
+ rack-test (~> 0.6.2)
20
+ activemodel (4.0.0)
21
+ activesupport (= 4.0.0)
22
+ builder (~> 3.1.0)
23
+ activerecord (4.0.0)
24
+ activemodel (= 4.0.0)
25
+ activerecord-deprecated_finders (~> 1.0.2)
26
+ activesupport (= 4.0.0)
27
+ arel (~> 4.0.0)
28
+ activerecord-deprecated_finders (1.0.3)
29
+ activesupport (4.0.0)
30
+ i18n (~> 0.6, >= 0.6.4)
31
+ minitest (~> 4.2)
32
+ multi_json (~> 1.3)
33
+ thread_safe (~> 0.1)
34
+ tzinfo (~> 0.3.37)
35
+ akami (1.2.2)
36
+ gyoku (>= 0.4.0)
37
+ nokogiri
38
+ arel (4.0.2)
39
+ builder (3.1.4)
40
+ coffee-rails (4.0.1)
41
+ coffee-script (>= 2.2.0)
42
+ railties (>= 4.0.0, < 5.0)
43
+ coffee-script (2.2.0)
44
+ coffee-script-source
45
+ execjs
46
+ coffee-script-source (1.7.0)
47
+ erubis (2.7.0)
48
+ execjs (2.0.2)
49
+ gyoku (1.1.1)
50
+ builder (>= 2.1.2)
51
+ hike (1.2.3)
52
+ httpclient (2.3.4.1)
53
+ httpi (2.1.0)
54
+ rack
55
+ rubyntlm (~> 0.3.2)
56
+ i18n (0.6.9)
57
+ jbuilder (1.5.3)
58
+ activesupport (>= 3.0.0)
59
+ multi_json (>= 1.2.0)
60
+ jquery-rails (3.1.0)
61
+ railties (>= 3.0, < 5.0)
62
+ thor (>= 0.14, < 2.0)
63
+ json (1.8.1)
64
+ mail (2.5.4)
65
+ mime-types (~> 1.16)
66
+ treetop (~> 1.4.8)
67
+ mime-types (1.25.1)
68
+ mini_portile (0.5.3)
69
+ minitest (4.7.5)
70
+ multi_json (1.9.2)
71
+ nokogiri (1.6.1)
72
+ mini_portile (~> 0.5.0)
73
+ nori (2.3.0)
74
+ pg (0.17.1)
75
+ polyglot (0.3.4)
76
+ rack (1.5.2)
77
+ rack-test (0.6.2)
78
+ rack (>= 1.0)
79
+ rails (4.0.0)
80
+ actionmailer (= 4.0.0)
81
+ actionpack (= 4.0.0)
82
+ activerecord (= 4.0.0)
83
+ activesupport (= 4.0.0)
84
+ bundler (>= 1.3.0, < 2.0)
85
+ railties (= 4.0.0)
86
+ sprockets-rails (~> 2.0.0)
87
+ railties (4.0.0)
88
+ actionpack (= 4.0.0)
89
+ activesupport (= 4.0.0)
90
+ rake (>= 0.8.7)
91
+ thor (>= 0.18.1, < 2.0)
92
+ rake (10.3.1)
93
+ rdoc (4.1.1)
94
+ json (~> 1.4)
95
+ rubyntlm (0.3.4)
96
+ sass (3.2.19)
97
+ sass-rails (4.0.3)
98
+ railties (>= 4.0.0, < 5.0)
99
+ sass (~> 3.2.0)
100
+ sprockets (~> 2.8, <= 2.11.0)
101
+ sprockets-rails (~> 2.0)
102
+ savon (2.4.0)
103
+ akami (~> 1.2.0)
104
+ builder (>= 2.1.2)
105
+ gyoku (~> 1.1.0)
106
+ httpi (~> 2.1.0)
107
+ nokogiri (>= 1.4.0)
108
+ nori (~> 2.3.0)
109
+ wasabi (~> 3.2.2)
110
+ sdoc (0.4.0)
111
+ json (~> 1.8)
112
+ rdoc (~> 4.0, < 5.0)
113
+ sprockets (2.11.0)
114
+ hike (~> 1.2)
115
+ multi_json (~> 1.0)
116
+ rack (~> 1.0)
117
+ tilt (~> 1.1, != 1.3.0)
118
+ sprockets-rails (2.0.1)
119
+ actionpack (>= 3.0)
120
+ activesupport (>= 3.0)
121
+ sprockets (~> 2.8)
122
+ thor (0.19.1)
123
+ thread_safe (0.3.3)
124
+ tilt (1.4.1)
125
+ treetop (1.4.15)
126
+ polyglot
127
+ polyglot (>= 0.3.1)
128
+ turbolinks (2.2.2)
129
+ coffee-rails
130
+ tzinfo (0.3.39)
131
+ uglifier (2.5.0)
132
+ execjs (>= 0.3.0)
133
+ json (>= 1.8.0)
134
+ wasabi (3.2.3)
135
+ httpi (~> 2.0)
136
+ mime-types (< 2.0.0)
137
+ nokogiri (>= 1.4.0)
138
+
139
+ PLATFORMS
140
+ ruby
141
+
142
+ DEPENDENCIES
143
+ aloha!
144
+ coffee-rails (~> 4.0.0)
145
+ jbuilder (~> 1.2)
146
+ jquery-rails
147
+ pg
148
+ rails (= 4.0.0)
149
+ sass-rails (~> 4.0.0)
150
+ sdoc
151
+ turbolinks
152
+ uglifier (>= 1.3.0)