corepro 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NWRlNDllNWI2MWMzMDBkNDk3MTg3YjJjNGQ1NGM4MTZhZmFhMTc4Yg==
4
+ NTBjMjZkNzczN2UzZDczOTViNzEzNDJjYWFhNTZlMmQwY2Y3YjUwYg==
5
5
  data.tar.gz: !binary |-
6
- YjljYzYzMjFkOWVlMTI3YTQzNmY3ZmFjODBiM2FhYjFiYTU2NjllOA==
6
+ NzA3NmYzNGI2NjYzNzcyNTI1MmQwYWVjZDRiYzg4ZjlhMTNkNGViZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MWU3NDQ3ZjQzYTVmYThlZjk0OGRkNzZkMGU3YWVkMzQ3ZTg5ODhiODY2M2My
10
- YzkyZmIzYzE5ZGRiZmUwMDM0YWViNzJlNjI1ZWE0MWM5ZjVhYzczZTA3Nzhi
11
- NzI0ZjRmODQzOTQ1ZGNkMjJlYmE3NmRkNWY1MTM5ZjZhOWRjZjY=
9
+ ZWY5ODE3Y2MwNTk3YzFlMDI1ODcwMTI4ODFkNDJlMThlZTE4MmE1ZTA2YzEx
10
+ Y2Y3NDNiMDIzYjI4M2MwMjQwMGI2YzlhZmU5ZmYxY2FkY2I2MjhlNjk3NmE0
11
+ Mzk1OTY5MzBmNTkyOGFiYzA5NzVmMTdiYWJlZTllMjA5MjlmYjE=
12
12
  data.tar.gz: !binary |-
13
- Mzg4YTgwNzQ4NzNmOWJhMjUyOGY5NDIxYjFiMDVjMThmN2IxZGMyNWE0ZDU0
14
- MTFiMTMzOWMwYThkZTEzMDIzYjM4MDRhOWUwNzM4OTQ3YmJlMTBmNWFlZDJj
15
- MDdhOWY2NDcxZDQ0NDYyYzQ3NDMzOGI5YTVhN2Q5Yjk1NjhiNDM=
13
+ YjRmYzZkZTE2NmJjNGMwNTFmMjJkY2M2ZThiZmZkM2I0MDE4OWVlZGNjNTJi
14
+ MDA4OTZiM2VjNWJiZDQ1ZTMyZTI1MTYxM2Y0NTc0ZTJlYTA0M2I2MTM0MzY3
15
+ Mzg0NTBhOGY5YjUwOGI5YzdiNTA2ZjljNDNjMGY5NTk5NWVkMTg=
@@ -1,8 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <module type="RUBY_MODULE" version="4">
3
- <component name="CompassSettings">
4
- <option name="compassSupportEnabled" value="true" />
5
- </component>
6
3
  <component name="FacetManager">
7
4
  <facet type="gem" name="Ruby Gem">
8
5
  <configuration>
@@ -13,7 +10,7 @@
13
10
  </facet>
14
11
  </component>
15
12
  <component name="ModuleRunConfigurationManager">
16
- <configuration default="false" name="All tests in corepro-sdk-ruby: corepro-sdk-ruby" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
13
+ <configuration default="false" name="All tests in corepro-sdk-ruby: corepro-sdk-ruby" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
17
14
  <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
18
15
  <module name="corepro-sdk-ruby" />
19
16
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
@@ -28,7 +25,7 @@
28
25
  <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
29
26
  <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
30
27
  <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
31
- <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$MODULE_DIR$" />
28
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$MODULE_DIR$/test" />
32
29
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
33
30
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/{*_test,test_*}.rb" />
34
31
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
@@ -45,7 +42,7 @@
45
42
  <ConfigurationWrapper RunnerId="RubyRunner" />
46
43
  <method />
47
44
  </configuration>
48
- <configuration default="false" name="Run test 'ad_customer_beneficiary_test': corepro-sdk-ruby" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
45
+ <configuration default="false" name="Run test 'AaaProgramTest': corepro-sdk-ruby" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
49
46
  <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
50
47
  <module name="corepro-sdk-ruby" />
51
48
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
@@ -61,7 +58,7 @@
61
58
  <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
62
59
  <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
63
60
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
64
- <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/ad_customer_beneficiary_test.rb" />
61
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/aaa_program_test.rb" />
65
62
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
66
63
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
67
64
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
@@ -69,11 +66,13 @@
69
66
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
70
67
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
71
68
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
69
+ <RunnerSettings RunnerId="RubyDebugRunner" />
72
70
  <RunnerSettings RunnerId="RubyRunner" />
71
+ <ConfigurationWrapper RunnerId="RubyDebugRunner" />
73
72
  <ConfigurationWrapper RunnerId="RubyRunner" />
74
73
  <method />
75
74
  </configuration>
76
- <configuration default="false" name="test_list: corepro-sdk-ruby" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
75
+ <configuration default="false" name="test_get: corepro-sdk-ruby" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
77
76
  <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
78
77
  <module name="corepro-sdk-ruby" />
79
78
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
@@ -84,14 +83,14 @@
84
83
  <envs>
85
84
  <env name="JRUBY_OPTS" value="-X+O" />
86
85
  </envs>
87
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
86
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
88
87
  <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
89
88
  <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
90
89
  <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
91
90
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
92
- <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/af_bankdocument_test.rb" />
91
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/aaa_program_test.rb" />
93
92
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
94
- <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="test_list" />
93
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="test_get" />
95
94
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_METHOD" />
96
95
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
97
96
  <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
@@ -101,6 +100,34 @@
101
100
  <ConfigurationWrapper RunnerId="RubyRunner" />
102
101
  <method />
103
102
  </configuration>
103
+ <configuration default="false" name="Run test 'aa_customer_prepaid_test': corepro-sdk-ruby" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
104
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
105
+ <module name="corepro-sdk-ruby" />
106
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
107
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$/test" />
108
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
109
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
110
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
111
+ <envs>
112
+ <env name="JRUBY_OPTS" value="-X+O" />
113
+ </envs>
114
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
115
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
116
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
117
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
118
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
119
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/aa_customer_prepaid_test.rb" />
120
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
121
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
122
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
123
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
124
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
125
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
126
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
127
+ <RunnerSettings RunnerId="RubyRunner" />
128
+ <ConfigurationWrapper RunnerId="RubyRunner" />
129
+ <method />
130
+ </configuration>
104
131
  </component>
105
132
  <component name="NewModuleRootManager">
106
133
  <content url="file://$MODULE_DIR$">
@@ -110,14 +137,13 @@
110
137
  <orderEntry type="sourceFolder" forTests="false" />
111
138
  <orderEntry type="library" scope="PROVIDED" name="ansi (v1.4.3, ruby-1.9.3-p484) [gem]" level="application" />
112
139
  <orderEntry type="library" scope="PROVIDED" name="builder (v3.2.2, ruby-1.9.3-p484) [gem]" level="application" />
113
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.7.0, ruby-1.9.3-p484) [gem]" level="application" />
140
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.7.8, ruby-1.9.3-p484) [gem]" level="application" />
114
141
  <orderEntry type="library" scope="PROVIDED" name="minitest (v5.4.0, ruby-1.9.3-p484) [gem]" level="application" />
115
142
  <orderEntry type="library" scope="PROVIDED" name="minitest-reporters (v1.0.5, ruby-1.9.3-p484) [gem]" level="application" />
116
143
  <orderEntry type="library" scope="PROVIDED" name="power_assert (v0.1.3, ruby-1.9.3-p484) [gem]" level="application" />
117
- <orderEntry type="library" scope="PROVIDED" name="rake (v10.3.2, ruby-1.9.3-p484) [gem]" level="application" />
144
+ <orderEntry type="library" scope="PROVIDED" name="rake (v10.4.2, ruby-1.9.3-p484) [gem]" level="application" />
118
145
  <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.5.1, ruby-1.9.3-p484) [gem]" level="application" />
119
146
  <orderEntry type="library" scope="PROVIDED" name="test-unit (v3.0.1, ruby-1.9.3-p484) [gem]" level="application" />
120
147
  <orderEntry type="library" scope="PROVIDED" name="win32console (v1.3.0, ruby-1.9.3-p484) [gem]" level="application" />
121
148
  </component>
122
- </module>
123
-
149
+ </module>
@@ -0,0 +1,34 @@
1
+ <component name="ProjectRunConfigurationManager">
2
+ <configuration default="false" name="All tests in corepro-sdk-ruby: corepro-sdk-ruby" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
3
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
4
+ <module name="corepro-sdk-ruby" />
5
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
6
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
7
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
8
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
9
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
10
+ <envs>
11
+ <env name="JRUBY_OPTS" value="-X+O" />
12
+ </envs>
13
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
14
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
15
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
16
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
17
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$MODULE_DIR$/test" />
18
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
19
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/{*_test,test_*}.rb" />
20
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
21
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="ALL_IN_FOLDER" />
22
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
23
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
24
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
25
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
26
+ <RunnerSettings RunnerId="RubyCover" />
27
+ <RunnerSettings RunnerId="RubyDebugRunner" />
28
+ <RunnerSettings RunnerId="RubyRunner" />
29
+ <ConfigurationWrapper RunnerId="RubyCover" />
30
+ <ConfigurationWrapper RunnerId="RubyDebugRunner" />
31
+ <ConfigurationWrapper RunnerId="RubyRunner" />
32
+ <method />
33
+ </configuration>
34
+ </component>
@@ -1,5 +1,5 @@
1
1
  CoreProApiKey: your-api-key-here
2
2
  CoreProApiSecret: your-secret-here
3
3
  CoreProDomainName: sandbox-api.corepro.io
4
- CoreProProxyServer: leave-empty-if-no-proxy
4
+ CoreProProxyServerName: leave-empty-if-no-proxy
5
5
  CoreProProxyPort: leave-empty-if-no-proxy
@@ -4,9 +4,14 @@ require 'yaml'
4
4
  module CorePro
5
5
  class Connection
6
6
 
7
+ attr_accessor :proxyServerName
8
+ attr_accessor :proxyPort
9
+
7
10
  @@config = begin
8
11
  if File.exists?('config.yml')
9
12
  YAML.load(File.open('config.yml'))
13
+ elsif File.exists?('../config.yml')
14
+ YAML.load(File.open('../config.yml'))
10
15
  else
11
16
  {}
12
17
  end
@@ -14,18 +19,23 @@ module CorePro
14
19
  puts "Could not parse YAML: #{e.message}"
15
20
  end
16
21
 
17
- def self.createFromConfig(apiKey = nil, apiSecret = nil, domainName = nil)
22
+
23
+ def self.createFromConfig(apiKey = nil, apiSecret = nil, domainName = nil, proxyServerName = nil, proxyPort = nil)
18
24
  c = Connection.new
19
25
  c.apiKey = apiKey || @@config['CoreProApiKey']
20
26
  c.apiSecret = apiSecret || @@config['CoreProApiSecret']
21
27
  c.domainName = domainName || @@config['CoreProDomainName']
28
+ c.proxyServerName = proxyServerName || @@config['CoreProProxyServerName']
29
+ c.proxyPort = proxyPort || @@config['CoreProProxyPort']
22
30
  c
23
31
  end
24
32
 
25
- def initialize(apiKey = nil, apiSecret = nil, domainName = nil)
33
+ def initialize(apiKey = nil, apiSecret = nil, domainName = nil, proxyServerName = nil, proxyPort = nil)
26
34
  @apiKey = apiKey || @@config['CoreProApiKey']
27
35
  @apiSecret = apiSecret || @@config['CoreProApiSecret']
28
36
  @domainName = domainName || @@config['CoreProDomainName']
37
+ @proxyServerName = proxyServerName || @@config['CoreProProxyServerName']
38
+ @proxyPort = proxyPort || @@config['CoreProProxyPort']
29
39
  @headerValue = ''
30
40
  end
31
41
 
@@ -51,6 +51,7 @@ module CorePro
51
51
  end
52
52
 
53
53
  def initialize()
54
+ super
54
55
  @phones = []
55
56
  @addresses = []
56
57
  @accounts = []
@@ -14,6 +14,7 @@ module CorePro
14
14
  end
15
15
 
16
16
  def initialize
17
+ super
17
18
  @answers = []
18
19
  end
19
20
  end
@@ -19,6 +19,7 @@ module CorePro
19
19
  end
20
20
 
21
21
  def initialize
22
+ super
22
23
  @messages = []
23
24
  @questions = []
24
25
  end
@@ -3,6 +3,9 @@ require 'json'
3
3
  module CorePro
4
4
  module Models
5
5
  class JsonBase
6
+ def is_hash?
7
+ false
8
+ end
6
9
 
7
10
  def to_hash
8
11
  hash = {}
@@ -68,6 +71,15 @@ module CorePro
68
71
  arr.push item
69
72
  end
70
73
  self.instance_variable_set "@#{var}", arr
74
+ elsif cd.new.is_hash?
75
+ # elsif val.kind_of?(Hash)
76
+ hash = {}
77
+ val.each do |key, itemJson|
78
+ item = cd.new
79
+ item.from_json! itemJson, nil
80
+ hash[key] = item
81
+ end
82
+ self.instance_variable_set "@#{var}", hash
71
83
  else
72
84
  item = cd.new
73
85
  item.from_json! val, nil
@@ -0,0 +1,37 @@
1
+ require_relative 'json_base'
2
+ require_relative 'program_interest_rate'
3
+ require_relative 'program_limit'
4
+ module CorePro
5
+ module Models
6
+ class ProgramChecking < JsonBase
7
+
8
+ def is_hash?
9
+ true
10
+ end
11
+ attr_accessor :category
12
+ attr_accessor :type
13
+ attr_accessor :balanceLimit
14
+ attr_accessor :interestRates
15
+ attr_accessor :isExternalWithdrawEnabled
16
+ attr_accessor :isInterestEnabled
17
+ attr_accessor :isRecurringContributionEnabled
18
+ attr_accessor :perTransactionDepositLimit
19
+ attr_accessor :perTransactionWithdrawLimit
20
+
21
+ def initialize
22
+ super
23
+ @interestRates = []
24
+ end
25
+
26
+ def from_json! json, classDefs
27
+ classDefs = classDefs || {}
28
+ classDefs['balanceLimit'] = CorePro::Models::ProgramLimit
29
+ classDefs['interestRates'] = CorePro::Models::ProgramInterestRate
30
+ classDefs['perTransactionDepositLimit'] = CorePro::Models::ProgramLimit
31
+ classDefs['perTransactionWithdrawLimit'] = CorePro::Models::ProgramLimit
32
+
33
+ super json, classDefs
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,31 @@
1
+ require_relative 'json_base'
2
+ module CorePro
3
+ module Models
4
+ class ProgramECode < JsonBase
5
+
6
+ def is_hash?
7
+ true
8
+ end
9
+
10
+ attr_accessor :category
11
+ attr_accessor :type
12
+ attr_accessor :programECodeId
13
+ attr_accessor :productCode
14
+ attr_accessor :minimumAmount
15
+ attr_accessor :maximumAmount
16
+ attr_accessor :name
17
+ attr_accessor :imageUrl
18
+ attr_accessor :isReissueSupported
19
+
20
+ def initialize
21
+ super
22
+ end
23
+
24
+ def from_json! json, classDefs
25
+ classDefs = classDefs || {}
26
+
27
+ super json, classDefs
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,37 @@
1
+ require_relative 'json_base'
2
+ require_relative 'program_interest_rate'
3
+ require_relative 'program_limit'
4
+ module CorePro
5
+ module Models
6
+ class ProgramPrepaid < JsonBase
7
+ def is_hash?
8
+ true
9
+ end
10
+ attr_accessor :category
11
+ attr_accessor :type
12
+ attr_accessor :balanceLimit
13
+ attr_accessor :interestRates
14
+ attr_accessor :isImmediateLoadFromLinkedAccountEnabled
15
+ attr_accessor :isExternalWithdrawEnabled
16
+ attr_accessor :isInterestEnabled
17
+ attr_accessor :isRecurringContributionEnabled
18
+ attr_accessor :perTransactionDepositLimit
19
+ attr_accessor :perTransactionWithdrawLimit
20
+
21
+ def initialize
22
+ super
23
+ @interestRates = []
24
+ end
25
+
26
+ def from_json! json, classDefs
27
+ classDefs = classDefs || {}
28
+ classDefs['balanceLimit'] = CorePro::Models::ProgramLimit
29
+ classDefs['interestRates'] = CorePro::Models::ProgramInterestRate
30
+ classDefs['perTransactionDepositLimit'] = CorePro::Models::ProgramLimit
31
+ classDefs['perTransactionWithdrawLimit'] = CorePro::Models::ProgramLimit
32
+
33
+ super json, classDefs
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,36 @@
1
+ require_relative 'json_base'
2
+ require_relative 'program_interest_rate'
3
+ require_relative 'program_limit'
4
+ module CorePro
5
+ module Models
6
+ class ProgramSavings < JsonBase
7
+ def is_hash?
8
+ true
9
+ end
10
+ attr_accessor :category
11
+ attr_accessor :type
12
+ attr_accessor :balanceLimit
13
+ attr_accessor :interestRates
14
+ attr_accessor :isExternalWithdrawEnabled
15
+ attr_accessor :isInterestEnabled
16
+ attr_accessor :isRecurringContributionEnabled
17
+ attr_accessor :perTransactionDepositLimit
18
+ attr_accessor :perTransactionWithdrawLimit
19
+
20
+ def initialize
21
+ @interestRates = []
22
+ super
23
+ end
24
+
25
+ def from_json! json, classDefs
26
+ classDefs = classDefs || {}
27
+ classDefs['balanceLimit'] = CorePro::Models::ProgramLimit
28
+ classDefs['interestRates'] = CorePro::Models::ProgramInterestRate
29
+ classDefs['perTransactionDepositLimit'] = CorePro::Models::ProgramLimit
30
+ classDefs['perTransactionWithdrawLimit'] = CorePro::Models::ProgramLimit
31
+
32
+ super json, classDefs
33
+ end
34
+ end
35
+ end
36
+ end
@@ -1,6 +1,10 @@
1
1
  require_relative 'models/model_base'
2
2
  require_relative 'utils/requestor'
3
+ require_relative 'models/program_checking'
4
+ require_relative 'models/program_e_code'
3
5
  require_relative 'models/program_interest_rate'
6
+ require_relative 'models/program_savings'
7
+ require_relative 'models/program_prepaid'
4
8
  require_relative 'models/program_limit'
5
9
 
6
10
  module CorePro
@@ -9,43 +13,47 @@ module CorePro
9
13
  attr_accessor :name
10
14
  attr_accessor :verificationType
11
15
  attr_accessor :timeZone
12
- attr_accessor :regDFeeAmount
13
- attr_accessor :regDMonthlyTransactionWithdrawCountMax
14
- attr_accessor :perTransactionWithdrawLimit
15
16
  attr_accessor :perUserDailyWithdrawLimit
16
17
  attr_accessor :perUserMonthlyWithdrawLimit
17
18
  attr_accessor :perProgramDailyWithdrawLimit
18
- attr_accessor :perTransactionDepositLimit
19
19
  attr_accessor :perUserDailyDepositLimit
20
20
  attr_accessor :perUserMonthlyDepositLimit
21
21
  attr_accessor :perProgramDailyDepositLimit
22
22
  attr_accessor :website
23
23
  attr_accessor :isInternalToInternalTransferEnabled
24
24
  attr_accessor :decimalCount
25
- attr_accessor :isInterestEnabled
26
- attr_accessor :allowedAccountType
27
- attr_accessor :isRecurringContributionEnabled
28
- attr_accessor :interestRates
25
+ attr_accessor :validAccountTypes
29
26
  attr_accessor :filledDate
27
+ attr_accessor :externalAccountCountMax
28
+ attr_accessor :accountCountMax
29
+ attr_accessor :checkingProducts
30
+ attr_accessor :eCodeProducts
31
+ attr_accessor :savingsProducts
32
+ attr_accessor :prepaidProducts
30
33
 
31
34
  def initialize
32
35
  super
33
- @interestRates = []
36
+ @checkingProducts = {}
37
+ @eCodeProducts = {}
38
+ @savingsProducts = {}
39
+ @prepaidProducts = {}
34
40
  end
35
41
 
36
42
  def from_json! json, classDefs
37
43
  classDefs = classDefs || {}
38
- classDefs['interestRates'] = CorePro::Models::ProgramInterestRate
39
- classDefs['perTransactionWithdrawLimit'] = CorePro::Models::ProgramLimit
40
44
  classDefs['perUserDailyWithdrawLimit'] = CorePro::Models::ProgramLimit
41
45
  classDefs['perUserMonthlyWithdrawLimit'] = CorePro::Models::ProgramLimit
42
46
  classDefs['perProgramDailyWithdrawLimit'] = CorePro::Models::ProgramLimit
43
47
 
44
- classDefs['perTransactionDepositLimit'] = CorePro::Models::ProgramLimit
45
48
  classDefs['perUserDailyDepositLimit'] = CorePro::Models::ProgramLimit
46
49
  classDefs['perUserMonthlyDepositLimit'] = CorePro::Models::ProgramLimit
47
50
  classDefs['perProgramDailyDepositLimit'] = CorePro::Models::ProgramLimit
48
51
 
52
+ classDefs['checkingProducts'] = CorePro::Models::ProgramChecking
53
+ classDefs['eCodeProducts'] = CorePro::Models::ProgramECode
54
+ classDefs['savingsProducts'] = CorePro::Models::ProgramSavings
55
+ classDefs['prepaidProducts'] = CorePro::Models::ProgramPrepaid
56
+
49
57
  super json, classDefs
50
58
  end
51
59
 
@@ -33,8 +33,8 @@ module CorePro
33
33
  raise ArgumentError, 'A valid connection with apiKey, apiSecret, and domainName must be specified.'
34
34
  end
35
35
  uri = URI.parse("https://#{connection.domainName}#{relativeUrl}")
36
- if @@config['CoreProProxyServer'] != nil && @@config['CoreProProxyPort'] != nil
37
- proxy = Net::HTTP::Proxy(@@config['CoreProProxyServer'], @@config['CoreProProxyPort'])
36
+ if connection.proxyServerName != nil && connection.proxyPort != nil
37
+ proxy = Net::HTTP::Proxy(connection.proxyServerName, connection.proxyPort)
38
38
  http = proxy.new(uri.host, uri.port)
39
39
  else
40
40
  http = Net::HTTP.new(uri.host, uri.port)
@@ -62,8 +62,8 @@ module CorePro
62
62
  end
63
63
 
64
64
  uri = URI.parse("https://#{connection.domainName}#{relativeUrl}")
65
- if @@config['CoreProProxyServer'] != nil && @@config['CoreProProxyPort'] != nil
66
- proxy = Net::HTTP::Proxy(@@config['CoreProProxyServer'], @@config['CoreProProxyPort'])
65
+ if connection.proxyServerName != nil && connection.proxyPort != nil
66
+ proxy = Net::HTTP::Proxy(connection.proxyServerName, connection.proxyPort)
67
67
  http = proxy.new(uri.host, uri.port)
68
68
  else
69
69
  http = Net::HTTP.new(uri.host, uri.port)
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/ruby -w
2
2
  module CorePro
3
- VERSION = '0.0.8'
3
+ VERSION = '0.0.9'
4
4
  end
@@ -1,9 +1,11 @@
1
- require_relative '../test/core_pro_test_base'
1
+ require_relative 'core_pro_test_base'
2
2
  require_relative '../lib/corepro/program'
3
3
 
4
- class AhProgramTest < CoreProTestBase
4
+ class AaaProgramTest < CoreProTestBase
5
5
  def test_get
6
+ puts @@prepaidConn
6
7
  p = CorePro::Program.get @@prepaidConn, nil
8
+ puts p.prepaidProducts['Prepaid']
7
9
  assert_equal 'CoreProPrepaidTester', p.name
8
10
  end
9
11
  end
@@ -7,7 +7,7 @@ class AbAccountPrepaidTest < CoreProTestBase
7
7
  a = CorePro::Account.new
8
8
  a.customerId = @@prepaidCustomerId
9
9
  a.tag = "act#{@@timestamp}"
10
- a.type = 'Client'
10
+ a.type = 'Prepaid'
11
11
  a.category = 'CategoryA'
12
12
  a.subCategory = 'CategoryB'
13
13
  a.isCloseable = true
@@ -11,7 +11,7 @@ class AcExternalAccountPrepaidTest < CoreProTestBase
11
11
  ea.accountNumber = '00001234'
12
12
  ea.firstName = 'Jimmy'
13
13
  ea.lastName = 'Jameson'
14
- ea.type = 'Client'
14
+ ea.type = 'Prepaid'
15
15
  externalAccountId = ea.create @@prepaidConn, nil
16
16
  @@prepaidExternalAccountId = externalAccountId
17
17
  assert @@prepaidExternalAccountId > 0
@@ -30,7 +30,7 @@ class CoreProTestBase < Test::Unit::TestCase
30
30
 
31
31
  # nacha-specific program
32
32
 
33
- @@nachaConn = CorePro::Connection.new 'corepronacha', 'corepronacha', 'sandbox-api.corepro.io'
33
+ @@nachaConn = CorePro::Connection.new 'corepronacha', 'corepronacha', 'pilot-api.corepro.io'
34
34
 
35
35
  @@nachaCustomerId = nil
36
36
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corepro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - devsupport
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-02 00:00:00.000000000 Z
11
+ date: 2014-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,6 +53,7 @@ files:
53
53
  - .idea/encodings.xml
54
54
  - .idea/misc.xml
55
55
  - .idea/modules.xml
56
+ - .idea/runConfigurations/All_tests_in_corepro_sdk_ruby__corepro_sdk_ruby.xml
56
57
  - .idea/scopes/scope_settings.xml
57
58
  - .idea/vcs.xml
58
59
  - CorePro.gemspec
@@ -89,8 +90,12 @@ files:
89
90
  - lib/corepro/models/file_content.rb
90
91
  - lib/corepro/models/json_base.rb
91
92
  - lib/corepro/models/model_base.rb
93
+ - lib/corepro/models/program_checking.rb
94
+ - lib/corepro/models/program_e_code.rb
92
95
  - lib/corepro/models/program_interest_rate.rb
93
96
  - lib/corepro/models/program_limit.rb
97
+ - lib/corepro/models/program_prepaid.rb
98
+ - lib/corepro/models/program_savings.rb
94
99
  - lib/corepro/program.rb
95
100
  - lib/corepro/statement.rb
96
101
  - lib/corepro/transaction.rb
@@ -101,6 +106,7 @@ files:
101
106
  - test.pdf
102
107
  - test/aa_customer_nacha_test.rb
103
108
  - test/aa_customer_prepaid_test.rb
109
+ - test/aaa_program_test.rb
104
110
  - test/ab_account_nacha_test.rb
105
111
  - test/ab_account_prepaid_test.rb
106
112
  - test/ac_external_account_nacha_test.rb
@@ -109,7 +115,6 @@ files:
109
115
  - test/ae_customer_document_test.rb
110
116
  - test/af_bankdocument_test.rb
111
117
  - test/ag_external_account_document_test.rb
112
- - test/ah_program_test.rb
113
118
  - test/ai_statement_test.rb
114
119
  - test/aj_transfer_nacha_test.rb
115
120
  - test/aj_transfer_prepaid_test.rb
@@ -135,13 +140,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
140
  version: '0'
136
141
  requirements: []
137
142
  rubyforge_project:
138
- rubygems_version: 2.4.1
143
+ rubygems_version: 2.3.0
139
144
  signing_key:
140
145
  specification_version: 4
141
146
  summary: A Ruby SDK for consuming the corepro API.
142
147
  test_files:
143
148
  - test/aa_customer_nacha_test.rb
144
149
  - test/aa_customer_prepaid_test.rb
150
+ - test/aaa_program_test.rb
145
151
  - test/ab_account_nacha_test.rb
146
152
  - test/ab_account_prepaid_test.rb
147
153
  - test/ac_external_account_nacha_test.rb
@@ -150,7 +156,6 @@ test_files:
150
156
  - test/ae_customer_document_test.rb
151
157
  - test/af_bankdocument_test.rb
152
158
  - test/ag_external_account_document_test.rb
153
- - test/ah_program_test.rb
154
159
  - test/ai_statement_test.rb
155
160
  - test/aj_transfer_nacha_test.rb
156
161
  - test/aj_transfer_prepaid_test.rb