Skip to content

Commit 42bb490

Browse files
Merge pull request #51 from mxenabled/openapi-generator-0.8.4
Generated version 0.8.4
2 parents 189693c + 689bd90 commit 42bb490

5 files changed

Lines changed: 183 additions & 2 deletions

File tree

docs/MxPlatformApi.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ All URIs are relative to *https://api.mx.com*
3737
| [**list_default_categories_by_user**](MxPlatformApi.md#list_default_categories_by_user) | **GET** /users/{user_guid}/categories/default | List default categories by user |
3838
| [**list_favorite_institutions**](MxPlatformApi.md#list_favorite_institutions) | **GET** /institutions/favorites | List favorite institutions |
3939
| [**list_holdings**](MxPlatformApi.md#list_holdings) | **GET** /users/{user_guid}/holdings | List holdings |
40+
| [**list_holdings_by_account**](MxPlatformApi.md#list_holdings_by_account) | **GET** /users/{user_guid}/accounts/{account_guid}/holdings | List holdings by account |
4041
| [**list_holdings_by_member**](MxPlatformApi.md#list_holdings_by_member) | **GET** /users/{user_guid}/members/{member_guid}/holdings | List holdings by member |
4142
| [**list_institution_credentials**](MxPlatformApi.md#list_institution_credentials) | **GET** /institutions/{institution_code}/credentials | List institution credentials |
4243
| [**list_institutions**](MxPlatformApi.md#list_institutions) | **GET** /institutions | List institutions |
@@ -2503,6 +2504,88 @@ end
25032504
- **Accept**: application/vnd.mx.api.v1+json
25042505

25052506

2507+
## list_holdings_by_account
2508+
2509+
> <HoldingsResponseBody> list_holdings_by_account(account_guid, user_guid, opts)
2510+
2511+
List holdings by account
2512+
2513+
This endpoint returns all holdings associated with the specified `account`.
2514+
2515+
### Examples
2516+
2517+
```ruby
2518+
require 'time'
2519+
require 'mx-platform-ruby'
2520+
# setup authorization
2521+
MxPlatformRuby.configure do |config|
2522+
# Configure HTTP basic authorization: basicAuth
2523+
config.username = 'YOUR USERNAME'
2524+
config.password = 'YOUR PASSWORD'
2525+
end
2526+
2527+
api_instance = MxPlatformRuby::MxPlatformApi.new
2528+
account_guid = 'ACT-7c6f361b-e582-15b6-60c0-358f12466b4b' # String | The unique id for the `account`.
2529+
user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for the `user`.
2530+
opts = {
2531+
from_date: '2015-09-20', # String | Filter holdings from this date.
2532+
page: 1, # Integer | Specify current page.
2533+
records_per_page: 10, # Integer | Specify records per page.
2534+
to_date: '2019-10-20' # String | Filter holdings to this date.
2535+
}
2536+
2537+
begin
2538+
# List holdings by account
2539+
result = api_instance.list_holdings_by_account(account_guid, user_guid, opts)
2540+
p result
2541+
rescue MxPlatformRuby::ApiError => e
2542+
puts "Error when calling MxPlatformApi->list_holdings_by_account: #{e}"
2543+
end
2544+
```
2545+
2546+
#### Using the list_holdings_by_account_with_http_info variant
2547+
2548+
This returns an Array which contains the response data, status code and headers.
2549+
2550+
> <Array(<HoldingsResponseBody>, Integer, Hash)> list_holdings_by_account_with_http_info(account_guid, user_guid, opts)
2551+
2552+
```ruby
2553+
begin
2554+
# List holdings by account
2555+
data, status_code, headers = api_instance.list_holdings_by_account_with_http_info(account_guid, user_guid, opts)
2556+
p status_code # => 2xx
2557+
p headers # => { ... }
2558+
p data # => <HoldingsResponseBody>
2559+
rescue MxPlatformRuby::ApiError => e
2560+
puts "Error when calling MxPlatformApi->list_holdings_by_account_with_http_info: #{e}"
2561+
end
2562+
```
2563+
2564+
### Parameters
2565+
2566+
| Name | Type | Description | Notes |
2567+
| ---- | ---- | ----------- | ----- |
2568+
| **account_guid** | **String** | The unique id for the &#x60;account&#x60;. | |
2569+
| **user_guid** | **String** | The unique id for the &#x60;user&#x60;. | |
2570+
| **from_date** | **String** | Filter holdings from this date. | [optional] |
2571+
| **page** | **Integer** | Specify current page. | [optional] |
2572+
| **records_per_page** | **Integer** | Specify records per page. | [optional] |
2573+
| **to_date** | **String** | Filter holdings to this date. | [optional] |
2574+
2575+
### Return type
2576+
2577+
[**HoldingsResponseBody**](HoldingsResponseBody.md)
2578+
2579+
### Authorization
2580+
2581+
[basicAuth](../README.md#basicAuth)
2582+
2583+
### HTTP request headers
2584+
2585+
- **Content-Type**: Not defined
2586+
- **Accept**: application/vnd.mx.api.v1+json
2587+
2588+
25062589
## list_holdings_by_member
25072590

25082591
> <HoldingsResponseBody> list_holdings_by_member(member_guid, user_guid, opts)

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

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,6 +2352,87 @@ def list_holdings_with_http_info(user_guid, opts = {})
23522352
return data, status_code, headers
23532353
end
23542354

2355+
# List holdings by account
2356+
# This endpoint returns all holdings associated with the specified `account`.
2357+
# @param account_guid [String] The unique id for the &#x60;account&#x60;.
2358+
# @param user_guid [String] The unique id for the &#x60;user&#x60;.
2359+
# @param [Hash] opts the optional parameters
2360+
# @option opts [String] :from_date Filter holdings from this date.
2361+
# @option opts [Integer] :page Specify current page.
2362+
# @option opts [Integer] :records_per_page Specify records per page.
2363+
# @option opts [String] :to_date Filter holdings to this date.
2364+
# @return [HoldingsResponseBody]
2365+
def list_holdings_by_account(account_guid, user_guid, opts = {})
2366+
data, _status_code, _headers = list_holdings_by_account_with_http_info(account_guid, user_guid, opts)
2367+
data
2368+
end
2369+
2370+
# List holdings by account
2371+
# This endpoint returns all holdings associated with the specified &#x60;account&#x60;.
2372+
# @param account_guid [String] The unique id for the &#x60;account&#x60;.
2373+
# @param user_guid [String] The unique id for the &#x60;user&#x60;.
2374+
# @param [Hash] opts the optional parameters
2375+
# @option opts [String] :from_date Filter holdings from this date.
2376+
# @option opts [Integer] :page Specify current page.
2377+
# @option opts [Integer] :records_per_page Specify records per page.
2378+
# @option opts [String] :to_date Filter holdings to this date.
2379+
# @return [Array<(HoldingsResponseBody, Integer, Hash)>] HoldingsResponseBody data, response status code and response headers
2380+
def list_holdings_by_account_with_http_info(account_guid, user_guid, opts = {})
2381+
if @api_client.config.debugging
2382+
@api_client.config.logger.debug 'Calling API: MxPlatformApi.list_holdings_by_account ...'
2383+
end
2384+
# verify the required parameter 'account_guid' is set
2385+
if @api_client.config.client_side_validation && account_guid.nil?
2386+
fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.list_holdings_by_account"
2387+
end
2388+
# verify the required parameter 'user_guid' is set
2389+
if @api_client.config.client_side_validation && user_guid.nil?
2390+
fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.list_holdings_by_account"
2391+
end
2392+
# resource path
2393+
local_var_path = '/users/{user_guid}/accounts/{account_guid}/holdings'.sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
2394+
2395+
# query parameters
2396+
query_params = opts[:query_params] || {}
2397+
query_params[:'from_date'] = opts[:'from_date'] if !opts[:'from_date'].nil?
2398+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2399+
query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil?
2400+
query_params[:'to_date'] = opts[:'to_date'] if !opts[:'to_date'].nil?
2401+
2402+
# header parameters
2403+
header_params = opts[:header_params] || {}
2404+
# HTTP header 'Accept' (if needed)
2405+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
2406+
2407+
# form parameters
2408+
form_params = opts[:form_params] || {}
2409+
2410+
# http body (model)
2411+
post_body = opts[:debug_body]
2412+
2413+
# return_type
2414+
return_type = opts[:debug_return_type] || 'HoldingsResponseBody'
2415+
2416+
# auth_names
2417+
auth_names = opts[:debug_auth_names] || ['basicAuth']
2418+
2419+
new_options = opts.merge(
2420+
:operation => :"MxPlatformApi.list_holdings_by_account",
2421+
:header_params => header_params,
2422+
:query_params => query_params,
2423+
:form_params => form_params,
2424+
:body => post_body,
2425+
:auth_names => auth_names,
2426+
:return_type => return_type
2427+
)
2428+
2429+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2430+
if @api_client.config.debugging
2431+
@api_client.config.logger.debug "API called: MxPlatformApi#list_holdings_by_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2432+
end
2433+
return data, status_code, headers
2434+
end
2435+
23552436
# List holdings by member
23562437
# This endpoint returns all holdings associated with the specified `member` across all accounts.
23572438
# @param member_guid [String] The unique id for a &#x60;member&#x60;.

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.8.3'
14+
VERSION = '0.8.4'
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.8.3
9+
gemVersion: 0.8.4
1010
library: faraday
1111
moduleName: MxPlatformRuby

spec/api/mx_platform_api_spec.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,23 @@
474474
end
475475
end
476476

477+
# unit tests for list_holdings_by_account
478+
# List holdings by account
479+
# This endpoint returns all holdings associated with the specified &#x60;account&#x60;.
480+
# @param account_guid The unique id for the &#x60;account&#x60;.
481+
# @param user_guid The unique id for the &#x60;user&#x60;.
482+
# @param [Hash] opts the optional parameters
483+
# @option opts [String] :from_date Filter holdings from this date.
484+
# @option opts [Integer] :page Specify current page.
485+
# @option opts [Integer] :records_per_page Specify records per page.
486+
# @option opts [String] :to_date Filter holdings to this date.
487+
# @return [HoldingsResponseBody]
488+
describe 'list_holdings_by_account test' do
489+
it 'should work' do
490+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
491+
end
492+
end
493+
477494
# unit tests for list_holdings_by_member
478495
# List holdings by member
479496
# This endpoint returns all holdings associated with the specified &#x60;member&#x60; across all accounts.

0 commit comments

Comments
 (0)