hydrogen-electron-api 1.3.1

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 (51) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +86 -0
  4. data/Rakefile +8 -0
  5. data/electron_api.gemspec +46 -0
  6. data/git_push.sh +55 -0
  7. data/lib/electron_api/api/ach_api.rb +75 -0
  8. data/lib/electron_api/api/card_api.rb +639 -0
  9. data/lib/electron_api/api_client.rb +391 -0
  10. data/lib/electron_api/api_error.rb +38 -0
  11. data/lib/electron_api/auth_configuration.rb +181 -0
  12. data/lib/electron_api/configuration.rb +209 -0
  13. data/lib/electron_api/environment.rb +36 -0
  14. data/lib/electron_api/models/ach_card_request_co.rb +180 -0
  15. data/lib/electron_api/models/ach_card_response_vo.rb +216 -0
  16. data/lib/electron_api/models/base_response_vo.rb +198 -0
  17. data/lib/electron_api/models/card_base_request_co.rb +200 -0
  18. data/lib/electron_api/models/card_client_request_co.rb +191 -0
  19. data/lib/electron_api/models/card_load_request_co.rb +189 -0
  20. data/lib/electron_api/models/card_load_unload_response_vo.rb +234 -0
  21. data/lib/electron_api/models/card_replace_response_vo.rb +234 -0
  22. data/lib/electron_api/models/card_reserve_account_response_vo.rb +234 -0
  23. data/lib/electron_api/models/card_spending_control_request_co.rb +180 -0
  24. data/lib/electron_api/models/card_spending_control_response_vo.rb +216 -0
  25. data/lib/electron_api/models/card_unload_request_co.rb +189 -0
  26. data/lib/electron_api/models/create_card_client_response_vo.rb +216 -0
  27. data/lib/electron_api/models/spending_control_vendor_request_data_vo.rb +254 -0
  28. data/lib/electron_api/models/update_card_client_response_vo.rb +216 -0
  29. data/lib/electron_api/version.rb +15 -0
  30. data/lib/electron_api.rb +57 -0
  31. data/spec/api/ach_api_spec.rb +46 -0
  32. data/spec/api/card_api_spec.rb +166 -0
  33. data/spec/api_client_spec.rb +243 -0
  34. data/spec/configuration_spec.rb +42 -0
  35. data/spec/models/ach_card_request_co_spec.rb +41 -0
  36. data/spec/models/ach_card_response_vo_spec.rb +65 -0
  37. data/spec/models/base_response_vo_spec.rb +53 -0
  38. data/spec/models/card_base_request_co_spec.rb +53 -0
  39. data/spec/models/card_client_request_co_spec.rb +47 -0
  40. data/spec/models/card_load_request_co_spec.rb +47 -0
  41. data/spec/models/card_load_unload_response_vo_spec.rb +77 -0
  42. data/spec/models/card_replace_response_vo_spec.rb +77 -0
  43. data/spec/models/card_reserve_account_response_vo_spec.rb +77 -0
  44. data/spec/models/card_spending_control_request_co_spec.rb +41 -0
  45. data/spec/models/card_spending_control_response_vo_spec.rb +65 -0
  46. data/spec/models/card_unload_request_co_spec.rb +47 -0
  47. data/spec/models/create_card_client_response_vo_spec.rb +65 -0
  48. data/spec/models/spending_control_vendor_request_data_vo_spec.rb +89 -0
  49. data/spec/models/update_card_client_response_vo_spec.rb +65 -0
  50. data/spec/spec_helper.rb +111 -0
  51. metadata +312 -0
@@ -0,0 +1,216 @@
1
+ =begin
2
+ #Hydrogen Electron API
3
+
4
+ #The Hydrogen Electron API
5
+
6
+ OpenAPI spec version: 1.3.1
7
+ Contact: info@hydrogenplatform.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.24
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module ElectronApi
16
+ class UpdateCardClientResponseVO
17
+ attr_accessor :message
18
+
19
+ attr_accessor :nucleus_client_id
20
+
21
+ attr_accessor :vendor_name
22
+
23
+ attr_accessor :vendor_request_data
24
+
25
+ attr_accessor :vendor_response
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'message' => :'message',
31
+ :'nucleus_client_id' => :'nucleus_client_id',
32
+ :'vendor_name' => :'vendor_name',
33
+ :'vendor_request_data' => :'vendor_request_data',
34
+ :'vendor_response' => :'vendor_response'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'message' => :'String',
42
+ :'nucleus_client_id' => :'String',
43
+ :'vendor_name' => :'String',
44
+ :'vendor_request_data' => :'Object',
45
+ :'vendor_response' => :'Object'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ if attributes.has_key?(:'message')
58
+ self.message = attributes[:'message']
59
+ end
60
+
61
+ if attributes.has_key?(:'nucleus_client_id')
62
+ self.nucleus_client_id = attributes[:'nucleus_client_id']
63
+ end
64
+
65
+ if attributes.has_key?(:'vendor_name')
66
+ self.vendor_name = attributes[:'vendor_name']
67
+ end
68
+
69
+ if attributes.has_key?(:'vendor_request_data')
70
+ self.vendor_request_data = attributes[:'vendor_request_data']
71
+ end
72
+
73
+ if attributes.has_key?(:'vendor_response')
74
+ self.vendor_response = attributes[:'vendor_response']
75
+ end
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = Array.new
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ true
89
+ end
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param [Object] Object to be compared
93
+ def ==(o)
94
+ return true if self.equal?(o)
95
+ self.class == o.class &&
96
+ message == o.message &&
97
+ nucleus_client_id == o.nucleus_client_id &&
98
+ vendor_name == o.vendor_name &&
99
+ vendor_request_data == o.vendor_request_data &&
100
+ vendor_response == o.vendor_response
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Fixnum] Hash code
111
+ def hash
112
+ [message, nucleus_client_id, vendor_name, vendor_request_data, vendor_response].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def build_from_hash(attributes)
119
+ self.class.swagger_types.each_pair do |key, type|
120
+ if type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :DateTime
141
+ value
142
+ when :Date
143
+ value
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :BOOLEAN
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ temp_model = ElectronApi.const_get(type).new
172
+ temp_model.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end# Outputs non-array value in the form of hash
198
+ # For object, use to_hash. Otherwise, just return the value
199
+ # @param [Object] value Any valid value
200
+ # @return [Hash] Returns the value in the form of hash
201
+ def _to_hash(value)
202
+ if value.is_a?(Array)
203
+ value.compact.map { |v| _to_hash(v) }
204
+ elsif value.is_a?(Hash)
205
+ {}.tap do |hash|
206
+ value.each { |k, v| hash[k] = _to_hash(v) }
207
+ end
208
+ elsif value.respond_to? :to_hash
209
+ value.to_hash
210
+ else
211
+ value
212
+ end
213
+ end
214
+
215
+ end
216
+ end
@@ -0,0 +1,15 @@
1
+ =begin
2
+ #Hydrogen Electron API
3
+
4
+ #The Hydrogen Electron API
5
+
6
+ OpenAPI spec version: 1.3.1
7
+ Contact: info@hydrogenplatform.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.24
10
+
11
+ =end
12
+
13
+ module ElectronApi
14
+ VERSION = '1.3.1'
15
+ end
@@ -0,0 +1,57 @@
1
+ =begin
2
+ #Hydrogen Electron API
3
+
4
+ #The Hydrogen Electron API
5
+
6
+ OpenAPI spec version: 1.3.1
7
+ Contact: info@hydrogenplatform.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.24
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'electron_api/api_client'
15
+ require 'electron_api/api_error'
16
+ require 'electron_api/version'
17
+ require 'electron_api/configuration'
18
+ require 'electron_api/auth_configuration'
19
+ require 'electron_api/environment'
20
+ # Models
21
+ require 'electron_api/models/ach_card_request_co'
22
+ require 'electron_api/models/ach_card_response_vo'
23
+ require 'electron_api/models/base_response_vo'
24
+ require 'electron_api/models/card_base_request_co'
25
+ require 'electron_api/models/card_client_request_co'
26
+ require 'electron_api/models/card_load_request_co'
27
+ require 'electron_api/models/card_load_unload_response_vo'
28
+ require 'electron_api/models/card_replace_response_vo'
29
+ require 'electron_api/models/card_reserve_account_response_vo'
30
+ require 'electron_api/models/card_spending_control_request_co'
31
+ require 'electron_api/models/card_spending_control_response_vo'
32
+ require 'electron_api/models/card_unload_request_co'
33
+ require 'electron_api/models/create_card_client_response_vo'
34
+ require 'electron_api/models/spending_control_vendor_request_data_vo'
35
+ require 'electron_api/models/update_card_client_response_vo'
36
+
37
+ # APIs
38
+ require 'electron_api/api/ach_api'
39
+ require 'electron_api/api/card_api'
40
+
41
+ module ElectronApi
42
+ class << self
43
+ # Customize default settings for the SDK using block.
44
+ # ElectronApi.configure do |config|
45
+ # config.username = "xxx"
46
+ # config.password = "xxx"
47
+ # end
48
+ # If no block given, return the default Configuration object.
49
+ def configure
50
+ if block_given?
51
+ yield(AuthConfiguration.default)
52
+ else
53
+ AuthConfiguration.default
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,46 @@
1
+ =begin
2
+ #Hydrogen Electron API
3
+
4
+ #The Hydrogen Electron API
5
+
6
+ OpenAPI spec version: 1.3.1
7
+ Contact: info@hydrogenplatform.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.24
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for ElectronApi::ACHApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'ACHApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = ElectronApi::ACHApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of ACHApi' do
30
+ it 'should create an instance of ACHApi' do
31
+ expect(@instance).to be_instance_of(ElectronApi::ACHApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for fund_card_using_post
36
+ # Fund card
37
+ # @param ach_card_request_co achCardRequestCO
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [AchCardResponseVO]
40
+ describe 'fund_card_using_post test' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ end
@@ -0,0 +1,166 @@
1
+ =begin
2
+ #Hydrogen Electron API
3
+
4
+ #The Hydrogen Electron API
5
+
6
+ OpenAPI spec version: 1.3.1
7
+ Contact: info@hydrogenplatform.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.24
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for ElectronApi::CardApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'CardApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = ElectronApi::CardApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of CardApi' do
30
+ it 'should create an instance of CardApi' do
31
+ expect(@instance).to be_instance_of(ElectronApi::CardApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for create_card_close_using_post
36
+ # close a card
37
+ # @param close_request closeRequest
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [BaseResponseVO]
40
+ describe 'create_card_close_using_post test' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ # unit tests for create_card_issue_using_post
47
+ # issue a card
48
+ # @param issue_request issueRequest
49
+ # @param [Hash] opts the optional parameters
50
+ # @return [BaseResponseVO]
51
+ describe 'create_card_issue_using_post test' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
+ end
55
+ end
56
+
57
+ # unit tests for create_card_load_using_post
58
+ # Create a card load
59
+ # @param load_request loadRequest
60
+ # @param [Hash] opts the optional parameters
61
+ # @return [CardLoadUnloadResponseVO]
62
+ describe 'create_card_load_using_post test' do
63
+ it 'should work' do
64
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
65
+ end
66
+ end
67
+
68
+ # unit tests for create_card_reactivate_using_post
69
+ # reactivate card
70
+ # @param reactivate_request reactivateRequest
71
+ # @param [Hash] opts the optional parameters
72
+ # @return [BaseResponseVO]
73
+ describe 'create_card_reactivate_using_post test' do
74
+ it 'should work' do
75
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
76
+ end
77
+ end
78
+
79
+ # unit tests for create_card_replace_using_post
80
+ # Create card replace
81
+ # @param request request
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [CardReplaceResponseVO]
84
+ describe 'create_card_replace_using_post test' do
85
+ it 'should work' do
86
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
87
+ end
88
+ end
89
+
90
+ # unit tests for create_card_spending_control_using_post
91
+ # Create card spending control
92
+ # @param request request
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [CardSpendingControlResponseVO]
95
+ describe 'create_card_spending_control_using_post test' do
96
+ it 'should work' do
97
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
+ end
99
+ end
100
+
101
+ # unit tests for create_card_suspend_using_post
102
+ # suspend card
103
+ # @param suspend_request suspendRequest
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [BaseResponseVO]
106
+ describe 'create_card_suspend_using_post test' do
107
+ it 'should work' do
108
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
109
+ end
110
+ end
111
+
112
+ # unit tests for create_card_unload_using_post
113
+ # Create a card upload
114
+ # @param reload_request reloadRequest
115
+ # @param [Hash] opts the optional parameters
116
+ # @return [CardLoadUnloadResponseVO]
117
+ describe 'create_card_unload_using_post test' do
118
+ it 'should work' do
119
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
120
+ end
121
+ end
122
+
123
+ # unit tests for create_client_card_using_post
124
+ # Create a card client
125
+ # @param card_client_request_co cardClientRequestCO
126
+ # @param [Hash] opts the optional parameters
127
+ # @return [CreateCardClientResponseVO]
128
+ describe 'create_client_card_using_post test' do
129
+ it 'should work' do
130
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
131
+ end
132
+ end
133
+
134
+ # unit tests for get_card_reserve_account_details_using_get
135
+ # Card reserve account
136
+ # @param [Hash] opts the optional parameters
137
+ # @return [CardReserveAccountResponseVO]
138
+ describe 'get_card_reserve_account_details_using_get test' do
139
+ it 'should work' do
140
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
141
+ end
142
+ end
143
+
144
+ # unit tests for update_card_spending_control_using_put
145
+ # Update a card spending control
146
+ # @param nucleus_spending_control_id nucleus_spending_control_id
147
+ # @param [Hash] opts the optional parameters
148
+ # @return [CardSpendingControlResponseVO]
149
+ describe 'update_card_spending_control_using_put test' do
150
+ it 'should work' do
151
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
152
+ end
153
+ end
154
+
155
+ # unit tests for update_client_card_using_put
156
+ # Update a card client
157
+ # @param nucleus_client_id nucleus_client_id
158
+ # @param [Hash] opts the optional parameters
159
+ # @return [UpdateCardClientResponseVO]
160
+ describe 'update_client_card_using_put test' do
161
+ it 'should work' do
162
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
163
+ end
164
+ end
165
+
166
+ end