atrium-ruby 2.8.5 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,190 @@
1
+ =begin
2
+ #MX API
3
+
4
+ #The MX Atrium API supports over 48,000 data connections to thousands of financial institutions. It provides secure access to your users' accounts and transactions with industry-leading cleansing, categorization, and classification. Atrium is designed according to resource-oriented REST architecture and responds with JSON bodies and HTTP response codes. Use Atrium's development environment, vestibule.mx.com, to quickly get up and running. The development environment limits are 100 users, 25 members per user, and access to the top 15 institutions. Contact MX to purchase production access.
5
+
6
+
7
+ =end
8
+
9
+ require 'date'
10
+
11
+ module Atrium
12
+ class MerchantsResponseBody
13
+ attr_accessor :merchant
14
+
15
+ attr_accessor :pagination
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ :'merchant' => :'merchant',
21
+ :'pagination' => :'pagination'
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.mx_types
27
+ {
28
+ :'merchant' => :'Array<Merchant>',
29
+ :'pagination' => :'Pagination'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'merchant')
42
+ if (value = attributes[:'merchant']).is_a?(Array)
43
+ self.merchant = value
44
+ end
45
+ end
46
+
47
+ if attributes.has_key?(:'pagination')
48
+ self.pagination = attributes[:'pagination']
49
+ end
50
+ end
51
+
52
+ # Show invalid properties with the reasons. Usually used together with valid?
53
+ # @return Array for valid properties with the reasons
54
+ def list_invalid_properties
55
+ invalid_properties = Array.new
56
+ invalid_properties
57
+ end
58
+
59
+ # Check to see if the all the properties in the model are valid
60
+ # @return true if the model is valid
61
+ def valid?
62
+ true
63
+ end
64
+
65
+ # Checks equality by comparing each attribute.
66
+ # @param [Object] Object to be compared
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ merchant == o.merchant &&
71
+ pagination == o.pagination
72
+ end
73
+
74
+ # @see the `==` method
75
+ # @param [Object] Object to be compared
76
+ def eql?(o)
77
+ self == o
78
+ end
79
+
80
+ # Calculates hash code according to all attributes.
81
+ # @return [Fixnum] Hash code
82
+ def hash
83
+ [merchant, pagination].hash
84
+ end
85
+
86
+ # Builds the object from hash
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ # @return [Object] Returns the model itself
89
+ def build_from_hash(attributes)
90
+ return nil unless attributes.is_a?(Hash)
91
+ self.class.mx_types.each_pair do |key, type|
92
+ if type =~ /\AArray<(.*)>/i
93
+ # check to ensure the input is an array given that the the attribute
94
+ # is documented as an array but the input is not
95
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
96
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
97
+ end
98
+ elsif !attributes[self.class.attribute_map[key]].nil?
99
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
100
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
101
+ end
102
+
103
+ self
104
+ end
105
+
106
+ # Deserializes the data based on type
107
+ # @param string type Data type
108
+ # @param string value Value to be deserialized
109
+ # @return [Object] Deserialized data
110
+ def _deserialize(type, value)
111
+ case type.to_sym
112
+ when :DateTime
113
+ DateTime.parse(value)
114
+ when :Date
115
+ Date.parse(value)
116
+ when :String
117
+ value.to_s
118
+ when :Integer
119
+ value.to_i
120
+ when :Float
121
+ value.to_f
122
+ when :BOOLEAN
123
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
124
+ true
125
+ else
126
+ false
127
+ end
128
+ when :Object
129
+ # generic object (usually a Hash), return directly
130
+ value
131
+ when /\AArray<(?<inner_type>.+)>\z/
132
+ inner_type = Regexp.last_match[:inner_type]
133
+ value.map { |v| _deserialize(inner_type, v) }
134
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
135
+ k_type = Regexp.last_match[:k_type]
136
+ v_type = Regexp.last_match[:v_type]
137
+ {}.tap do |hash|
138
+ value.each do |k, v|
139
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
140
+ end
141
+ end
142
+ else # model
143
+ temp_model = Atrium.const_get(type).new
144
+ temp_model.build_from_hash(value)
145
+ end
146
+ end
147
+
148
+ # Returns the string representation of the object
149
+ # @return [String] String presentation of the object
150
+ def to_s
151
+ to_hash.to_s
152
+ end
153
+
154
+ # to_body is an alias to to_hash (backward compatibility)
155
+ # @return [Hash] Returns the object in the form of hash
156
+ def to_body
157
+ to_hash
158
+ end
159
+
160
+ # Returns the object in the form of hash
161
+ # @return [Hash] Returns the object in the form of hash
162
+ def to_hash
163
+ hash = {}
164
+ self.class.attribute_map.each_pair do |attr, param|
165
+ value = self.send(attr)
166
+ next if value.nil?
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ # Outputs non-array value in the form of hash
173
+ # For object, use to_hash. Otherwise, just return the value
174
+ # @param [Object] value Any valid value
175
+ # @return [Hash] Returns the value in the form of hash
176
+ def _to_hash(value)
177
+ if value.is_a?(Array)
178
+ value.compact.map { |v| _to_hash(v) }
179
+ elsif value.is_a?(Hash)
180
+ {}.tap do |hash|
181
+ value.each { |k, v| hash[k] = _to_hash(v) }
182
+ end
183
+ elsif value.respond_to? :to_hash
184
+ value.to_hash
185
+ else
186
+ value
187
+ end
188
+ end
189
+ end
190
+ end
@@ -7,5 +7,5 @@
7
7
  =end
8
8
 
9
9
  module Atrium
10
- VERSION = '2.8.5'
10
+ VERSION = '2.9.0'
11
11
  end
@@ -27,6 +27,29 @@ describe 'MerchantsApi' do
27
27
  end
28
28
  end
29
29
 
30
+ # unit tests for list_merchant_locations
31
+ # List merchant locations
32
+ # Returns a list of all the merchant locations associated with a merchant, including physical location, latitude, longitude, etc.
33
+ # @param merchant_guid The unique identifier for a &#x60;merchant&#x60;.
34
+ # @param [Hash] opts the optional parameters
35
+ # @return [MerchantLocationsResponseBody]
36
+ describe 'list_merchant_locations test' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ end
40
+ end
41
+
42
+ # unit tests for list_merchants
43
+ # List merchants
44
+ # Returns a list of merchnants.
45
+ # @param [Hash] opts the optional parameters
46
+ # @return [MerchantsResponseBody]
47
+ describe 'list_merchants test' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
30
53
  # unit tests for read_merchant
31
54
  # Read merchant
32
55
  # Returns information about a particular merchant, such as a logo, name, and website.
@@ -39,4 +62,17 @@ describe 'MerchantsApi' do
39
62
  end
40
63
  end
41
64
 
65
+ # unit tests for read_merchant_location
66
+ # Read merchant location
67
+ # Retuns a specific location associated with a merchant, including physical location, latitude, longitude, etc.
68
+ # @param merchant_guid The unique identifier for a &#x60;merchant&#x60;.
69
+ # @param merchant_location_guid The unique identifier for a &#x60;merchant_location&#x60;.
70
+ # @param [Hash] opts the optional parameters
71
+ # @return [MerchantLocationResponseBody]
72
+ describe 'read_merchant_location test' do
73
+ it 'should work' do
74
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
75
+ end
76
+ end
77
+
42
78
  end
@@ -39,6 +39,12 @@ describe 'AccountNumber' do
39
39
  end
40
40
  end
41
41
 
42
+ describe 'test attribute "institution_number"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
42
48
  describe 'test attribute "member_guid"' do
43
49
  it 'should work' do
44
50
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -51,6 +57,12 @@ describe 'AccountNumber' do
51
57
  end
52
58
  end
53
59
 
60
+ describe 'test attribute "transit_number"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
63
+ end
64
+ end
65
+
54
66
  describe 'test attribute "user_guid"' do
55
67
  it 'should work' do
56
68
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #MX API
3
+
4
+ #The MX Atrium API supports over 48,000 data connections to thousands of financial institutions. It provides secure access to your users' accounts and transactions with industry-leading cleansing, categorization, and classification. Atrium is designed according to resource-oriented REST architecture and responds with JSON bodies and HTTP response codes. Use Atrium's development environment, vestibule.mx.com, to quickly get up and running. The development environment limits are 100 users, 25 members per user, and access to the top 15 institutions. Contact MX to purchase production access.
5
+
6
+
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Atrium::MerchantLocationResponseBody
14
+ # Please update as you see appropriate
15
+ describe 'MerchantLocationResponseBody' do
16
+ before do
17
+ # run before each test
18
+ @instance = Atrium::MerchantLocationResponseBody.new
19
+ end
20
+
21
+ after do
22
+ # run after each test
23
+ end
24
+
25
+ describe 'test an instance of MerchantLocationResponseBody' do
26
+ it 'should create an instance of MerchantLocationResponseBody' do
27
+ expect(@instance).to be_instance_of(Atrium::MerchantLocationResponseBody)
28
+ end
29
+ end
30
+ describe 'test attribute "merchant_location"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
33
+ end
34
+ end
35
+
36
+ end
@@ -0,0 +1,90 @@
1
+ =begin
2
+ #MX API
3
+
4
+ #The MX Atrium API supports over 48,000 data connections to thousands of financial institutions. It provides secure access to your users' accounts and transactions with industry-leading cleansing, categorization, and classification. Atrium is designed according to resource-oriented REST architecture and responds with JSON bodies and HTTP response codes. Use Atrium's development environment, vestibule.mx.com, to quickly get up and running. The development environment limits are 100 users, 25 members per user, and access to the top 15 institutions. Contact MX to purchase production access.
5
+
6
+
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Atrium::MerchantLocation
14
+ # Please update as you see appropriate
15
+ describe 'MerchantLocation' do
16
+ before do
17
+ # run before each test
18
+ @instance = Atrium::MerchantLocation.new
19
+ end
20
+
21
+ after do
22
+ # run after each test
23
+ end
24
+
25
+ describe 'test an instance of MerchantLocation' do
26
+ it 'should create an instance of MerchantLocation' do
27
+ expect(@instance).to be_instance_of(Atrium::MerchantLocation)
28
+ end
29
+ end
30
+ describe 'test attribute "city"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "guid"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "latitude"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
48
+ describe 'test attribute "longitude"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "merchant_guid"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
+ end
58
+ end
59
+
60
+ describe 'test attribute "phone_number"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
63
+ end
64
+ end
65
+
66
+ describe 'test attribute "postal_code"' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
+ end
70
+ end
71
+
72
+ describe 'test attribute "state"' do
73
+ it 'should work' do
74
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
75
+ end
76
+ end
77
+
78
+ describe 'test attribute "store_number"' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
81
+ end
82
+ end
83
+
84
+ describe 'test attribute "street_address"' 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
+ end
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #MX API
3
+
4
+ #The MX Atrium API supports over 48,000 data connections to thousands of financial institutions. It provides secure access to your users' accounts and transactions with industry-leading cleansing, categorization, and classification. Atrium is designed according to resource-oriented REST architecture and responds with JSON bodies and HTTP response codes. Use Atrium's development environment, vestibule.mx.com, to quickly get up and running. The development environment limits are 100 users, 25 members per user, and access to the top 15 institutions. Contact MX to purchase production access.
5
+
6
+
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Atrium::MerchantLocationsResponseBody
14
+ # Please update as you see appropriate
15
+ describe 'MerchantLocationsResponseBody' do
16
+ before do
17
+ # run before each test
18
+ @instance = Atrium::MerchantLocationsResponseBody.new
19
+ end
20
+
21
+ after do
22
+ # run after each test
23
+ end
24
+
25
+ describe 'test an instance of MerchantLocationsResponseBody' do
26
+ it 'should create an instance of MerchantLocationsResponseBody' do
27
+ expect(@instance).to be_instance_of(Atrium::MerchantLocationsResponseBody)
28
+ end
29
+ end
30
+ describe 'test attribute "merchant_locations"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "pagination"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ end
40
+ end
41
+
42
+ end
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #MX API
3
+
4
+ #The MX Atrium API supports over 48,000 data connections to thousands of financial institutions. It provides secure access to your users' accounts and transactions with industry-leading cleansing, categorization, and classification. Atrium is designed according to resource-oriented REST architecture and responds with JSON bodies and HTTP response codes. Use Atrium's development environment, vestibule.mx.com, to quickly get up and running. The development environment limits are 100 users, 25 members per user, and access to the top 15 institutions. Contact MX to purchase production access.
5
+
6
+
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Atrium::MerchantsResponseBody
14
+ # Please update as you see appropriate
15
+ describe 'MerchantsResponseBody' do
16
+ before do
17
+ # run before each test
18
+ @instance = Atrium::MerchantsResponseBody.new
19
+ end
20
+
21
+ after do
22
+ # run after each test
23
+ end
24
+
25
+ describe 'test an instance of MerchantsResponseBody' do
26
+ it 'should create an instance of MerchantsResponseBody' do
27
+ expect(@instance).to be_instance_of(Atrium::MerchantsResponseBody)
28
+ end
29
+ end
30
+ describe 'test attribute "merchant"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "pagination"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ end
40
+ end
41
+
42
+ end