diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 3f4c7cf..b3735de 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -1,3 +1,3 @@ -git_push.sh .rubocop.yml .travis.yml +git_push.sh diff --git a/README.md b/README.md index a42180d..d411eb9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +*This project is currently in **Beta**. Please open up an issue [here](https://github.com/mxenabled/mx-platform-ruby/issues) to report issues using the MX Platform API Ruby Library.* + # mx-platform-ruby MxPlatformRuby - the Ruby gem for the MX Platform API @@ -6,257 +8,62 @@ The MX Platform API is a powerful, fully-featured API designed to make aggregati This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 0.1.0 -- Package version: 0.3.1 -- Build package: org.openapitools.codegen.languages.RubyClientCodegen -For more information, please visit [https://www.mx.com/products/platform-api](https://www.mx.com/products/platform-api) +- Package version: 0.3.2 ## Installation -### Build a gem - -To build the Ruby code into a gem: +Add this line to your application's Gemfile: -```shell -gem build mx-platform-ruby.gemspec +```ruby +gem 'mx-platform-ruby' ``` -Then either install the gem locally: - +And then execute: ```shell -gem install ./mx-platform-ruby-0.3.1.gem +$ bundle ``` -(for development, run `gem install --dev ./mx-platform-ruby-0.3.1.gem` to install the development dependencies) - -or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). - -Finally add this to the Gemfile: - - gem 'mx-platform-ruby', '~> 0.3.1' - -### Install from Git - -If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile: - - gem 'mx-platform-ruby', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git' - -### Include the Ruby code directly - -Include the Ruby code directly using `-I` as follows: - +Or install it yourself with: ```shell -ruby -Ilib script.rb +$ gem install mx-platform-ruby ``` ## Getting Started +In order to make requests, you will need to [sign up](https://dashboard.mx.com/sign_up) for the MX Platform API and get a `Client ID` and `API Key`. + Please follow the [installation](#installation) procedure and then run the following code: ```ruby # Load the gem require 'mx-platform-ruby' -# Setup authorization +# setup authorization MxPlatformRuby.configure do |config| - # Configure HTTP basic authorization: basicAuth - config.username = 'YOUR_USERNAME' - config.password = 'YOUR_PASSWORD' + # Configure HTTP basic authorization + config.username = 'Your Client ID from https://dashboard.mx.com' + config.password = 'Your API Key from https://dashboard.mx.com' + + # Configure server. 0 for production, 1 for development + config.server_index = 1 end api_instance = MxPlatformRuby::MxPlatformApi.new -member_guid = 'MBR-7c6f361b-e582-15b6-60c0-358f12466b4b' # String | The unique id for a `member`. -user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for a `user`. +user_create_request_body = MxPlatformRuby::UserCreateRequestBody.new( + user: MxPlatformRuby::UserCreateRequest.new( + metadata: "Creating a user!" + ) +) begin - #Aggregate member - result = api_instance.aggregate_member(member_guid, user_guid) + # Create user + result = api_instance.create_user(user_create_request_body) p result rescue MxPlatformRuby::ApiError => e - puts "Exception when calling MxPlatformApi->aggregate_member: #{e}" + puts "Error when calling MxPlatformApi->create_user: #{e}" end - ``` -## Documentation for API Endpoints - -All URIs are relative to *https://api.mx.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*MxPlatformRuby::MxPlatformApi* | [**aggregate_member**](docs/MxPlatformApi.md#aggregate_member) | **POST** /users/{user_guid}/members/{member_guid}/aggregate | Aggregate member -*MxPlatformRuby::MxPlatformApi* | [**check_balances**](docs/MxPlatformApi.md#check_balances) | **POST** /users/{user_guid}/members/{member_guid}/check_balance | Check balances -*MxPlatformRuby::MxPlatformApi* | [**create_category**](docs/MxPlatformApi.md#create_category) | **POST** /users/{user_guid}/categories | Create category -*MxPlatformRuby::MxPlatformApi* | [**create_member**](docs/MxPlatformApi.md#create_member) | **POST** /users/{user_guid}/members | Create member -*MxPlatformRuby::MxPlatformApi* | [**create_tag**](docs/MxPlatformApi.md#create_tag) | **POST** /users/{user_guid}/tags | Create tag -*MxPlatformRuby::MxPlatformApi* | [**create_tagging**](docs/MxPlatformApi.md#create_tagging) | **POST** /users/{user_guid}/taggings | Create tagging -*MxPlatformRuby::MxPlatformApi* | [**create_transaction_rule**](docs/MxPlatformApi.md#create_transaction_rule) | **POST** /users/{user_guid}/transaction_rules | Create transaction rule -*MxPlatformRuby::MxPlatformApi* | [**create_user**](docs/MxPlatformApi.md#create_user) | **POST** /users | Create user -*MxPlatformRuby::MxPlatformApi* | [**delete_category**](docs/MxPlatformApi.md#delete_category) | **DELETE** /users/{user_guid}/categories/{category_guid} | Delete category -*MxPlatformRuby::MxPlatformApi* | [**delete_member**](docs/MxPlatformApi.md#delete_member) | **DELETE** /users/{user_guid}/members/{member_guid} | Delete member -*MxPlatformRuby::MxPlatformApi* | [**delete_tag**](docs/MxPlatformApi.md#delete_tag) | **DELETE** /users/{user_guid}/tags/{tag_guid} | Delete tag -*MxPlatformRuby::MxPlatformApi* | [**delete_tagging**](docs/MxPlatformApi.md#delete_tagging) | **DELETE** /users/{user_guid}/taggings/{tagging_guid} | Delete tagging -*MxPlatformRuby::MxPlatformApi* | [**delete_transaction_rule**](docs/MxPlatformApi.md#delete_transaction_rule) | **DELETE** /users/{user_guid}/transaction_rules/{transaction_rule_guid} | Delete transaction rule -*MxPlatformRuby::MxPlatformApi* | [**delete_user**](docs/MxPlatformApi.md#delete_user) | **DELETE** /users/{user_guid} | Delete user -*MxPlatformRuby::MxPlatformApi* | [**download_statement_pdf**](docs/MxPlatformApi.md#download_statement_pdf) | **GET** /users/{user_guid}/members/{member_guid}/statements/{statement_guid}.pdf | Download statement pdf -*MxPlatformRuby::MxPlatformApi* | [**enhance_transactions**](docs/MxPlatformApi.md#enhance_transactions) | **POST** /transactions/enhance | Enhance transactions -*MxPlatformRuby::MxPlatformApi* | [**extend_history**](docs/MxPlatformApi.md#extend_history) | **POST** /users/{user_guid}/members/{member_guid}/extend_history | Extend history -*MxPlatformRuby::MxPlatformApi* | [**fetch_statements**](docs/MxPlatformApi.md#fetch_statements) | **POST** /users/{user_guid}/members/{member_guid}/fetch_statements | Fetch statements -*MxPlatformRuby::MxPlatformApi* | [**identify_member**](docs/MxPlatformApi.md#identify_member) | **POST** /users/{user_guid}/members/{member_guid}/identify | Identify member -*MxPlatformRuby::MxPlatformApi* | [**list_account_numbers_by_account**](docs/MxPlatformApi.md#list_account_numbers_by_account) | **GET** /users/{user_guid}/accounts/{account_guid}/account_numbers | List account numbers by account -*MxPlatformRuby::MxPlatformApi* | [**list_account_numbers_by_member**](docs/MxPlatformApi.md#list_account_numbers_by_member) | **GET** /users/{user_guid}/members/{member_guid}/account_numbers | List account numbers by member -*MxPlatformRuby::MxPlatformApi* | [**list_account_owners_by_member**](docs/MxPlatformApi.md#list_account_owners_by_member) | **GET** /users/{user_guid}/members/{member_guid}/account_owners | List account owners by member -*MxPlatformRuby::MxPlatformApi* | [**list_categories**](docs/MxPlatformApi.md#list_categories) | **GET** /users/{user_guid}/categories | List categories -*MxPlatformRuby::MxPlatformApi* | [**list_default_categories**](docs/MxPlatformApi.md#list_default_categories) | **GET** /users/{user_guid}/categories/default | List default categories -*MxPlatformRuby::MxPlatformApi* | [**list_favorite_institutions**](docs/MxPlatformApi.md#list_favorite_institutions) | **GET** /institutions/favorites | List favorite institutions -*MxPlatformRuby::MxPlatformApi* | [**list_holdings**](docs/MxPlatformApi.md#list_holdings) | **GET** /users/{user_guid}/holdings | List holdings -*MxPlatformRuby::MxPlatformApi* | [**list_holdings_by_member**](docs/MxPlatformApi.md#list_holdings_by_member) | **GET** /users/{user_guid}/members/{member_guid}/holdings | List holdings by member -*MxPlatformRuby::MxPlatformApi* | [**list_institution_credentials**](docs/MxPlatformApi.md#list_institution_credentials) | **GET** /institutions/{institution_code}/credentials | List institution credentials -*MxPlatformRuby::MxPlatformApi* | [**list_institutions**](docs/MxPlatformApi.md#list_institutions) | **GET** /institutions | List institutions -*MxPlatformRuby::MxPlatformApi* | [**list_member_challenges**](docs/MxPlatformApi.md#list_member_challenges) | **GET** /users/{user_guid}/members/{member_guid}/challenges | List member challenges -*MxPlatformRuby::MxPlatformApi* | [**list_member_credentials**](docs/MxPlatformApi.md#list_member_credentials) | **GET** /users/{user_guid}/members/{member_guid}/credentials | List member credentials -*MxPlatformRuby::MxPlatformApi* | [**list_members**](docs/MxPlatformApi.md#list_members) | **GET** /users/{user_guid}/members | List members -*MxPlatformRuby::MxPlatformApi* | [**list_merchants**](docs/MxPlatformApi.md#list_merchants) | **GET** /merchants | List merchants -*MxPlatformRuby::MxPlatformApi* | [**list_statements_by_member**](docs/MxPlatformApi.md#list_statements_by_member) | **GET** /users/{user_guid}/members/{member_guid}/statements | List statements by member -*MxPlatformRuby::MxPlatformApi* | [**list_taggings**](docs/MxPlatformApi.md#list_taggings) | **GET** /users/{user_guid}/taggings | List taggings -*MxPlatformRuby::MxPlatformApi* | [**list_tags**](docs/MxPlatformApi.md#list_tags) | **GET** /users/{user_guid}/tags | List tags -*MxPlatformRuby::MxPlatformApi* | [**list_transaction_rules**](docs/MxPlatformApi.md#list_transaction_rules) | **GET** /users/{user_guid}/transaction_rules | List transaction rules -*MxPlatformRuby::MxPlatformApi* | [**list_transactions**](docs/MxPlatformApi.md#list_transactions) | **GET** /users/{user_guid}/transactions | List transactions -*MxPlatformRuby::MxPlatformApi* | [**list_transactions_by_account**](docs/MxPlatformApi.md#list_transactions_by_account) | **GET** /users/{user_guid}/accounts/{account_guid}/transactions | List transactions by account -*MxPlatformRuby::MxPlatformApi* | [**list_transactions_by_member**](docs/MxPlatformApi.md#list_transactions_by_member) | **GET** /users/{user_guid}/members/{member_guid}/transactions | List transactions by member -*MxPlatformRuby::MxPlatformApi* | [**list_transactions_by_tag**](docs/MxPlatformApi.md#list_transactions_by_tag) | **GET** /users/{user_guid}/tags/{tag_guid}/transactions | List transactions by tag -*MxPlatformRuby::MxPlatformApi* | [**list_user_accounts**](docs/MxPlatformApi.md#list_user_accounts) | **GET** /users/{user_guid}/accounts | List accounts -*MxPlatformRuby::MxPlatformApi* | [**list_users**](docs/MxPlatformApi.md#list_users) | **GET** /users | List users -*MxPlatformRuby::MxPlatformApi* | [**read_account**](docs/MxPlatformApi.md#read_account) | **GET** /users/{user_guid}/accounts/{account_guid} | Read account -*MxPlatformRuby::MxPlatformApi* | [**read_category**](docs/MxPlatformApi.md#read_category) | **GET** /users/{user_guid}/categories/{category_guid} | Read category -*MxPlatformRuby::MxPlatformApi* | [**read_holding**](docs/MxPlatformApi.md#read_holding) | **GET** /users/{user_guid}/holdings/{holding_guid} | Read holding -*MxPlatformRuby::MxPlatformApi* | [**read_institution**](docs/MxPlatformApi.md#read_institution) | **GET** /institutions/{institution_code} | Read institution -*MxPlatformRuby::MxPlatformApi* | [**read_member**](docs/MxPlatformApi.md#read_member) | **GET** /users/{user_guid}/members/{member_guid} | Read member -*MxPlatformRuby::MxPlatformApi* | [**read_member_status**](docs/MxPlatformApi.md#read_member_status) | **GET** /users/{user_guid}/members/{member_guid}/status | Read member status -*MxPlatformRuby::MxPlatformApi* | [**read_merchant**](docs/MxPlatformApi.md#read_merchant) | **GET** /merchants/{merchant_guid} | Read merchant -*MxPlatformRuby::MxPlatformApi* | [**read_statement_by_member**](docs/MxPlatformApi.md#read_statement_by_member) | **GET** /users/{user_guid}/members/{member_guid}/statements/{statement_guid} | Read statement by member -*MxPlatformRuby::MxPlatformApi* | [**read_tag**](docs/MxPlatformApi.md#read_tag) | **GET** /users/{user_guid}/tags/{tag_guid} | Read tag -*MxPlatformRuby::MxPlatformApi* | [**read_tagging**](docs/MxPlatformApi.md#read_tagging) | **GET** /users/{user_guid}/taggings/{tagging_guid} | Read tagging -*MxPlatformRuby::MxPlatformApi* | [**read_transaction**](docs/MxPlatformApi.md#read_transaction) | **GET** /users/{user_guid}/transactions/{transaction_guid} | Read transaction -*MxPlatformRuby::MxPlatformApi* | [**read_transaction_rule**](docs/MxPlatformApi.md#read_transaction_rule) | **GET** /users/{user_guid}/transaction_rules/{transaction_rule_guid} | Read transaction rule -*MxPlatformRuby::MxPlatformApi* | [**read_user**](docs/MxPlatformApi.md#read_user) | **GET** /users/{user_guid} | Read user -*MxPlatformRuby::MxPlatformApi* | [**request_connect_widget_url**](docs/MxPlatformApi.md#request_connect_widget_url) | **POST** /users/{user_guid}/connect_widget_url | Request connect widget url -*MxPlatformRuby::MxPlatformApi* | [**request_o_auth_window_uri**](docs/MxPlatformApi.md#request_o_auth_window_uri) | **GET** /users/{user_guid}/members/{member_guid}/oauth_window_uri | Request oauth window uri -*MxPlatformRuby::MxPlatformApi* | [**request_widget_url**](docs/MxPlatformApi.md#request_widget_url) | **POST** /users/{user_guid}/widget_urls | Request widget url -*MxPlatformRuby::MxPlatformApi* | [**resume_aggregation**](docs/MxPlatformApi.md#resume_aggregation) | **PUT** /users/{user_guid}/members/{member_guid}/resume | Resume aggregation -*MxPlatformRuby::MxPlatformApi* | [**update_account_by_member**](docs/MxPlatformApi.md#update_account_by_member) | **PUT** /users/{user_guid}/members/{member_guid}/accounts/{account_guid} | Update account by member -*MxPlatformRuby::MxPlatformApi* | [**update_category**](docs/MxPlatformApi.md#update_category) | **PUT** /users/{user_guid}/categories/{category_guid} | Update category -*MxPlatformRuby::MxPlatformApi* | [**update_member**](docs/MxPlatformApi.md#update_member) | **PUT** /users/{user_guid}/members/{member_guid} | Update member -*MxPlatformRuby::MxPlatformApi* | [**update_tag**](docs/MxPlatformApi.md#update_tag) | **PUT** /users/{user_guid}/tags/{tag_guid} | Update tag -*MxPlatformRuby::MxPlatformApi* | [**update_tagging**](docs/MxPlatformApi.md#update_tagging) | **PUT** /users/{user_guid}/taggings/{tagging_guid} | Update tagging -*MxPlatformRuby::MxPlatformApi* | [**update_transaction**](docs/MxPlatformApi.md#update_transaction) | **PUT** /users/{user_guid}/transactions/{transaction_guid} | Update transaction -*MxPlatformRuby::MxPlatformApi* | [**update_transaction_rule**](docs/MxPlatformApi.md#update_transaction_rule) | **PUT** /users/{user_guid}/transaction_rules/{transaction_rule_guid} | Update transaction_rule -*MxPlatformRuby::MxPlatformApi* | [**update_user**](docs/MxPlatformApi.md#update_user) | **PUT** /users/{user_guid} | Update user -*MxPlatformRuby::MxPlatformApi* | [**verify_member**](docs/MxPlatformApi.md#verify_member) | **POST** /users/{user_guid}/members/{member_guid}/verify | Verify member - - -## Documentation for Models - - - [MxPlatformRuby::AccountNumberResponse](docs/AccountNumberResponse.md) - - [MxPlatformRuby::AccountNumbersResponseBody](docs/AccountNumbersResponseBody.md) - - [MxPlatformRuby::AccountOwnerResponse](docs/AccountOwnerResponse.md) - - [MxPlatformRuby::AccountOwnersResponseBody](docs/AccountOwnersResponseBody.md) - - [MxPlatformRuby::AccountResponse](docs/AccountResponse.md) - - [MxPlatformRuby::AccountResponseBody](docs/AccountResponseBody.md) - - [MxPlatformRuby::AccountUpdateRequest](docs/AccountUpdateRequest.md) - - [MxPlatformRuby::AccountUpdateRequestBody](docs/AccountUpdateRequestBody.md) - - [MxPlatformRuby::AccountsResponseBody](docs/AccountsResponseBody.md) - - [MxPlatformRuby::CategoriesResponseBody](docs/CategoriesResponseBody.md) - - [MxPlatformRuby::CategoryCreateRequest](docs/CategoryCreateRequest.md) - - [MxPlatformRuby::CategoryCreateRequestBody](docs/CategoryCreateRequestBody.md) - - [MxPlatformRuby::CategoryResponse](docs/CategoryResponse.md) - - [MxPlatformRuby::CategoryResponseBody](docs/CategoryResponseBody.md) - - [MxPlatformRuby::CategoryUpdateRequest](docs/CategoryUpdateRequest.md) - - [MxPlatformRuby::CategoryUpdateRequestBody](docs/CategoryUpdateRequestBody.md) - - [MxPlatformRuby::ChallengeResponse](docs/ChallengeResponse.md) - - [MxPlatformRuby::ChallengeResponseImageOptions](docs/ChallengeResponseImageOptions.md) - - [MxPlatformRuby::ChallengeResponseOptions](docs/ChallengeResponseOptions.md) - - [MxPlatformRuby::ChallengesResponseBody](docs/ChallengesResponseBody.md) - - [MxPlatformRuby::ConnectWidgetRequest](docs/ConnectWidgetRequest.md) - - [MxPlatformRuby::ConnectWidgetRequestBody](docs/ConnectWidgetRequestBody.md) - - [MxPlatformRuby::ConnectWidgetResponse](docs/ConnectWidgetResponse.md) - - [MxPlatformRuby::ConnectWidgetResponseBody](docs/ConnectWidgetResponseBody.md) - - [MxPlatformRuby::CredentialRequest](docs/CredentialRequest.md) - - [MxPlatformRuby::CredentialResponse](docs/CredentialResponse.md) - - [MxPlatformRuby::CredentialsResponseBody](docs/CredentialsResponseBody.md) - - [MxPlatformRuby::EnhanceTransactionResponse](docs/EnhanceTransactionResponse.md) - - [MxPlatformRuby::EnhanceTransactionsRequest](docs/EnhanceTransactionsRequest.md) - - [MxPlatformRuby::EnhanceTransactionsRequestBody](docs/EnhanceTransactionsRequestBody.md) - - [MxPlatformRuby::EnhanceTransactionsResponseBody](docs/EnhanceTransactionsResponseBody.md) - - [MxPlatformRuby::HoldingResponse](docs/HoldingResponse.md) - - [MxPlatformRuby::HoldingResponseBody](docs/HoldingResponseBody.md) - - [MxPlatformRuby::HoldingsResponseBody](docs/HoldingsResponseBody.md) - - [MxPlatformRuby::InstitutionResponse](docs/InstitutionResponse.md) - - [MxPlatformRuby::InstitutionResponseBody](docs/InstitutionResponseBody.md) - - [MxPlatformRuby::InstitutionsResponseBody](docs/InstitutionsResponseBody.md) - - [MxPlatformRuby::MemberCreateRequest](docs/MemberCreateRequest.md) - - [MxPlatformRuby::MemberCreateRequestBody](docs/MemberCreateRequestBody.md) - - [MxPlatformRuby::MemberResponse](docs/MemberResponse.md) - - [MxPlatformRuby::MemberResponseBody](docs/MemberResponseBody.md) - - [MxPlatformRuby::MemberResumeRequest](docs/MemberResumeRequest.md) - - [MxPlatformRuby::MemberResumeRequestBody](docs/MemberResumeRequestBody.md) - - [MxPlatformRuby::MemberStatusResponse](docs/MemberStatusResponse.md) - - [MxPlatformRuby::MemberStatusResponseBody](docs/MemberStatusResponseBody.md) - - [MxPlatformRuby::MemberUpdateRequest](docs/MemberUpdateRequest.md) - - [MxPlatformRuby::MemberUpdateRequestBody](docs/MemberUpdateRequestBody.md) - - [MxPlatformRuby::MembersResponseBody](docs/MembersResponseBody.md) - - [MxPlatformRuby::MerchantResponse](docs/MerchantResponse.md) - - [MxPlatformRuby::MerchantResponseBody](docs/MerchantResponseBody.md) - - [MxPlatformRuby::MerchantsResponseBody](docs/MerchantsResponseBody.md) - - [MxPlatformRuby::OAuthWindowResponse](docs/OAuthWindowResponse.md) - - [MxPlatformRuby::OAuthWindowResponseBody](docs/OAuthWindowResponseBody.md) - - [MxPlatformRuby::PaginationResponse](docs/PaginationResponse.md) - - [MxPlatformRuby::StatementResponse](docs/StatementResponse.md) - - [MxPlatformRuby::StatementResponseBody](docs/StatementResponseBody.md) - - [MxPlatformRuby::StatementsResponseBody](docs/StatementsResponseBody.md) - - [MxPlatformRuby::TagCreateRequest](docs/TagCreateRequest.md) - - [MxPlatformRuby::TagCreateRequestBody](docs/TagCreateRequestBody.md) - - [MxPlatformRuby::TagResponse](docs/TagResponse.md) - - [MxPlatformRuby::TagResponseBody](docs/TagResponseBody.md) - - [MxPlatformRuby::TagUpdateRequest](docs/TagUpdateRequest.md) - - [MxPlatformRuby::TagUpdateRequestBody](docs/TagUpdateRequestBody.md) - - [MxPlatformRuby::TaggingCreateRequest](docs/TaggingCreateRequest.md) - - [MxPlatformRuby::TaggingCreateRequestBody](docs/TaggingCreateRequestBody.md) - - [MxPlatformRuby::TaggingResponse](docs/TaggingResponse.md) - - [MxPlatformRuby::TaggingResponseBody](docs/TaggingResponseBody.md) - - [MxPlatformRuby::TaggingUpdateRequest](docs/TaggingUpdateRequest.md) - - [MxPlatformRuby::TaggingUpdateRequestBody](docs/TaggingUpdateRequestBody.md) - - [MxPlatformRuby::TaggingsResponseBody](docs/TaggingsResponseBody.md) - - [MxPlatformRuby::TagsResponseBody](docs/TagsResponseBody.md) - - [MxPlatformRuby::TransactionResponse](docs/TransactionResponse.md) - - [MxPlatformRuby::TransactionResponseBody](docs/TransactionResponseBody.md) - - [MxPlatformRuby::TransactionRuleCreateRequest](docs/TransactionRuleCreateRequest.md) - - [MxPlatformRuby::TransactionRuleCreateRequestBody](docs/TransactionRuleCreateRequestBody.md) - - [MxPlatformRuby::TransactionRuleResponse](docs/TransactionRuleResponse.md) - - [MxPlatformRuby::TransactionRuleResponseBody](docs/TransactionRuleResponseBody.md) - - [MxPlatformRuby::TransactionRuleUpdateRequest](docs/TransactionRuleUpdateRequest.md) - - [MxPlatformRuby::TransactionRuleUpdateRequestBody](docs/TransactionRuleUpdateRequestBody.md) - - [MxPlatformRuby::TransactionRulesResponseBody](docs/TransactionRulesResponseBody.md) - - [MxPlatformRuby::TransactionUpdateRequest](docs/TransactionUpdateRequest.md) - - [MxPlatformRuby::TransactionUpdateRequestBody](docs/TransactionUpdateRequestBody.md) - - [MxPlatformRuby::TransactionsResponseBody](docs/TransactionsResponseBody.md) - - [MxPlatformRuby::UserCreateRequest](docs/UserCreateRequest.md) - - [MxPlatformRuby::UserCreateRequestBody](docs/UserCreateRequestBody.md) - - [MxPlatformRuby::UserResponse](docs/UserResponse.md) - - [MxPlatformRuby::UserResponseBody](docs/UserResponseBody.md) - - [MxPlatformRuby::UserUpdateRequest](docs/UserUpdateRequest.md) - - [MxPlatformRuby::UserUpdateRequestBody](docs/UserUpdateRequestBody.md) - - [MxPlatformRuby::UsersResponseBody](docs/UsersResponseBody.md) - - [MxPlatformRuby::WidgetRequest](docs/WidgetRequest.md) - - [MxPlatformRuby::WidgetRequestBody](docs/WidgetRequestBody.md) - - [MxPlatformRuby::WidgetResponse](docs/WidgetResponse.md) - - [MxPlatformRuby::WidgetResponseBody](docs/WidgetResponseBody.md) - - -## Documentation for Authorization - - -### basicAuth - -- **Type**: HTTP basic authentication +## Documentation +Additional examples for the API endpoints can be found [here](docs/MxPlatformApi.md). diff --git a/lib/mx-platform-ruby/version.rb b/lib/mx-platform-ruby/version.rb index 9c64663..9ef6f41 100644 --- a/lib/mx-platform-ruby/version.rb +++ b/lib/mx-platform-ruby/version.rb @@ -11,5 +11,5 @@ =end module MxPlatformRuby - VERSION = '0.3.1' + VERSION = '0.3.2' end diff --git a/openapi/config.yml b/openapi/config.yml index 62c0e25..49f33ac 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.3.1" +gemVersion: "0.3.2" library: "faraday" moduleName: "MxPlatformRuby" diff --git a/openapi/templates/README.mustache b/openapi/templates/README.mustache new file mode 100644 index 0000000..322af1a --- /dev/null +++ b/openapi/templates/README.mustache @@ -0,0 +1,71 @@ +*This project is currently in **Beta**. Please open up an issue [here](https://github.com/mxenabled/mx-platform-ruby/issues) to report issues using the MX Platform API Ruby Library.* + +# {{gemName}} + +{{moduleName}} - the Ruby gem for the {{appName}} + +{{#appDescriptionWithNewLines}} +{{{.}}} +{{/appDescriptionWithNewLines}} + +This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- Package version: {{gemVersion}} + +## Installation + +Add this line to your application's Gemfile: + +```ruby +gem 'mx-platform-ruby' +``` + +And then execute: +```shell +$ bundle +``` + +Or install it yourself with: +```shell +$ gem install mx-platform-ruby +``` + +## Getting Started + +In order to make requests, you will need to [sign up](https://dashboard.mx.com/sign_up) for the MX Platform API and get a `Client ID` and `API Key`. + +Please follow the [installation](#installation) procedure and then run the following code: + +```ruby +# Load the gem +require 'mx-platform-ruby' + +# setup authorization +MxPlatformRuby.configure do |config| + # Configure HTTP basic authorization + config.username = 'Your Client ID from https://dashboard.mx.com' + config.password = 'Your API Key from https://dashboard.mx.com' + + # Configure server. 0 for production, 1 for development + config.server_index = 1 +end + +api_instance = MxPlatformRuby::MxPlatformApi.new +user_create_request_body = MxPlatformRuby::UserCreateRequestBody.new( + user: MxPlatformRuby::UserCreateRequest.new( + metadata: "Creating a user!" + ) +) + +begin + # Create user + result = api_instance.create_user(user_create_request_body) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->create_user: #{e}" +end +``` + +## Documentation + +Additional examples for the API endpoints can be found [here](docs/MxPlatformApi.md).