Skip to content

Commit dae6994

Browse files
Merge pull request #62 from mxenabled/openapi-generator-0.9.3
Generated version 0.9.3
2 parents a39ca4e + d23b506 commit dae6994

File tree

6 files changed

+34
-41
lines changed

6 files changed

+34
-41
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Please follow the [installation](#installation) procedure and then run the follo
3838
```ruby
3939
require 'mx-platform-ruby'
4040

41-
MxPlatformRuby.configure do |config|
41+
::MxPlatformRuby.configure do |config|
4242
# Configure with your Client ID/API Key from https://dashboard.mx.com
4343
config.username = 'Your Client ID'
4444
config.password = 'Your API Key'
@@ -51,16 +51,16 @@ api_client = ::MxPlatformRuby::ApiClient.new
5151
api_client.default_headers['Accept'] = 'application/vnd.mx.api.v1+json'
5252
mx_platform_api = ::MxPlatformRuby::MxPlatformApi.new(api_client)
5353

54-
user_create_request_body = MxPlatformRuby::UserCreateRequestBody.new(
55-
user: MxPlatformRuby::UserCreateRequest.new(
56-
metadata: "Creating a user!"
54+
request_body = ::MxPlatformRuby::UserCreateRequestBody.new(
55+
user: ::MxPlatformRuby::UserCreateRequest.new(
56+
metadata: 'Creating a user!'
5757
)
5858
)
5959

6060
begin
61-
result = mx_platform_api.create_user(user_create_request_body)
62-
p result
63-
rescue MxPlatformRuby::ApiError => e
61+
response = mx_platform_api.create_user(request_body)
62+
p response
63+
rescue ::MxPlatformRuby::ApiError => e
6464
puts "Error when calling MxPlatformApi->create_user: #{e}"
6565
end
6666
```

docs/MxPlatformApi.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4368,7 +4368,7 @@ end
43684368

43694369
## read_default_category
43704370

4371-
> <CategoryResponseBody> read_default_category(category_guid, user_guid)
4371+
> <CategoryResponseBody> read_default_category(category_guid)
43724372
43734373
Read a default category
43744374

@@ -4388,11 +4388,10 @@ end
43884388

43894389
api_instance = MxPlatformRuby::MxPlatformApi.new
43904390
category_guid = 'CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874' # String | The unique id for a `category`.
4391-
user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for a `user`.
43924391

43934392
begin
43944393
# Read a default category
4395-
result = api_instance.read_default_category(category_guid, user_guid)
4394+
result = api_instance.read_default_category(category_guid)
43964395
p result
43974396
rescue MxPlatformRuby::ApiError => e
43984397
puts "Error when calling MxPlatformApi->read_default_category: #{e}"
@@ -4403,12 +4402,12 @@ end
44034402

44044403
This returns an Array which contains the response data, status code and headers.
44054404

4406-
> <Array(<CategoryResponseBody>, Integer, Hash)> read_default_category_with_http_info(category_guid, user_guid)
4405+
> <Array(<CategoryResponseBody>, Integer, Hash)> read_default_category_with_http_info(category_guid)
44074406
44084407
```ruby
44094408
begin
44104409
# Read a default category
4411-
data, status_code, headers = api_instance.read_default_category_with_http_info(category_guid, user_guid)
4410+
data, status_code, headers = api_instance.read_default_category_with_http_info(category_guid)
44124411
p status_code # => 2xx
44134412
p headers # => { ... }
44144413
p data # => <CategoryResponseBody>
@@ -4422,7 +4421,6 @@ end
44224421
| Name | Type | Description | Notes |
44234422
| ---- | ---- | ----------- | ----- |
44244423
| **category_guid** | **String** | The unique id for a &#x60;category&#x60;. | |
4425-
| **user_guid** | **String** | The unique id for a &#x60;user&#x60;. | |
44264424

44274425
### Return type
44284426

@@ -5518,7 +5516,7 @@ end
55185516

55195517
## request_connect_widget_url
55205518

5521-
> <ConnectWidgetResponseBody> request_connect_widget_url(user_guid, opts)
5519+
> <ConnectWidgetResponseBody> request_connect_widget_url(user_guid, connect_widget_request_body)
55225520
55235521
Request connect widget url
55245522

@@ -5538,13 +5536,11 @@ end
55385536

55395537
api_instance = MxPlatformRuby::MxPlatformApi.new
55405538
user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for a `user`.
5541-
opts = {
5542-
connect_widget_request_body: MxPlatformRuby::ConnectWidgetRequestBody.new # ConnectWidgetRequestBody | Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
5543-
}
5539+
connect_widget_request_body = MxPlatformRuby::ConnectWidgetRequestBody.new # ConnectWidgetRequestBody | Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
55445540

55455541
begin
55465542
# Request connect widget url
5547-
result = api_instance.request_connect_widget_url(user_guid, opts)
5543+
result = api_instance.request_connect_widget_url(user_guid, connect_widget_request_body)
55485544
p result
55495545
rescue MxPlatformRuby::ApiError => e
55505546
puts "Error when calling MxPlatformApi->request_connect_widget_url: #{e}"
@@ -5555,12 +5551,12 @@ end
55555551

55565552
This returns an Array which contains the response data, status code and headers.
55575553

5558-
> <Array(<ConnectWidgetResponseBody>, Integer, Hash)> request_connect_widget_url_with_http_info(user_guid, opts)
5554+
> <Array(<ConnectWidgetResponseBody>, Integer, Hash)> request_connect_widget_url_with_http_info(user_guid, connect_widget_request_body)
55595555
55605556
```ruby
55615557
begin
55625558
# Request connect widget url
5563-
data, status_code, headers = api_instance.request_connect_widget_url_with_http_info(user_guid, opts)
5559+
data, status_code, headers = api_instance.request_connect_widget_url_with_http_info(user_guid, connect_widget_request_body)
55645560
p status_code # => 2xx
55655561
p headers # => { ... }
55665562
p data # => <ConnectWidgetResponseBody>
@@ -5574,7 +5570,7 @@ end
55745570
| Name | Type | Description | Notes |
55755571
| ---- | ---- | ----------- | ----- |
55765572
| **user_guid** | **String** | The unique id for a &#x60;user&#x60;. | |
5577-
| **connect_widget_request_body** | [**ConnectWidgetRequestBody**](ConnectWidgetRequestBody.md) | Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) | [optional] |
5573+
| **connect_widget_request_body** | [**ConnectWidgetRequestBody**](ConnectWidgetRequestBody.md) | Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) | |
55785574

55795575
### Return type
55805576

lib/mx-platform-ruby/api/mx_platform_api.rb

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4098,34 +4098,28 @@ def read_category_with_http_info(category_guid, user_guid, opts = {})
40984098
# Read a default category
40994099
# Use this endpoint to read the attributes of a default category.
41004100
# @param category_guid [String] The unique id for a &#x60;category&#x60;.
4101-
# @param user_guid [String] The unique id for a &#x60;user&#x60;.
41024101
# @param [Hash] opts the optional parameters
41034102
# @return [CategoryResponseBody]
4104-
def read_default_category(category_guid, user_guid, opts = {})
4105-
data, _status_code, _headers = read_default_category_with_http_info(category_guid, user_guid, opts)
4103+
def read_default_category(category_guid, opts = {})
4104+
data, _status_code, _headers = read_default_category_with_http_info(category_guid, opts)
41064105
data
41074106
end
41084107

41094108
# Read a default category
41104109
# Use this endpoint to read the attributes of a default category.
41114110
# @param category_guid [String] The unique id for a &#x60;category&#x60;.
4112-
# @param user_guid [String] The unique id for a &#x60;user&#x60;.
41134111
# @param [Hash] opts the optional parameters
41144112
# @return [Array<(CategoryResponseBody, Integer, Hash)>] CategoryResponseBody data, response status code and response headers
4115-
def read_default_category_with_http_info(category_guid, user_guid, opts = {})
4113+
def read_default_category_with_http_info(category_guid, opts = {})
41164114
if @api_client.config.debugging
41174115
@api_client.config.logger.debug 'Calling API: MxPlatformApi.read_default_category ...'
41184116
end
41194117
# verify the required parameter 'category_guid' is set
41204118
if @api_client.config.client_side_validation && category_guid.nil?
41214119
fail ArgumentError, "Missing the required parameter 'category_guid' when calling MxPlatformApi.read_default_category"
41224120
end
4123-
# verify the required parameter 'user_guid' is set
4124-
if @api_client.config.client_side_validation && user_guid.nil?
4125-
fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.read_default_category"
4126-
end
41274121
# resource path
4128-
local_var_path = '/categories/{category_guid}'.sub('{' + 'category_guid' + '}', CGI.escape(category_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
4122+
local_var_path = '/categories/{category_guid}'.sub('{' + 'category_guid' + '}', CGI.escape(category_guid.to_s))
41294123

41304124
# query parameters
41314125
query_params = opts[:query_params] || {}
@@ -5196,28 +5190,32 @@ def read_user_with_http_info(user_guid, opts = {})
51965190
# Request connect widget url
51975191
# This endpoint will return a URL for an embeddable version of MX Connect.
51985192
# @param user_guid [String] The unique id for a &#x60;user&#x60;.
5193+
# @param connect_widget_request_body [ConnectWidgetRequestBody] Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
51995194
# @param [Hash] opts the optional parameters
5200-
# @option opts [ConnectWidgetRequestBody] :connect_widget_request_body Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
52015195
# @return [ConnectWidgetResponseBody]
5202-
def request_connect_widget_url(user_guid, opts = {})
5203-
data, _status_code, _headers = request_connect_widget_url_with_http_info(user_guid, opts)
5196+
def request_connect_widget_url(user_guid, connect_widget_request_body, opts = {})
5197+
data, _status_code, _headers = request_connect_widget_url_with_http_info(user_guid, connect_widget_request_body, opts)
52045198
data
52055199
end
52065200

52075201
# Request connect widget url
52085202
# This endpoint will return a URL for an embeddable version of MX Connect.
52095203
# @param user_guid [String] The unique id for a &#x60;user&#x60;.
5204+
# @param connect_widget_request_body [ConnectWidgetRequestBody] Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
52105205
# @param [Hash] opts the optional parameters
5211-
# @option opts [ConnectWidgetRequestBody] :connect_widget_request_body Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
52125206
# @return [Array<(ConnectWidgetResponseBody, Integer, Hash)>] ConnectWidgetResponseBody data, response status code and response headers
5213-
def request_connect_widget_url_with_http_info(user_guid, opts = {})
5207+
def request_connect_widget_url_with_http_info(user_guid, connect_widget_request_body, opts = {})
52145208
if @api_client.config.debugging
52155209
@api_client.config.logger.debug 'Calling API: MxPlatformApi.request_connect_widget_url ...'
52165210
end
52175211
# verify the required parameter 'user_guid' is set
52185212
if @api_client.config.client_side_validation && user_guid.nil?
52195213
fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.request_connect_widget_url"
52205214
end
5215+
# verify the required parameter 'connect_widget_request_body' is set
5216+
if @api_client.config.client_side_validation && connect_widget_request_body.nil?
5217+
fail ArgumentError, "Missing the required parameter 'connect_widget_request_body' when calling MxPlatformApi.request_connect_widget_url"
5218+
end
52215219
# resource path
52225220
local_var_path = '/users/{user_guid}/connect_widget_url'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
52235221

@@ -5238,7 +5236,7 @@ def request_connect_widget_url_with_http_info(user_guid, opts = {})
52385236
form_params = opts[:form_params] || {}
52395237

52405238
# http body (model)
5241-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'connect_widget_request_body'])
5239+
post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_widget_request_body)
52425240

52435241
# return_type
52445242
return_type = opts[:debug_return_type] || 'ConnectWidgetResponseBody'

lib/mx-platform-ruby/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
=end
1212

1313
module MxPlatformRuby
14-
VERSION = '0.9.2'
14+
VERSION = '0.9.3'
1515
end

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ gemHomepage: https://github.com/mxenabled/mx-platform-ruby
66
gemLicense: MIT
77
gemName: mx-platform-ruby
88
gemRequiredRubyVersion: ">= 2.6"
9-
gemVersion: 0.9.2
9+
gemVersion: 0.9.3
1010
library: faraday
1111
moduleName: MxPlatformRuby

spec/api/mx_platform_api_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,6 @@
835835
# Read a default category
836836
# Use this endpoint to read the attributes of a default category.
837837
# @param category_guid The unique id for a &#x60;category&#x60;.
838-
# @param user_guid The unique id for a &#x60;user&#x60;.
839838
# @param [Hash] opts the optional parameters
840839
# @return [CategoryResponseBody]
841840
describe 'read_default_category test' do
@@ -1042,8 +1041,8 @@
10421041
# Request connect widget url
10431042
# This endpoint will return a URL for an embeddable version of MX Connect.
10441043
# @param user_guid The unique id for a &#x60;user&#x60;.
1044+
# @param connect_widget_request_body Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
10451045
# @param [Hash] opts the optional parameters
1046-
# @option opts [ConnectWidgetRequestBody] :connect_widget_request_body Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
10471046
# @return [ConnectWidgetResponseBody]
10481047
describe 'request_connect_widget_url test' do
10491048
it 'should work' do

0 commit comments

Comments
 (0)