mx-platform-ruby 0.15.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1593,6 +1593,81 @@ module MxPlatformRuby
1593
1593
  return data, status_code, headers
1594
1594
  end
1595
1595
 
1596
+ # Download a Tax Document PDF
1597
+ # Use this endpoint to download a PDF version of the specified tax document. The endpoint URL is the base URL appended with the uri of the tax_document.
1598
+ # @param tax_document_guid [String] The unique id for a `tax_document`.
1599
+ # @param member_guid [String] The unique id for a `member`.
1600
+ # @param user_guid [String] The unique id for a `user`.
1601
+ # @param [Hash] opts the optional parameters
1602
+ # @return [File]
1603
+ def download_tax_document(tax_document_guid, member_guid, user_guid, opts = {})
1604
+ data, _status_code, _headers = download_tax_document_with_http_info(tax_document_guid, member_guid, user_guid, opts)
1605
+ data
1606
+ end
1607
+
1608
+ # Download a Tax Document PDF
1609
+ # Use this endpoint to download a PDF version of the specified tax document. The endpoint URL is the base URL appended with the uri of the tax_document.
1610
+ # @param tax_document_guid [String] The unique id for a `tax_document`.
1611
+ # @param member_guid [String] The unique id for a `member`.
1612
+ # @param user_guid [String] The unique id for a `user`.
1613
+ # @param [Hash] opts the optional parameters
1614
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
1615
+ def download_tax_document_with_http_info(tax_document_guid, member_guid, user_guid, opts = {})
1616
+ if @api_client.config.debugging
1617
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.download_tax_document ...'
1618
+ end
1619
+ # verify the required parameter 'tax_document_guid' is set
1620
+ if @api_client.config.client_side_validation && tax_document_guid.nil?
1621
+ fail ArgumentError, "Missing the required parameter 'tax_document_guid' when calling MxPlatformApi.download_tax_document"
1622
+ end
1623
+ # verify the required parameter 'member_guid' is set
1624
+ if @api_client.config.client_side_validation && member_guid.nil?
1625
+ fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.download_tax_document"
1626
+ end
1627
+ # verify the required parameter 'user_guid' is set
1628
+ if @api_client.config.client_side_validation && user_guid.nil?
1629
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.download_tax_document"
1630
+ end
1631
+ # resource path
1632
+ local_var_path = '/users/{user_guid}/members/{member_guid}/tax_documents/{tax_document_guid}.pdf'.sub('{' + 'tax_document_guid' + '}', CGI.escape(tax_document_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
1633
+
1634
+ # query parameters
1635
+ query_params = opts[:query_params] || {}
1636
+
1637
+ # header parameters
1638
+ header_params = opts[:header_params] || {}
1639
+ # HTTP header 'Accept' (if needed)
1640
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+pdf'])
1641
+
1642
+ # form parameters
1643
+ form_params = opts[:form_params] || {}
1644
+
1645
+ # http body (model)
1646
+ post_body = opts[:debug_body]
1647
+
1648
+ # return_type
1649
+ return_type = opts[:debug_return_type] || 'File'
1650
+
1651
+ # auth_names
1652
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
1653
+
1654
+ new_options = opts.merge(
1655
+ :operation => :"MxPlatformApi.download_tax_document",
1656
+ :header_params => header_params,
1657
+ :query_params => query_params,
1658
+ :form_params => form_params,
1659
+ :body => post_body,
1660
+ :auth_names => auth_names,
1661
+ :return_type => return_type
1662
+ )
1663
+
1664
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1665
+ if @api_client.config.debugging
1666
+ @api_client.config.logger.debug "API called: MxPlatformApi#download_tax_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1667
+ end
1668
+ return data, status_code, headers
1669
+ end
1670
+
1596
1671
  # Enhance transactions
1597
1672
  # Use this endpoint to categorize, cleanse, and classify transactions. These transactions are not persisted or stored on the MX platform.
1598
1673
  # @param enhance_transactions_request_body [EnhanceTransactionsRequestBody] Transaction object to be enhanced
@@ -1799,6 +1874,75 @@ module MxPlatformRuby
1799
1874
  return data, status_code, headers
1800
1875
  end
1801
1876
 
1877
+ # Fetch Tax Documents
1878
+ # Use this endpoint to fetch (aggregate) the tax documents associated with the specified member. This request **does not** return the latest tax documents. It just starts the document aggregation process and returns the initial state of the process. You must interact with the newly aggregated data using the other document endpoints in this reference. This request may also trigger multi-factor authentication which requires end-user input and a specific process for answering authentication challenges.
1879
+ # @param member_guid [String] The unique id for a &#x60;member&#x60;.
1880
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
1881
+ # @param [Hash] opts the optional parameters
1882
+ # @return [MemberResponseBody]
1883
+ def fetch_tax_documents(member_guid, user_guid, opts = {})
1884
+ data, _status_code, _headers = fetch_tax_documents_with_http_info(member_guid, user_guid, opts)
1885
+ data
1886
+ end
1887
+
1888
+ # Fetch Tax Documents
1889
+ # Use this endpoint to fetch (aggregate) the tax documents associated with the specified member. This request **does not** return the latest tax documents. It just starts the document aggregation process and returns the initial state of the process. You must interact with the newly aggregated data using the other document endpoints in this reference. This request may also trigger multi-factor authentication which requires end-user input and a specific process for answering authentication challenges.
1890
+ # @param member_guid [String] The unique id for a &#x60;member&#x60;.
1891
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
1892
+ # @param [Hash] opts the optional parameters
1893
+ # @return [Array<(MemberResponseBody, Integer, Hash)>] MemberResponseBody data, response status code and response headers
1894
+ def fetch_tax_documents_with_http_info(member_guid, user_guid, opts = {})
1895
+ if @api_client.config.debugging
1896
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.fetch_tax_documents ...'
1897
+ end
1898
+ # verify the required parameter 'member_guid' is set
1899
+ if @api_client.config.client_side_validation && member_guid.nil?
1900
+ fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.fetch_tax_documents"
1901
+ end
1902
+ # verify the required parameter 'user_guid' is set
1903
+ if @api_client.config.client_side_validation && user_guid.nil?
1904
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.fetch_tax_documents"
1905
+ end
1906
+ # resource path
1907
+ local_var_path = '/users/{user_guid}/members/{member_guid}/fetch_tax_documents'.sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
1908
+
1909
+ # query parameters
1910
+ query_params = opts[:query_params] || {}
1911
+
1912
+ # header parameters
1913
+ header_params = opts[:header_params] || {}
1914
+ # HTTP header 'Accept' (if needed)
1915
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
1916
+
1917
+ # form parameters
1918
+ form_params = opts[:form_params] || {}
1919
+
1920
+ # http body (model)
1921
+ post_body = opts[:debug_body]
1922
+
1923
+ # return_type
1924
+ return_type = opts[:debug_return_type] || 'MemberResponseBody'
1925
+
1926
+ # auth_names
1927
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
1928
+
1929
+ new_options = opts.merge(
1930
+ :operation => :"MxPlatformApi.fetch_tax_documents",
1931
+ :header_params => header_params,
1932
+ :query_params => query_params,
1933
+ :form_params => form_params,
1934
+ :body => post_body,
1935
+ :auth_names => auth_names,
1936
+ :return_type => return_type
1937
+ )
1938
+
1939
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1940
+ if @api_client.config.debugging
1941
+ @api_client.config.logger.debug "API called: MxPlatformApi#fetch_tax_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1942
+ end
1943
+ return data, status_code, headers
1944
+ end
1945
+
1802
1946
  # Identify member
1803
1947
  # The identify endpoint begins an identification process for an already-existing member.
1804
1948
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
@@ -3602,6 +3746,81 @@ module MxPlatformRuby
3602
3746
  return data, status_code, headers
3603
3747
  end
3604
3748
 
3749
+ # List Tax Documents
3750
+ # Use this endpoint to get a paginated list of tax documents.
3751
+ # @param member_guid [String] The unique id for a &#x60;member&#x60;.
3752
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
3753
+ # @param [Hash] opts the optional parameters
3754
+ # @option opts [Integer] :page Specify current page.
3755
+ # @option opts [Integer] :records_per_page Specify records per page.
3756
+ # @return [TaxDocumentsResponseBody]
3757
+ def list_tax_documents(member_guid, user_guid, opts = {})
3758
+ data, _status_code, _headers = list_tax_documents_with_http_info(member_guid, user_guid, opts)
3759
+ data
3760
+ end
3761
+
3762
+ # List Tax Documents
3763
+ # Use this endpoint to get a paginated list of tax documents.
3764
+ # @param member_guid [String] The unique id for a &#x60;member&#x60;.
3765
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
3766
+ # @param [Hash] opts the optional parameters
3767
+ # @option opts [Integer] :page Specify current page.
3768
+ # @option opts [Integer] :records_per_page Specify records per page.
3769
+ # @return [Array<(TaxDocumentsResponseBody, Integer, Hash)>] TaxDocumentsResponseBody data, response status code and response headers
3770
+ def list_tax_documents_with_http_info(member_guid, user_guid, opts = {})
3771
+ if @api_client.config.debugging
3772
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.list_tax_documents ...'
3773
+ end
3774
+ # verify the required parameter 'member_guid' is set
3775
+ if @api_client.config.client_side_validation && member_guid.nil?
3776
+ fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.list_tax_documents"
3777
+ end
3778
+ # verify the required parameter 'user_guid' is set
3779
+ if @api_client.config.client_side_validation && user_guid.nil?
3780
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.list_tax_documents"
3781
+ end
3782
+ # resource path
3783
+ local_var_path = '/users/{user_guid}/members/{member_guid}/tax_documents'.sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
3784
+
3785
+ # query parameters
3786
+ query_params = opts[:query_params] || {}
3787
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
3788
+ query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil?
3789
+
3790
+ # header parameters
3791
+ header_params = opts[:header_params] || {}
3792
+ # HTTP header 'Accept' (if needed)
3793
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
3794
+
3795
+ # form parameters
3796
+ form_params = opts[:form_params] || {}
3797
+
3798
+ # http body (model)
3799
+ post_body = opts[:debug_body]
3800
+
3801
+ # return_type
3802
+ return_type = opts[:debug_return_type] || 'TaxDocumentsResponseBody'
3803
+
3804
+ # auth_names
3805
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
3806
+
3807
+ new_options = opts.merge(
3808
+ :operation => :"MxPlatformApi.list_tax_documents",
3809
+ :header_params => header_params,
3810
+ :query_params => query_params,
3811
+ :form_params => form_params,
3812
+ :body => post_body,
3813
+ :auth_names => auth_names,
3814
+ :return_type => return_type
3815
+ )
3816
+
3817
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3818
+ if @api_client.config.debugging
3819
+ @api_client.config.logger.debug "API called: MxPlatformApi#list_tax_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3820
+ end
3821
+ return data, status_code, headers
3822
+ end
3823
+
3605
3824
  # List transaction rules
3606
3825
  # Use this endpoint to read the attributes of all existing transaction rules belonging to the user.
3607
3826
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
@@ -5243,6 +5462,81 @@ module MxPlatformRuby
5243
5462
  return data, status_code, headers
5244
5463
  end
5245
5464
 
5465
+ # Read a Tax Document
5466
+ # Use this endpoint to read the attributes of the specified tax document.
5467
+ # @param tax_document_guid [String] The unique id for a &#x60;tax_document&#x60;.
5468
+ # @param member_guid [String] The unique id for a &#x60;member&#x60;.
5469
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5470
+ # @param [Hash] opts the optional parameters
5471
+ # @return [TaxDocumentResponseBody]
5472
+ def read_tax_document(tax_document_guid, member_guid, user_guid, opts = {})
5473
+ data, _status_code, _headers = read_tax_document_with_http_info(tax_document_guid, member_guid, user_guid, opts)
5474
+ data
5475
+ end
5476
+
5477
+ # Read a Tax Document
5478
+ # Use this endpoint to read the attributes of the specified tax document.
5479
+ # @param tax_document_guid [String] The unique id for a &#x60;tax_document&#x60;.
5480
+ # @param member_guid [String] The unique id for a &#x60;member&#x60;.
5481
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5482
+ # @param [Hash] opts the optional parameters
5483
+ # @return [Array<(TaxDocumentResponseBody, Integer, Hash)>] TaxDocumentResponseBody data, response status code and response headers
5484
+ def read_tax_document_with_http_info(tax_document_guid, member_guid, user_guid, opts = {})
5485
+ if @api_client.config.debugging
5486
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.read_tax_document ...'
5487
+ end
5488
+ # verify the required parameter 'tax_document_guid' is set
5489
+ if @api_client.config.client_side_validation && tax_document_guid.nil?
5490
+ fail ArgumentError, "Missing the required parameter 'tax_document_guid' when calling MxPlatformApi.read_tax_document"
5491
+ end
5492
+ # verify the required parameter 'member_guid' is set
5493
+ if @api_client.config.client_side_validation && member_guid.nil?
5494
+ fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.read_tax_document"
5495
+ end
5496
+ # verify the required parameter 'user_guid' is set
5497
+ if @api_client.config.client_side_validation && user_guid.nil?
5498
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.read_tax_document"
5499
+ end
5500
+ # resource path
5501
+ local_var_path = '/users/{user_guid}/members/{member_guid}/tax_documents/{tax_document_guid}'.sub('{' + 'tax_document_guid' + '}', CGI.escape(tax_document_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
5502
+
5503
+ # query parameters
5504
+ query_params = opts[:query_params] || {}
5505
+
5506
+ # header parameters
5507
+ header_params = opts[:header_params] || {}
5508
+ # HTTP header 'Accept' (if needed)
5509
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
5510
+
5511
+ # form parameters
5512
+ form_params = opts[:form_params] || {}
5513
+
5514
+ # http body (model)
5515
+ post_body = opts[:debug_body]
5516
+
5517
+ # return_type
5518
+ return_type = opts[:debug_return_type] || 'TaxDocumentResponseBody'
5519
+
5520
+ # auth_names
5521
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
5522
+
5523
+ new_options = opts.merge(
5524
+ :operation => :"MxPlatformApi.read_tax_document",
5525
+ :header_params => header_params,
5526
+ :query_params => query_params,
5527
+ :form_params => form_params,
5528
+ :body => post_body,
5529
+ :auth_names => auth_names,
5530
+ :return_type => return_type
5531
+ )
5532
+
5533
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
5534
+ if @api_client.config.debugging
5535
+ @api_client.config.logger.debug "API called: MxPlatformApi#read_tax_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5536
+ end
5537
+ return data, status_code, headers
5538
+ end
5539
+
5246
5540
  # Read transaction
5247
5541
  # Requests to this endpoint will return the attributes of the specified `transaction`.
5248
5542
  # @param transaction_guid [String] The unique id for a &#x60;transaction&#x60;.
@@ -17,6 +17,10 @@ module MxPlatformRuby
17
17
  class InstitutionResponse
18
18
  attr_accessor :code
19
19
 
20
+ attr_accessor :forgot_password_url
21
+
22
+ attr_accessor :forgot_username_url
23
+
20
24
  attr_accessor :instructional_text
21
25
 
22
26
  attr_accessor :medium_logo_url
@@ -35,12 +39,16 @@ module MxPlatformRuby
35
39
 
36
40
  attr_accessor :supports_transaction_history
37
41
 
42
+ attr_accessor :trouble_signing_in_url
43
+
38
44
  attr_accessor :url
39
45
 
40
46
  # Attribute mapping from ruby-style variable name to JSON key.
41
47
  def self.attribute_map
42
48
  {
43
49
  :'code' => :'code',
50
+ :'forgot_password_url' => :'forgot_password_url',
51
+ :'forgot_username_url' => :'forgot_username_url',
44
52
  :'instructional_text' => :'instructional_text',
45
53
  :'medium_logo_url' => :'medium_logo_url',
46
54
  :'name' => :'name',
@@ -50,6 +58,7 @@ module MxPlatformRuby
50
58
  :'supports_account_verification' => :'supports_account_verification',
51
59
  :'supports_oauth' => :'supports_oauth',
52
60
  :'supports_transaction_history' => :'supports_transaction_history',
61
+ :'trouble_signing_in_url' => :'trouble_signing_in_url',
53
62
  :'url' => :'url'
54
63
  }
55
64
  end
@@ -63,6 +72,8 @@ module MxPlatformRuby
63
72
  def self.openapi_types
64
73
  {
65
74
  :'code' => :'String',
75
+ :'forgot_password_url' => :'String',
76
+ :'forgot_username_url' => :'String',
66
77
  :'instructional_text' => :'String',
67
78
  :'medium_logo_url' => :'String',
68
79
  :'name' => :'String',
@@ -72,6 +83,7 @@ module MxPlatformRuby
72
83
  :'supports_account_verification' => :'Boolean',
73
84
  :'supports_oauth' => :'Boolean',
74
85
  :'supports_transaction_history' => :'Boolean',
86
+ :'trouble_signing_in_url' => :'String',
75
87
  :'url' => :'String'
76
88
  }
77
89
  end
@@ -80,6 +92,8 @@ module MxPlatformRuby
80
92
  def self.openapi_nullable
81
93
  Set.new([
82
94
  :'code',
95
+ :'forgot_password_url',
96
+ :'forgot_username_url',
83
97
  :'instructional_text',
84
98
  :'medium_logo_url',
85
99
  :'name',
@@ -89,6 +103,7 @@ module MxPlatformRuby
89
103
  :'supports_account_verification',
90
104
  :'supports_oauth',
91
105
  :'supports_transaction_history',
106
+ :'trouble_signing_in_url',
92
107
  :'url'
93
108
  ])
94
109
  end
@@ -112,6 +127,14 @@ module MxPlatformRuby
112
127
  self.code = attributes[:'code']
113
128
  end
114
129
 
130
+ if attributes.key?(:'forgot_password_url')
131
+ self.forgot_password_url = attributes[:'forgot_password_url']
132
+ end
133
+
134
+ if attributes.key?(:'forgot_username_url')
135
+ self.forgot_username_url = attributes[:'forgot_username_url']
136
+ end
137
+
115
138
  if attributes.key?(:'instructional_text')
116
139
  self.instructional_text = attributes[:'instructional_text']
117
140
  end
@@ -148,6 +171,10 @@ module MxPlatformRuby
148
171
  self.supports_transaction_history = attributes[:'supports_transaction_history']
149
172
  end
150
173
 
174
+ if attributes.key?(:'trouble_signing_in_url')
175
+ self.trouble_signing_in_url = attributes[:'trouble_signing_in_url']
176
+ end
177
+
151
178
  if attributes.key?(:'url')
152
179
  self.url = attributes[:'url']
153
180
  end
@@ -172,6 +199,8 @@ module MxPlatformRuby
172
199
  return true if self.equal?(o)
173
200
  self.class == o.class &&
174
201
  code == o.code &&
202
+ forgot_password_url == o.forgot_password_url &&
203
+ forgot_username_url == o.forgot_username_url &&
175
204
  instructional_text == o.instructional_text &&
176
205
  medium_logo_url == o.medium_logo_url &&
177
206
  name == o.name &&
@@ -181,6 +210,7 @@ module MxPlatformRuby
181
210
  supports_account_verification == o.supports_account_verification &&
182
211
  supports_oauth == o.supports_oauth &&
183
212
  supports_transaction_history == o.supports_transaction_history &&
213
+ trouble_signing_in_url == o.trouble_signing_in_url &&
184
214
  url == o.url
185
215
  end
186
216
 
@@ -193,7 +223,7 @@ module MxPlatformRuby
193
223
  # Calculates hash code according to all attributes.
194
224
  # @return [Integer] Hash code
195
225
  def hash
196
- [code, instructional_text, medium_logo_url, name, small_logo_url, supports_account_identification, supports_account_statement, supports_account_verification, supports_oauth, supports_transaction_history, url].hash
226
+ [code, forgot_password_url, forgot_username_url, instructional_text, medium_logo_url, name, small_logo_url, supports_account_identification, supports_account_statement, supports_account_verification, supports_oauth, supports_transaction_history, trouble_signing_in_url, url].hash
197
227
  end
198
228
 
199
229
  # Builds the object from hash