From 0fb74e5a7ee18e6c21e1f49ada49da3780e99447 Mon Sep 17 00:00:00 2001 From: devexperience Date: Wed, 19 Apr 2023 16:59:40 +0000 Subject: [PATCH] Generated version 0.15.0 This pull request was automatically generated by a GitHub Action to generate version 0.15.0 of this library. --- .openapi-generator/FILES | 24 ++ docs/AuthorizationCodeRequest.md | 18 ++ docs/AuthorizationCodeRequestBody.md | 18 ++ docs/AuthorizationCodeResponse.md | 18 ++ docs/AuthorizationCodeResponseBody.md | 18 ++ docs/MxPlatformApi.md | 142 +++++++++++ ...aymentProcessorAuthorizationCodeRequest.md | 22 ++ ...ntProcessorAuthorizationCodeRequestBody.md | 18 ++ ...ymentProcessorAuthorizationCodeResponse.md | 18 ++ ...tProcessorAuthorizationCodeResponseBody.md | 18 ++ lib/mx-platform-ruby.rb | 8 + lib/mx-platform-ruby/api/mx_platform_api.rb | 136 ++++++++++ .../models/authorization_code_request.rb | 219 ++++++++++++++++ .../models/authorization_code_request_body.rb | 218 ++++++++++++++++ .../models/authorization_code_response.rb | 219 ++++++++++++++++ .../authorization_code_response_body.rb | 220 ++++++++++++++++ ...nt_processor_authorization_code_request.rb | 239 ++++++++++++++++++ ...ocessor_authorization_code_request_body.rb | 218 ++++++++++++++++ ...t_processor_authorization_code_response.rb | 219 ++++++++++++++++ ...cessor_authorization_code_response_body.rb | 218 ++++++++++++++++ lib/mx-platform-ruby/version.rb | 2 +- openapi/config.yml | 2 +- spec/api/mx_platform_api_spec.rb | 24 ++ .../authorization_code_request_body_spec.rb | 34 +++ .../models/authorization_code_request_spec.rb | 34 +++ .../authorization_code_response_body_spec.rb | 34 +++ .../authorization_code_response_spec.rb | 34 +++ ...or_authorization_code_request_body_spec.rb | 34 +++ ...ocessor_authorization_code_request_spec.rb | 46 ++++ ...r_authorization_code_response_body_spec.rb | 34 +++ ...cessor_authorization_code_response_spec.rb | 34 +++ 31 files changed, 2538 insertions(+), 2 deletions(-) create mode 100644 docs/AuthorizationCodeRequest.md create mode 100644 docs/AuthorizationCodeRequestBody.md create mode 100644 docs/AuthorizationCodeResponse.md create mode 100644 docs/AuthorizationCodeResponseBody.md create mode 100644 docs/PaymentProcessorAuthorizationCodeRequest.md create mode 100644 docs/PaymentProcessorAuthorizationCodeRequestBody.md create mode 100644 docs/PaymentProcessorAuthorizationCodeResponse.md create mode 100644 docs/PaymentProcessorAuthorizationCodeResponseBody.md create mode 100644 lib/mx-platform-ruby/models/authorization_code_request.rb create mode 100644 lib/mx-platform-ruby/models/authorization_code_request_body.rb create mode 100644 lib/mx-platform-ruby/models/authorization_code_response.rb create mode 100644 lib/mx-platform-ruby/models/authorization_code_response_body.rb create mode 100644 lib/mx-platform-ruby/models/payment_processor_authorization_code_request.rb create mode 100644 lib/mx-platform-ruby/models/payment_processor_authorization_code_request_body.rb create mode 100644 lib/mx-platform-ruby/models/payment_processor_authorization_code_response.rb create mode 100644 lib/mx-platform-ruby/models/payment_processor_authorization_code_response_body.rb create mode 100644 spec/models/authorization_code_request_body_spec.rb create mode 100644 spec/models/authorization_code_request_spec.rb create mode 100644 spec/models/authorization_code_response_body_spec.rb create mode 100644 spec/models/authorization_code_response_spec.rb create mode 100644 spec/models/payment_processor_authorization_code_request_body_spec.rb create mode 100644 spec/models/payment_processor_authorization_code_request_spec.rb create mode 100644 spec/models/payment_processor_authorization_code_response_body_spec.rb create mode 100644 spec/models/payment_processor_authorization_code_response_spec.rb diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 40eda67..343b74d 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -12,6 +12,10 @@ docs/AccountResponseBody.md docs/AccountUpdateRequest.md docs/AccountUpdateRequestBody.md docs/AccountsResponseBody.md +docs/AuthorizationCodeRequest.md +docs/AuthorizationCodeRequestBody.md +docs/AuthorizationCodeResponse.md +docs/AuthorizationCodeResponseBody.md docs/CategoriesResponseBody.md docs/CategoryCreateRequest.md docs/CategoryCreateRequestBody.md @@ -72,6 +76,10 @@ docs/OAuthWindowResponse.md docs/OAuthWindowResponseBody.md docs/OptionResponse.md docs/PaginationResponse.md +docs/PaymentProcessorAuthorizationCodeRequest.md +docs/PaymentProcessorAuthorizationCodeRequestBody.md +docs/PaymentProcessorAuthorizationCodeResponse.md +docs/PaymentProcessorAuthorizationCodeResponseBody.md docs/StatementResponse.md docs/StatementResponseBody.md docs/StatementsResponseBody.md @@ -126,6 +134,10 @@ lib/mx-platform-ruby/models/account_response_body.rb lib/mx-platform-ruby/models/account_update_request.rb lib/mx-platform-ruby/models/account_update_request_body.rb lib/mx-platform-ruby/models/accounts_response_body.rb +lib/mx-platform-ruby/models/authorization_code_request.rb +lib/mx-platform-ruby/models/authorization_code_request_body.rb +lib/mx-platform-ruby/models/authorization_code_response.rb +lib/mx-platform-ruby/models/authorization_code_response_body.rb lib/mx-platform-ruby/models/categories_response_body.rb lib/mx-platform-ruby/models/category_create_request.rb lib/mx-platform-ruby/models/category_create_request_body.rb @@ -185,6 +197,10 @@ lib/mx-platform-ruby/models/o_auth_window_response.rb lib/mx-platform-ruby/models/o_auth_window_response_body.rb lib/mx-platform-ruby/models/option_response.rb lib/mx-platform-ruby/models/pagination_response.rb +lib/mx-platform-ruby/models/payment_processor_authorization_code_request.rb +lib/mx-platform-ruby/models/payment_processor_authorization_code_request_body.rb +lib/mx-platform-ruby/models/payment_processor_authorization_code_response.rb +lib/mx-platform-ruby/models/payment_processor_authorization_code_response_body.rb lib/mx-platform-ruby/models/statement_response.rb lib/mx-platform-ruby/models/statement_response_body.rb lib/mx-platform-ruby/models/statements_response_body.rb @@ -239,6 +255,10 @@ spec/models/account_response_spec.rb spec/models/account_update_request_body_spec.rb spec/models/account_update_request_spec.rb spec/models/accounts_response_body_spec.rb +spec/models/authorization_code_request_body_spec.rb +spec/models/authorization_code_request_spec.rb +spec/models/authorization_code_response_body_spec.rb +spec/models/authorization_code_response_spec.rb spec/models/categories_response_body_spec.rb spec/models/category_create_request_body_spec.rb spec/models/category_create_request_spec.rb @@ -298,6 +318,10 @@ spec/models/o_auth_window_response_body_spec.rb spec/models/o_auth_window_response_spec.rb spec/models/option_response_spec.rb spec/models/pagination_response_spec.rb +spec/models/payment_processor_authorization_code_request_body_spec.rb +spec/models/payment_processor_authorization_code_request_spec.rb +spec/models/payment_processor_authorization_code_response_body_spec.rb +spec/models/payment_processor_authorization_code_response_spec.rb spec/models/statement_response_body_spec.rb spec/models/statement_response_spec.rb spec/models/statements_response_body_spec.rb diff --git a/docs/AuthorizationCodeRequest.md b/docs/AuthorizationCodeRequest.md new file mode 100644 index 0000000..48429f4 --- /dev/null +++ b/docs/AuthorizationCodeRequest.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::AuthorizationCodeRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **scope** | **String** | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::AuthorizationCodeRequest.new( + scope: user-guid:USR-101ad774-288b-44ed-ad16-da87d522ea20 member-guid:MBR-54feffb9-8474-47bd-8442-de003910113a account-guid:ACT-32a64160-582a-4f00-ab34-5f49cc35ed35 read-protected +) +``` + diff --git a/docs/AuthorizationCodeRequestBody.md b/docs/AuthorizationCodeRequestBody.md new file mode 100644 index 0000000..4d74e4b --- /dev/null +++ b/docs/AuthorizationCodeRequestBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::AuthorizationCodeRequestBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization_code** | [**AuthorizationCodeRequest**](AuthorizationCodeRequest.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::AuthorizationCodeRequestBody.new( + authorization_code: null +) +``` + diff --git a/docs/AuthorizationCodeResponse.md b/docs/AuthorizationCodeResponse.md new file mode 100644 index 0000000..13a54a6 --- /dev/null +++ b/docs/AuthorizationCodeResponse.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::AuthorizationCodeResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **code** | **String** | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::AuthorizationCodeResponse.new( + code: 9nN-9D8_4Z3WYazx7-zXfmqsD3jwgL_2W927Sb3otI +) +``` + diff --git a/docs/AuthorizationCodeResponseBody.md b/docs/AuthorizationCodeResponseBody.md new file mode 100644 index 0000000..bae8c82 --- /dev/null +++ b/docs/AuthorizationCodeResponseBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::AuthorizationCodeResponseBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization_code** | [**Array<AuthorizationCodeResponse>**](AuthorizationCodeResponse.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::AuthorizationCodeResponseBody.new( + authorization_code: null +) +``` + diff --git a/docs/MxPlatformApi.md b/docs/MxPlatformApi.md index 624bba1..01985ab 100644 --- a/docs/MxPlatformApi.md +++ b/docs/MxPlatformApi.md @@ -24,6 +24,7 @@ All URIs are relative to *https://api.mx.com* | [**delete_tagging**](MxPlatformApi.md#delete_tagging) | **DELETE** /users/{user_guid}/taggings/{tagging_guid} | Delete tagging | | [**delete_transaction_rule**](MxPlatformApi.md#delete_transaction_rule) | **DELETE** /users/{user_guid}/transaction_rules/{transaction_rule_guid} | Delete transaction rule | | [**delete_user**](MxPlatformApi.md#delete_user) | **DELETE** /users/{user_guid} | Delete user | +| [**deprecated_request_payment_processor_authorization_code**](MxPlatformApi.md#deprecated_request_payment_processor_authorization_code) | **POST** /payment_processor_authorization_code | (Deprecated) Request an authorization code. | | [**download_statement_pdf**](MxPlatformApi.md#download_statement_pdf) | **GET** /users/{user_guid}/members/{member_guid}/statements/{statement_guid}.pdf | Download statement pdf | | [**enhance_transactions**](MxPlatformApi.md#enhance_transactions) | **POST** /transactions/enhance | Enhance transactions | | [**extend_history**](MxPlatformApi.md#extend_history) | **POST** /users/{user_guid}/members/{member_guid}/extend_history | Extend history | @@ -79,6 +80,7 @@ All URIs are relative to *https://api.mx.com* | [**read_transaction**](MxPlatformApi.md#read_transaction) | **GET** /users/{user_guid}/transactions/{transaction_guid} | Read transaction | | [**read_transaction_rule**](MxPlatformApi.md#read_transaction_rule) | **GET** /users/{user_guid}/transaction_rules/{transaction_rule_guid} | Read transaction rule | | [**read_user**](MxPlatformApi.md#read_user) | **GET** /users/{user_guid} | Read user | +| [**request_authorization_code**](MxPlatformApi.md#request_authorization_code) | **POST** /authorization_code | Request an authorization code. | | [**request_connect_widget_url**](MxPlatformApi.md#request_connect_widget_url) | **POST** /users/{user_guid}/connect_widget_url | Request connect widget url | | [**request_o_auth_window_uri**](MxPlatformApi.md#request_o_auth_window_uri) | **GET** /users/{user_guid}/members/{member_guid}/oauth_window_uri | Request oauth window uri | | [**request_widget_url**](MxPlatformApi.md#request_widget_url) | **POST** /users/{user_guid}/widget_urls | Request widget url | @@ -1536,6 +1538,76 @@ nil (empty response body) - **Accept**: Not defined +## deprecated_request_payment_processor_authorization_code + +> deprecated_request_payment_processor_authorization_code(payment_processor_authorization_code_request_body) + +(Deprecated) Request an authorization code. + +(This endpoint is deprecated. Clients should use `/authorization_code`.) Clients use this endpoint to request an authorization_code according to a user, member, and account specified in the request body. Clients then pass this code to processors. Processor access is scoped only to the user/member/account specified in this request. Before requesting an authorization_code, clients must have verified the specified member. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::MxPlatformApi.new +payment_processor_authorization_code_request_body = MxPlatformRuby::PaymentProcessorAuthorizationCodeRequestBody.new # PaymentProcessorAuthorizationCodeRequestBody | The scope for the authorization code. + +begin + # (Deprecated) Request an authorization code. + result = api_instance.deprecated_request_payment_processor_authorization_code(payment_processor_authorization_code_request_body) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->deprecated_request_payment_processor_authorization_code: #{e}" +end +``` + +#### Using the deprecated_request_payment_processor_authorization_code_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> deprecated_request_payment_processor_authorization_code_with_http_info(payment_processor_authorization_code_request_body) + +```ruby +begin + # (Deprecated) Request an authorization code. + data, status_code, headers = api_instance.deprecated_request_payment_processor_authorization_code_with_http_info(payment_processor_authorization_code_request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->deprecated_request_payment_processor_authorization_code_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **payment_processor_authorization_code_request_body** | [**PaymentProcessorAuthorizationCodeRequestBody**](PaymentProcessorAuthorizationCodeRequestBody.md) | The scope for the authorization code. | | + +### Return type + +[**PaymentProcessorAuthorizationCodeResponseBody**](PaymentProcessorAuthorizationCodeResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/vnd.mx.api.v1+json + + ## download_statement_pdf > File download_statement_pdf(member_guid, statement_guid, user_guid) @@ -5686,6 +5758,76 @@ end - **Accept**: application/vnd.mx.api.v1+json +## request_authorization_code + +> request_authorization_code(authorization_code_request_body) + +Request an authorization code. + +Clients use this endpoint to request an authorization code according to the parameters specified in the scope. Clients then pass this code to processors. Processor access is scoped only to the GUIDs and features specified in this request. Before requesting an authorization code which includes a member in the scope, clients must have verified that member. + +### Examples + +```ruby +require 'time' +require 'mx-platform-ruby' +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization: basicAuth + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MxPlatformRuby::MxPlatformApi.new +authorization_code_request_body = MxPlatformRuby::AuthorizationCodeRequestBody.new # AuthorizationCodeRequestBody | The scope for the authorization code. + +begin + # Request an authorization code. + result = api_instance.request_authorization_code(authorization_code_request_body) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->request_authorization_code: #{e}" +end +``` + +#### Using the request_authorization_code_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> request_authorization_code_with_http_info(authorization_code_request_body) + +```ruby +begin + # Request an authorization code. + data, status_code, headers = api_instance.request_authorization_code_with_http_info(authorization_code_request_body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->request_authorization_code_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization_code_request_body** | [**AuthorizationCodeRequestBody**](AuthorizationCodeRequestBody.md) | The scope for the authorization code. | | + +### Return type + +[**AuthorizationCodeResponseBody**](AuthorizationCodeResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/vnd.mx.api.v1+json + + ## request_connect_widget_url > request_connect_widget_url(user_guid, connect_widget_request_body) diff --git a/docs/PaymentProcessorAuthorizationCodeRequest.md b/docs/PaymentProcessorAuthorizationCodeRequest.md new file mode 100644 index 0000000..cc7c3ca --- /dev/null +++ b/docs/PaymentProcessorAuthorizationCodeRequest.md @@ -0,0 +1,22 @@ +# MxPlatformRuby::PaymentProcessorAuthorizationCodeRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **account_guid** | **String** | | [optional] | +| **member_guid** | **String** | | [optional] | +| **user_guid** | **String** | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::PaymentProcessorAuthorizationCodeRequest.new( + account_guid: ACT-4d4c0068-33bc-4d06-bbd6-cd270fd0135c, + member_guid: MBR-46637bc5-942d-4229-9370-ddd858bf805e, + user_guid: USR-f12b1f5a-7cbe-467c-aa30-0a10d0b2f549 +) +``` + diff --git a/docs/PaymentProcessorAuthorizationCodeRequestBody.md b/docs/PaymentProcessorAuthorizationCodeRequestBody.md new file mode 100644 index 0000000..f2c2945 --- /dev/null +++ b/docs/PaymentProcessorAuthorizationCodeRequestBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::PaymentProcessorAuthorizationCodeRequestBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **payment_processor_authorization_code** | [**PaymentProcessorAuthorizationCodeRequest**](PaymentProcessorAuthorizationCodeRequest.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::PaymentProcessorAuthorizationCodeRequestBody.new( + payment_processor_authorization_code: null +) +``` + diff --git a/docs/PaymentProcessorAuthorizationCodeResponse.md b/docs/PaymentProcessorAuthorizationCodeResponse.md new file mode 100644 index 0000000..07cd660 --- /dev/null +++ b/docs/PaymentProcessorAuthorizationCodeResponse.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::PaymentProcessorAuthorizationCodeResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization_code** | **String** | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::PaymentProcessorAuthorizationCodeResponse.new( + authorization_code: 9nN-9D8_4Z3WYazx7-zXfmqsD3jwgL_2W927Sb3otI +) +``` + diff --git a/docs/PaymentProcessorAuthorizationCodeResponseBody.md b/docs/PaymentProcessorAuthorizationCodeResponseBody.md new file mode 100644 index 0000000..da2653d --- /dev/null +++ b/docs/PaymentProcessorAuthorizationCodeResponseBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::PaymentProcessorAuthorizationCodeResponseBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **payment_processor_authorization_code** | [**PaymentProcessorAuthorizationCodeResponse**](PaymentProcessorAuthorizationCodeResponse.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::PaymentProcessorAuthorizationCodeResponseBody.new( + payment_processor_authorization_code: null +) +``` + diff --git a/lib/mx-platform-ruby.rb b/lib/mx-platform-ruby.rb index f538f29..2c0fe9b 100644 --- a/lib/mx-platform-ruby.rb +++ b/lib/mx-platform-ruby.rb @@ -26,6 +26,10 @@ require 'mx-platform-ruby/models/account_update_request' require 'mx-platform-ruby/models/account_update_request_body' require 'mx-platform-ruby/models/accounts_response_body' +require 'mx-platform-ruby/models/authorization_code_request' +require 'mx-platform-ruby/models/authorization_code_request_body' +require 'mx-platform-ruby/models/authorization_code_response' +require 'mx-platform-ruby/models/authorization_code_response_body' require 'mx-platform-ruby/models/categories_response_body' require 'mx-platform-ruby/models/category_create_request' require 'mx-platform-ruby/models/category_create_request_body' @@ -85,6 +89,10 @@ require 'mx-platform-ruby/models/o_auth_window_response_body' require 'mx-platform-ruby/models/option_response' require 'mx-platform-ruby/models/pagination_response' +require 'mx-platform-ruby/models/payment_processor_authorization_code_request' +require 'mx-platform-ruby/models/payment_processor_authorization_code_request_body' +require 'mx-platform-ruby/models/payment_processor_authorization_code_response' +require 'mx-platform-ruby/models/payment_processor_authorization_code_response_body' require 'mx-platform-ruby/models/statement_response' require 'mx-platform-ruby/models/statement_response_body' require 'mx-platform-ruby/models/statements_response_body' diff --git a/lib/mx-platform-ruby/api/mx_platform_api.rb b/lib/mx-platform-ruby/api/mx_platform_api.rb index b189a8d..63d7cb9 100644 --- a/lib/mx-platform-ruby/api/mx_platform_api.rb +++ b/lib/mx-platform-ruby/api/mx_platform_api.rb @@ -1450,6 +1450,74 @@ def delete_user_with_http_info(user_guid, opts = {}) return data, status_code, headers end + # (Deprecated) Request an authorization code. + # (This endpoint is deprecated. Clients should use `/authorization_code`.) Clients use this endpoint to request an authorization_code according to a user, member, and account specified in the request body. Clients then pass this code to processors. Processor access is scoped only to the user/member/account specified in this request. Before requesting an authorization_code, clients must have verified the specified member. + # @param payment_processor_authorization_code_request_body [PaymentProcessorAuthorizationCodeRequestBody] The scope for the authorization code. + # @param [Hash] opts the optional parameters + # @return [PaymentProcessorAuthorizationCodeResponseBody] + def deprecated_request_payment_processor_authorization_code(payment_processor_authorization_code_request_body, opts = {}) + data, _status_code, _headers = deprecated_request_payment_processor_authorization_code_with_http_info(payment_processor_authorization_code_request_body, opts) + data + end + + # (Deprecated) Request an authorization code. + # (This endpoint is deprecated. Clients should use `/authorization_code`.) Clients use this endpoint to request an authorization_code according to a user, member, and account specified in the request body. Clients then pass this code to processors. Processor access is scoped only to the user/member/account specified in this request. Before requesting an authorization_code, clients must have verified the specified member. + # @param payment_processor_authorization_code_request_body [PaymentProcessorAuthorizationCodeRequestBody] The scope for the authorization code. + # @param [Hash] opts the optional parameters + # @return [Array<(PaymentProcessorAuthorizationCodeResponseBody, Integer, Hash)>] PaymentProcessorAuthorizationCodeResponseBody data, response status code and response headers + def deprecated_request_payment_processor_authorization_code_with_http_info(payment_processor_authorization_code_request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MxPlatformApi.deprecated_request_payment_processor_authorization_code ...' + end + # verify the required parameter 'payment_processor_authorization_code_request_body' is set + if @api_client.config.client_side_validation && payment_processor_authorization_code_request_body.nil? + fail ArgumentError, "Missing the required parameter 'payment_processor_authorization_code_request_body' when calling MxPlatformApi.deprecated_request_payment_processor_authorization_code" + end + # resource path + local_var_path = '/payment_processor_authorization_code' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_processor_authorization_code_request_body) + + # return_type + return_type = opts[:debug_return_type] || 'PaymentProcessorAuthorizationCodeResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"MxPlatformApi.deprecated_request_payment_processor_authorization_code", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: MxPlatformApi#deprecated_request_payment_processor_authorization_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Download statement pdf # Use this endpoint to download a specified statement PDF. # @param member_guid [String] The unique id for a `member`. @@ -5376,6 +5444,74 @@ def read_user_with_http_info(user_guid, opts = {}) return data, status_code, headers end + # Request an authorization code. + # Clients use this endpoint to request an authorization code according to the parameters specified in the scope. Clients then pass this code to processors. Processor access is scoped only to the GUIDs and features specified in this request. Before requesting an authorization code which includes a member in the scope, clients must have verified that member. + # @param authorization_code_request_body [AuthorizationCodeRequestBody] The scope for the authorization code. + # @param [Hash] opts the optional parameters + # @return [AuthorizationCodeResponseBody] + def request_authorization_code(authorization_code_request_body, opts = {}) + data, _status_code, _headers = request_authorization_code_with_http_info(authorization_code_request_body, opts) + data + end + + # Request an authorization code. + # Clients use this endpoint to request an authorization code according to the parameters specified in the scope. Clients then pass this code to processors. Processor access is scoped only to the GUIDs and features specified in this request. Before requesting an authorization code which includes a member in the scope, clients must have verified that member. + # @param authorization_code_request_body [AuthorizationCodeRequestBody] The scope for the authorization code. + # @param [Hash] opts the optional parameters + # @return [Array<(AuthorizationCodeResponseBody, Integer, Hash)>] AuthorizationCodeResponseBody data, response status code and response headers + def request_authorization_code_with_http_info(authorization_code_request_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MxPlatformApi.request_authorization_code ...' + end + # verify the required parameter 'authorization_code_request_body' is set + if @api_client.config.client_side_validation && authorization_code_request_body.nil? + fail ArgumentError, "Missing the required parameter 'authorization_code_request_body' when calling MxPlatformApi.request_authorization_code" + end + # resource path + local_var_path = '/authorization_code' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(authorization_code_request_body) + + # return_type + return_type = opts[:debug_return_type] || 'AuthorizationCodeResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"MxPlatformApi.request_authorization_code", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: MxPlatformApi#request_authorization_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Request connect widget url # This endpoint will return a URL for an embeddable version of MX Connect. # @param user_guid [String] The unique id for a `user`. diff --git a/lib/mx-platform-ruby/models/authorization_code_request.rb b/lib/mx-platform-ruby/models/authorization_code_request.rb new file mode 100644 index 0000000..caa5753 --- /dev/null +++ b/lib/mx-platform-ruby/models/authorization_code_request.rb @@ -0,0 +1,219 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class AuthorizationCodeRequest + attr_accessor :scope + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'scope' => :'scope' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'scope' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'scope' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::AuthorizationCodeRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::AuthorizationCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'scope') + self.scope = attributes[:'scope'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + scope == o.scope + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [scope].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/authorization_code_request_body.rb b/lib/mx-platform-ruby/models/authorization_code_request_body.rb new file mode 100644 index 0000000..78bf63f --- /dev/null +++ b/lib/mx-platform-ruby/models/authorization_code_request_body.rb @@ -0,0 +1,218 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class AuthorizationCodeRequestBody + attr_accessor :authorization_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'authorization_code' => :'authorization_code' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'authorization_code' => :'AuthorizationCodeRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::AuthorizationCodeRequestBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::AuthorizationCodeRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'authorization_code') + self.authorization_code = attributes[:'authorization_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authorization_code == o.authorization_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [authorization_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/authorization_code_response.rb b/lib/mx-platform-ruby/models/authorization_code_response.rb new file mode 100644 index 0000000..1f1b0fb --- /dev/null +++ b/lib/mx-platform-ruby/models/authorization_code_response.rb @@ -0,0 +1,219 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class AuthorizationCodeResponse + attr_accessor :code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::AuthorizationCodeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::AuthorizationCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/authorization_code_response_body.rb b/lib/mx-platform-ruby/models/authorization_code_response_body.rb new file mode 100644 index 0000000..a14f1fc --- /dev/null +++ b/lib/mx-platform-ruby/models/authorization_code_response_body.rb @@ -0,0 +1,220 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class AuthorizationCodeResponseBody + attr_accessor :authorization_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'authorization_code' => :'authorization_code' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'authorization_code' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::AuthorizationCodeResponseBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::AuthorizationCodeResponseBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'authorization_code') + if (value = attributes[:'authorization_code']).is_a?(Array) + self.authorization_code = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authorization_code == o.authorization_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [authorization_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/payment_processor_authorization_code_request.rb b/lib/mx-platform-ruby/models/payment_processor_authorization_code_request.rb new file mode 100644 index 0000000..93d8732 --- /dev/null +++ b/lib/mx-platform-ruby/models/payment_processor_authorization_code_request.rb @@ -0,0 +1,239 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class PaymentProcessorAuthorizationCodeRequest + attr_accessor :account_guid + + attr_accessor :member_guid + + attr_accessor :user_guid + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_guid' => :'account_guid', + :'member_guid' => :'member_guid', + :'user_guid' => :'user_guid' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'account_guid' => :'String', + :'member_guid' => :'String', + :'user_guid' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'account_guid', + :'member_guid', + :'user_guid' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::PaymentProcessorAuthorizationCodeRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::PaymentProcessorAuthorizationCodeRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'account_guid') + self.account_guid = attributes[:'account_guid'] + end + + if attributes.key?(:'member_guid') + self.member_guid = attributes[:'member_guid'] + end + + if attributes.key?(:'user_guid') + self.user_guid = attributes[:'user_guid'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_guid == o.account_guid && + member_guid == o.member_guid && + user_guid == o.user_guid + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [account_guid, member_guid, user_guid].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/payment_processor_authorization_code_request_body.rb b/lib/mx-platform-ruby/models/payment_processor_authorization_code_request_body.rb new file mode 100644 index 0000000..65c1046 --- /dev/null +++ b/lib/mx-platform-ruby/models/payment_processor_authorization_code_request_body.rb @@ -0,0 +1,218 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class PaymentProcessorAuthorizationCodeRequestBody + attr_accessor :payment_processor_authorization_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'payment_processor_authorization_code' => :'payment_processor_authorization_code' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'payment_processor_authorization_code' => :'PaymentProcessorAuthorizationCodeRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::PaymentProcessorAuthorizationCodeRequestBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::PaymentProcessorAuthorizationCodeRequestBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'payment_processor_authorization_code') + self.payment_processor_authorization_code = attributes[:'payment_processor_authorization_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + payment_processor_authorization_code == o.payment_processor_authorization_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [payment_processor_authorization_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/payment_processor_authorization_code_response.rb b/lib/mx-platform-ruby/models/payment_processor_authorization_code_response.rb new file mode 100644 index 0000000..a87d8d0 --- /dev/null +++ b/lib/mx-platform-ruby/models/payment_processor_authorization_code_response.rb @@ -0,0 +1,219 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class PaymentProcessorAuthorizationCodeResponse + attr_accessor :authorization_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'authorization_code' => :'authorization_code' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'authorization_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'authorization_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::PaymentProcessorAuthorizationCodeResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::PaymentProcessorAuthorizationCodeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'authorization_code') + self.authorization_code = attributes[:'authorization_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authorization_code == o.authorization_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [authorization_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/models/payment_processor_authorization_code_response_body.rb b/lib/mx-platform-ruby/models/payment_processor_authorization_code_response_body.rb new file mode 100644 index 0000000..5806536 --- /dev/null +++ b/lib/mx-platform-ruby/models/payment_processor_authorization_code_response_body.rb @@ -0,0 +1,218 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class PaymentProcessorAuthorizationCodeResponseBody + attr_accessor :payment_processor_authorization_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'payment_processor_authorization_code' => :'payment_processor_authorization_code' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'payment_processor_authorization_code' => :'PaymentProcessorAuthorizationCodeResponse' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MxPlatformRuby::PaymentProcessorAuthorizationCodeResponseBody` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MxPlatformRuby::PaymentProcessorAuthorizationCodeResponseBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'payment_processor_authorization_code') + self.payment_processor_authorization_code = attributes[:'payment_processor_authorization_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + payment_processor_authorization_code == o.payment_processor_authorization_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [payment_processor_authorization_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MxPlatformRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mx-platform-ruby/version.rb b/lib/mx-platform-ruby/version.rb index 127e437..25158b7 100644 --- a/lib/mx-platform-ruby/version.rb +++ b/lib/mx-platform-ruby/version.rb @@ -11,5 +11,5 @@ =end module MxPlatformRuby - VERSION = '0.14.1' + VERSION = '0.15.0' end diff --git a/openapi/config.yml b/openapi/config.yml index 1af77cc..0eac06e 100644 --- a/openapi/config.yml +++ b/openapi/config.yml @@ -6,6 +6,6 @@ gemHomepage: https://github.com/mxenabled/mx-platform-ruby gemLicense: MIT gemName: mx-platform-ruby gemRequiredRubyVersion: ">= 2.6" -gemVersion: 0.14.1 +gemVersion: 0.15.0 library: faraday moduleName: MxPlatformRuby diff --git a/spec/api/mx_platform_api_spec.rb b/spec/api/mx_platform_api_spec.rb index 353bc2b..e5bc9ea 100644 --- a/spec/api/mx_platform_api_spec.rb +++ b/spec/api/mx_platform_api_spec.rb @@ -296,6 +296,18 @@ end end + # unit tests for deprecated_request_payment_processor_authorization_code + # (Deprecated) Request an authorization code. + # (This endpoint is deprecated. Clients should use `/authorization_code`.) Clients use this endpoint to request an authorization_code according to a user, member, and account specified in the request body. Clients then pass this code to processors. Processor access is scoped only to the user/member/account specified in this request. Before requesting an authorization_code, clients must have verified the specified member. + # @param payment_processor_authorization_code_request_body The scope for the authorization code. + # @param [Hash] opts the optional parameters + # @return [PaymentProcessorAuthorizationCodeResponseBody] + describe 'deprecated_request_payment_processor_authorization_code test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for download_statement_pdf # Download statement pdf # Use this endpoint to download a specified statement PDF. @@ -1075,6 +1087,18 @@ end end + # unit tests for request_authorization_code + # Request an authorization code. + # Clients use this endpoint to request an authorization code according to the parameters specified in the scope. Clients then pass this code to processors. Processor access is scoped only to the GUIDs and features specified in this request. Before requesting an authorization code which includes a member in the scope, clients must have verified that member. + # @param authorization_code_request_body The scope for the authorization code. + # @param [Hash] opts the optional parameters + # @return [AuthorizationCodeResponseBody] + describe 'request_authorization_code test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for request_connect_widget_url # Request connect widget url # This endpoint will return a URL for an embeddable version of MX Connect. diff --git a/spec/models/authorization_code_request_body_spec.rb b/spec/models/authorization_code_request_body_spec.rb new file mode 100644 index 0000000..bdfe9d2 --- /dev/null +++ b/spec/models/authorization_code_request_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::AuthorizationCodeRequestBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::AuthorizationCodeRequestBody do + let(:instance) { MxPlatformRuby::AuthorizationCodeRequestBody.new } + + describe 'test an instance of AuthorizationCodeRequestBody' do + it 'should create an instance of AuthorizationCodeRequestBody' do + expect(instance).to be_instance_of(MxPlatformRuby::AuthorizationCodeRequestBody) + end + end + describe 'test attribute "authorization_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/authorization_code_request_spec.rb b/spec/models/authorization_code_request_spec.rb new file mode 100644 index 0000000..ab0f30e --- /dev/null +++ b/spec/models/authorization_code_request_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::AuthorizationCodeRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::AuthorizationCodeRequest do + let(:instance) { MxPlatformRuby::AuthorizationCodeRequest.new } + + describe 'test an instance of AuthorizationCodeRequest' do + it 'should create an instance of AuthorizationCodeRequest' do + expect(instance).to be_instance_of(MxPlatformRuby::AuthorizationCodeRequest) + end + end + describe 'test attribute "scope"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/authorization_code_response_body_spec.rb b/spec/models/authorization_code_response_body_spec.rb new file mode 100644 index 0000000..cd9b2e1 --- /dev/null +++ b/spec/models/authorization_code_response_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::AuthorizationCodeResponseBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::AuthorizationCodeResponseBody do + let(:instance) { MxPlatformRuby::AuthorizationCodeResponseBody.new } + + describe 'test an instance of AuthorizationCodeResponseBody' do + it 'should create an instance of AuthorizationCodeResponseBody' do + expect(instance).to be_instance_of(MxPlatformRuby::AuthorizationCodeResponseBody) + end + end + describe 'test attribute "authorization_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/authorization_code_response_spec.rb b/spec/models/authorization_code_response_spec.rb new file mode 100644 index 0000000..d195b2d --- /dev/null +++ b/spec/models/authorization_code_response_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::AuthorizationCodeResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::AuthorizationCodeResponse do + let(:instance) { MxPlatformRuby::AuthorizationCodeResponse.new } + + describe 'test an instance of AuthorizationCodeResponse' do + it 'should create an instance of AuthorizationCodeResponse' do + expect(instance).to be_instance_of(MxPlatformRuby::AuthorizationCodeResponse) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/payment_processor_authorization_code_request_body_spec.rb b/spec/models/payment_processor_authorization_code_request_body_spec.rb new file mode 100644 index 0000000..4e303f4 --- /dev/null +++ b/spec/models/payment_processor_authorization_code_request_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::PaymentProcessorAuthorizationCodeRequestBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::PaymentProcessorAuthorizationCodeRequestBody do + let(:instance) { MxPlatformRuby::PaymentProcessorAuthorizationCodeRequestBody.new } + + describe 'test an instance of PaymentProcessorAuthorizationCodeRequestBody' do + it 'should create an instance of PaymentProcessorAuthorizationCodeRequestBody' do + expect(instance).to be_instance_of(MxPlatformRuby::PaymentProcessorAuthorizationCodeRequestBody) + end + end + describe 'test attribute "payment_processor_authorization_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/payment_processor_authorization_code_request_spec.rb b/spec/models/payment_processor_authorization_code_request_spec.rb new file mode 100644 index 0000000..69f1c88 --- /dev/null +++ b/spec/models/payment_processor_authorization_code_request_spec.rb @@ -0,0 +1,46 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::PaymentProcessorAuthorizationCodeRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::PaymentProcessorAuthorizationCodeRequest do + let(:instance) { MxPlatformRuby::PaymentProcessorAuthorizationCodeRequest.new } + + describe 'test an instance of PaymentProcessorAuthorizationCodeRequest' do + it 'should create an instance of PaymentProcessorAuthorizationCodeRequest' do + expect(instance).to be_instance_of(MxPlatformRuby::PaymentProcessorAuthorizationCodeRequest) + end + end + describe 'test attribute "account_guid"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "member_guid"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_guid"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/payment_processor_authorization_code_response_body_spec.rb b/spec/models/payment_processor_authorization_code_response_body_spec.rb new file mode 100644 index 0000000..4e1aa31 --- /dev/null +++ b/spec/models/payment_processor_authorization_code_response_body_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::PaymentProcessorAuthorizationCodeResponseBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::PaymentProcessorAuthorizationCodeResponseBody do + let(:instance) { MxPlatformRuby::PaymentProcessorAuthorizationCodeResponseBody.new } + + describe 'test an instance of PaymentProcessorAuthorizationCodeResponseBody' do + it 'should create an instance of PaymentProcessorAuthorizationCodeResponseBody' do + expect(instance).to be_instance_of(MxPlatformRuby::PaymentProcessorAuthorizationCodeResponseBody) + end + end + describe 'test attribute "payment_processor_authorization_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/payment_processor_authorization_code_response_spec.rb b/spec/models/payment_processor_authorization_code_response_spec.rb new file mode 100644 index 0000000..b3f7d7f --- /dev/null +++ b/spec/models/payment_processor_authorization_code_response_spec.rb @@ -0,0 +1,34 @@ +=begin +#MX Platform API + +#The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. + +The version of the OpenAPI document: 0.1.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.4.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::PaymentProcessorAuthorizationCodeResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::PaymentProcessorAuthorizationCodeResponse do + let(:instance) { MxPlatformRuby::PaymentProcessorAuthorizationCodeResponse.new } + + describe 'test an instance of PaymentProcessorAuthorizationCodeResponse' do + it 'should create an instance of PaymentProcessorAuthorizationCodeResponse' do + expect(instance).to be_instance_of(MxPlatformRuby::PaymentProcessorAuthorizationCodeResponse) + end + end + describe 'test attribute "authorization_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end