atrium-ruby 2.8.4 → 2.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -2
  3. data/docs/AccountNumber.md +2 -0
  4. data/docs/ConnectWidgetRequestBody.md +1 -0
  5. data/docs/Member.md +1 -0
  6. data/docs/MemberCreateRequest.md +4 -1
  7. data/docs/MembersApi.md +44 -0
  8. data/docs/MerchantLocation.md +17 -0
  9. data/docs/MerchantLocationResponseBody.md +8 -0
  10. data/docs/MerchantLocationsResponseBody.md +9 -0
  11. data/docs/MerchantsApi.md +107 -2
  12. data/docs/MerchantsResponseBody.md +9 -0
  13. data/docs/Transaction.md +1 -0
  14. data/docs/TransactionCleanseAndCategorizeRequest.md +1 -0
  15. data/docs/TransactionCleanseAndCategorizeResponse.md +3 -0
  16. data/lib/atrium-ruby.rb +4 -0
  17. data/lib/atrium-ruby/api/members_api.rb +64 -0
  18. data/lib/atrium-ruby/api/merchants_api.rb +156 -0
  19. data/lib/atrium-ruby/models/account_number.rb +19 -1
  20. data/lib/atrium-ruby/models/connect_widget_request_body.rb +10 -1
  21. data/lib/atrium-ruby/models/member.rb +10 -1
  22. data/lib/atrium-ruby/models/member_create_request.rb +31 -9
  23. data/lib/atrium-ruby/models/merchant_location.rb +260 -0
  24. data/lib/atrium-ruby/models/merchant_location_response_body.rb +179 -0
  25. data/lib/atrium-ruby/models/merchant_locations_response_body.rb +190 -0
  26. data/lib/atrium-ruby/models/merchants_response_body.rb +190 -0
  27. data/lib/atrium-ruby/models/transaction.rb +10 -1
  28. data/lib/atrium-ruby/models/transaction_cleanse_and_categorize_request.rb +10 -1
  29. data/lib/atrium-ruby/models/transaction_cleanse_and_categorize_response.rb +31 -4
  30. data/lib/atrium-ruby/version.rb +1 -1
  31. data/spec/api/members_api_spec.rb +15 -0
  32. data/spec/api/merchants_api_spec.rb +36 -0
  33. data/spec/models/account_number_spec.rb +12 -0
  34. data/spec/models/connect_widget_request_body_spec.rb +6 -0
  35. data/spec/models/member_create_request_spec.rb +18 -0
  36. data/spec/models/member_spec.rb +6 -0
  37. data/spec/models/merchant_location_response_body_spec.rb +36 -0
  38. data/spec/models/merchant_location_spec.rb +90 -0
  39. data/spec/models/merchant_locations_response_body_spec.rb +42 -0
  40. data/spec/models/merchants_response_body_spec.rb +42 -0
  41. data/spec/models/transaction_cleanse_and_categorize_request_spec.rb +6 -0
  42. data/spec/models/transaction_cleanse_and_categorize_response_spec.rb +18 -0
  43. data/spec/models/transaction_spec.rb +6 -0
  44. metadata +18 -2
@@ -15,6 +15,25 @@ module Atrium
15
15
  def initialize(api_client = ApiClient.default)
16
16
  @api_client = api_client
17
17
  end
18
+ # List merchant locations
19
+ # Returns a list of all the merchant locations associated with a merchant, including physical location, latitude, longitude, etc.
20
+ # @param merchant_guid The unique identifier for a `merchant`.
21
+ # @param [Hash] opts the optional parameters
22
+ # @return [MerchantLocationsResponseBody]
23
+ def list_merchant_locations(merchant_guid, opts = {})
24
+ data, _status_code, _headers = list_merchant_locations_with_http_info(merchant_guid, opts)
25
+ data
26
+ end
27
+
28
+ # List merchants
29
+ # Returns a list of merchnants.
30
+ # @param [Hash] opts the optional parameters
31
+ # @return [MerchantsResponseBody]
32
+ def list_merchants(opts = {})
33
+ data, _status_code, _headers = list_merchants_with_http_info(opts)
34
+ data
35
+ end
36
+
18
37
  # Read merchant
19
38
  # Returns information about a particular merchant, such as a logo, name, and website.
20
39
  # @param merchant_guid The unique identifier for a `merchant`.
@@ -25,9 +44,99 @@ module Atrium
25
44
  data
26
45
  end
27
46
 
47
+ # Read merchant location
48
+ # Retuns a specific location associated with a merchant, including physical location, latitude, longitude, etc.
49
+ # @param merchant_guid The unique identifier for a `merchant`.
50
+ # @param merchant_location_guid The unique identifier for a `merchant_location`.
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [MerchantLocationResponseBody]
53
+ def read_merchant_location(merchant_guid, merchant_location_guid, opts = {})
54
+ data, _status_code, _headers = read_merchant_location_with_http_info(merchant_guid, merchant_location_guid, opts)
55
+ data
56
+ end
57
+
28
58
 
29
59
  private
30
60
 
61
+ # List merchant locations
62
+ # Returns a list of all the merchant locations associated with a merchant, including physical location, latitude, longitude, etc.
63
+ # @param merchant_guid The unique identifier for a `merchant`.
64
+ # @param [Hash] opts the optional parameters
65
+ # @return [Array<(MerchantLocationsResponseBody, Fixnum, Hash)>] MerchantLocationsResponseBody data, response status code and response headers
66
+ def list_merchant_locations_with_http_info(merchant_guid, opts = {})
67
+ if @api_client.config.debugging
68
+ @api_client.config.logger.debug 'Calling API: MerchantsApi.list_merchant_locations ...'
69
+ end
70
+ # verify the required parameter 'merchant_guid' is set
71
+ if @api_client.config.client_side_validation && merchant_guid.nil?
72
+ fail ArgumentError, "Missing the required parameter 'merchant_guid' when calling MerchantsApi.list_merchant_locations"
73
+ end
74
+ # resource path
75
+ local_var_path = '/merchants/{merchant_guid}/merchant_locations'.sub('{' + 'merchant_guid' + '}', merchant_guid.to_s)
76
+
77
+ # query parameters
78
+ query_params = {}
79
+
80
+ # header parameters
81
+ header_params = {}
82
+ # HTTP header 'Accept' (if needed)
83
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.atrium.v1+json'])
84
+
85
+ # form parameters
86
+ form_params = {}
87
+
88
+ # http body (model)
89
+ post_body = nil
90
+ auth_names = ['apiKey', 'clientID']
91
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
92
+ :header_params => header_params,
93
+ :query_params => query_params,
94
+ :form_params => form_params,
95
+ :body => post_body,
96
+ :auth_names => auth_names,
97
+ :return_type => 'MerchantLocationsResponseBody')
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug "API called: MerchantsApi#list_merchant_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
100
+ end
101
+ return data, status_code, headers
102
+ end
103
+ # List merchants
104
+ # Returns a list of merchnants.
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [Array<(MerchantsResponseBody, Fixnum, Hash)>] MerchantsResponseBody data, response status code and response headers
107
+ def list_merchants_with_http_info(opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: MerchantsApi.list_merchants ...'
110
+ end
111
+ # resource path
112
+ local_var_path = '/merchants'
113
+
114
+ # query parameters
115
+ query_params = {}
116
+
117
+ # header parameters
118
+ header_params = {}
119
+ # HTTP header 'Accept' (if needed)
120
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.atrium.v1+json'])
121
+
122
+ # form parameters
123
+ form_params = {}
124
+
125
+ # http body (model)
126
+ post_body = nil
127
+ auth_names = ['apiKey', 'clientID']
128
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
129
+ :header_params => header_params,
130
+ :query_params => query_params,
131
+ :form_params => form_params,
132
+ :body => post_body,
133
+ :auth_names => auth_names,
134
+ :return_type => 'MerchantsResponseBody')
135
+ if @api_client.config.debugging
136
+ @api_client.config.logger.debug "API called: MerchantsApi#list_merchants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
137
+ end
138
+ return data, status_code, headers
139
+ end
31
140
  # Read merchant
32
141
  # Returns information about a particular merchant, such as a logo, name, and website.
33
142
  # @param merchant_guid The unique identifier for a &#x60;merchant&#x60;.
@@ -70,5 +179,52 @@ module Atrium
70
179
  end
71
180
  return data, status_code, headers
72
181
  end
182
+ # Read merchant location
183
+ # Retuns a specific location associated with a merchant, including physical location, latitude, longitude, etc.
184
+ # @param merchant_guid The unique identifier for a &#x60;merchant&#x60;.
185
+ # @param merchant_location_guid The unique identifier for a &#x60;merchant_location&#x60;.
186
+ # @param [Hash] opts the optional parameters
187
+ # @return [Array<(MerchantLocationResponseBody, Fixnum, Hash)>] MerchantLocationResponseBody data, response status code and response headers
188
+ def read_merchant_location_with_http_info(merchant_guid, merchant_location_guid, opts = {})
189
+ if @api_client.config.debugging
190
+ @api_client.config.logger.debug 'Calling API: MerchantsApi.read_merchant_location ...'
191
+ end
192
+ # verify the required parameter 'merchant_guid' is set
193
+ if @api_client.config.client_side_validation && merchant_guid.nil?
194
+ fail ArgumentError, "Missing the required parameter 'merchant_guid' when calling MerchantsApi.read_merchant_location"
195
+ end
196
+ # verify the required parameter 'merchant_location_guid' is set
197
+ if @api_client.config.client_side_validation && merchant_location_guid.nil?
198
+ fail ArgumentError, "Missing the required parameter 'merchant_location_guid' when calling MerchantsApi.read_merchant_location"
199
+ end
200
+ # resource path
201
+ local_var_path = '/merchants/{merchant_guid}/merchant_locations/{merchant_location_guid}'.sub('{' + 'merchant_guid' + '}', merchant_guid.to_s).sub('{' + 'merchant_location_guid' + '}', merchant_location_guid.to_s)
202
+
203
+ # query parameters
204
+ query_params = {}
205
+
206
+ # header parameters
207
+ header_params = {}
208
+ # HTTP header 'Accept' (if needed)
209
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.atrium.v1+json'])
210
+
211
+ # form parameters
212
+ form_params = {}
213
+
214
+ # http body (model)
215
+ post_body = nil
216
+ auth_names = ['apiKey', 'clientID']
217
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
218
+ :header_params => header_params,
219
+ :query_params => query_params,
220
+ :form_params => form_params,
221
+ :body => post_body,
222
+ :auth_names => auth_names,
223
+ :return_type => 'MerchantLocationResponseBody')
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug "API called: MerchantsApi#read_merchant_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
226
+ end
227
+ return data, status_code, headers
228
+ end
73
229
  end
74
230
  end
@@ -14,10 +14,14 @@ module Atrium
14
14
 
15
15
  attr_accessor :account_number
16
16
 
17
+ attr_accessor :institution_number
18
+
17
19
  attr_accessor :member_guid
18
20
 
19
21
  attr_accessor :routing_number
20
22
 
23
+ attr_accessor :transit_number
24
+
21
25
  attr_accessor :user_guid
22
26
 
23
27
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -25,8 +29,10 @@ module Atrium
25
29
  {
26
30
  :'account_guid' => :'account_guid',
27
31
  :'account_number' => :'account_number',
32
+ :'institution_number' => :'institution_number',
28
33
  :'member_guid' => :'member_guid',
29
34
  :'routing_number' => :'routing_number',
35
+ :'transit_number' => :'transit_number',
30
36
  :'user_guid' => :'user_guid'
31
37
  }
32
38
  end
@@ -36,8 +42,10 @@ module Atrium
36
42
  {
37
43
  :'account_guid' => :'String',
38
44
  :'account_number' => :'String',
45
+ :'institution_number' => :'String',
39
46
  :'member_guid' => :'String',
40
47
  :'routing_number' => :'String',
48
+ :'transit_number' => :'String',
41
49
  :'user_guid' => :'String'
42
50
  }
43
51
  end
@@ -58,6 +66,10 @@ module Atrium
58
66
  self.account_number = attributes[:'account_number']
59
67
  end
60
68
 
69
+ if attributes.has_key?(:'institution_number')
70
+ self.institution_number = attributes[:'institution_number']
71
+ end
72
+
61
73
  if attributes.has_key?(:'member_guid')
62
74
  self.member_guid = attributes[:'member_guid']
63
75
  end
@@ -66,6 +78,10 @@ module Atrium
66
78
  self.routing_number = attributes[:'routing_number']
67
79
  end
68
80
 
81
+ if attributes.has_key?(:'transit_number')
82
+ self.transit_number = attributes[:'transit_number']
83
+ end
84
+
69
85
  if attributes.has_key?(:'user_guid')
70
86
  self.user_guid = attributes[:'user_guid']
71
87
  end
@@ -91,8 +107,10 @@ module Atrium
91
107
  self.class == o.class &&
92
108
  account_guid == o.account_guid &&
93
109
  account_number == o.account_number &&
110
+ institution_number == o.institution_number &&
94
111
  member_guid == o.member_guid &&
95
112
  routing_number == o.routing_number &&
113
+ transit_number == o.transit_number &&
96
114
  user_guid == o.user_guid
97
115
  end
98
116
 
@@ -105,7 +123,7 @@ module Atrium
105
123
  # Calculates hash code according to all attributes.
106
124
  # @return [Fixnum] Hash code
107
125
  def hash
108
- [account_guid, account_number, member_guid, routing_number, user_guid].hash
126
+ [account_guid, account_number, institution_number, member_guid, routing_number, transit_number, user_guid].hash
109
127
  end
110
128
 
111
129
  # Builds the object from hash
@@ -22,6 +22,8 @@ module Atrium
22
22
 
23
23
  attr_accessor :ui_message_version
24
24
 
25
+ attr_accessor :ui_message_webview_url_scheme
26
+
25
27
  attr_accessor :update_credentials
26
28
 
27
29
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -33,6 +35,7 @@ module Atrium
33
35
  :'disable_institution_search' => :'disable_institution_search',
34
36
  :'mode' => :'mode',
35
37
  :'ui_message_version' => :'ui_message_version',
38
+ :'ui_message_webview_url_scheme' => :'ui_message_webview_url_scheme',
36
39
  :'update_credentials' => :'update_credentials'
37
40
  }
38
41
  end
@@ -46,6 +49,7 @@ module Atrium
46
49
  :'disable_institution_search' => :'BOOLEAN',
47
50
  :'mode' => :'String',
48
51
  :'ui_message_version' => :'Float',
52
+ :'ui_message_webview_url_scheme' => :'String',
49
53
  :'update_credentials' => :'BOOLEAN'
50
54
  }
51
55
  end
@@ -82,6 +86,10 @@ module Atrium
82
86
  self.ui_message_version = attributes[:'ui_message_version']
83
87
  end
84
88
 
89
+ if attributes.has_key?(:'ui_message_webview_url_scheme')
90
+ self.ui_message_webview_url_scheme = attributes[:'ui_message_webview_url_scheme']
91
+ end
92
+
85
93
  if attributes.has_key?(:'update_credentials')
86
94
  self.update_credentials = attributes[:'update_credentials']
87
95
  end
@@ -111,6 +119,7 @@ module Atrium
111
119
  disable_institution_search == o.disable_institution_search &&
112
120
  mode == o.mode &&
113
121
  ui_message_version == o.ui_message_version &&
122
+ ui_message_webview_url_scheme == o.ui_message_webview_url_scheme &&
114
123
  update_credentials == o.update_credentials
115
124
  end
116
125
 
@@ -123,7 +132,7 @@ module Atrium
123
132
  # Calculates hash code according to all attributes.
124
133
  # @return [Fixnum] Hash code
125
134
  def hash
126
- [is_mobile_webview, current_institution_code, current_member_guid, disable_institution_search, mode, ui_message_version, update_credentials].hash
135
+ [is_mobile_webview, current_institution_code, current_member_guid, disable_institution_search, mode, ui_message_version, ui_message_webview_url_scheme, update_credentials].hash
127
136
  end
128
137
 
129
138
  # Builds the object from hash
@@ -26,6 +26,8 @@ module Atrium
26
26
 
27
27
  attr_accessor :name
28
28
 
29
+ attr_accessor :oauth_window_uri
30
+
29
31
  attr_accessor :status
30
32
 
31
33
  attr_accessor :successfully_aggregated_at
@@ -43,6 +45,7 @@ module Atrium
43
45
  :'is_being_aggregated' => :'is_being_aggregated',
44
46
  :'metadata' => :'metadata',
45
47
  :'name' => :'name',
48
+ :'oauth_window_uri' => :'oauth_window_uri',
46
49
  :'status' => :'status',
47
50
  :'successfully_aggregated_at' => :'successfully_aggregated_at',
48
51
  :'user_guid' => :'user_guid'
@@ -60,6 +63,7 @@ module Atrium
60
63
  :'is_being_aggregated' => :'BOOLEAN',
61
64
  :'metadata' => :'String',
62
65
  :'name' => :'String',
66
+ :'oauth_window_uri' => :'String',
63
67
  :'status' => :'String',
64
68
  :'successfully_aggregated_at' => :'String',
65
69
  :'user_guid' => :'String'
@@ -106,6 +110,10 @@ module Atrium
106
110
  self.name = attributes[:'name']
107
111
  end
108
112
 
113
+ if attributes.has_key?(:'oauth_window_uri')
114
+ self.oauth_window_uri = attributes[:'oauth_window_uri']
115
+ end
116
+
109
117
  if attributes.has_key?(:'status')
110
118
  self.status = attributes[:'status']
111
119
  end
@@ -145,6 +153,7 @@ module Atrium
145
153
  is_being_aggregated == o.is_being_aggregated &&
146
154
  metadata == o.metadata &&
147
155
  name == o.name &&
156
+ oauth_window_uri == o.oauth_window_uri &&
148
157
  status == o.status &&
149
158
  successfully_aggregated_at == o.successfully_aggregated_at &&
150
159
  user_guid == o.user_guid
@@ -159,7 +168,7 @@ module Atrium
159
168
  # Calculates hash code according to all attributes.
160
169
  # @return [Fixnum] Hash code
161
170
  def hash
162
- [aggregated_at, connection_status, guid, identifier, institution_code, is_being_aggregated, metadata, name, status, successfully_aggregated_at, user_guid].hash
171
+ [aggregated_at, connection_status, guid, identifier, institution_code, is_being_aggregated, metadata, name, oauth_window_uri, status, successfully_aggregated_at, user_guid].hash
163
172
  end
164
173
 
165
174
  # Builds the object from hash
@@ -14,20 +14,29 @@ module Atrium
14
14
 
15
15
  attr_accessor :identifier
16
16
 
17
+ attr_accessor :is_oauth
18
+
17
19
  attr_accessor :institution_code
18
20
 
19
21
  attr_accessor :metadata
20
22
 
23
+ attr_accessor :referral_source
24
+
21
25
  attr_accessor :skip_aggregation
22
26
 
27
+ attr_accessor :ui_message_webview_url_scheme
28
+
23
29
  # Attribute mapping from ruby-style variable name to JSON key.
24
30
  def self.attribute_map
25
31
  {
26
32
  :'credentials' => :'credentials',
27
33
  :'identifier' => :'identifier',
34
+ :'is_oauth' => :'is_oauth',
28
35
  :'institution_code' => :'institution_code',
29
36
  :'metadata' => :'metadata',
30
- :'skip_aggregation' => :'skip_aggregation'
37
+ :'referral_source' => :'referral_source',
38
+ :'skip_aggregation' => :'skip_aggregation',
39
+ :'ui_message_webview_url_scheme' => :'ui_message_webview_url_scheme'
31
40
  }
32
41
  end
33
42
 
@@ -36,9 +45,12 @@ module Atrium
36
45
  {
37
46
  :'credentials' => :'Array<CredentialRequest>',
38
47
  :'identifier' => :'String',
48
+ :'is_oauth' => :'BOOLEAN',
39
49
  :'institution_code' => :'String',
40
50
  :'metadata' => :'String',
41
- :'skip_aggregation' => :'BOOLEAN'
51
+ :'referral_source' => :'String',
52
+ :'skip_aggregation' => :'BOOLEAN',
53
+ :'ui_message_webview_url_scheme' => :'String'
42
54
  }
43
55
  end
44
56
 
@@ -60,6 +72,10 @@ module Atrium
60
72
  self.identifier = attributes[:'identifier']
61
73
  end
62
74
 
75
+ if attributes.has_key?(:'is_oauth')
76
+ self.is_oauth = attributes[:'is_oauth']
77
+ end
78
+
63
79
  if attributes.has_key?(:'institution_code')
64
80
  self.institution_code = attributes[:'institution_code']
65
81
  end
@@ -68,19 +84,23 @@ module Atrium
68
84
  self.metadata = attributes[:'metadata']
69
85
  end
70
86
 
87
+ if attributes.has_key?(:'referral_source')
88
+ self.referral_source = attributes[:'referral_source']
89
+ end
90
+
71
91
  if attributes.has_key?(:'skip_aggregation')
72
92
  self.skip_aggregation = attributes[:'skip_aggregation']
73
93
  end
94
+
95
+ if attributes.has_key?(:'ui_message_webview_url_scheme')
96
+ self.ui_message_webview_url_scheme = attributes[:'ui_message_webview_url_scheme']
97
+ end
74
98
  end
75
99
 
76
100
  # Show invalid properties with the reasons. Usually used together with valid?
77
101
  # @return Array for valid properties with the reasons
78
102
  def list_invalid_properties
79
103
  invalid_properties = Array.new
80
- if @credentials.nil?
81
- invalid_properties.push('invalid value for "credentials", credentials cannot be nil.')
82
- end
83
-
84
104
  if @institution_code.nil?
85
105
  invalid_properties.push('invalid value for "institution_code", institution_code cannot be nil.')
86
106
  end
@@ -91,7 +111,6 @@ module Atrium
91
111
  # Check to see if the all the properties in the model are valid
92
112
  # @return true if the model is valid
93
113
  def valid?
94
- return false if @credentials.nil?
95
114
  return false if @institution_code.nil?
96
115
  true
97
116
  end
@@ -103,9 +122,12 @@ module Atrium
103
122
  self.class == o.class &&
104
123
  credentials == o.credentials &&
105
124
  identifier == o.identifier &&
125
+ is_oauth == o.is_oauth &&
106
126
  institution_code == o.institution_code &&
107
127
  metadata == o.metadata &&
108
- skip_aggregation == o.skip_aggregation
128
+ referral_source == o.referral_source &&
129
+ skip_aggregation == o.skip_aggregation &&
130
+ ui_message_webview_url_scheme == o.ui_message_webview_url_scheme
109
131
  end
110
132
 
111
133
  # @see the `==` method
@@ -117,7 +139,7 @@ module Atrium
117
139
  # Calculates hash code according to all attributes.
118
140
  # @return [Fixnum] Hash code
119
141
  def hash
120
- [credentials, identifier, institution_code, metadata, skip_aggregation].hash
142
+ [credentials, identifier, is_oauth, institution_code, metadata, referral_source, skip_aggregation, ui_message_webview_url_scheme].hash
121
143
  end
122
144
 
123
145
  # Builds the object from hash